* system.h (STDIN_FILENO): Provide default definition if one is not
provided by the system header files.
(STDOUT_FILENO, STDERR_FILENO): Likewise.
* i386/xm-djgpp.h (COLLECT2_HOST_INITIALIZATION): New macro.
* collect2.c (main): Use it.
(pexecute_pid): New variable. Holds return value from call to pexecute.
(collect2_execute): Rework to use pexecute instead of fork.
(collect2_wait): Use pwait() instead of wait().
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r25960
* system.h: Use putc_unlocked, fputc_unlocked, and
fputs_unlocked only if putc_unlocked has a prototype already.
Prototype fputs_unlocked if necessary.
* configure.in: Check for prototypes of putc_unlocked and
fputs_unlocked.
* acconfig.h: Updated.
* config.in, configure: Rebuilt.
From-SVN: r25855
* system.h (const, inline): Move the stage2 handling of these
keywords-as-macros from here...
* gansidecl.h (const, inline): ...to here.
(This became necessary after using `const' in config directory headers,
which get included before system.h does. If we're going to reset these
keywords, we must do so before absolutely any other header file.)
From-SVN: r25626
* cccp.c: Don't define HOST_WIDE_INT. Replace all occurrences of
WIDE_INT with WIDEST_INT.
* cexp.y: Likewise.
Don't define unsigned_HOST_WIDE_INT, CHAR_BIT or
HOST_BITS_PER_WIDE_INT. Replace occurrences of PRINTF_PROTO_1()
style with PVPROTO() ATTRIBUTE_PRINTF_1 style macros. Replace
occurrences of "unsigned_HOST" with "unsigned HOST". Provide a
definition of variable `c89' when compiling a test binary and set it.
* system.h: Don't define the PRINTF_PROTO_* macros.
From-SVN: r25217
* configure.in: Test for availability of putc_unlocked, fputc_unlocked,
and fputs_unlocked.
* configure: Rebuilt.
* system.h: If the *_unlocked functions are available use them
instead of the locked counterparts by defining macros.
* config.in: Regenerated.
From-SVN: r24175
Add support for strsignal, for platforms which have it but don't have
sys_siglist (like Solaris 2.7.)
* acconfig.h (NEED_DECLARATION_STRSIGNAL): Provide a stub.
* collect2.c: Don't declare `sys_siglist' here.
(my_strsignal): Prototype and define new function. Use it in
place of `sys_siglist' hacks.
* mips_tfile.c: Likewise.
* configure.in (AC_CHECK_FUNCS): Check for strsignal.
(GCC_NEED_DECLARATIONS): Likewise.
* system.h (strsignal): Prototype it, if necessary.
(sys_siglist): Declare it, if necessary.
From-SVN: r22403
* aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
safe to include both string.h and strings.h together.
(GCC_NEED_DECLARATION): Test STRING_WITH_STRINGS when deciding
which headers to search for function declarations. Continue to
prefer string.h over strings.h when both are not acceptable.
* acconfig.h (STRING_WITH_STRINGS): Add stub.
* configure.in: Call GCC_HEADER_STRING.
* system.h: Test STRING_WITH_STRINGS when deciding which headers
to include. Continue to prefer string.h over strings.h when both
are not acceptable.
From-SVN: r22204
Add the ability to GCC_NEED_DECLARATION{S} for looking in arbitrary
header files when searching for function declarations. Use this
functionality to check for getrlimit/setrlimit.
* aclocal.m4 (GCC_NEED_DECLARATION): Accept an optional second
argument, which is typically preprocessor code used to draw in
additional header files when looking for a function declaration.
(GCC_NEED_DECLARATIONS): Likewise.
* configure.in (GCC_NEED_DECLARATIONS): Add checks for getrlimit
and setrlimit, search for them in sys/resource.h.
* acconfig.h: Add stubs for NEED_DECLARATION_GETRLIMIT and
NEED_DECLARATION_SETRLIMIT.
* system.h: Prototype getrlimit/setrlimit if necessary.
From-SVN: r20831
* gansidecl.h (ATTRIBUTE_UNUSED): Use __unused__ not `unused'.
Don't define NULL here. Also, remove all vestiges of autoconf
based checks for bcmp/bcopy/bzero/index/rindex.
* system.h: Immediately after including stdio.h, check for and if
necessary provide a default definition of NULL.
From-SVN: r20814
* acconfig.h (HAVE_VOLATILE): Insert stub for autoconf.
* alocal.m4 (GCC_C_VOLATILE): New autoconf test.
* configure.in: Use GCC_C_VOLATILE.
* system.h (volatile): Define as empty if no volatile support is
available.
* genemit.c (output_add_clobbers): Removed unused variable 'i' from
generated fucntion.
From-SVN: r19653
Consolidate O_RDONLY/O_WRONLY fallback definitions from various files
into system.h.
* system.h: Wrap time.h and sys/file.h in autoconf checks.
Provide default definitions for O_RDONLY and O_WRONLY here.
* cccp.c, cpplib.c, fix-header.c, gcc.c, protoize.c: Not here.
From-SVN: r19571
I've backed out of including stat.h via system.h because stat.h can
define static functions (eg on x86 svr4 according to jfc@mit.edu)
causing code bloat.
* system.h: Remove sys/stat.h.
* gcc.c: Add sys/stat.h.
From-SVN: r18289
* system.h: Fix return type of bcmp prototype from `void' to `int'.
Make bcopy, bcmp and bzero prototypes explicitly `extern'.
Add a prototype for getenv.
From-SVN: r18018