]> Savannah Git Hosting - gnulib.git/commitdiff
Tweak last commit.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Dec 2011 13:22:09 +0000 (14:22 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 3 Dec 2011 13:22:09 +0000 (14:22 +0100)
* lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
Fix preprocessor directives indentation. Fix typos.
* m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
* modules/unistd (Makefile): Likewise.

ChangeLog
lib/unistd.in.h
m4/unistd_h.m4
modules/unistd

index a7c67e6da5dfa5f9a9a50972c2654f414ece6c82..072a0ed5a1a569dd32b0e8ffa7307e6548d367b8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-03  Bruno Haible  <bruno@clisp.org>
+
+       Tweak last commit.
+       * lib/unistd.in.h (sethostname): Keep declarations in alphabetic order.
+       Fix preprocessor directives indentation. Fix typos.
+       * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): Keep alphabetic order.
+       * modules/unistd (Makefile): Likewise.
+
 2011-12-01  Ben Walton  <bwalton@artsci.utoronto.ca>
 
        Integrate the sethostname module into unistd.
index d01f68df7e8b35c234f817e192cd5c006b3c9acb..617eb7926e23af6c5c4773f0d87a813cce7ba98a 100644 (file)
@@ -683,31 +683,6 @@ _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
 # endif
 #endif
 
-#if @GNULIB_SETHOSTNAME@
-/* Set the host name of the machine.
-   The host name may or may not be fully qualified.
-
-   Put LEN bytes of NAME into the host name.
-   Return 0 if successful, otherwise, set errno and return -1
-
-   Platforms with no ability to set the hostname return -1 and set
-   errno = ENOSYS. */
-#  if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
-_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
-                                    _GL_ARG_NONNULL ((1)));
-#  endif
-/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
-   and FreeBSD 6.4 the second parameter is int.  On Solaris 11
-   2011-10, the first parameter is not const. */
-_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
-_GL_CXXALIASWARN (sethostname);
-#elif defined GNULIB_POSIXCHECK
-# undef gethostname
-# if HAVE_RAW_DECL_GETHOSTNAME
-_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
-                 "use gnulib module sethostname for portability");
-# endif
-#endif
 
 #if @GNULIB_GETHOSTNAME@
 /* Return the standard host name of the machine.
@@ -1293,6 +1268,33 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
 #endif
 
 
+#if @GNULIB_SETHOSTNAME@
+/* Set the host name of the machine.
+   The host name may or may not be fully qualified.
+
+   Put LEN bytes of NAME into the host name.
+   Return 0 if successful, otherwise, set errno and return -1.
+
+   Platforms with no ability to set the hostname return -1 and set
+   errno = ENOSYS.  */
+# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@
+_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len)
+                                    _GL_ARG_NONNULL ((1)));
+# endif
+/* Need to cast, because on Solaris 11 2011-10, MacOS X 10.5, IRIX 6.5
+   and FreeBSD 6.4 the second parameter is int.  On Solaris 11
+   2011-10, the first parameter is not const.  */
+_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len));
+_GL_CXXALIASWARN (sethostname);
+#elif defined GNULIB_POSIXCHECK
+# undef sethostname
+# if HAVE_RAW_DECL_SETHOSTNAME
+_GL_WARN_ON_USE (sethostname, "sethostname is unportable - "
+                 "use gnulib module sethostname for portability");
+# endif
+#endif
+
+
 #if @GNULIB_SLEEP@
 /* Pause the execution of the current thread for N seconds.
    Returns the number of seconds left to sleep.
index d3fa58650e4f81fd26734d14433a2a1c3ebea2b2..34bdef54a32e1312b6bb121cda6b1fd0d9eadc95 100644 (file)
@@ -94,8 +94,8 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   GNULIB_READLINK=0;             AC_SUBST([GNULIB_READLINK])
   GNULIB_READLINKAT=0;           AC_SUBST([GNULIB_READLINKAT])
   GNULIB_RMDIR=0;                AC_SUBST([GNULIB_RMDIR])
-  GNULIB_SLEEP=0;                AC_SUBST([GNULIB_SLEEP])
   GNULIB_SETHOSTNAME=0;          AC_SUBST([GNULIB_SETHOSTNAME])
+  GNULIB_SLEEP=0;                AC_SUBST([GNULIB_SLEEP])
   GNULIB_SYMLINK=0;              AC_SUBST([GNULIB_SYMLINK])
   GNULIB_SYMLINKAT=0;            AC_SUBST([GNULIB_SYMLINKAT])
   GNULIB_TTYNAME_R=0;            AC_SUBST([GNULIB_TTYNAME_R])
@@ -131,8 +131,8 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
   HAVE_PWRITE=1;          AC_SUBST([HAVE_PWRITE])
   HAVE_READLINK=1;        AC_SUBST([HAVE_READLINK])
   HAVE_READLINKAT=1;      AC_SUBST([HAVE_READLINKAT])
-  HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_SETHOSTNAME=1;     AC_SUBST([HAVE_SETHOSTNAME])
+  HAVE_SLEEP=1;           AC_SUBST([HAVE_SLEEP])
   HAVE_SYMLINK=1;         AC_SUBST([HAVE_SYMLINK])
   HAVE_SYMLINKAT=1;       AC_SUBST([HAVE_SYMLINKAT])
   HAVE_UNLINKAT=1;        AC_SUBST([HAVE_UNLINKAT])
index a9160ebed63667c6059d8895561d2d8ca1670982..de86020e1b1ac99422242d31e0e9103c52c9c5d8 100644 (file)
@@ -104,8 +104,8 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
              -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \
              -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
              -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
-             -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \
+             -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
              -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
              -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
              -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \