Browse Source

interrogate should look in /usr/include

Joe Shochet 23 years ago
parent
commit
bb33020f89

+ 2 - 2
dtool/pptempl/Global.pp

@@ -522,10 +522,10 @@ 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%]
+#defer interrogate_spath $[install_parser_inc_dir:%=-S%] -S/usr/include
 
 #defer interrogate_options \
-    -DCPPPARSER -D__cplusplus $[SYSTEM_IGATE_FLAGS] \
+    -DCPPPARSER -D__STDC__ -D__cplusplus $[SYSTEM_IGATE_FLAGS] \
     $[interrogate_spath] $[interrogate_ipath] \
     $[CDEFINES_OPT$[OPTIMIZE]:%=-D%] \
     $[filter -D%,$[C++FLAGS]] \

+ 5 - 0
dtool/src/cppparser/cppBison.yxx

@@ -1192,6 +1192,11 @@ instance_identifier:
 {
   $$ = $1;
   $$->add_array_modifier($3);
+}
+        | instance_identifier ':' INTEGER
+{
+  // bitfield definition.  We ignore the bitfield for now.
+  $$ = $1;
 }
         | '(' instance_identifier ')'
 {

+ 0 - 2
dtool/src/interrogate/interrogate.cxx

@@ -425,8 +425,6 @@ main(int argc, char *argv[]) {
     exit(1);
   }
 
-  parser._system_include_path.append_directory("/usr/include");
-
   output_code_filename.set_text();
   output_data_filename.set_text();
   output_data_basename = output_data_filename.get_basename();

+ 1 - 1
dtool/src/parser-inc/Sources.pp

@@ -2,4 +2,4 @@
     algorithm deque ft2build.h iostream list map memory \
     pair queue set stack stdcompare.h stdtypedefs.h \
     string vector windows.h zlib.h md5.h files.h hex.h \
-    nurbs.hh
+    nurbs.hh stddef.h

+ 30 - 0
dtool/src/parser-inc/stddef.h

@@ -0,0 +1,30 @@
+// Filename: stddef.h
+// Created by:  drose (26Sep02)
+//
+////////////////////////////////////////////////////////////////////
+//
+// PANDA 3D SOFTWARE
+// Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
+//
+// All use of this software is subject to the terms of the Panda 3d
+// Software license.  You should have received a copy of this license
+// along with this source code; you will also find a current copy of
+// the license at http://www.panda3d.org/license.txt .
+//
+// To contact the maintainers of this program write to
+// [email protected] .
+//
+////////////////////////////////////////////////////////////////////
+
+// This file, and all the other files in this directory, aren't
+// intended to be compiled--they're just parsed by CPPParser (and
+// interrogate) in lieu of the actual system headers, to generate the
+// interrogate database.
+
+#ifndef STDDEF_H
+#define STDDEF_H
+
+#include <stdtypedefs.h>
+
+#endif
+

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

@@ -29,6 +29,7 @@ typedef int off_t;
 typedef unsigned int time_t;
 typedef int ptrdiff_t;
 typedef int clock_t;
+typedef int wchar_t;
 
 typedef unsigned int uint;
 typedef unsigned long ulong;