+#if @GNULIB_FCNTL@
+# if @REPLACE_FCNTL@
+# undef fcntl
+# define fcntl rpl_fcntl
+# endif
+# if !@HAVE_FCNTL@ || @REPLACE_FCNTL@
+extern int fcntl (int fd, int action, ...);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fcntl
+# define fcntl \
+ (GL_LINK_WARNING ("fcntl is not always POSIX compliant - " \
+ "use gnulib module fcntl for portability"), \
+ fcntl)
+#endif
+