Mercurial > hg > octave-nkf > gnulib-hg
changeset 13758:e50f7d9e3040
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.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 03 Oct 2010 23:53:34 +0200 |
parents | 87aaf9340686 |
children | 38b745d4e6a4 |
files | ChangeLog lib/math.in.h lib/spawn.in.h lib/stdint.in.h lib/stdio.in.h lib/stdlib.in.h lib/sys_socket.in.h lib/sys_stat.in.h |
diffstat | 8 files changed, 71 insertions(+), 32 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2010-10-03 Paul Eggert <eggert@cs.ucla.edu> + + 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 <bruno@clisp.org> Joachim Schmitz <schmitz@hp.com> (tiny change)
--- a/lib/math.in.h +++ b/lib/math.in.h @@ -609,7 +609,8 @@ 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 <math.h> included above provides a declaration of isnan macro. */ +/* The original <math.h> 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 @@ #if @GNULIB_ISNANL@ /* Test for NaN for 'long double' numbers. */ # if @HAVE_ISNANL@ -/* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function. */ +/* The original <math.h> 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_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 @@ # 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 @@ # 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
--- a/lib/spawn.in.h +++ b/lib/spawn.in.h @@ -295,7 +295,8 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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 @@ #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
--- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -475,8 +475,9 @@ /* 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 <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, 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 + <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes <stdint.h> and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) # define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
--- a/lib/stdio.in.h +++ b/lib/stdio.in.h @@ -265,7 +265,8 @@ #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
--- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -177,7 +177,8 @@ #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
--- a/lib/sys_socket.in.h +++ b/lib/sys_socket.in.h @@ -122,8 +122,8 @@ 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 + <http://msdn.microsoft.com/en-us/library/ms738520> suggests that getaddrinfo should be available on all Windows releases. */
--- a/lib/sys_stat.in.h +++ b/lib/sys_stat.in.h @@ -594,7 +594,8 @@ # 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