On NextStep, <utime.h> doesn't define struct utime, unless we
authorJim Blandy <jimb@red-bean.com>
Tue, 3 Sep 1996 04:48:42 +0000 (04:48 +0000)
committerJim Blandy <jimb@red-bean.com>
Tue, 3 Sep 1996 04:48:42 +0000 (04:48 +0000)
#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.

libguile/acconfig.h
libguile/aclocal.m4 [new file with mode: 0644]
libguile/scmconfig.h.in

index 2d19754..46a2276 100644 (file)
    caller's stack frame.  On most machines, this is not the case.  */
 #undef SCM_STACK_GROWS_UP
 
+/* Define this if <utime.h> 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 (file)
index 0000000..2446edc
--- /dev/null
@@ -0,0 +1,18 @@
+dnl  On the NeXT, #including <utime.h> 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 <sys/utime.h>
+#else
+#include <utime.h>
+#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)])
index 4206287..acf311c 100644 (file)
    caller's stack frame.  On most machines, this is not the case.  */
 #undef SCM_STACK_GROWS_UP
 
+/* Define this if <utime.h> 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
 /* Define if you have the <sys/types.h> header file.  */
 #undef HAVE_SYS_TYPES_H
 
+/* Define if you have the <sys/utime.h> header file.  */
+#undef HAVE_SYS_UTIME_H
+
 /* Define if you have the <time.h> header file.  */
 #undef HAVE_TIME_H
 
 /* Define if you have the <unistd.h> header file.  */
 #undef HAVE_UNISTD_H
+
+/* Define if you have the <utime.h> header file.  */
+#undef HAVE_UTIME_H