]> git.sur5r.net Git - openldap/commitdiff
Moved the ctime_r number of arguments check to the right file.
authorBart Hartgers <bart@openldap.org>
Sat, 2 Jan 1999 21:54:58 +0000 (21:54 +0000)
committerBart Hartgers <bart@openldap.org>
Sat, 2 Jan 1999 21:54:58 +0000 (21:54 +0000)
build/openldap.m4

index defe9f770fdf63a86fde99d753a0325fa361dd58..c72ab19a17e73e6765dbd2a3d30171606a173386 100644 (file)
@@ -425,3 +425,25 @@ AC_DEFUN(OL_TYPE_SIG_ATOMIC_T,
   fi
  ])dnl
 
+dnl ====================================================================
+dnl check no of arguments for ctime_r
+AC_DEFUN(OL_NARGS_CTIME_R,
+  [AC_MSG_CHECKING([number of args for ctime_r])
+   AC_TRY_COMPILE([#include <time.h>],
+                  [time_t ti; char *buffer;
+                 ctime_r(&ti,buffer,32);],ol_nargs_ctime_r=3,
+                                          ol_nargs_ctime_r=0)
+  if test $ol_nargs_ctime_r = 0 ; then
+    AC_TRY_COMPILE([#include <time.h>],
+                    [time_t ti; char *buffer;
+                   ctime_r(&ti,buffer);],ol_nargs_ctime_r=2 )
+  fi
+  AC_MSG_RESULT($ol_nargs_ctime_r)
+  if test $ol_nargs_ctime_r = 2 ; then
+    AC_DEFINE( ARGS_CTIME_R_2 )
+  fi
+  if test $ol_nargs_ctime_r = 3 ; then
+    AC_DEFINE( ARGS_CTIME_R_3 )
+  fi
+])dnl
+