summaryrefslogtreecommitdiff
path: root/lib/sys_stat.in.h
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2009-11-16 23:40:28 +0100
committerLudovic Courtès <ludo@gnu.org>2009-11-17 23:13:58 +0100
commitf29ded4b67ca5d750863ba24d16456ed8f730d0a (patch)
treeefa4a7794f98c8d8f57ddf91210f5af69b090743 /lib/sys_stat.in.h
parente614d37577b63766613dac95d76e9f7826b528d9 (diff)
downloadguile-f29ded4b67ca5d750863ba24d16456ed8f730d0a.tar.gz
Use Gnulib's `warning' module.
* m4/gnulib-cache.m4: Add `warnings'. * configure.ac: Use `gl_WARN_ADD' to check whether compiler flags are supported. * libguile/Makefile.am (libguile_la_LIBADD): Add $(LTLIBICONV). (libguile_la_LDFLAGS): Add $(INET_NTOP_LIB) $(INET_PTON_LIB).
Diffstat (limited to 'lib/sys_stat.in.h')
-rw-r--r--lib/sys_stat.in.h44
1 files changed, 43 insertions, 1 deletions
diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h
index 5dc6428cd..d178f6e91 100644
--- a/lib/sys_stat.in.h
+++ b/lib/sys_stat.in.h
@@ -424,6 +424,23 @@ extern int mkdirat (int fd, char const *file, mode_t mode);
#endif
+#if @GNULIB_MKFIFO@
+# if @REPLACE_MKFIFO@
+# undef mkfifo
+# define mkfifo rpl_mkfifo
+# endif
+# if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@
+int mkfifo (char const *file, mode_t mode);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifo
+# define mkfifo(n,m) \
+ (GL_LINK_WARNING ("mkfifo is not portable - " \
+ "use gnulib module mkfifo for portability"), \
+ mkfifo (n, m))
+#endif
+
+
#if @GNULIB_MKFIFOAT@
# if !@HAVE_MKFIFOAT@
int mkfifoat (int fd, char const *file, mode_t mode);
@@ -437,6 +454,23 @@ int mkfifoat (int fd, char const *file, mode_t mode);
#endif
+#if @GNULIB_MKNOD@
+# if @REPLACE_MKNOD@
+# undef mknod
+# define mknod rpl_mknod
+# endif
+# if !@HAVE_MKNOD@ || @REPLACE_MKNOD@
+int mknod (char const *file, mode_t mode, dev_t dev);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mknod
+# define mknod(n,m,d) \
+ (GL_LINK_WARNING ("mknod is not portable - " \
+ "use gnulib module mknod for portability"), \
+ mknod (n, m, d))
+#endif
+
+
#if @GNULIB_MKNODAT@
# if !@HAVE_MKNODAT@
int mknodat (int fd, char const *file, mode_t mode, dev_t dev);
@@ -456,7 +490,15 @@ int mknodat (int fd, char const *file, mode_t mode, dev_t dev);
struct stat. This means that rpl_stat will not be used if the user
does (stat)(a,b). Oh well. */
# undef stat
-# define stat(name, st) rpl_stat (name, st)
+# ifdef _LARGE_FILES
+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+ so we have to replace stat64() instead of stat(). */
+# define stat stat64
+# undef stat64
+# define stat64(name, st) rpl_stat (name, st)
+# else /* !_LARGE_FILES */
+# define stat(name, st) rpl_stat (name, st)
+# endif /* !_LARGE_FILES */
extern int stat (const char *name, struct stat *buf);
# endif
#elif defined GNULIB_POSIXCHECK