More system.h cutover...

* 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
This commit is contained in:
Kaveh R. Ghazi 1998-05-06 08:57:18 +00:00 committed by Kaveh Ghazi
parent 8f81384fec
commit 90fbb8c9f5
6 changed files with 36 additions and 70 deletions

View 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.

View 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

View 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

View 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) == '$')
/* 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
/* 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 );

View 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

View 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. */