projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3364558
)
Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
author
Bruno Haible
<bruno@clisp.org>
Sat, 27 Mar 2010 19:09:55 +0000
(20:09 +0100)
committer
Bruno Haible
<bruno@clisp.org>
Sat, 27 Mar 2010 19:09:55 +0000
(20:09 +0100)
ChangeLog
patch
|
blob
|
history
lib/time.in.h
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 57ded7c3c40d005bc91d3fe452ed3045d2487c38..0bfcebe25932c463fb17bc6e1899e761a2fa34a2 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,10
@@
+2010-03-27 Bruno Haible <bruno@clisp.org>
+
+ Use GNULIB_POSIXCHECK instead of GNULIB_PORTCHECK.
+ * lib/time.in.h (asctime, asctime_r, ctime, ctime_r): Test
+ GNULIB_POSIXCHECK, not GNULIB_PORTCHECK. Provide compile-time warnings
+ rather than link errors.
+
2010-03-27 Bruno Haible <bruno@clisp.org>
Avoid side effects from tests-related modules on the compilation of lib.
2010-03-27 Bruno Haible <bruno@clisp.org>
Avoid side effects from tests-related modules on the compilation of lib.
diff --git
a/lib/time.in.h
b/lib/time.in.h
index 7fa228a8ef42cf148de5a4d84245b26948f6b678..3a3e5ab1b33b390c9ea9e5469ba67ada8cf5ebc8 100644
(file)
--- a/
lib/time.in.h
+++ b/
lib/time.in.h
@@
-185,15
+185,25
@@
_GL_CXXALIASWARN (timegm);
/* Encourage applications to avoid unsafe functions that can overrun
buffers when given outlandish struct tm values. Portable
applications should use strftime (or even sprintf) instead. */
/* Encourage applications to avoid unsafe functions that can overrun
buffers when given outlandish struct tm values. Portable
applications should use strftime (or even sprintf) instead. */
-# if
GNULIB_PORT
CHECK
+# if
defined GNULIB_POSIX
CHECK
# undef asctime
# undef asctime
-# define asctime eschew_asctime
+_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - "
+ "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
# undef asctime_r
# undef asctime_r
-# define asctime_r eschew_asctime_r
+_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - "
+ "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
# undef ctime
# undef ctime
-# define ctime eschew_ctime
+_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - "
+ "better use strftime (or even sprintf) instead");
+# endif
+# if defined GNULIB_POSIXCHECK
# undef ctime_r
# undef ctime_r
-# define ctime_r eschew_ctime_r
+_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - "
+ "better use strftime (or even sprintf) instead");
# endif
#endif
# endif
#endif