Mercurial > hg > octave-lyh > gnulib-hg
changeset 14384:588ed4cdea87
Fix misindentation of preprocessor directives.
* lib/argp-namefrob.h: Reindent preprocessor directives.
* lib/getopt_int.h (struct _getopt_data): Likewise.
* lib/progreloc.c (maybe_executable, find_executable): Likewise.
* lib/vasnprintf.c (decode_long_double): Likewise.
* tests/test-argmatch.c: Insert blank lines, for clarity.
* tests/test-exclude.c: Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 23 Feb 2011 10:58:06 +0100 |
parents | e514f670d508 |
children | ed68f818ecca |
files | ChangeLog lib/argp-namefrob.h lib/getopt_int.h lib/progreloc.c lib/vasnprintf.c tests/test-argmatch.c tests/test-exclude.c |
diffstat | 7 files changed, 42 insertions(+), 28 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2011-02-23 Bruno Haible <bruno@clisp.org> + + Fix misindentation of preprocessor directives. + * lib/argp-namefrob.h: Reindent preprocessor directives. + * lib/getopt_int.h (struct _getopt_data): Likewise. + * lib/progreloc.c (maybe_executable, find_executable): Likewise. + * lib/vasnprintf.c (decode_long_double): Likewise. + * tests/test-argmatch.c: Insert blank lines, for clarity. + * tests/test-exclude.c: Likewise. + 2011-02-22 Bruno Haible <bruno@clisp.org> ioctl: Fix for MacOS X in 64-bit mode.
--- a/lib/argp-namefrob.h +++ b/lib/argp-namefrob.h @@ -100,45 +100,45 @@ #endif #if defined(HAVE_DECL_FEOF_UNLOCKED) && !HAVE_DECL_FEOF_UNLOCKED # define feof_unlocked(x) feof (x) -# endif +#endif #if defined(HAVE_DECL_FERROR_UNLOCKED) && !HAVE_DECL_FERROR_UNLOCKED # define ferror_unlocked(x) ferror (x) -# endif +#endif #if defined(HAVE_DECL_FFLUSH_UNLOCKED) && !HAVE_DECL_FFLUSH_UNLOCKED # define fflush_unlocked(x) fflush (x) -# endif +#endif #if defined(HAVE_DECL_FGETS_UNLOCKED) && !HAVE_DECL_FGETS_UNLOCKED # define fgets_unlocked(x,y,z) fgets (x,y,z) -# endif +#endif #if defined(HAVE_DECL_FPUTC_UNLOCKED) && !HAVE_DECL_FPUTC_UNLOCKED # define fputc_unlocked(x,y) fputc (x,y) -# endif +#endif #if defined(HAVE_DECL_FPUTS_UNLOCKED) && !HAVE_DECL_FPUTS_UNLOCKED # define fputs_unlocked(x,y) fputs (x,y) -# endif +#endif #if defined(HAVE_DECL_FREAD_UNLOCKED) && !HAVE_DECL_FREAD_UNLOCKED # define fread_unlocked(w,x,y,z) fread (w,x,y,z) -# endif +#endif #if defined(HAVE_DECL_FWRITE_UNLOCKED) && !HAVE_DECL_FWRITE_UNLOCKED # define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z) -# endif +#endif #if defined(HAVE_DECL_GETC_UNLOCKED) && !HAVE_DECL_GETC_UNLOCKED # define getc_unlocked(x) getc (x) -# endif +#endif #if defined(HAVE_DECL_GETCHAR_UNLOCKED) && !HAVE_DECL_GETCHAR_UNLOCKED # define getchar_unlocked() getchar () -# endif +#endif #if defined(HAVE_DECL_PUTC_UNLOCKED) && !HAVE_DECL_PUTC_UNLOCKED # define putc_unlocked(x,y) putc (x,y) -# endif +#endif #if defined(HAVE_DECL_PUTCHAR_UNLOCKED) && !HAVE_DECL_PUTCHAR_UNLOCKED # define putchar_unlocked(x) putchar (x) -# endif +#endif #endif /* !_LIBC */ #ifndef __set_errno -#define __set_errno(e) (errno = (e)) +# define __set_errno(e) (errno = (e)) #endif #if defined GNULIB_ARGP_DISABLE_DIRNAME
--- a/lib/getopt_int.h +++ b/lib/getopt_int.h @@ -108,7 +108,7 @@ #if defined _LIBC && defined USE_NONOPTION_FLAGS int __nonoption_flags_max_len; int __nonoption_flags_len; -# endif +#endif }; /* The initializer is necessary to set OPTIND and OPTERR to their
--- a/lib/progreloc.c +++ b/lib/progreloc.c @@ -117,7 +117,7 @@ if (access (filename, X_OK) < 0) return false; -#ifdef __linux__ +# ifdef __linux__ if (executable_fd >= 0) { /* If we already have an executable_fd, check that filename points to @@ -135,7 +135,7 @@ return false; } } -#endif +# endif #endif return true; @@ -157,7 +157,7 @@ /* Shouldn't happen. */ return NULL; { -#if defined __CYGWIN__ +# if defined __CYGWIN__ /* cygwin-1.5.13 (2005-03-01) or newer would also allow a Linux-like implementation: readlink of "/proc/self/exe". But using the result of the Win32 system call is simpler and is consistent with the @@ -176,12 +176,12 @@ return NULL; /* Call canonicalize_file_name, because Cygwin supports symbolic links. */ return canonicalize_file_name (location_as_posix_path); -#else +# else return xstrdup (location); -#endif +# endif } #else /* Unix && !Cygwin */ -#ifdef __linux__ +# ifdef __linux__ /* The executable is accessible as /proc/<pid>/exe. In newer Linux versions, also as /proc/self/exe. Linux >= 2.1 provides a symlink to the true pathname; older Linux versions give only device and ino, @@ -205,8 +205,8 @@ executable_fd = open (buf, O_EXEC, 0); } } -#endif -#if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH +# endif +# if HAVE_MACH_O_DYLD_H && HAVE__NSGETEXECUTABLEPATH /* On MacOS X 10.2 or newer, the function int _NSGetExecutablePath (char *buf, uint32_t *bufsize); can be used to retrieve the executable's full path. */ @@ -215,7 +215,7 @@ if (_NSGetExecutablePath (location, &length) == 0 && location[0] == '/') return canonicalize_file_name (location); -#endif +# endif /* Guess the executable's full path. We assume the executable has been called via execlp() or execvp() with properly set up argv[0]. The login(1) convention to add a '-' prefix to argv[0] is not supported. */ @@ -256,10 +256,10 @@ /* We have a path item at p, of length p_len. Now concatenate the path item and argv0. */ concat_name = (char *) xmalloc (p_len + strlen (argv0) + 2); -#ifdef NO_XMALLOC +# ifdef NO_XMALLOC if (concat_name == NULL) return NULL; -#endif +# endif if (p_len == 0) /* An empty PATH element designates the current directory. */ strcpy (concat_name, argv0);
--- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -935,11 +935,11 @@ abort (); m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; } -#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess - precision. */ +# if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess + precision. */ if (!(y == 0.0L)) abort (); -#endif +# endif /* Normalise. */ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) m.nlimbs--;
--- a/tests/test-argmatch.c +++ b/tests/test-argmatch.c @@ -29,6 +29,7 @@ /* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL + # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) # define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else @@ -37,6 +38,7 @@ ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN; ARGMATCH_DIE_DECL { exit (1); } + #endif enum backup_type
--- a/tests/test-exclude.c +++ b/tests/test-exclude.c @@ -63,6 +63,7 @@ /* Some packages define ARGMATCH_DIE and ARGMATCH_DIE_DECL in <config.h>, and thus must link with a definition of that function. Provide it here. */ #ifdef ARGMATCH_DIE_DECL + # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8) # define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) # else @@ -71,6 +72,7 @@ ARGMATCH_DIE_DECL _GL_ATTRIBUTE_NORETURN; ARGMATCH_DIE_DECL { exit (1); } + #endif int