]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Provide fdprintf if it's missing Closes #1366
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 16 Nov 2015 19:44:41 +0000 (14:44 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 16 Nov 2015 19:46:01 +0000 (14:46 -0500)
configure
configure.ac
src/include/autoconf.h.in
src/include/missing-h
src/lib/missing.c

index 567245c15c8211eade37f2bcafeb798c4b3a329b..664cf4ad6f1e7e4f1c0ab46095feef67773fe0a5 100755 (executable)
--- a/configure
+++ b/configure
@@ -9937,45 +9937,52 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
 for ac_func in \
-  getopt_long \
-  fcntl \
-  strsignal \
-  sigaction \
-  sigprocmask \
-  pthread_sigmask \
-  snprintf \
-  vsnprintf \
-  setsid \
-  strncasecmp \
-  strcasecmp \
-  localtime_r \
+  bindat \
+  clock_gettime \
+  closefrom \
   ctime_r \
+  dladdr \
+  fcntl \
+  fopencookie \
+  funopen \
+  getaddrinfo \
+  getnameinfo \
+  getopt_long \
+  getpeereid \
+  getresuid \
+  gettimeofday \
+  getusershell \
   gmtime_r \
-  strsep \
+  if_indextoname \
   inet_aton \
-  inet_pton \
   inet_ntop \
+  inet_pton \
+  initgroups \
+  kqueue \
+  localtime_r \
   mallopt \
+  mkdirat \
+  openat \
+  pthread_sigmask \
   setlinebuf \
-  setvbuf \
-  getusershell \
-  initgroups \
-  getaddrinfo \
-  getnameinfo \
-  closefrom \
-  gettimeofday \
-  getpeereid \
-  setuid \
   setresuid \
-  getresuid \
+  setsid \
+  setuid \
+  setvbuf \
+  sigaction \
+  sigprocmask \
+  snprintf \
+  strcasecmp \
   strlcat \
   strlcpy \
-  kqueue \
-  openat \
-  mkdirat \
+  strncasecmp \
+  strsep \
+  strsignal \
   unlinkat \
   bindat \
   dladdr
+  vdprintf \
+  vsnprintf
 
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
index 23eeb7faf3cf8488181e9d13a4faf4a70bbb4d03..5e86ca1954c945645ca54a6ea963b73a2046fbc9 100644 (file)
@@ -1433,45 +1433,52 @@ dnl #  5. Checks for structures and functions
 dnl #
 dnl #############################################################
 AC_CHECK_FUNCS( \
-  getopt_long \
-  fcntl \
-  strsignal \
-  sigaction \
-  sigprocmask \
-  pthread_sigmask \
-  snprintf \
-  vsnprintf \
-  setsid \
-  strncasecmp \
-  strcasecmp \
-  localtime_r \
+  bindat \
+  clock_gettime \
+  closefrom \
   ctime_r \
+  dladdr \
+  fcntl \
+  fopencookie \
+  funopen \
+  getaddrinfo \
+  getnameinfo \
+  getopt_long \
+  getpeereid \
+  getresuid \
+  gettimeofday \
+  getusershell \
   gmtime_r \
-  strsep \
+  if_indextoname \
   inet_aton \
-  inet_pton \
   inet_ntop \
+  inet_pton \
+  initgroups \
+  kqueue \
+  localtime_r \
   mallopt \
+  mkdirat \
+  openat \
+  pthread_sigmask \
   setlinebuf \
-  setvbuf \
-  getusershell \
-  initgroups \
-  getaddrinfo \
-  getnameinfo \
-  closefrom \
-  gettimeofday \
-  getpeereid \
-  setuid \
   setresuid \
-  getresuid \
+  setsid \
+  setuid \
+  setvbuf \
+  sigaction \
+  sigprocmask \
+  snprintf \
+  strcasecmp \
   strlcat \
   strlcpy \
-  kqueue \
-  openat \
-  mkdirat \
+  strncasecmp \
+  strsep \
+  strsignal \
   unlinkat \
   bindat \
   dladdr
+  vdprintf \
+  vsnprintf
 )
 
 AC_TYPE_SIGNAL
index db9d41d424ccca87a45797548f7dfc2de05e599b..a637c68577d765fa07c8ae75b323646c56c48483 100644 (file)
@@ -54,6 +54,9 @@
 /* Define to 1 if you have the <sys/capability.h> header file. */
 #undef HAVE_CAPABILITY_H
 
+/* Define to 1 if you have the `clock_gettime' function. */
+#undef HAVE_CLOCK_GETTIME
+
 /* Define to 1 if you have the `closefrom' function. */
 #undef HAVE_CLOSEFROM
 
 /* Define to 1 if you have the <fnmatch.h> header file. */
 #undef HAVE_FNMATCH_H
 
+/* Define to 1 if you have the `fopencookie' function. */
+#undef HAVE_FOPENCOOKIE
+
+/* Define to 1 if you have the `funopen' function. */
+#undef HAVE_FUNOPEN
+
 /* Define to 1 if you have the `getaddrinfo' function. */
 #undef HAVE_GETADDRINFO
 
 /* Define if the function (or macro) htonlll exists. */
 #undef HAVE_HTONLLL
 
+/* Define to 1 if you have the `if_indextoname' function. */
+#undef HAVE_IF_INDEXTONAME
+
 /* define if you have IN6_PKTINFO (Linux) */
 #undef HAVE_IN6_PKTINFO
 
 /* Define to 1 if you have the <utmp.h> header file. */
 #undef HAVE_UTMP_H
 
+/* Define to 1 if you have the `vdprintf' function. */
+#undef HAVE_VDPRINTF
+
 /* Define to 1 if you have the `vsnprintf' function. */
 #undef HAVE_VSNPRINTF
 
index b0960f66df31be5163d7bef0f6562b9bcbf90cfe..650d27783fe8e7d33b0f750c07f4b0b561c44d5a 100644 (file)
@@ -351,6 +351,10 @@ size_t strlcat(char *dst, char const *src, size_t siz);
 struct tm *gmtime_r(time_t const *l_clock, struct tm *result);
 #endif
 
+#ifndef HAVE_VDPRINTF
+int vdprintf (int fd, const char format, va_list args);
+#endif
+
 #ifndef HAVE_GETTIMEOFDAY
 int gettimeofday (struct timeval *tv, void *tz);
 #endif
index 4c45fb40b10765954dc759139b8dd1aead43a96e..084c07b33d1b80871216b510cde1b907f4241634 100644 (file)
@@ -191,6 +191,22 @@ struct tm *gmtime_r(time_t const *l_clock, struct tm *result)
 }
 #endif
 
+#ifndef HAVE_VDPRINTF
+int vdprintf (int fd, const char format, va_list args)
+{
+       int     ret;
+       FILE    *fp;
+
+       fp = fdopen(fd, "w");
+       if (!fp) return -1;
+
+       ret = vfprintf(fp, format, args);
+       fclose(fp);
+
+       return ret;
+}
+#endif
+
 #ifndef HAVE_GETTIMEOFDAY
 #ifdef WIN32
 /*