summaryrefslogtreecommitdiff
path: root/m4/strptime.m4
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2007-01-29 23:12:55 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2007-01-29 23:12:55 +0000
commit88c14dcf4d4df04f3c12f7d506484993850c55ad (patch)
treea6a663a5e3da0d4a8f6b02df957792aa2607f2c4 /m4/strptime.m4
parent0730a6cdc74a97b1b5b507c0be6116cc0967c056 (diff)
downloadgnulib-88c14dcf4d4df04f3c12f7d506484993850c55ad.tar.gz
* lib/strptime.h (strptime): Use 'restrict' for args where
POSIX requires this. * lib/strptime.c (strptime): Likewise. Change license notice from LGPL to GPL, since gnulib-tool will change this as needed. Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is defined. Include "strptime.h" first, to check interface. Do not #undef _LIBC and _NL_CURRENT. Do not include <stdlib.h>; no longer needed. Include "time_r.h" and declare ptime_locale_status only if _LIBC is not defined. (__P): Remove unused macro. (match_string): Bring back glibc version, but use it only if _LIBC is defined. (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too. Remove unnecessary assertion and abort() call. Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc. * m4/strptime.m4: Fix serial number comment. (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF. * modules/strptime (Files): Add m4/tm_gmtoff.m4. (Depends-on): Add time_r.
Diffstat (limited to 'm4/strptime.m4')
-rw-r--r--m4/strptime.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/strptime.m4 b/m4/strptime.m4
index 344ede3560..e1236b9339 100644
--- a/m4/strptime.m4
+++ b/m4/strptime.m4
@@ -1,10 +1,12 @@
-# strtol.m4 serial 4
-dnl Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# strptime.m4 serial 2
+dnl Copyright (C) 2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_STRPTIME],
[
+ AC_REQUIRE([AC_C_RESTRICT])
AC_REPLACE_FUNCS(strptime)
+ AC_REQUIRE([gl_TM_GMTOFF])
])