mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-15 20:18:05 +02:00
fixed up sys/poll.h and sys/types.h inclusions.
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org> * fixed up sys/poll.h and sys/types.h inclusions.
This commit is contained in:
parent
c0c488e4ba
commit
e0153773a6
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
Sat Dec 19 04:27:17 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* fixed up sys/poll.h and sys/types.h inclusions.
|
||||||
|
|
||||||
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
Sat Dec 19 03:10:50 1998 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
* fixed up gthread includes, cleaned up glibconfig.h a little bit.
|
||||||
|
@ -17,6 +17,7 @@ INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
|
|||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
glib.m4 \
|
glib.m4 \
|
||||||
glib.spec \
|
glib.spec \
|
||||||
|
acglib.m4 \
|
||||||
sanity_check \
|
sanity_check \
|
||||||
README.win32 \
|
README.win32 \
|
||||||
glib.def \
|
glib.def \
|
||||||
@ -59,6 +60,8 @@ include_HEADERS = \
|
|||||||
configinclude_DATA = \
|
configinclude_DATA = \
|
||||||
glibconfig.h
|
glibconfig.h
|
||||||
|
|
||||||
|
configure: configure.in acglib.m4
|
||||||
|
|
||||||
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
||||||
glibconfig.h: stamp-gc-h
|
glibconfig.h: stamp-gc-h
|
||||||
@:
|
@:
|
||||||
|
28
acglib.m4
28
acglib.m4
@ -68,6 +68,7 @@ main()
|
|||||||
char *p = (char*) &tv;
|
char *p = (char*) &tv;
|
||||||
int i;
|
int i;
|
||||||
FILE *f=fopen("conftestval", "w");
|
FILE *f=fopen("conftestval", "w");
|
||||||
|
if (!f) exit(1);
|
||||||
for (i = 0; i < $4; i++)
|
for (i = 0; i < $4; i++)
|
||||||
fprintf(f, "%s%d", i?",":"", *(p++));
|
fprintf(f, "%s%d", i?",":"", *(p++));
|
||||||
fprintf(f, "\n");
|
fprintf(f, "\n");
|
||||||
@ -78,3 +79,30 @@ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
|
|||||||
undefine([AC_TYPE_NAME])dnl
|
undefine([AC_TYPE_NAME])dnl
|
||||||
undefine([AC_CV_NAME])dnl
|
undefine([AC_CV_NAME])dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
dnl GLIB_SYSDEFS (INCLUDES, DEFS_LIST, OFILE [, PREFIX])
|
||||||
|
AC_DEFUN(GLIB_SYSDEFS,
|
||||||
|
[glib_sysdefso="translit($3, [-_a-zA-Z0-9 *], [-_a-zA-Z0-9])"
|
||||||
|
AC_MSG_CHECKING(system definitions for $2)
|
||||||
|
cat >confrun.c <<_______EOF
|
||||||
|
#include <stdio.h>
|
||||||
|
$1
|
||||||
|
int main (int c, char **v) {
|
||||||
|
FILE *f = fopen ("$glib_sysdefso", "a");
|
||||||
|
if (!f) return 1;
|
||||||
|
_______EOF
|
||||||
|
for glib_sysdef in $2 ; do
|
||||||
|
echo "#ifdef $glib_sysdef" >>confrun.c
|
||||||
|
echo " fprintf (f, \"#define GLIB_SYSDEF_%s %s%d\\n\", \"$glib_sysdef\", \"$4\", $glib_sysdef);" >>confrun.c
|
||||||
|
echo "#else" >>confrun.c
|
||||||
|
echo " fprintf (f, \"#define GLIB_SYSDEF_%s\\n\", \"$glib_sysdef\");" >>confrun.c
|
||||||
|
echo "#endif" >>confrun.c
|
||||||
|
done
|
||||||
|
echo "return 0; }" >>confrun.c
|
||||||
|
AC_TRY_RUN(`cat confrun.c`, AC_MSG_RESULT(done),
|
||||||
|
for glib_sysdef in $2 ; do
|
||||||
|
echo "#define GLIB_SYSDEF_$glib_sysdef" >>$glib_sysdefso
|
||||||
|
done
|
||||||
|
AC_MSG_RESULT(failed),)
|
||||||
|
rm -f confrun.c
|
||||||
|
])
|
||||||
|
32
configure.in
32
configure.in
@ -9,6 +9,9 @@ AC_INIT(glist.c)
|
|||||||
# Save this value here, since automake will set cflags later
|
# Save this value here, since automake will set cflags later
|
||||||
cflags_set=${CFLAGS+set}
|
cflags_set=${CFLAGS+set}
|
||||||
|
|
||||||
|
# we rewrite this file
|
||||||
|
rm -f glibconfig-sysdefs.h
|
||||||
|
|
||||||
# The following version number definitions apply to GLib and GModule
|
# The following version number definitions apply to GLib and GModule
|
||||||
# as a whole, so if changes occoured in either of them, they are both
|
# as a whole, so if changes occoured in either of them, they are both
|
||||||
# treated with the same interface and binary age.
|
# treated with the same interface and binary age.
|
||||||
@ -729,6 +732,16 @@ GLIB_IF_VAR_EQ(mutex_has_default, yes,
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
dnl ****************************************
|
||||||
|
dnl *** GLib POLL* compatibility defines ***
|
||||||
|
dnl ****************************************
|
||||||
|
GLIB_SYSDEFS([#include <sys/types.h>
|
||||||
|
#include <sys/poll.h>],
|
||||||
|
POLLIN POLLOUT POLLPRI POLLERR POLLHUP POLLNVAL,
|
||||||
|
glibconfig-sysdefs.h,
|
||||||
|
=)
|
||||||
|
|
||||||
|
|
||||||
dnl ******************************
|
dnl ******************************
|
||||||
dnl *** output the whole stuff ***
|
dnl *** output the whole stuff ***
|
||||||
dnl ******************************
|
dnl ******************************
|
||||||
@ -781,8 +794,7 @@ _______EOF
|
|||||||
echo '#include <'"$g_mutex_header_file"'>' >> $outfile
|
echo '#include <'"$g_mutex_header_file"'>' >> $outfile
|
||||||
fi
|
fi
|
||||||
if test x$glib_sys_poll_h = xyes; then
|
if test x$glib_sys_poll_h = xyes; then
|
||||||
echo '#include <sys/types.h>' >> $outfile
|
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
|
||||||
echo '#include <sys/poll.h>' >> $outfile
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> $outfile <<_______EOF
|
cat >> $outfile <<_______EOF
|
||||||
@ -865,7 +877,7 @@ $glib_inline
|
|||||||
#endif /* !__cplusplus */
|
#endif /* !__cplusplus */
|
||||||
_______EOF
|
_______EOF
|
||||||
|
|
||||||
|
echo >>$outfile
|
||||||
if test x$g_mutex_has_default = xyes; then
|
if test x$g_mutex_has_default = xyes; then
|
||||||
cat >>$outfile <<_______EOF
|
cat >>$outfile <<_______EOF
|
||||||
$g_enable_threads_def G_THREADS_ENABLED
|
$g_enable_threads_def G_THREADS_ENABLED
|
||||||
@ -893,8 +905,8 @@ typedef struct _GMutex* GStaticMutex;
|
|||||||
#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (&(mutex)))
|
#define g_static_mutex_get_mutex(mutex) (g_static_mutex_get_mutex_impl (&(mutex)))
|
||||||
_______EOF
|
_______EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo >>$outfile
|
||||||
g_bit_sizes="16 32"
|
g_bit_sizes="16 32"
|
||||||
if test -n "$gint64"; then
|
if test -n "$gint64"; then
|
||||||
g_bit_sizes="$g_bit_sizes 64"
|
g_bit_sizes="$g_bit_sizes 64"
|
||||||
@ -913,13 +925,21 @@ _______EOF
|
|||||||
#define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
|
#define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
|
||||||
#define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
|
#define GLONG_TO_BE(val) ((glong) GINT${glongbits}_TO_BE (val))
|
||||||
#define GULONG_TO_BE(val) ((gulong) GUINT${glongbits}_TO_BE (val))
|
#define GULONG_TO_BE(val) ((gulong) GUINT${glongbits}_TO_BE (val))
|
||||||
|
|
||||||
#define GINT_TO_LE(val) ((gint) GINT${gintbits}_TO_LE (val))
|
#define GINT_TO_LE(val) ((gint) GINT${gintbits}_TO_LE (val))
|
||||||
#define GUINT_TO_LE(val) ((guint) GUINT${gintbits}_TO_LE (val))
|
#define GUINT_TO_LE(val) ((guint) GUINT${gintbits}_TO_LE (val))
|
||||||
#define GINT_TO_BE(val) ((gint) GINT${gintbits}_TO_BE (val))
|
#define GINT_TO_BE(val) ((gint) GINT${gintbits}_TO_BE (val))
|
||||||
#define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
|
#define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
|
||||||
#define G_BYTE_ORDER $g_byte_order
|
#define G_BYTE_ORDER $g_byte_order
|
||||||
|
|
||||||
|
_______EOF
|
||||||
|
|
||||||
|
if test -r glibconfig-sysdefs.h; then
|
||||||
|
cat glibconfig-sysdefs.h >>$outfile
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
cat >>$outfile <<_______EOF
|
||||||
|
|
||||||
$glib_wc
|
$glib_wc
|
||||||
|
|
||||||
|
|
||||||
|
31
glib.h
31
glib.h
@ -2294,31 +2294,12 @@ typedef enum
|
|||||||
} GSeekType;
|
} GSeekType;
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_IO_IN
|
G_IO_IN GLIB_SYSDEF_POLLIN,
|
||||||
#ifdef POLLIN
|
G_IO_OUT GLIB_SYSDEF_POLLOUT,
|
||||||
= POLLIN
|
G_IO_PRI GLIB_SYSDEF_POLLPRI,
|
||||||
#endif
|
G_IO_ERR GLIB_SYSDEF_POLLERR,
|
||||||
, G_IO_OUT
|
G_IO_HUP GLIB_SYSDEF_POLLHUP,
|
||||||
#ifdef POLLOUT
|
G_IO_NVAL GLIB_SYSDEF_POLLNVAL
|
||||||
= POLLOUT
|
|
||||||
#endif
|
|
||||||
, G_IO_PRI
|
|
||||||
#ifdef POLLPRI
|
|
||||||
= POLLPRI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
, G_IO_ERR
|
|
||||||
#ifdef POLLERR
|
|
||||||
= POLLERR
|
|
||||||
#endif
|
|
||||||
, G_IO_HUP
|
|
||||||
#ifdef POLLHUP
|
|
||||||
= POLLHUP
|
|
||||||
#endif
|
|
||||||
, G_IO_NVAL
|
|
||||||
#ifdef POLLNVAL
|
|
||||||
= POLLNVAL
|
|
||||||
#endif
|
|
||||||
} GIOCondition;
|
} GIOCondition;
|
||||||
|
|
||||||
struct _GIOChannel
|
struct _GIOChannel
|
||||||
|
@ -17,6 +17,7 @@ INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
|
|||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
glib.m4 \
|
glib.m4 \
|
||||||
glib.spec \
|
glib.spec \
|
||||||
|
acglib.m4 \
|
||||||
sanity_check \
|
sanity_check \
|
||||||
README.win32 \
|
README.win32 \
|
||||||
glib.def \
|
glib.def \
|
||||||
@ -59,6 +60,8 @@ include_HEADERS = \
|
|||||||
configinclude_DATA = \
|
configinclude_DATA = \
|
||||||
glibconfig.h
|
glibconfig.h
|
||||||
|
|
||||||
|
configure: configure.in acglib.m4
|
||||||
|
|
||||||
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
||||||
glibconfig.h: stamp-gc-h
|
glibconfig.h: stamp-gc-h
|
||||||
@:
|
@:
|
||||||
|
31
glib/glib.h
31
glib/glib.h
@ -2294,31 +2294,12 @@ typedef enum
|
|||||||
} GSeekType;
|
} GSeekType;
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
G_IO_IN
|
G_IO_IN GLIB_SYSDEF_POLLIN,
|
||||||
#ifdef POLLIN
|
G_IO_OUT GLIB_SYSDEF_POLLOUT,
|
||||||
= POLLIN
|
G_IO_PRI GLIB_SYSDEF_POLLPRI,
|
||||||
#endif
|
G_IO_ERR GLIB_SYSDEF_POLLERR,
|
||||||
, G_IO_OUT
|
G_IO_HUP GLIB_SYSDEF_POLLHUP,
|
||||||
#ifdef POLLOUT
|
G_IO_NVAL GLIB_SYSDEF_POLLNVAL
|
||||||
= POLLOUT
|
|
||||||
#endif
|
|
||||||
, G_IO_PRI
|
|
||||||
#ifdef POLLPRI
|
|
||||||
= POLLPRI
|
|
||||||
#endif
|
|
||||||
|
|
||||||
, G_IO_ERR
|
|
||||||
#ifdef POLLERR
|
|
||||||
= POLLERR
|
|
||||||
#endif
|
|
||||||
, G_IO_HUP
|
|
||||||
#ifdef POLLHUP
|
|
||||||
= POLLHUP
|
|
||||||
#endif
|
|
||||||
, G_IO_NVAL
|
|
||||||
#ifdef POLLNVAL
|
|
||||||
= POLLNVAL
|
|
||||||
#endif
|
|
||||||
} GIOCondition;
|
} GIOCondition;
|
||||||
|
|
||||||
struct _GIOChannel
|
struct _GIOChannel
|
||||||
|
@ -25,7 +25,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef GLIB_HAVE_SYS_POLL_H
|
||||||
|
#include <sys/poll.h>
|
||||||
|
#endif /* GLIB_HAVE_SYS_POLL_H */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
4
gmain.c
4
gmain.c
@ -25,7 +25,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "glib.h"
|
#include "glib.h"
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#ifdef GLIB_HAVE_SYS_POLL_H
|
||||||
|
#include <sys/poll.h>
|
||||||
|
#endif /* GLIB_HAVE_SYS_POLL_H */
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user