Browse Source

fix issues with parser-inc and new interrogate search rules

David Rose 18 years ago
parent
commit
ecad9e186e

+ 2 - 2
dtool/pptempl/Global.pp

@@ -732,8 +732,8 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set!
 
 // Caution!  interrogate_ipath might be redefined in the
 // Global.platform.pp file.
-#defer interrogate_ipath $[target_ipath:%=-I%]
-#defer interrogate_spath $[install_parser_inc_dir:%=-S%] -S/usr/include
+#defer interrogate_ipath $[install_parser_inc_dir:%=-I%] $[target_ipath:%=-I%]
+#defer interrogate_spath -S/usr/include
 
 #defer interrogate_options \
     -DCPPPARSER -D__STDC__=1 -D__cplusplus $[SYSTEM_IGATE_FLAGS] \

+ 4 - 2
dtool/src/cppparser/cppPreprocessor.cxx

@@ -1412,8 +1412,10 @@ handle_include_directive(const string &args, int first_line,
       }
     }
 
-    // Now look for it on the primary include path.
-    if (!angle_quotes && !found_file && filename.resolve_filename(_include_path)) {
+    // Now look for it on the primary include path.  We have to search
+    // this path, even if the file was named with angle quotes, so
+    // that we will search parser-inc before the system path.
+    if (!found_file && filename.resolve_filename(_include_path)) {
       found_file = true;
       source = CPPFile::S_alternate;
     }

+ 9 - 0
dtool/src/parser-inc/stdtypedefs.h

@@ -41,6 +41,15 @@ typedef unsigned long ulong;
 typedef unsigned short ushort;
 typedef unsigned char uchar;
 
+typedef unsigned char uint8_t;
+typedef char int8_t;
+typedef unsigned short uint16_t;
+typedef short int16_t;
+typedef unsigned int uint32_t;
+typedef int int32_t;
+typedef unsigned long long uint64_t;
+typedef long long int64_t;
+
 #define NULL ((void *)0)
 
 #endif