mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01: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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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>
|
||||
|
||||
* 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 = \
|
||||
glib.m4 \
|
||||
glib.spec \
|
||||
acglib.m4 \
|
||||
sanity_check \
|
||||
README.win32 \
|
||||
glib.def \
|
||||
@ -59,6 +60,8 @@ include_HEADERS = \
|
||||
configinclude_DATA = \
|
||||
glibconfig.h
|
||||
|
||||
configure: configure.in acglib.m4
|
||||
|
||||
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
||||
glibconfig.h: stamp-gc-h
|
||||
@:
|
||||
|
28
acglib.m4
28
acglib.m4
@ -68,6 +68,7 @@ main()
|
||||
char *p = (char*) &tv;
|
||||
int i;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
for (i = 0; i < $4; i++)
|
||||
fprintf(f, "%s%d", i?",":"", *(p++));
|
||||
fprintf(f, "\n");
|
||||
@ -78,3 +79,30 @@ AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
|
||||
undefine([AC_TYPE_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
|
||||
cflags_set=${CFLAGS+set}
|
||||
|
||||
# we rewrite this file
|
||||
rm -f glibconfig-sysdefs.h
|
||||
|
||||
# The following version number definitions apply to GLib and GModule
|
||||
# as a whole, so if changes occoured in either of them, they are both
|
||||
# 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 *** output the whole stuff ***
|
||||
dnl ******************************
|
||||
@ -781,8 +794,7 @@ _______EOF
|
||||
echo '#include <'"$g_mutex_header_file"'>' >> $outfile
|
||||
fi
|
||||
if test x$glib_sys_poll_h = xyes; then
|
||||
echo '#include <sys/types.h>' >> $outfile
|
||||
echo '#include <sys/poll.h>' >> $outfile
|
||||
echo '#define GLIB_HAVE_SYS_POLL_H' >> $outfile
|
||||
fi
|
||||
|
||||
cat >> $outfile <<_______EOF
|
||||
@ -865,7 +877,7 @@ $glib_inline
|
||||
#endif /* !__cplusplus */
|
||||
_______EOF
|
||||
|
||||
|
||||
echo >>$outfile
|
||||
if test x$g_mutex_has_default = xyes; then
|
||||
cat >>$outfile <<_______EOF
|
||||
$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)))
|
||||
_______EOF
|
||||
fi
|
||||
|
||||
|
||||
|
||||
echo >>$outfile
|
||||
g_bit_sizes="16 32"
|
||||
if test -n "$gint64"; then
|
||||
g_bit_sizes="$g_bit_sizes 64"
|
||||
@ -913,13 +925,21 @@ _______EOF
|
||||
#define GULONG_TO_LE(val) ((gulong) GUINT${glongbits}_TO_LE (val))
|
||||
#define GLONG_TO_BE(val) ((glong) GINT${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 GUINT_TO_LE(val) ((guint) GUINT${gintbits}_TO_LE (val))
|
||||
#define GINT_TO_BE(val) ((gint) GINT${gintbits}_TO_BE (val))
|
||||
#define GUINT_TO_BE(val) ((guint) GUINT${gintbits}_TO_BE (val))
|
||||
#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
|
||||
|
||||
|
||||
|
31
glib.h
31
glib.h
@ -2294,31 +2294,12 @@ typedef enum
|
||||
} GSeekType;
|
||||
typedef enum
|
||||
{
|
||||
G_IO_IN
|
||||
#ifdef POLLIN
|
||||
= POLLIN
|
||||
#endif
|
||||
, G_IO_OUT
|
||||
#ifdef POLLOUT
|
||||
= 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
|
||||
G_IO_IN GLIB_SYSDEF_POLLIN,
|
||||
G_IO_OUT GLIB_SYSDEF_POLLOUT,
|
||||
G_IO_PRI GLIB_SYSDEF_POLLPRI,
|
||||
G_IO_ERR GLIB_SYSDEF_POLLERR,
|
||||
G_IO_HUP GLIB_SYSDEF_POLLHUP,
|
||||
G_IO_NVAL GLIB_SYSDEF_POLLNVAL
|
||||
} GIOCondition;
|
||||
|
||||
struct _GIOChannel
|
||||
|
@ -17,6 +17,7 @@ INCLUDES = -DG_LOG_DOMAIN=g_log_domain_glib @GLIB_DEBUG_FLAGS@
|
||||
EXTRA_DIST = \
|
||||
glib.m4 \
|
||||
glib.spec \
|
||||
acglib.m4 \
|
||||
sanity_check \
|
||||
README.win32 \
|
||||
glib.def \
|
||||
@ -59,6 +60,8 @@ include_HEADERS = \
|
||||
configinclude_DATA = \
|
||||
glibconfig.h
|
||||
|
||||
configure: configure.in acglib.m4
|
||||
|
||||
BUILT_SOURCES = stamp-gc-h #note: not glibconfig.h
|
||||
glibconfig.h: stamp-gc-h
|
||||
@:
|
||||
|
31
glib/glib.h
31
glib/glib.h
@ -2294,31 +2294,12 @@ typedef enum
|
||||
} GSeekType;
|
||||
typedef enum
|
||||
{
|
||||
G_IO_IN
|
||||
#ifdef POLLIN
|
||||
= POLLIN
|
||||
#endif
|
||||
, G_IO_OUT
|
||||
#ifdef POLLOUT
|
||||
= 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
|
||||
G_IO_IN GLIB_SYSDEF_POLLIN,
|
||||
G_IO_OUT GLIB_SYSDEF_POLLOUT,
|
||||
G_IO_PRI GLIB_SYSDEF_POLLPRI,
|
||||
G_IO_ERR GLIB_SYSDEF_POLLERR,
|
||||
G_IO_HUP GLIB_SYSDEF_POLLHUP,
|
||||
G_IO_NVAL GLIB_SYSDEF_POLLNVAL
|
||||
} GIOCondition;
|
||||
|
||||
struct _GIOChannel
|
||||
|
@ -25,7 +25,11 @@
|
||||
*/
|
||||
|
||||
#include "glib.h"
|
||||
#include <sys/types.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 <errno.h>
|
||||
#include "config.h"
|
||||
|
Loading…
Reference in New Issue
Block a user