From: Paul Eggert Date: Sun, 3 Oct 2010 21:53:34 +0000 (+0200) Subject: Avoid some lines longer than 80 characters. X-Git-Tag: v0.1~3729 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=fb22d8f7dad4a6160090cf16c824aa651425e563;p=gnulib.git Avoid some lines longer than 80 characters. * lib/stdint.in.h: Break long comment lines. * lib/math.in.h: Likewise. (_GL_NUM_UINT_WORDS): New macro, for readability. (gl_signbitf, gl_signbitd, gl_signbitl): Use it. * lib/stdio.in.h: Break lines in _GL_WARN_ON_USE calls. * lib/stdlib.in.h: Likewise. * lib/spawn.in.h: Likewise. * lib/sys_socket.in.h: Update an URL. * lib/sys_stat.in.h: Break long line. --- diff --git a/ChangeLog b/ChangeLog index 18d7d4b59..1d06c162d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-10-03 Paul Eggert + + Avoid some lines longer than 80 characters. + * lib/stdint.in.h: Break long comment lines. + * lib/math.in.h: Likewise. + (_GL_NUM_UINT_WORDS): New macro, for readability. + (gl_signbitf, gl_signbitd, gl_signbitl): Use it. + * lib/stdio.in.h: Break lines in _GL_WARN_ON_USE calls. + * lib/stdlib.in.h: Likewise. + * lib/spawn.in.h: Likewise. + * lib/sys_socket.in.h: Update an URL. + * lib/sys_stat.in.h: Break long line. + 2010-10-03 Bruno Haible Joachim Schmitz (tiny change) diff --git a/lib/math.in.h b/lib/math.in.h index fbc29184f..63950327d 100644 --- a/lib/math.in.h +++ b/lib/math.in.h @@ -609,7 +609,8 @@ _GL_EXTERN_C int isnanf (float x); This function is a gnulib extension, unlike isnan() which applied only to 'double' numbers earlier but now is a type-generic macro. */ # if @HAVE_ISNAND@ -/* The original included above provides a declaration of isnan macro. */ +/* The original included above provides a declaration of isnan + macro. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnand @@ -629,7 +630,8 @@ _GL_EXTERN_C int isnand (double x); #if @GNULIB_ISNANL@ /* Test for NaN for 'long double' numbers. */ # if @HAVE_ISNANL@ -/* The original included above provides a declaration of isnan macro or (older) isnanl function. */ +/* The original included above provides a declaration of isnan + macro or (older) isnanl function. */ # if __GNUC__ >= 4 /* GCC 4.0 and newer provides three built-ins for isnan. */ # undef isnanl @@ -701,11 +703,13 @@ _GL_EXTERN_C int gl_signbitf (float arg); _GL_EXTERN_C int gl_signbitd (double arg); _GL_EXTERN_C int gl_signbitl (long double arg); # if __GNUC__ >= 2 && !__STRICT_ANSI__ +# define _GL_NUM_UINT_WORDS(type) \ + ((sizeof (type) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) # if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf # define gl_signbitf_OPTIMIZED_MACRO # define gl_signbitf(arg) \ ({ union { float _value; \ - unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ + unsigned int _word[_GL_NUM_UINT_WORDS (float)]; \ } _m; \ _m._value = (arg); \ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \ @@ -714,8 +718,8 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd # define gl_signbitd_OPTIMIZED_MACRO # define gl_signbitd(arg) \ - ({ union { double _value; \ - unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ + ({ union { double _value; \ + unsigned int _word[_GL_NUM_UINT_WORDS (double)]; \ } _m; \ _m._value = (arg); \ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \ @@ -725,10 +729,10 @@ _GL_EXTERN_C int gl_signbitl (long double arg); # define gl_signbitl_OPTIMIZED_MACRO # define gl_signbitl(arg) \ ({ union { long double _value; \ - unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \ + unsigned int _word[_GL_NUM_UINT_WORDS (long double)]; \ } _m; \ _m._value = (arg); \ - (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ + (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \ }) # endif # endif diff --git a/lib/spawn.in.h b/lib/spawn.in.h index cc8d9a9c4..73b34399d 100644 --- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -295,7 +295,8 @@ _GL_CXXALIASWARN (posix_spawnattr_destroy); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_destroy # if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY -_GL_WARN_ON_USE (posix_spawnattr_destroy, "posix_spawnattr_destroy is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_destroy, + "posix_spawnattr_destroy is unportable - " "use gnulib module posix_spawnattr_destroy for portability"); # endif #endif @@ -329,7 +330,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getsigdefault); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getsigdefault # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT -_GL_WARN_ON_USE (posix_spawnattr_getsigdefault, "posix_spawnattr_getsigdefault is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getsigdefault, + "posix_spawnattr_getsigdefault is unportable - " "use gnulib module posix_spawnattr_getsigdefault for portability"); # endif #endif @@ -362,7 +364,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setsigdefault); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setsigdefault # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT -_GL_WARN_ON_USE (posix_spawnattr_setsigdefault, "posix_spawnattr_setsigdefault is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setsigdefault, + "posix_spawnattr_setsigdefault is unportable - " "use gnulib module posix_spawnattr_setsigdefault for portability"); # endif #endif @@ -395,7 +398,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getsigmask); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getsigmask # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK -_GL_WARN_ON_USE (posix_spawnattr_getsigmask, "posix_spawnattr_getsigmask is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getsigmask, + "posix_spawnattr_getsigmask is unportable - " "use gnulib module posix_spawnattr_getsigmask for portability"); # endif #endif @@ -428,7 +432,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setsigmask); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setsigmask # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK -_GL_WARN_ON_USE (posix_spawnattr_setsigmask, "posix_spawnattr_setsigmask is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setsigmask, + "posix_spawnattr_setsigmask is unportable - " "use gnulib module posix_spawnattr_setsigmask for portability"); # endif #endif @@ -461,7 +466,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getflags); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getflags # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS -_GL_WARN_ON_USE (posix_spawnattr_getflags, "posix_spawnattr_getflags is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getflags, + "posix_spawnattr_getflags is unportable - " "use gnulib module posix_spawnattr_getflags for portability"); # endif #endif @@ -490,7 +496,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setflags); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setflags # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS -_GL_WARN_ON_USE (posix_spawnattr_setflags, "posix_spawnattr_setflags is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setflags, + "posix_spawnattr_setflags is unportable - " "use gnulib module posix_spawnattr_setflags for portability"); # endif #endif @@ -523,7 +530,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getpgroup); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getpgroup # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP -_GL_WARN_ON_USE (posix_spawnattr_getpgroup, "posix_spawnattr_getpgroup is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getpgroup, + "posix_spawnattr_getpgroup is unportable - " "use gnulib module posix_spawnattr_getpgroup for portability"); # endif #endif @@ -552,7 +560,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setpgroup); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setpgroup # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP -_GL_WARN_ON_USE (posix_spawnattr_setpgroup, "posix_spawnattr_setpgroup is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setpgroup, + "posix_spawnattr_setpgroup is unportable - " "use gnulib module posix_spawnattr_setpgroup for portability"); # endif #endif @@ -585,7 +594,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getschedpolicy); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getschedpolicy # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY -_GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, "posix_spawnattr_getschedpolicy is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, + "posix_spawnattr_getschedpolicy is unportable - " "use gnulib module posix_spawnattr_getschedpolicy for portability"); # endif #endif @@ -614,7 +624,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setschedpolicy); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setschedpolicy # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY -_GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, "posix_spawnattr_setschedpolicy is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, + "posix_spawnattr_setschedpolicy is unportable - " "use gnulib module posix_spawnattr_setschedpolicy for portability"); # endif #endif @@ -647,7 +658,8 @@ _GL_CXXALIASWARN (posix_spawnattr_getschedparam); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_getschedparam # if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM -_GL_WARN_ON_USE (posix_spawnattr_getschedparam, "posix_spawnattr_getschedparam is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_getschedparam, + "posix_spawnattr_getschedparam is unportable - " "use gnulib module posix_spawnattr_getschedparam for portability"); # endif #endif @@ -680,7 +692,8 @@ _GL_CXXALIASWARN (posix_spawnattr_setschedparam); #elif defined GNULIB_POSIXCHECK # undef posix_spawnattr_setschedparam # if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM -_GL_WARN_ON_USE (posix_spawnattr_setschedparam, "posix_spawnattr_setschedparam is unportable - " +_GL_WARN_ON_USE (posix_spawnattr_setschedparam, + "posix_spawnattr_setschedparam is unportable - " "use gnulib module posix_spawnattr_setschedparam for portability"); # endif #endif @@ -710,7 +723,8 @@ _GL_CXXALIASWARN (posix_spawn_file_actions_init); #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_init # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT -_GL_WARN_ON_USE (posix_spawn_file_actions_init, "posix_spawn_file_actions_init is unportable - " +_GL_WARN_ON_USE (posix_spawn_file_actions_init, + "posix_spawn_file_actions_init is unportable - " "use gnulib module posix_spawn_file_actions_init for portability"); # endif #endif @@ -739,7 +753,8 @@ _GL_CXXALIASWARN (posix_spawn_file_actions_destroy); #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_destroy # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY -_GL_WARN_ON_USE (posix_spawn_file_actions_destroy, "posix_spawn_file_actions_destroy is unportable - " +_GL_WARN_ON_USE (posix_spawn_file_actions_destroy, + "posix_spawn_file_actions_destroy is unportable - " "use gnulib module posix_spawn_file_actions_destroy for portability"); # endif #endif @@ -777,7 +792,8 @@ _GL_CXXALIASWARN (posix_spawn_file_actions_addopen); #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addopen # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN -_GL_WARN_ON_USE (posix_spawn_file_actions_addopen, "posix_spawn_file_actions_addopen is unportable - " +_GL_WARN_ON_USE (posix_spawn_file_actions_addopen, + "posix_spawn_file_actions_addopen is unportable - " "use gnulib module posix_spawn_file_actions_addopen for portability"); # endif #endif @@ -807,7 +823,8 @@ _GL_CXXALIASWARN (posix_spawn_file_actions_addclose); #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_addclose # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE -_GL_WARN_ON_USE (posix_spawn_file_actions_addclose, "posix_spawn_file_actions_addclose is unportable - " +_GL_WARN_ON_USE (posix_spawn_file_actions_addclose, + "posix_spawn_file_actions_addclose is unportable - " "use gnulib module posix_spawn_file_actions_addclose for portability"); # endif #endif @@ -841,7 +858,8 @@ _GL_CXXALIASWARN (posix_spawn_file_actions_adddup2); #elif defined GNULIB_POSIXCHECK # undef posix_spawn_file_actions_adddup2 # if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 -_GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, "posix_spawn_file_actions_adddup2 is unportable - " +_GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, + "posix_spawn_file_actions_adddup2 is unportable - " "use gnulib module posix_spawn_file_actions_adddup2 for portability"); # endif #endif diff --git a/lib/stdint.in.h b/lib/stdint.in.h index a861c0794..26f9e6b7a 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -475,8 +475,9 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - /* wchar_t limits */ /* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested - includes -> -> -> , and the latter includes + This include is not on the top, above, because on OSF/1 4.0 we have a + sequence of nested includes + -> -> -> , and the latter includes and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H diff --git a/lib/stdio.in.h b/lib/stdio.in.h index 135b08485..442183c32 100644 --- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -265,7 +265,8 @@ _GL_CXXALIASWARN (freopen); #elif defined GNULIB_POSIXCHECK # undef freopen /* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - " +_GL_WARN_ON_USE (freopen, + "freopen on Win32 platforms is not POSIX compatible - " "use gnulib module freopen for portability"); #endif diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index de13bf7f8..10efdcadb 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -177,7 +177,8 @@ _GL_CXXALIASWARN (canonicalize_file_name); #elif defined GNULIB_POSIXCHECK # undef canonicalize_file_name # if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME -_GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - " +_GL_WARN_ON_USE (canonicalize_file_name, + "canonicalize_file_name is unportable - " "use gnulib module canonicalize-lgpl for portability"); # endif #endif diff --git a/lib/sys_socket.in.h b/lib/sys_socket.in.h index c4daaacf6..ee8ce1180 100644 --- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -122,8 +122,8 @@ struct sockaddr_storage adding AC_DEFINE(WINVER, 0x0501) to configure.ac. Note that your code may not run on older Windows releases then. My Windows 2000 box was not able to run the code, for example. The situation is - slightly confusing because: - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winsock/winsock/getaddrinfo_2.asp + slightly confusing because + suggests that getaddrinfo should be available on all Windows releases. */ diff --git a/lib/sys_stat.in.h b/lib/sys_stat.in.h index 3496a199a..4e2f44527 100644 --- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -594,7 +594,8 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " # else /* !_LARGE_FILES */ # define stat(name, st) rpl_stat (name, st) # endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2)); +_GL_EXTERN_C int stat (const char *name, struct stat *buf) + _GL_ARG_NONNULL ((1, 2)); # endif #elif defined GNULIB_POSIXCHECK # undef stat