+Mon Dec 22 11:24:01 1997 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cse.c (rtx_cost): Add default case in enumeration switch.
+ * fix-header.c (recognized_macro): Likewise.
+ (recognized_extern): Likewise.
+ (write_rbrac): Likewise.
+ * objc/objc-act.c (encode_aggregate): Likewise.
+ (gen_declarator): Likewise.
+ (gen_declspecs): Likewise.
+
Mon Dec 22 09:58:51 1997 Jeffrey A Law (law@cygnus.com)
* haifa-sched.c (create_reg_dead_note): Detect and handle another
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* This program massages a system include file (such as stdio.h),
- into a form more conforming with ANSI/POSIX, and more suitable for C++:
+ into a form that is compatible with GNU C and GNU C++.
* extern "C" { ... } braces are added (inside #ifndef __cplusplus),
if they seem to be needed. These prevent C++ compilers from name
/* Used to mark names defined in the ANSI/ISO C standard. */
#define ANSI_SYMBOL 1
+/* We no longer massage include files for POSIX or XOPEN symbols,
+ as there are now several versions of the POSIX and XOPEN standards,
+ and it would be a maintenance nightmare for us to track them all.
+ Better to be compatible with the system include files. */
+/*#define ADD_MISSING_POSIX 1 */
+/*#define ADD_MISSING_XOPEN 1 */
+
+#if ADD_MISSING_POSIX
/* Used to mark names defined in the Posix.1 or Posix.2 standard. */
#define POSIX1_SYMBOL 2
#define POSIX2_SYMBOL 4
+#else
+#define POSIX1_SYMBOL 0
+#define POSIX2_SYMBOL 0
+#endif
+#if ADD_MISSING_XOPEN
/* Used to mark names defined in X/Open Portability Guide. */
#define XOPEN_SYMBOL 8
/* Used to mark names defined in X/Open UNIX Extensions. */
#define XOPEN_EXTENDED_SYMBOL 16
+#else
+#define XOPEN_SYMBOL 0
+#define XOPEN_EXTENDED_SYMBOL 0
+#endif
/* Used to indicate names that are not functions */
#define MACRO_SYMBOL 512
{ "stdio.h", ANSI_SYMBOL,
"clearerr\0fclose\0feof\0ferror\0fflush\0fgetc\0fgetpos\0\
fgets\0fopen\0fprintf\0fputc\0fputs\0fread\0freopen\0fscanf\0fseek\0\
-fsetpos\0ftell\0fwrite\0getc\0getchar\0gets\00perror\0popen\0\
+fsetpos\0ftell\0fwrite\0getc\0getchar\0gets\0perror\0\
printf\0putc\0putchar\0puts\0remove\0rename\0rewind\0scanf\0setbuf\0\
setvbuf\0sprintf\0sscanf\0vprintf\0vsprintf\0vfprintf\0tmpfile\0\
tmpnam\0ungetc\0" },
else if (strcmp (fname, "S_IFREG") == 0) seen_S_IFREG++;
else if (strcmp (fname, "S_ISREG") == 0) seen_S_ISREG++;
}
+ break;
+
+ default:
+ break;
}
}
switch (special_file_handling)
{
case errno_h:
- if (strcmp (name, "errno") == 0 && !seen_errno)
+ if (name_length == 5 && strncmp (name, "errno", 5) == 0 && !seen_errno)
seen_errno = 1, required_other--;
break;
+
+ default:
+ break;
}
}
fprintf (outf,
"#define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)\n");
break;
+
+ default:
+ break;
}
cur_symbol_table_size = 0;
for (entry = include_entry; ;)
{
- add_symbols (entry->flags, entry->names);
+ if (entry->flags)
+ add_symbols (entry->flags, entry->names);
entry++;
if (entry->name != CONTINUED)
break;