warn-on-use: use instead of link-warning
[gnulib.git] / lib / sys_file.in.h
index 58e0d6a..77a7ccb 100644 (file)
@@ -41,7 +41,7 @@
 # define LOCK_NB 4       /* Don't block when locking.  */
 #endif
 
-/* The definition of GL_LINK_WARNING is copied here.  */
+/* The definition of _GL_WARN_ON_USE is copied here.  */
 
 #if @GNULIB_FLOCK@
 /* Apply or remove advisory locks on an open file.
@@ -51,10 +51,10 @@ extern int flock (int fd, int operation);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef flock
-# define flock(fd,op)                          \
-    (GL_LINK_WARNING ("flock is unportable - " \
-                      "use gnulib module flock for portability"), \
-     flock ((fd), (op)))
+# if HAVE_RAW_DECL_FLOCK
+_GL_WARN_ON_USE (flock, "flock is unportable - "
+                 "use gnulib module flock for portability");
+# endif
 #endif