1.0.10.3: Grovel suseconds_t
authorNIIMI Satoshi <sa2c@users.sourceforge.net>
Wed, 26 Sep 2007 11:37:34 +0000 (11:37 +0000)
committerNIIMI Satoshi <sa2c@users.sourceforge.net>
Wed, 26 Sep 2007 11:37:34 +0000 (11:37 +0000)
Instead to detect if suseconds_t exists by OS and architecture,
check it in grovel-features.sh.

contrib/sb-posix/constants.lisp
tools-for-build/grovel-features.sh
tools-for-build/grovel-headers.c
tools-for-build/os-provides-suseconds-t-test.c [new file with mode: 0644]
version.lisp-expr

index 440adb3..bf0fe3b 100644 (file)
  ;; utime(), utimes()
  #-win32
  (:type suseconds-t ; OAOOM warning: similar kludge in tools-for-build
-        #-(and darwin ppc) "suseconds_t"
-        #+(and darwin ppc) "int")
+        #+os-provides-suseconds-t "suseconds_t"
+        #-os-provides-suseconds-t "long")
 
  #-win32
  (:structure alien-utimbuf
index db2cd54..8bc5a2c 100644 (file)
@@ -26,3 +26,5 @@ featurep os-provides-dladdr
 featurep os-provides-putwc
 
 featurep os-provides-blksize-t
+
+featurep os-provides-suseconds-t
index c5de8e8..49eeac5 100644 (file)
@@ -241,11 +241,9 @@ main(int argc, char *argv[])
     DEFTYPE("off-t",   off_t);
     DEFTYPE("size-t",  size_t);
     DEFTYPE("time-t",  time_t);
-#if defined(LISP_FEATURE_DARWIN) && defined(LISP_FEATURE_PPC)
-    /* No idea if this is an issue with PPC versions of OS X, or just
-     * 10.3, but at any rate on some Darwin versions suseconds_t seems
-     * to be missing... Similar kludge in sb-posix. */
-    DEFTYPE("suseconds-t", int);
+#if !defined(LISP_FEATURE_OS_PROVIDES_SUSECONDS_T)
+    /* Similar kludge in sb-posix. */
+    DEFTYPE("suseconds-t", long);
 #else
     DEFTYPE("suseconds-t", suseconds_t);
 #endif
diff --git a/tools-for-build/os-provides-suseconds-t-test.c b/tools-for-build/os-provides-suseconds-t-test.c
new file mode 100644 (file)
index 0000000..5fcd725
--- /dev/null
@@ -0,0 +1,10 @@
+/* test to build and run so that we know if we have blksize_t */
+
+#include <sys/types.h>
+
+int main ()
+{
+    suseconds_t s = 0;
+    s = s + s;
+    return 104;
+}
index c54337c..8c40497 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.10.2"
+"1.0.10.3"