bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mutilated stdlib.h


From: Bruce Korb
Subject: Mutilated stdlib.h
Date: Thu, 31 Mar 2011 17:36:15 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 SUSE/3.1.7 Thunderbird/3.1.7

Hi,

I used gnulib-tool to pull some stuff into a new project directory:

    local opts='--symlink --import'
    local glt=$(which gnulib-tool)
    test -f "${glt}" || {
        glt=$(echo ~gnu/proj/gnulib)/gnulib-tool
        test -f "${glt}" || die "Please put gnulib into PATH"
    }
    local modules='close malloc-posix git-version-gen stdbool
    snprintf'
    ${glt} ${opts} ${modules}

And when I got around to building it, the editing commands for stdlib.h
were in the typescript and the result was an unusable stdlib.h.

1. Is there something simple to look at?
2. If not, is there some additional info?  config logs, etc.
   This is a pretty vanilla x86-64 Linux (openSuSE 11.4)..

> rm -f stdlib.h-t stdlib.h && \
> { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
>   sed -e 's|@''INCLUDE_NEXT''@||g' \
>       -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
>       -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
>       -e 's|@''NEXT_STDLIB_H''@||g' \
>       -e 's|@''GNULIB__EXIT''@||g' \
>       -e 's|@''GNULIB_ATOLL''@||g' \
>       -e 's|@''GNULIB_CALLOC_POSIX''@||g' \
>       -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@||g' \
>       -e 's|@''GNULIB_GETLOADAVG''@||g' \
>       -e 's|@''GNULIB_GETSUBOPT''@||g' \
>       -e 's|@''GNULIB_GRANTPT''@||g' \
>       -e 's|@''GNULIB_MALLOC_POSIX''@||g' \
>       -e 's|@''GNULIB_MBTOWC''@||g' \
>       -e 's|@''GNULIB_MKDTEMP''@||g' \
>       -e 's|@''GNULIB_MKOSTEMP''@||g' \
>       -e 's|@''GNULIB_MKOSTEMPS''@||g' \
>       -e 's|@''GNULIB_MKSTEMP''@||g' \
>       -e 's|@''GNULIB_MKSTEMPS''@||g' \
>       -e 's|@''GNULIB_PTSNAME''@||g' \
>       -e 's|@''GNULIB_PUTENV''@||g' \
>       -e 's|@''GNULIB_RANDOM_R''@||g' \
>       -e 's|@''GNULIB_REALLOC_POSIX''@||g' \
>       -e 's|@''GNULIB_REALPATH''@||g' \
>       -e 's|@''GNULIB_RPMATCH''@||g' \
>       -e 's|@''GNULIB_SETENV''@||g' \
>       -e 's|@''GNULIB_STRTOD''@||g' \
>       -e 's|@''GNULIB_STRTOLL''@||g' \
>       -e 's|@''GNULIB_STRTOULL''@||g' \
>       -e 's|@''GNULIB_SYSTEM_POSIX''@||g' \
>       -e 's|@''GNULIB_UNLOCKPT''@||g' \
>       -e 's|@''GNULIB_UNSETENV''@||g' \
>       -e 's|@''GNULIB_WCTOMB''@||g' \
>       < ../../lib/stdlib.in.h | \
>   sed -e 's|@''HAVE__EXIT''@||g' \
>       -e 's|@''HAVE_ATOLL''@||g' \
>       -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@||g' \
>       -e 's|@''HAVE_DECL_GETLOADAVG''@||g' \
>       -e 's|@''HAVE_GETSUBOPT''@||g' \
>       -e 's|@''HAVE_GRANTPT''@||g' \
>       -e 's|@''HAVE_MKDTEMP''@||g' \
>       -e 's|@''HAVE_MKOSTEMP''@||g' \
>       -e 's|@''HAVE_MKOSTEMPS''@||g' \
>       -e 's|@''HAVE_MKSTEMP''@||g' \
>       -e 's|@''HAVE_MKSTEMPS''@||g' \
>       -e 's|@''HAVE_PTSNAME''@||g' \
>       -e 's|@''HAVE_RANDOM_H''@||g' \
>       -e 's|@''HAVE_RANDOM_R''@||g' \
>       -e 's|@''HAVE_REALPATH''@||g' \
>       -e 's|@''HAVE_RPMATCH''@||g' \
>       -e 's|@''HAVE_DECL_SETENV''@||g' \
>       -e 's|@''HAVE_STRTOD''@||g' \
>       -e 's|@''HAVE_STRTOLL''@||g' \
>       -e 's|@''HAVE_STRTOULL''@||g' \
>       -e 's|@''HAVE_STRUCT_RANDOM_DATA''@||g' \
>       -e 's|@''HAVE_SYS_LOADAVG_H''@||g' \
>       -e 's|@''HAVE_UNLOCKPT''@||g' \
>       -e 's|@''HAVE_DECL_UNSETENV''@||g' \
>       -e 's|@''REPLACE_CALLOC''@||g' \
>       -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@||g' \
>       -e 's|@''REPLACE_MALLOC''@||g' \
>       -e 's|@''REPLACE_MBTOWC''@||g' \
>       -e 's|@''REPLACE_MKSTEMP''@||g' \
>       -e 's|@''REPLACE_PUTENV''@||g' \
>       -e 's|@''REPLACE_REALLOC''@||g' \
>       -e 's|@''REPLACE_REALPATH''@||g' \
>       -e 's|@''REPLACE_SETENV''@||g' \
>       -e 's|@''REPLACE_STRTOD''@||g' \
>       -e 's|@''REPLACE_UNSETENV''@||g' \
>       -e 's|@''REPLACE_WCTOMB''@||g' \
>       -e '/definitions of _GL_FUNCDECL_RPL/r c++defs.h' \
>       -e '/definition of _GL_ARG_NONNULL/r arg-nonnull.h' \
>       -e '/definition of _GL_WARN_ON_USE/r warn-on-use.h'; \
> } > stdlib.h-t && \
> mv stdlib.h-t stdlib.h

Yielding a header looking like this (with some white space removed):

> #if __GNUC__ >= 3
> @PRAGMA_SYSTEM_HEADER@
> #endif
> @PRAGMA_COLUMNS@
> #if defined __need_malloc_and_calloc
> #
> #else
> #ifndef _GL_STDLIB_H
> /* The include_next requires a split double-inclusion guard.  */
> #
> #ifndef _GL_STDLIB_H
> #define _GL_STDLIB_H
> /* NetBSD 5.0 mis-defines NULL.  */
> #include <stddef.h>
> /* MirBSD 10 defines WEXITSTATUS in <sys/wait.h>, not in <stdlib.h>.  */
> #if  && !defined WEXITSTATUS
> # include <sys/wait.h>
> #endif



reply via email to

[Prev in Thread] Current Thread [Next in Thread]