From: Jim Blandy Date: Tue, 3 Sep 1996 04:48:42 +0000 (+0000) Subject: On NextStep, doesn't define struct utime, unless we X-Git-Url: http://git.hcoop.net/bpt/guile.git/commitdiff_plain/2420229da7870ae950c0bdda8dc76f99cdac179b?hp=5bc433f5fd1dd7fd06478548d5dcda7e9345dd93 On NextStep, doesn't define struct utime, unless we #define _POSIX_SOURCE before #including it. * aclocal.m4 (GUILE_STRUCT_UTIMBUF): New test. * acconfig.h: New comment text for above CPP symbol. * configure.in: Call it. * posix.c: #define _POSIX_SOURCE if it seems necessary. --- diff --git a/libguile/acconfig.h b/libguile/acconfig.h index 2d197543a..46a22767b 100644 --- a/libguile/acconfig.h +++ b/libguile/acconfig.h @@ -23,6 +23,10 @@ caller's stack frame. On most machines, this is not the case. */ #undef SCM_STACK_GROWS_UP +/* Define this if doesn't define struct utimbuf unless + _POSIX_SOURCE is #defined. */ +#undef UTIMBUF_NEEDS_POSIX + /* Define these to indicate the current version of Guile. These values are supposed to be supplied by the configuration system. */ #undef GUILE_MAJOR_VERSION diff --git a/libguile/aclocal.m4 b/libguile/aclocal.m4 new file mode 100644 index 000000000..2446edc0e --- /dev/null +++ b/libguile/aclocal.m4 @@ -0,0 +1,18 @@ +dnl On the NeXT, #including doesn't give you a definition for +dnl struct utime, unless you #define _POSIX_SOURCE. + +AC_DEFUN(GUILE_STRUCT_UTIMBUF, [ + AC_MSG_CHECKING([whether we need POSIX to get struct utimbuf]) + AC_CACHE_VAL(guile_cv_struct_utimbuf_needs_posix, + [AC_TRY_CPP([ +#ifdef __EMX__ +#include +#else +#include +#endif +struct utime blah; +], + guile_cv_struct_utimbuf_needs_posix=no, + guile_cv_struct_utimbuf_needs_posix=yes + AC_DEFINE(UTIMBUF_NEEDS_POSIX))]) + AC_MSG_RESULT($guile_cv_struct_utimbuf_needs_posix)]) diff --git a/libguile/scmconfig.h.in b/libguile/scmconfig.h.in index 42062870e..acf311c16 100644 --- a/libguile/scmconfig.h.in +++ b/libguile/scmconfig.h.in @@ -76,6 +76,10 @@ caller's stack frame. On most machines, this is not the case. */ #undef SCM_STACK_GROWS_UP +/* Define this if doesn't define struct utimbuf unless + _POSIX_SOURCE is #defined. */ +#undef UTIMBUF_NEEDS_POSIX + /* Define these to indicate the current version of Guile. These values are supposed to be supplied by the configuration system. */ #undef GUILE_MAJOR_VERSION @@ -208,8 +212,14 @@ /* Define if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define if you have the header file. */ +#undef HAVE_SYS_UTIME_H + /* Define if you have the header file. */ #undef HAVE_TIME_H /* Define if you have the header file. */ #undef HAVE_UNISTD_H + +/* Define if you have the header file. */ +#undef HAVE_UTIME_H