diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index b31117314c..a8bc41a709 100644 --- a/dtool/pptempl/Global.pp +++ b/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]] \ diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 64c2897230..43c0c5603c 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/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 ')' { diff --git a/dtool/src/interrogate/interrogate.cxx b/dtool/src/interrogate/interrogate.cxx index ce8d4ca0ef..c456406765 100644 --- a/dtool/src/interrogate/interrogate.cxx +++ b/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(); diff --git a/dtool/src/parser-inc/Sources.pp b/dtool/src/parser-inc/Sources.pp index 8c67664b92..1e0be5287c 100644 --- a/dtool/src/parser-inc/Sources.pp +++ b/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 diff --git a/dtool/src/parser-inc/stddef.h b/dtool/src/parser-inc/stddef.h new file mode 100644 index 0000000000..b0551eb330 --- /dev/null +++ b/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 +// panda3d@yahoogroups.com . +// +//////////////////////////////////////////////////////////////////// + +// 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 + +#endif + diff --git a/dtool/src/parser-inc/stdtypedefs.h b/dtool/src/parser-inc/stdtypedefs.h index 5058fc512c..a06b9af555 100644 --- a/dtool/src/parser-inc/stdtypedefs.h +++ b/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;