update getdtablesize patch to include lib/unistd.in.h content
authorBdale Garbee <bdale@gag.com>
Wed, 20 Apr 2011 08:29:53 +0000 (02:29 -0600)
committerBdale Garbee <bdale@gag.com>
Wed, 20 Apr 2011 08:29:53 +0000 (02:29 -0600)
debian/patches/getdtablesize-missing.diff

index 94561b363f93f107df8c92037a80375cfeb463c9..46839c4f2bf02cb526cff48a19f93afd9e56a0cf 100644 (file)
@@ -107,3 +107,33 @@ index bb79c0d..0a22af3 100644
  ## begin gnulib module getopt-posix
  
  BUILT_SOURCES += $(GETOPT_H)
+diff --git a/lib/unistd.in.h b/lib/unistd.in.h
+index bffdf8f..21cf667 100644
+--- a/lib/unistd.in.h
++++ b/lib/unistd.in.h
+@@ -423,17 +423,19 @@ extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
+ #if @GNULIB_GETDTABLESIZE@
+-# if !@HAVE_GETDTABLESIZE@
+ /* Return the maximum number of file descriptors in the current process.
+    In POSIX, this is same as sysconf (_SC_OPEN_MAX).  */
+-extern int getdtablesize (void);
++# if !@HAVE_GETDTABLESIZE@
++_GL_FUNCDECL_SYS (getdtablesize, int, (void));
+ # endif
++_GL_CXXALIAS_SYS (getdtablesize, int, (void));
++_GL_CXXALIASWARN (getdtablesize);
+ #elif defined GNULIB_POSIXCHECK
+ # undef getdtablesize
+-# define getdtablesize() \
+-    (GL_LINK_WARNING ("getdtablesize is unportable - " \
+-                      "use gnulib module getdtablesize for portability"), \
+-     getdtablesize ())
++# if HAVE_RAW_DECL_GETDTABLESIZE
++_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
++                 "use gnulib module getdtablesize for portability");
++# endif
+ #endif