More system.h cutover...
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 6 May 1998 08:57:18 +0000 (08:57 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 6 May 1998 08:57:18 +0000 (08:57 +0000)
        * Makefile.in (mips-tfile.o, mips-tdump.o): Depend on system.h.
        * mips-tdump.c: Include system.h, remove redundant headers.
        * mips-tfile.c: Likewise.  Convert all ctype function calls to
        macro versions defined in system.h.
        * objc/Make-lang.in (objc-act.o): Depend on system.h.
        * objc/objc-act.c: Include system.h, remove redundant headers.

From-SVN: r19573

gcc/ChangeLog
gcc/Makefile.in
gcc/mips-tdump.c
gcc/mips-tfile.c
gcc/objc/Make-lang.in
gcc/objc/objc-act.c

index 6dc6b710913e8bba9bf11c12e589a27dd8e4a495..83863d70371493691446755e8c3e02f637aeaf8f 100644 (file)
@@ -1,3 +1,13 @@
+Wed May  6 11:43:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * Makefile.in (mips-tfile.o, mips-tdump.o): Depend on system.h.
+       * mips-tdump.c: Include system.h, remove redundant headers.
+       * mips-tfile.c: Likewise.  Also, convert all ctype function calls
+       to calls of the macro versions defined in system.h.
+
+       * objc/Make-lang.in (objc-act.o): Depend on system.h.
+       * objc/objc-act.c: Include system.h, remove redundant headers.
+
 Wed May  6 11:21:06 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * configure.in (AC_CHECK_FUNCS): Add isascii.
index 0697b6dcf2b7c79792155653653ffe610f6510f8..6914072d00b251f4bc1c7a45b8def47c44b5a26c 100644 (file)
@@ -1442,12 +1442,12 @@ $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) \
 mips-tfile: mips-tfile.o version.o $(LIBDEPS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tfile.o version.o $(LIBS)
 
-mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H)
+mips-tfile.o : mips-tfile.c $(CONFIG_H) $(RTL_H) system.h
 
 mips-tdump: mips-tdump.o version.o $(LIBDEPS)
        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mips-tdump.o version.o $(LIBS)
 
-mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H)
+mips-tdump.o : mips-tdump.c $(CONFIG_H) $(RTL_H) system.h
 
 # Build file to support OSF/rose half-pic format.
 halfpic.o: halfpic.c $(CONFIG_H) $(RTL_H) $(TREE_H) system.h
index edebf022c1ef735e9c07cb91dbf1cc12932edbf6..6ca005ad6dc6f0b2a3c411758e8205120081ab01 100644 (file)
@@ -21,12 +21,7 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 #include "config.h"
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/file.h>
-#include <time.h>
-#include <fcntl.h>
-#include <errno.h>
+#include "system.h"
 
 #ifdef index
 #undef index
index 8069ddb5597dfa5d459c85f097158b9dcc4773eb..49a3dc6cca21ab20600047fc5f611386c678e734 100644 (file)
@@ -605,7 +605,7 @@ Boston, MA 02111-1307, USA.  */
 #else
 #include <varargs.h>
 #endif
-#include <stdio.h>
+#include "system.h"
 
 #ifndef __SABER__
 #define saber_stop()
@@ -705,11 +705,6 @@ main ()
 #undef rindex
 #undef index
 
-#include <sys/types.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
 #include <signal.h>
 #include <sys/stat.h>
 
@@ -731,23 +726,6 @@ main ()
 #define STAB_CODE_TYPE int
 #endif
 
-#ifdef _OSF_SOURCE
-#define HAS_STDLIB_H
-#define HAS_UNISTD_H
-#endif
-
-#ifdef HAS_STDLIB_H
-#include <stdlib.h>
-#endif
-
-#ifdef HAS_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifndef errno
-extern int errno;                      /* MIPS errno.h doesn't declare this */
-#endif
-
 #ifndef MALLOC_CHECK
 #ifdef __SABER__
 #define MALLOC_CHECK
@@ -755,7 +733,7 @@ extern int errno;                   /* MIPS errno.h doesn't declare this */
 #endif
 
 #define IS_ASM_IDENT(ch) \
