projects
/
platform
/
upstream
/
glib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang
[platform/upstream/glib.git]
/
glib
/
gpoll.h
diff --git
a/glib/gpoll.h
b/glib/gpoll.h
index
f28b758
..
f28e3c5
100644
(file)
--- a/
glib/gpoll.h
+++ b/
glib/gpoll.h
@@
-12,18
+12,16
@@
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
*/
+#ifndef __G_POLL_H__
+#define __G_POLL_H__
+
#if !defined (__GLIB_H_INSIDE__) && !defined (__G_MAIN_H__) && !defined (GLIB_COMPILATION)
#error "Only <glib.h> can be included directly."
#endif
#if !defined (__GLIB_H_INSIDE__) && !defined (__G_MAIN_H__) && !defined (GLIB_COMPILATION)
#error "Only <glib.h> can be included directly."
#endif
-#ifndef __G_POLL_H__
-#define __G_POLL_H__
-
#include <glib/gtypes.h>
G_BEGIN_DECLS
#include <glib/gtypes.h>
G_BEGIN_DECLS
@@
-40,7
+38,6
@@
G_BEGIN_DECLS
* in place of g_poll(). Thus g_poll() must have the same signature as
* poll(), meaning GPollFD must have the same layout as struct pollfd.
*
* in place of g_poll(). Thus g_poll() must have the same signature as
* poll(), meaning GPollFD must have the same layout as struct pollfd.
*
- *
* On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file
* descriptor as provided by the C runtime) that can be used by
* MsgWaitForMultipleObjects. This does *not* include file handles
* On Win32, the fd in a GPollFD should be Win32 HANDLE (*not* a file
* descriptor as provided by the C runtime) that can be used by
* MsgWaitForMultipleObjects. This does *not* include file handles
@@
-79,7
+76,7
@@
typedef gint (*GPollFunc) (GPollFD *ufds,
/**
* GPollFD:
/**
* GPollFD:
- * @fd: the file descriptor to poll (or a
<type>HANDLE</type>
on Win32)
+ * @fd: the file descriptor to poll (or a
HANDLE
on Win32)
* @events: a bitwise combination from #GIOCondition, specifying which
* events should be polled for. Typically for reading from a file
* descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and
* @events: a bitwise combination from #GIOCondition, specifying which
* events should be polled for. Typically for reading from a file
* descriptor you would use %G_IO_IN | %G_IO_HUP | %G_IO_ERR, and
@@
-93,7
+90,9
@@
typedef gint (*GPollFunc) (GPollFD *ufds,
struct _GPollFD
{
#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8
struct _GPollFD
{
#if defined (G_OS_WIN32) && GLIB_SIZEOF_VOID_P == 8
+#ifndef __GTK_DOC_IGNORE__
gint64 fd;
gint64 fd;
+#endif
#else
gint fd;
#endif
#else
gint fd;
#endif
@@
-101,6
+100,12
@@
struct _GPollFD
gushort revents;
};
gushort revents;
};
+/**
+ * G_POLLFD_FORMAT:
+ *
+ * A format specifier that can be used in printf()-style format strings
+ * when printing the @fd member of a #GPollFD.
+ */
#ifdef G_OS_WIN32
#if GLIB_SIZEOF_VOID_P == 8
#define G_POLLFD_FORMAT "%#I64x"
#ifdef G_OS_WIN32
#if GLIB_SIZEOF_VOID_P == 8
#define G_POLLFD_FORMAT "%#I64x"
@@
-111,9
+116,11
@@
struct _GPollFD
#define G_POLLFD_FORMAT "%d"
#endif
#define G_POLLFD_FORMAT "%d"
#endif
-gint g_poll (GPollFD *fds,
- guint nfds,
- gint timeout);
+GLIB_AVAILABLE_IN_ALL
+gint
+g_poll (GPollFD *fds,
+ guint nfds,
+ gint timeout);
G_END_DECLS
G_END_DECLS