* using the format specified by format
**/
char *
-nsd_strptime(const char *s, const char *format, struct tm *tm)
+unbound_strptime(const char *s, const char *format, struct tm *tm)
{
int c, alt_format, ret;
int split_year = 0;
tm->tm_mon = ret;
break;
case 'c': /* date and time representation */
- if (!(s = nsd_strptime(s, "%x %X", tm))) {
+ if (!(s = unbound_strptime(s, "%x %X", tm))) {
return NULL;
}
break;
tm->tm_mday = ret;
break;
case 'D': /* equivalent to %m/%d/%y */
- if (!(s = nsd_strptime(s, "%m/%d/%y", tm))) {
+ if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
return NULL;
}
break;
tm->tm_hour += 12;
break;
case 'r': /* equivalent of %I:%M:%S %p */
- if (!(s = nsd_strptime(s, "%I:%M:%S %p", tm))) {
+ if (!(s = unbound_strptime(s, "%I:%M:%S %p", tm))) {
return NULL;
}
break;
case 'R': /* equivalent of %H:%M */
- if (!(s = nsd_strptime(s, "%H:%M", tm))) {
+ if (!(s = unbound_strptime(s, "%H:%M", tm))) {
return NULL;
}
break;
tm->tm_sec = ret;
break;
case 'T': /* equivalent of %H:%M:%S */
- if (!(s = nsd_strptime(s, "%H:%M:%S", tm))) {
+ if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
return NULL;
}
break;
**/
break;
case 'x': /* date format */
- if (!(s = nsd_strptime(s, "%m/%d/%y", tm))) {
+ if (!(s = unbound_strptime(s, "%m/%d/%y", tm))) {
return NULL;
}
break;
case 'X': /* time format */
- if (!(s = nsd_strptime(s, "%H:%M:%S", tm))) {
+ if (!(s = unbound_strptime(s, "%H:%M:%S", tm))) {
return NULL;
}
break;
/* Define to 1 if you have the `strlcpy' function. */
#undef HAVE_STRLCPY
+/* Define to 1 if you have the `strptime' function. */
+#undef HAVE_STRPTIME
+
/* Define if you have Swig libraries and header files. */
#undef HAVE_SWIG
char *ctime_r(const time_t *timep, char *buf);
#endif
+#ifndef HAVE_STRPTIME
+#define strptime unbound_strptime
+struct tm;
+char *strptime(const char *s, const char *format, struct tm *tm);
+#endif
+
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1
fi
-ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
+for ac_func in strptime
+do :
+ ac_fn_c_check_func "$LINENO" "strptime" "ac_cv_func_strptime"
if test "x$ac_cv_func_strptime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRPTIME 1
+_ACEOF
else
case " $LIBOBJS " in
esac
fi
+done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setusercontext" >&5
$as_echo_n "checking for library containing setusercontext... " >&6; }
])
fi
-AC_CHECK_FUNC([strptime],,[AC_LIBOBJ([strptime])])
+AC_CHECK_FUNCS([strptime],,[AC_LIBOBJ([strptime])])
AC_SEARCH_LIBS([setusercontext], [util])
AC_CHECK_FUNCS([tzset sigprocmask fcntl getpwnam getrlimit setrlimit setsid sbrk chroot kill sleep usleep random srandom recvmsg sendmsg writev socketpair glob initgroups strftime localtime_r setusercontext _beginthreadex])
AC_CHECK_FUNCS([setresuid],,[AC_CHECK_FUNCS([setreuid])])
char *ctime_r(const time_t *timep, char *buf);
#endif
+#ifndef HAVE_STRPTIME
+#define strptime unbound_strptime
+struct tm;
+char *strptime(const char *s, const char *format, struct tm *tm);
+#endif
+
#if defined(HAVE_EVENT_H) && !defined(HAVE_EVENT_BASE_ONCE) && (defined(HAVE_PTHREAD) || defined(HAVE_SOLARIS_THREADS))
/* using version of libevent that is not threadsafe. */
# define LIBEVENT_SIGNAL_PROBLEM 1