-  (isalnum (ch) || (ch) == '_' || (ch) == '.' || (ch) == '$')
+  (ISALNUM (ch) || (ch) == '_' || (ch) == '.' || (ch) == '$')
 
 \f
 /* Redefinition of of storage classes as an enumeration for better
@@ -1755,13 +1733,6 @@ STATIC void        free_thead            __proto((thead_t *));
 STATIC char     *local_index           __proto((const char *, int));
 STATIC char     *local_rindex          __proto((const char *, int));
 
-#ifdef NEED_DECLARATION_SBRK
-extern char  *sbrk                     __proto((int));
-#endif
-#ifdef NEED_DECLARATION_FREE
-extern void   free                     __proto((PTR_T));
-#endif
-
 extern char  *mktemp                   __proto((char *));
 extern long   strtol                   __proto((const char *, char **, int));
 
@@ -1775,12 +1746,6 @@ extern char *sys_siglist[NSIG + 1];
 #endif
 #endif
 
-#ifndef SEEK_SET       /* Symbolic constants for the "fseek" function: */
-#define        SEEK_SET 0      /* Set file pointer to offset */
-#define        SEEK_CUR 1      /* Set file pointer to its current value plus offset */
-#define        SEEK_END 2      /* Set file pointer to the size of the file plus offset */
-#endif
-
 \f
 /* List of assembler pseudo ops and beginning sequences that need
    special actions.  Someday, this should be a hash table, and such,
@@ -2835,7 +2800,7 @@ parse_begin (start)
       return;
     }
 
-  for (end_p1 = start; (ch = *end_p1) != '\0' && !isspace (ch); end_p1++)
+  for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++)
     ;
 
   hash_ptr = hash_string (start,
@@ -2885,7 +2850,7 @@ parse_bend (start)
       return;
     }
 
-  for (end_p1 = start; (ch = *end_p1) != '\0' && !isspace (ch); end_p1++)
+  for (end_p1 = start; (ch = *end_p1) != '\0' && !ISSPACE (ch); end_p1++)
     ;
 
   hash_ptr = hash_string (start,
@@ -2995,7 +2960,7 @@ parse_def (name_start)
           (ch = *dir_end_p1) != ' ' && ch != '\t';
           dir_end_p1++)
        {
-         if (ch == '\0' || isspace (ch))
+         if (ch == '\0' || ISSPACE (ch))
            {
              error_line = __LINE__;
              saber_stop ();
@@ -3011,7 +2976,7 @@ parse_def (name_start)
       while (ch == ' ' || ch == '\t')
        ch = *++arg_start;
 
-      if (isdigit (ch) || ch == '-' || ch == '+')
+      if (ISDIGIT (ch) || ch == '-' || ch == '+')
        {
          int ch2;
          arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3019,7 +2984,7 @@ parse_def (name_start)
            arg_was_number++;
        }
 
-      else if (ch == '\0' || isspace (ch))
+      else if (ch == '\0' || ISSPACE (ch))
        {
          error_line = __LINE__;
          saber_stop ();
@@ -3067,7 +3032,7 @@ parse_def (name_start)
                    ch = *++arg_start;
 
                  arg_was_number = 0;
-                 if (isdigit (ch) || ch == '-' || ch == '+')
+                 if (ISDIGIT (ch) || ch == '-' || ch == '+')
                    {
                      int ch2;
                      arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3141,7 +3106,7 @@ parse_def (name_start)
                    ch = *++arg_start;
 
                  arg_was_number = 0;
-                 if (isdigit (ch) || ch == '-' || ch == '+')
+                 if (ISDIGIT (ch) || ch == '-' || ch == '+')
                    {
                      int ch2;
                      arg_number = strtol (arg_start, (char **) &arg_end_p1, 0);
@@ -3520,7 +3485,7 @@ parse_end (start)
     }
 
   /* Get the function name, skipping whitespace.  */
