projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f1b8903
)
Warn when fseek or ftell are used.
author
Bruno Haible
<bruno@clisp.org>
Sat, 28 Apr 2007 23:02:00 +0000
(23:02 +0000)
committer
Bruno Haible
<bruno@clisp.org>
Sat, 28 Apr 2007 23:02:00 +0000
(23:02 +0000)
ChangeLog
patch
|
blob
|
history
lib/stdio_.h
patch
|
blob
|
history
diff --git
a/ChangeLog
b/ChangeLog
index 5963fff398d3008f1199e6bc29931618a6f22860..3987866167c5959549f2a1f808ccccb13eded46b 100644
(file)
--- a/
ChangeLog
+++ b/
ChangeLog
@@
-1,3
+1,9
@@
+2007-04-28 Bruno Haible <bruno@clisp.org>
+
+ * lib/stdio_.h (fseek, ftell): Provide link warnings suggesting to use
+ fseeko and ftello.
+ Suggested by Eric Blake.
+
2007-04-28 Jim Meyering <jim@meyering.net>
Avoid false-negative in gl_STDINT_H's C99 conformance test.
2007-04-28 Jim Meyering <jim@meyering.net>
Avoid false-negative in gl_STDINT_H's C99 conformance test.
diff --git
a/lib/stdio_.h
b/lib/stdio_.h
index 0e35ffd0371edb36f6d4e3fdb522c14e108808d9..66311be852ad6c2cde8321b87d873958158e465b 100644
(file)
--- a/
lib/stdio_.h
+++ b/
lib/stdio_.h
@@
-231,6
+231,16
@@
typedef int verify_fseeko_types[2 * (sizeof (off_t) == sizeof (long)) - 1];
fseeko (f, o, w))
#endif
fseeko (f, o, w))
#endif
+#if defined GNULIB_POSIXCHECK
+# ifndef fseek
+# define fseek(f,o,w) \
+ (GL_LINK_WARNING ("fseek cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use fseeko function for handling of large files"), \
+ fseek (f, o, w))
+# endif
+#endif
+
#if @GNULIB_FTELLO@
# if !@HAVE_FTELLO@
/* Assume 'off_t' is the same type as 'long'. */
#if @GNULIB_FTELLO@
# if !@HAVE_FTELLO@
/* Assume 'off_t' is the same type as 'long'. */
@@
-245,6
+255,16
@@
typedef int verify_ftello_types[2 * (sizeof (off_t) == sizeof (long)) - 1];
ftello (f))
#endif
ftello (f))
#endif
+#if defined GNULIB_POSIXCHECK
+# ifndef ftell
+# define ftell(f) \
+ (GL_LINK_WARNING ("ftell cannot handle files larger than 4 GB " \
+ "on 32-bit platforms - " \
+ "use ftello function for handling of large files"), \
+ ftell (f))
+# endif
+#endif
+
#if @GNULIB_FFLUSH@
# if @REPLACE_FFLUSH@
# define fflush rpl_fflush
#if @GNULIB_FFLUSH@
# if @REPLACE_FFLUSH@
# define fflush rpl_fflush