Re: [gamin] some portability stuff [u]



On Sat, 2004-09-18 at 15:12 +0200, Michael Banck wrote:

> 2. in gam_poll.c, some calls to st_mtim.tv_nsec are outside of #ifdef
> linux.
> 
> As this does not appear to be Linux-specific I suggest to add a
> configure test (from coreutils/make) for the st_mtim.tv_nsec struct
> member. Along this, the second call to this struct should be moved
> inside the #ifdef.
> 

It seems that some parts of the patch was missed, namely this (or
it is at least not in CVS):

-----
--- gamin-0.0.9/acinclude.m4	1970-01-01 01:00:00.000000000 +0100
+++ gamin-0.0.9.new/acinclude.m4	2004-09-16 01:46:45.000000000 +0200
@@ -0,0 +1,27 @@
+dnl ---------------------------------------------------------------------------
+dnl From Paul Eggert <eggert twinsun com>
+
+AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
+ [AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim],
+   ac_cv_struct_st_mtim_nsec,
+   [ac_save_CPPFLAGS="$CPPFLAGS"
+    ac_cv_struct_st_mtim_nsec=no
+    # tv_nsec -- the usual case
+    # _tv_nsec -- Solaris 2.6, if
+    #   (defined _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED == 1
+    #    && !defined __EXTENSIONS__)
+    # st__tim.tv_nsec -- UnixWare 2.1.2
+    for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
+      CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
+      AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
+        [ac_cv_struct_st_mtim_nsec=$ac_val; break])
+    done
+    CPPFLAGS="$ac_save_CPPFLAGS"])
+
+  if test $ac_cv_struct_st_mtim_nsec != no; then
+    AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, [Define if 'struct stat' contains a nanoseconds field])
+  fi
+ ]
+)
-----


Regards,

-- 
Martin Schlemmer
Gentoo Linux Developer, Desktop/System Team Developer
Cape Town, South Africa

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]