2003-08-05 Jason Eckhardt <jle@rice.edu>
[binutils-gdb.git] / gas / input-file.c
index 0b6c9e01a7a873a7b5dc69f1c7a421df549588f4..5c23f31eacfb9abe1bde8df60d21a4041e2f4ab9 100644 (file)
@@ -26,9 +26,9 @@
 
 #include <stdio.h>
 #include <string.h>
-
 #include "as.h"
 #include "input-file.h"
+#include "safe-ctype.h"
 
 static int input_file_get PARAMS ((char *, int));
 
@@ -159,13 +159,23 @@ input_file_open (filename, pre)
       if (c == 'N')
        {
          fgets (buf, 80, f_in);
-         if (!strcmp (buf, "O_APP\n"))
+         if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
            preprocess = 0;
          if (!strchr (buf, '\n'))
            ungetc ('#', f_in); /* It was longer.  */
          else
            ungetc ('\n', f_in);
        }
+      else if (c == 'A')
+       {
+         fgets (buf, 80, f_in);
+         if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
+           preprocess = 1;
+         if (!strchr (buf, '\n'))
+           ungetc ('#', f_in);
+         else
+           ungetc ('\n', f_in);
+       }
       else if (c == '\n')
        ungetc ('\n', f_in);
       else