diff options
author | YamaArashi <shadow962@live.com> | 2016-02-13 14:04:10 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2016-02-13 14:04:10 -0800 |
commit | 47d5ab74c312567d17cd5df362d73d36f53eb0c2 (patch) | |
tree | 8d5fab1cade86a10154b874da6786121e35caa8d /gcc | |
parent | 87926b4bcc3046ac85fabda09178e9bf50dd8381 (diff) |
rely on configure less
Diffstat (limited to 'gcc')
-rwxr-xr-x | gcc/bitmap.c | 14 | ||||
-rwxr-xr-x | gcc/gcc.c | 17 | ||||
-rwxr-xr-x | gcc/genattrtab.c | 12 | ||||
-rwxr-xr-x | gcc/getpwd.c | 38 | ||||
-rwxr-xr-x | gcc/gmon.c | 329 | ||||
-rwxr-xr-x | gcc/machmode.h | 12 | ||||
-rwxr-xr-x | gcc/print-rtl.c | 3 | ||||
-rwxr-xr-x | gcc/print-tree.c | 10 | ||||
-rwxr-xr-x | gcc/system.h | 170 | ||||
-rwxr-xr-x | gcc/toplev.c | 34 |
10 files changed, 23 insertions, 616 deletions
diff --git a/gcc/bitmap.c b/gcc/bitmap.c index a5aa2e7..1ca00b0 100755 --- a/gcc/bitmap.c +++ b/gcc/bitmap.c @@ -559,23 +559,13 @@ bitmap_debug_file (file, head) { bitmap_element *ptr; - fprintf (file, "\nfirst = "); - fprintf (file, HOST_PTR_PRINTF, head->first); - fprintf (file, " current = "); - fprintf (file, HOST_PTR_PRINTF, head->current); - fprintf (file, " indx = %u\n", head->indx); + fprintf (file, "\nfirst = %p current = %p indx = %u\n", head->first, head->current, head->indx); for (ptr = head->first; ptr; ptr = ptr->next) { int i, j, col = 26; - fprintf (file, "\t"); - fprintf (file, HOST_PTR_PRINTF, ptr); - fprintf (file, " next = "); - fprintf (file, HOST_PTR_PRINTF, ptr->next); - fprintf (file, " prev = "); - fprintf (file, HOST_PTR_PRINTF, ptr->prev); - fprintf (file, " indx = %u\n\t\tbits = {", ptr->indx); + fprintf (file, "\t%p next = %p prev = %p indx = %u\n\t\tbits = {", ptr, ptr->next, ptr->prev, ptr->indx); for (i = 0; i < BITMAP_ELEMENT_WORDS; i++) for (j = 0; j < HOST_BITS_PER_WIDE_INT; j++) @@ -1161,22 +1161,7 @@ char * xstrerror(e) int e; { -#ifdef HAVE_STRERROR - - return strerror(e); - -#else - - static char buffer[30]; - if (!e) - return "cannot access"; - - if (e > 0 && e < sys_nerr) - return sys_errlist[e]; - - sprintf (buffer, "Unknown error %d", e); - return buffer; -#endif + return strerror(e); } static char * diff --git a/gcc/genattrtab.c b/gcc/genattrtab.c index a86a739..1087e65 100755 --- a/gcc/genattrtab.c +++ b/gcc/genattrtab.c @@ -5898,18 +5898,6 @@ main (argc, argv) rtx tem; int i; -#if defined (RLIMIT_STACK) && defined (HAVE_GETRLIMIT) && defined (HAVE_SETRLIMIT) - /* Get rid of any avoidable limit on stack size. */ - { - struct rlimit rlim; - - /* Set the stack limit huge so that alloca does not fail. */ - getrlimit (RLIMIT_STACK, &rlim); - rlim.rlim_cur = rlim.rlim_max; - setrlimit (RLIMIT_STACK, &rlim); - } -#endif - obstack_init (rtl_obstack); obstack_init (hash_obstack); obstack_init (temp_obstack); diff --git a/gcc/getpwd.c b/gcc/getpwd.c index 3547bc8..f6d87b9 100755 --- a/gcc/getpwd.c +++ b/gcc/getpwd.c @@ -3,22 +3,6 @@ #include "config.h" #include "system.h" -/* Virtually every UN*X system now in common use (except for pre-4.3-tahoe - BSD systems) now provides getcwd as called for by POSIX. Allow for - the few exceptions to the general rule here. */ - -#if !(defined (POSIX) || defined (USG) ) || defined (HAVE_GETWD) -#define getcwd(buf,len) getwd(buf) -#ifdef MAXPATHLEN -#define GUESSPATHLEN (MAXPATHLEN + 1) -#else -#define GUESSPATHLEN 100 -#endif -#else /* (defined (USG)) */ -/* We actually use this as a starting point, not a limit. */ -#define GUESSPATHLEN 100 -#endif /* (defined (USG)) */ - #if !( defined(_WIN32) && !defined(__CYGWIN__)) /* Get the working directory. Use the PWD environment variable if it's @@ -33,32 +17,33 @@ getpwd () static int failure_errno; char *p = pwd; - size_t s; + size_t guessed_len; struct stat dotstat, pwdstat; if (!p && !(errno = failure_errno)) { - if (! ((p = getenv ("PWD")) != 0 + int env_ok = ((p = getenv ("PWD")) != 0 && *p == '/' && stat (p, &pwdstat) == 0 && stat (".", &dotstat) == 0 && dotstat.st_ino == pwdstat.st_ino - && dotstat.st_dev == pwdstat.st_dev)) + && dotstat.st_dev == pwdstat.st_dev); - /* The shortcut didn't work. Try the slow, ``sure'' way. */ - for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2) + if (!env_ok) + { + /* The shortcut didn't work. Try the slow, ``sure'' way. */ + for (guessed_len = 256; !getcwd(p = xmalloc (guessed_len), guessed_len); guessed_len *= 2) { int e = errno; free (p); -#ifdef ERANGE if (e != ERANGE) -#endif { errno = failure_errno = e; p = 0; break; } } + } /* Cache the result. This assumes that the program does not invoke chdir between calls to getpwd. */ @@ -69,18 +54,13 @@ getpwd () #else /* _WIN32 && !__CYGWIN__ */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 255 -#endif - char * getpwd () { static char *pwd = 0; if (!pwd) - pwd = getcwd (xmalloc (MAXPATHLEN + 1), MAXPATHLEN + 1 - ); + pwd = _getcwd(NULL, 0); return pwd; } diff --git a/gcc/gmon.c b/gcc/gmon.c deleted file mode 100755 index 2bb7366..0000000 --- a/gcc/gmon.c +++ /dev/null @@ -1,329 +0,0 @@ -/*- - * Copyright (c) 1991, 1998 The Regents of the University of California. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -#ifndef lint -static char sccsid[] = "@(#)gmon.c 5.3 (Berkeley) 5/22/91"; -#endif /* not lint */ - -#if 0 -#include <unistd.h> - -#endif -#ifdef DEBUG -#include <stdio.h> -#endif - -#include "gmon.h" - -extern mcount() asm ("mcount"); -extern char *minbrk asm ("minbrk"); - -#ifdef __alpha -extern char *sbrk (); -#endif - - /* - * froms is actually a bunch of unsigned shorts indexing tos - */ -static int profiling = 3; -static unsigned short *froms; -static struct tostruct *tos = 0; -static long tolimit = 0; -static char *s_lowpc = 0; -static char *s_highpc = 0; -static unsigned long s_textsize = 0; - -static int ssiz; -static char *sbuf; -static int s_scale; - /* see profil(2) where this is describe (incorrectly) */ -#define SCALE_1_TO_1 0x10000L - -#define MSG "No space for profiling buffer(s)\n" - -monstartup(lowpc, highpc) - char *lowpc; - char *highpc; -{ - int monsize; - char *buffer; - register int o; - - /* - * round lowpc and highpc to multiples of the density we're using - * so the rest of the scaling (here and in gprof) stays in ints. - */ - lowpc = (char *) - ROUNDDOWN((unsigned) lowpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_lowpc = lowpc; - highpc = (char *) - ROUNDUP((unsigned) highpc, HISTFRACTION*sizeof(HISTCOUNTER)); - s_highpc = highpc; - s_textsize = highpc - lowpc; - monsize = (s_textsize / HISTFRACTION) + sizeof(struct phdr); - buffer = sbrk( monsize ); - if ( buffer == (char *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - return; - } - froms = (unsigned short *) sbrk( s_textsize / HASHFRACTION ); - if ( froms == (unsigned short *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - return; - } - tolimit = s_textsize * ARCDENSITY / 100; - if ( tolimit < MINARCS ) { - tolimit = MINARCS; - } else if ( tolimit > 65534 ) { - tolimit = 65534; - } - tos = (struct tostruct *) sbrk( tolimit * sizeof( struct tostruct ) ); - if ( tos == (struct tostruct *) -1 ) { - write( 2 , MSG , sizeof(MSG) ); - froms = 0; - tos = 0; - return; - } - minbrk = sbrk(0); - tos[0].link = 0; - sbuf = buffer; - ssiz = monsize; - ( (struct phdr *) buffer ) -> lpc = lowpc; - ( (struct phdr *) buffer ) -> hpc = highpc; - ( (struct phdr *) buffer ) -> ncnt = ssiz; - monsize -= sizeof(struct phdr); - if ( monsize <= 0 ) - return; - o = highpc - lowpc; - if( monsize < o ) -#ifndef hp300 - s_scale = ( (float) monsize / o ) * SCALE_1_TO_1; -#else /* avoid floating point */ - { - int quot = o / monsize; - - if (quot >= 0x10000) - s_scale = 1; - else if (quot >= 0x100) - s_scale = 0x10000 / quot; - else if (o >= 0x800000) - s_scale = 0x1000000 / (o / (monsize >> 8)); - else - s_scale = 0x1000000 / ((o << 8) / monsize); - } -#endif - else - s_scale = SCALE_1_TO_1; - moncontrol(1); -} - -_mcleanup() -{ - int fd; - int fromindex; - int endfrom; - char *frompc; - int toindex; - struct rawarc rawarc; - - moncontrol(0); - fd = creat( "gmon.out" , 0666 ); - if ( fd < 0 ) { - perror( "mcount: gmon.out" ); - return; - } -# ifdef DEBUG - fprintf( stderr , "[mcleanup] sbuf 0x%x ssiz %d\n" , sbuf , ssiz ); -# endif DEBUG - write( fd , sbuf , ssiz ); - endfrom = s_textsize / (HASHFRACTION * sizeof(*froms)); - for ( fromindex = 0 ; fromindex < endfrom ; fromindex++ ) { - if ( froms[fromindex] == 0 ) { - continue; - } - frompc = s_lowpc + (fromindex * HASHFRACTION * sizeof(*froms)); - for (toindex=froms[fromindex]; toindex!=0; toindex=tos[toindex].link) { -# ifdef DEBUG - fprintf( stderr , - "[mcleanup] frompc 0x%x selfpc 0x%x count %d\n" , - frompc , tos[toindex].selfpc , tos[toindex].count ); -# endif DEBUG - rawarc.raw_frompc = (unsigned long) frompc; - rawarc.raw_selfpc = (unsigned long) tos[toindex].selfpc; - rawarc.raw_count = tos[toindex].count; - write( fd , &rawarc , sizeof rawarc ); - } - } - close( fd ); -} - -mcount() -{ - register char *selfpc; - register unsigned short *frompcindex; - register struct tostruct *top; - register struct tostruct *prevtop; - register long toindex; - - /* - * find the return address for mcount, - * and the return address for mcount's caller. - */ - - /* selfpc = pc pushed by mcount call. - This identifies the function that was just entered. */ - selfpc = (void *) __builtin_return_address (0); - /* frompcindex = pc in preceding frame. - This identifies the caller of the function just entered. */ - frompcindex = (void *) __builtin_return_address (1); - /* - * check that we are profiling - * and that we aren't recursively invoked. - */ - if (profiling) { - goto out; - } - profiling++; - /* - * check that frompcindex is a reasonable pc value. - * for example: signal catchers get called from the stack, - * not from text space. too bad. - */ - frompcindex = (unsigned short *) ((long) frompcindex - (long) s_lowpc); - if ((unsigned long) frompcindex > s_textsize) { - goto done; - } - frompcindex = - &froms[((long) frompcindex) / (HASHFRACTION * sizeof(*froms))]; - toindex = *frompcindex; - if (toindex == 0) { - /* - * first time traversing this arc - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - *frompcindex = toindex; - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = 0; - goto done; - } - top = &tos[toindex]; - if (top->selfpc == selfpc) { - /* - * arc at front of chain; usual case. - */ - top->count++; - goto done; - } - /* - * have to go looking down chain for it. - * top points to what we are looking at, - * prevtop points to previous top. - * we know it is not at the head of the chain. - */ - for (; /* goto done */; ) { - if (top->link == 0) { - /* - * top is end of the chain and none of the chain - * had top->selfpc == selfpc. - * so we allocate a new tostruct - * and link it to the head of the chain. - */ - toindex = ++tos[0].link; - if (toindex >= tolimit) { - goto overflow; - } - top = &tos[toindex]; - top->selfpc = selfpc; - top->count = 1; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - /* - * otherwise, check the next arc on the chain. - */ - prevtop = top; - top = &tos[top->link]; - if (top->selfpc == selfpc) { - /* - * there it is. - * increment its count - * move it to the head of the chain. - */ - top->count++; - toindex = prevtop->link; - prevtop->link = top->link; - top->link = *frompcindex; - *frompcindex = toindex; - goto done; - } - - } -done: - profiling--; - /* and fall through */ -out: - return; /* normal return restores saved registers */ - -overflow: - profiling++; /* halt further profiling */ -# define TOLIMIT "mcount: tos overflow\n" - write(2, TOLIMIT, sizeof(TOLIMIT)); - goto out; -} - -/* Control profiling; - profiling is what mcount checks to see if - all the data structures are ready. */ - -moncontrol(mode) - int mode; -{ - if (mode) { - /* start */ - profil(sbuf + sizeof(struct phdr), ssiz - sizeof(struct phdr), - (int)s_lowpc, s_scale); - profiling = 0; - } else { - /* stop */ - profil((char *) 0, 0, 0, 0); - profiling = 3; - } -} - diff --git a/gcc/machmode.h b/gcc/machmode.h index 75a7d09..8d42416 100755 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -38,18 +38,6 @@ Boston, MA 02111-1307, USA. */ #endif -/* Provide a default way to print an address in hex via printf. */ - -#ifndef HOST_PTR_PRINTF -# ifdef HAVE_PRINTF_PTR -# define HOST_PTR_PRINTF "%p" -# else -# define HOST_PTR_PRINTF \ - (sizeof (int) == sizeof (char *) ? "%x" \ - : sizeof (long) == sizeof (char *) ? "%lx" : "%llx") -# endif -#endif /* ! HOST_PTR_PRINTF */ - /* Provide defaults for the way to print a HOST_WIDE_INT in various manners. */ diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index f7cb5c6..48dc7db 100755 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -273,8 +273,7 @@ print_rtx (in_rtx) break; case 't': - putc (' ', outfile); - fprintf (outfile, HOST_PTR_PRINTF, (char *) XTREE (in_rtx, i)); + fprintf (outfile, " %p", (char *) XTREE (in_rtx, i)); break; case '*': diff --git a/gcc/print-tree.c b/gcc/print-tree.c index 1f5af9c..b62fe17 100755 --- a/gcc/print-tree.c +++ b/gcc/print-tree.c @@ -79,8 +79,7 @@ print_node_brief (file, prefix, node, indent) name if any. */ if (indent > 0) fprintf (file, " "); - fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]); - fprintf (file, HOST_PTR_PRINTF, (char *) node); + fprintf (file, "%s <%s %p", prefix, tree_code_name[(int) TREE_CODE (node)], (char *) node); if (class == 'd') { @@ -236,8 +235,7 @@ print_node (file, prefix, node, indent) indent_to (file, indent); /* Print the slot this node is in, and its code, and address. */ - fprintf (file, "%s <%s ", prefix, tree_code_name[(int) TREE_CODE (node)]); - fprintf (file, HOST_PTR_PRINTF, (char *) node); + fprintf (file, "%s <%s %p", prefix, tree_code_name[(int) TREE_CODE (node)], (char *) node); /* Print the name, if any. */ if (class == 'd') @@ -433,9 +431,7 @@ print_node (file, prefix, node, indent) } else if (TREE_CODE (node) == FUNCTION_DECL) { - fprintf (file, "saved-insns "); - fprintf (file, HOST_PTR_PRINTF, - (char *) DECL_SAVED_INSNS (node)); + fprintf (file, "saved-insns %p", (char *) DECL_SAVED_INSNS (node)); } } diff --git a/gcc/system.h b/gcc/system.h index 58b2e9c..e56eb8c 100755 --- a/gcc/system.h +++ b/gcc/system.h @@ -22,20 +22,9 @@ Boston, MA 02111-1307, USA. */ #ifndef __GCC_SYSTEM_H__ #define __GCC_SYSTEM_H__ -/* We must include stdarg.h/varargs.h before stdio.h. */ -#ifdef ANSI_PROTOTYPES #include <stdarg.h> -#else -#include <varargs.h> -#endif - #include <stdio.h> -/* Define a generic NULL if one hasn't already been defined. */ -#ifndef NULL -#define NULL 0 -#endif - /* The compiler is not a multi-threaded application and therefore we do not have to use the locking functions. */ #ifdef HAVE_PUTC_UNLOCKED @@ -113,21 +102,15 @@ Boston, MA 02111-1307, USA. */ #include <sys/types.h> #include <errno.h> - -#ifndef errno -extern int errno; -#endif - #include <string.h> - -#ifdef HAVE_STDLIB_H -# include <stdlib.h> -#endif +#include <stdlib.h> #ifdef HAVE_UNISTD_H # include <unistd.h> #endif +#include <sys/stat.h> + #ifdef HAVE_SYS_PARAM_H # include <sys/param.h> #endif @@ -157,11 +140,6 @@ extern int errno; # endif #endif -#ifndef SEEK_SET -# define SEEK_SET 0 -# define SEEK_CUR 1 -# define SEEK_END 2 -#endif #ifndef F_OK # define F_OK 0 # define X_OK 1 @@ -205,153 +183,19 @@ extern int errno; #define zero_memory(dst,len) memset((dst),0,(len)) -#ifdef NEED_DECLARATION_ATOF -extern double atof (); -#endif - -#ifdef NEED_DECLARATION_ATOL -extern long atol(); -#endif - -#ifdef NEED_DECLARATION_FREE -extern void free (); -#endif - -#ifdef NEED_DECLARATION_GETCWD -extern char *getcwd (); -#endif - -#ifdef NEED_DECLARATION_GETENV -extern char *getenv (); -#endif - -#ifdef NEED_DECLARATION_GETWD -extern char *getwd (); -#endif - -#ifdef NEED_DECLARATION_SBRK -extern char *sbrk (); -#endif - -#ifdef HAVE_STRERROR -# ifdef NEED_DECLARATION_STRERROR -# ifndef strerror -extern char *strerror (); -# endif -# endif -#else /* ! HAVE_STRERROR */ -extern int sys_nerr; -extern char *sys_errlist[]; -#endif /* HAVE_STRERROR */ - -#ifdef HAVE_STRSIGNAL -# ifdef NEED_DECLARATION_STRSIGNAL -# ifndef strsignal -extern char * strsignal (); -# endif -# endif -#else /* ! HAVE_STRSIGNAL */ -# ifndef SYS_SIGLIST_DECLARED -# ifndef NO_SYS_SIGLIST -extern char * sys_siglist[]; -# endif -# endif -#endif /* HAVE_STRSIGNAL */ - -#ifdef HAVE_GETRLIMIT -# ifdef NEED_DECLARATION_GETRLIMIT -# ifndef getrlimit -extern int getrlimit (); -# endif -# endif -#endif - -#ifdef HAVE_SETRLIMIT -# ifdef NEED_DECLARATION_SETRLIMIT -# ifndef setrlimit -extern int setrlimit (); -# endif -# endif -#endif - -/* HAVE_VOLATILE only refers to the stage1 compiler. We also check - __STDC__ and assume gcc sets it and has volatile in stage >=2. */ -#if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile) -#define volatile -#endif - /* Redefine abort to report an internal error w/o coredump, and reporting the location of the error in the source file. */ -#ifndef abort -#ifndef __STDC__ -#ifndef __GNUC__ -#ifndef USE_SYSTEM_ABORT -#define USE_SYSTEM_ABORT -#endif /* !USE_SYSTEM_ABORT */ -#endif /* !__GNUC__ */ -#endif /* !__STDC__ */ - -#ifdef USE_SYSTEM_ABORT -# ifdef NEED_DECLARATION_ABORT -extern void abort (); -# endif -#else -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) -#define abort() \ -(fprintf (stderr, \ - "%s:%d: Internal compiler error\n", __FILE__, __LINE__), \ - exit (FATAL_EXIT_CODE)) -#else -#if 1 -/* CYGNUS LOCAL where to report bugs -- general */ -#define abort() \ -(fprintf (stderr, \ - "%s:%d: Internal compiler error in function %s\n" \ - "Please submit a Problem Report to Cygnus Solutions with send-pr.\n", \ - __FILE__, __LINE__, __PRETTY_FUNCTION__), \ - exit (FATAL_EXIT_CODE)) -#else -#define abort() \ -(fprintf (stderr, \ - "%s:%d: Internal compiler error in function %s\n" \ - "Please submit a full bug report to `egcs-bugs@cygnus.com'.\n" \ - "See <URL:http://egcs.cygnus.com/faq.html#bugreport> for details.\n", \ - __FILE__, __LINE__, __PRETTY_FUNCTION__), \ - exit (FATAL_EXIT_CODE)) -#endif -/* END CYGNUS LOCAL */ -#endif /* recent gcc */ -#endif /* USE_SYSTEM_ABORT */ -#endif /* !abort */ - - -/* Define a STRINGIFY macro that's right for ANSI or traditional C. - HAVE_CPP_STRINGIFY only refers to the stage1 compiler. Assume that - (non-traditional) gcc used in stage2 or later has this feature. - - Note: if the argument passed to STRINGIFY is itself a macro, eg - #define foo bar, STRINGIFY(foo) will produce "foo", not "bar". - Although the __STDC__ case could be made to expand this via a layer - of indirection, the traditional C case can not do so. Therefore - this behavior is not supported. */ -#ifndef STRINGIFY -# if defined(HAVE_CPP_STRINGIFY) || (defined(__GNUC__) && defined(__STDC__)) -# define STRINGIFY(STRING) #STRING -# else -# define STRINGIFY(STRING) "STRING" -# endif -#endif /* ! STRINGIFY */ +#define abort() \ + (fprintf (stderr, "%s:%d: Internal compiler error\n", __FILE__, __LINE__), \ + exit (FATAL_EXIT_CODE)) +#define STRINGIFY(STRING) #STRING /* These macros are here in preparation for the use of gettext in egcs. */ #define _(String) String #define N_(String) String -#if HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif - /* Test if something is a normal file. */ #ifndef S_ISREG #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) diff --git a/gcc/toplev.c b/gcc/toplev.c index d8e54cd..472df7c 100755 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -4250,7 +4250,6 @@ main (argc, argv) { register int i; char *filename = 0; - int flag_print_mem = 0; int version_flag = 0; char *p; @@ -4267,18 +4266,6 @@ main (argc, argv) --p; progname = p; -#if defined (RLIMIT_STACK) && defined (HAVE_GETRLIMIT) && defined (HAVE_SETRLIMIT) - /* Get rid of any avoidable limit on stack size. */ - { - struct rlimit rlim; - - /* Set the stack limit huge so that alloca does not fail. */ - getrlimit (RLIMIT_STACK, &rlim); - rlim.rlim_cur = rlim.rlim_max; - setrlimit (RLIMIT_STACK, &rlim); - } -#endif - signal (SIGFPE, float_signal); #ifdef SIGPIPE @@ -4490,9 +4477,6 @@ main (argc, argv) case 'L': loop_dump = 1; break; - case 'm': - flag_print_mem = 1; - break; #ifdef MACHINE_DEPENDENT_REORG case 'M': mach_dep_reorg_dump = 1; @@ -4916,24 +4900,6 @@ main (argc, argv) compile_file (filename); -#if !defined(OS2) && (!defined(_WIN32) || defined (__CYGWIN__)) - if (flag_print_mem) - { - char *lim = (char *) sbrk (0); - - fprintf (stderr, "Data size %ld.\n", (long)(lim - (char *) &environ)); - fflush (stderr); - -#ifndef __MSDOS__ -#ifdef USG - system ("ps -l 1>&2"); -#else /* not USG */ - system ("ps v"); -#endif /* not USG */ -#endif - } -#endif /* ! OS2 && (! _WIN32 || CYGWIN) */ - if (errorcount) exit (FATAL_EXIT_CODE); if (sorrycount) |