grim/guifications3
Clone
Summary
Browse
Changes
Graph
bumped the glib dependency to >=2.26.0
2011-05-17, Gary Kramlich
2e22ea40b80f
bumped the glib dependency to >=2.26.0
added a dep on GIO
/*
* Guifications - The end-all, be-all notification framework
* Copyright (C) 2003-2009 Gary Kramlich <grim@reaperworld.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include
"gf_unix_utils.h"
#include
<gflib/gf_filesystem.h>
#include
<fcntl.h>
#include
<unistd.h>
gchar
*
gf_unix_get_socket_path
(
void
)
{
gchar
*
dir
=
NULL
,
*
path
=
NULL
;
dir
=
gf_fs_user_settings_dir
();
path
=
g_build_filename
(
dir
,
"gflib-unix"
,
NULL
);
g_free
(
dir
);
return
path
;
}
gboolean
gf_unix_fd_make_nonblocking
(
gint
fd
)
{
gint
flags
=
0
;
flags
=
fcntl
(
fd
,
F_GETFL
,
0
);
if
(
flags
==
-1
)
return
FALSE
;
flags
|=
O_NONBLOCK
;
flags
=
fcntl
(
fd
,
F_SETFL
,
flags
);
if
(
flags
==
-1
)
return
FALSE
;
return
TRUE
;
}