(dir_name_r): Declare it.
[gnulib.git] / lib / nanosleep.h
index 1c8517d..2019ed5 100644 (file)
 #if ! defined NANOSLEEP_H
 # define NANOSLEEP_H
 
-# if HAVE_CONFIG_H
-#  include <config.h>
-# endif
-
-# ifndef PARAMS
-#  if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-#   define PARAMS(Args) Args
-#  else
-#   define PARAMS(Args) ()
-#  endif
-# endif
+/* You must include config.h before including this file.  */
 
 # include <sys/types.h>
 # if TIME_WITH_SYS_TIME
@@ -42,7 +32,7 @@
 # endif
 
 # if ! HAVE_STRUCT_TIMESPEC
-/* Some systems don't define this struct.  */
+/* Some systems don't define this struct, e.g., AIX 4.1, Ultrix 4.3.  */
 struct timespec
 {
   time_t tv_sec;
@@ -50,8 +40,10 @@ struct timespec
 };
 # endif
 
-int
-nanosleep PARAMS ((const struct timespec *requested_delay,
-                  struct timespec *remaining_delay)
+# if ! HAVE_DECL_NANOSLEEP
+/* Don't specify a prototype here.  Some systems (e.g., OSF) declare
+   nanosleep with a conflicting one (const-less first parameter).  */
+int nanosleep ();
+# endif
 
 #endif