-  for (start_func = start; isspace (*start_func); start_func++)
+  for (start_func = start; ISSPACE (*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3579,7 +3544,7 @@ parse_ent (start)
       return;
     }
 
-  for (start_func = start; isspace (*start_func); start_func++)
+  for (start_func = start; ISSPACE (*start_func); start_func++)
     ;
 
   ch = *start_func;
@@ -3689,7 +3654,7 @@ parse_stabs_common (string_start, string_end, rest)
     mark_stabs ("");
 
   /* Read code from stabs.  */
-  if (!isdigit (*rest))
+  if (!ISDIGIT (*rest))
     {
       error ("Invalid .stabs/.stabn directive, code is non-numeric");
       return;
@@ -3709,7 +3674,7 @@ parse_stabs_common (string_start, string_end, rest)
       shash_t *shash_ptr;
 
       /* Skip ,0, */
-      if (p[0] != ',' || p[1] != '0' || p[2] != ',' || !isdigit (p[3]))
+      if (p[0] != ',' || p[1] != '0' || p[2] != ',' || !ISDIGIT (p[3]))
        {
          error ("Invalid line number .stabs/.stabn directive");
          return;
@@ -3717,7 +3682,7 @@ parse_stabs_common (string_start, string_end, rest)
 
       code = strtol (p+3, &p, 0);
       ch = *++p;
-      if (p[-1] != ',' || isdigit (ch) || !IS_ASM_IDENT (ch))
+      if (p[-1] != ',' || ISDIGIT (ch) || !IS_ASM_IDENT (ch))
        {
          error ("Invalid line number .stabs/.stabn directive");
          return;
@@ -3759,11 +3724,11 @@ parse_stabs_common (string_start, string_end, rest)
       /* Skip ,<num>,<num>, */
       if (*p++ != ',')
        goto failure;
-      for (; isdigit (*p); p++)
+      for (; ISDIGIT (*p); p++)
        ;
       if (*p++ != ',')
        goto failure;
-      for (; isdigit (*p); p++)
+      for (; ISDIGIT (*p); p++)
        ;
       if (*p++ != ',')
        goto failure;
@@ -3775,7 +3740,7 @@ parse_stabs_common (string_start, string_end, rest)
          return;
        }
 
-      if (isdigit (ch) || ch == '-')
+      if (ISDIGIT (ch) || ch == '-')
        {
          st = st_Nil;
          sc = sc_Nil;
@@ -3843,7 +3808,7 @@ parse_stabs_common (string_start, string_end, rest)
          ch = *end_p1++;
          if (ch != '\n')
            {
-             if (((!isdigit (*end_p1)) && (*end_p1 != '-'))
+             if (((!ISDIGIT (*end_p1)) && (*end_p1 != '-'))
                  || ((ch != '+') && (ch != '-')))
                {
                  error ("Invalid .stabs/.stabn directive, badly formed value");
@@ -3919,16 +3884,16 @@ parse_input __proto((void))
   while ((p = read_line ()) != (char *) 0)
     {
       /* Skip leading blanks */
-      while (isspace (*p))
+      while (ISSPACE (*p))
        p++;
 
       /* See if it's a directive we handle.  If so, dispatch handler.  */
       for (i = 0; i < sizeof (pseudo_ops) / sizeof (pseudo_ops[0]); i++)
        if (memcmp (p, pseudo_ops[i].name, pseudo_ops[i].len) == 0
-           && isspace (p[pseudo_ops[i].len]))
+           && ISSPACE (p[pseudo_ops[i].len]))
          {
            p += pseudo_ops[i].len;     /* skip to first argument */
-           while (isspace (*p))
+           while (ISSPACE (*p))
              p++;
 
            (*pseudo_ops[i].func)( p );
index ebde9d0101b899bed45a57150e2f51a29138e879..cbf52e10cd20f8977d64b22c873194b9da026c9d 100644 (file)
@@ -87,7 +87,7 @@ $(srcdir)/objc/objc-parse.y: $(srcdir)/c-parse.in
        $(srcdir)/move-if-change tmp-objc-prs.y $(srcdir)/objc/objc-parse.y
 
 objc-act.o : $(srcdir)/objc/objc-act.c \
-   $(CONFIG_H) $(TREE_H) $(RTL_H) \
+   $(CONFIG_H) $(TREE_H) $(RTL_H) system.h \
    $(srcdir)/c-tree.h $(srcdir)/c-lex.h \
    $(srcdir)/flags.h $(srcdir)/objc/objc-act.h $(srcdir)/input.h \
    $(srcdir)/function.h $(srcdir)/output.h $(srcdir)/c-parse.h
index 0f68bd87436383d66b4af159f799639359012f31..463ef692c38dc27d747716233e207891d4f65674 100644 (file)
@@ -39,10 +39,7 @@ Boston, MA 02111-1307, USA.  */
    - OBJC_INT_SELECTORS  */
 
 #include "config.h"
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include "system.h"
 #include "tree.h"
 #include "c-tree.h"
 #include "c-lex.h"
@@ -51,7 +48,6 @@ Boston, MA 02111-1307, USA.  */
 #include "input.h"
 #include "except.h"
 #include "function.h"
-#include <string.h>
 #include "output.h"
 
 /* This is the default way of generating a method name.  */