Browse Source

dtool: Undo a few changes to dtoolbase that aren't strictly necessary, to better parallel upstream.

Sam Edwards 11 năm trước cách đây
mục cha
commit
eaeff00901

+ 1 - 1
dtool/src/cppparser/cppBison.yxx

@@ -195,7 +195,7 @@ pop_struct() {
 /* This is a bison-specific declaration to enable recursive calls to
 /* This is a bison-specific declaration to enable recursive calls to
    yyparse().  It changes the calling sequence to yylex(), passing
    yyparse().  It changes the calling sequence to yylex(), passing
    pointers to the current yylval and yylloc. */
    pointers to the current yylval and yylloc. */
-%pure-parser
+%pure_parser
 
 
 %token <u.real> REAL
 %token <u.real> REAL
 %token <u.integer> INTEGER
 %token <u.integer> INTEGER

+ 0 - 6
dtool/src/dtoolbase/dlmalloc.h

@@ -148,15 +148,9 @@ void* dlvalloc(size_t);
 */
 */
 int dlmallopt(int, int);
 int dlmallopt(int, int);
 
 
-#ifndef M_TRIM_THRESHOLD
 #define M_TRIM_THRESHOLD     (-1)
 #define M_TRIM_THRESHOLD     (-1)
-#endif
-
 #define M_GRANULARITY        (-2)
 #define M_GRANULARITY        (-2)
-
-#ifndef M_MMAP_THRESHOLD
 #define M_MMAP_THRESHOLD     (-3)
 #define M_MMAP_THRESHOLD     (-3)
-#endif
 
 
 
 
 /*
 /*

+ 0 - 7
dtool/src/dtoolbase/dlmalloc_src.cxx

@@ -597,15 +597,9 @@ DEFAULT_MMAP_THRESHOLD       default: 256K
   malloc does support the following options.
   malloc does support the following options.
 */
 */
 
 
-#ifndef M_TRIM_THRESHOLD
 #define M_TRIM_THRESHOLD     (-1)
 #define M_TRIM_THRESHOLD     (-1)
-#endif
-
 #define M_GRANULARITY        (-2)
 #define M_GRANULARITY        (-2)
-
-#ifndef M_MMAP_THRESHOLD
 #define M_MMAP_THRESHOLD     (-3)
 #define M_MMAP_THRESHOLD     (-3)
-#endif
 
 
 /* ------------------------ Mallinfo declarations ------------------------ */
 /* ------------------------ Mallinfo declarations ------------------------ */
 
 
@@ -1186,7 +1180,6 @@ int mspace_mallopt(int, int);
 #include <assert.h>
 #include <assert.h>
 #endif /* ABORT_ON_ASSERT_FAILURE */
 #endif /* ABORT_ON_ASSERT_FAILURE */
 #else  /* DEBUG */
 #else  /* DEBUG */
-#undef assert
 #define assert(x)
 #define assert(x)
 #endif /* DEBUG */
 #endif /* DEBUG */
 #ifndef LACKS_STRING_H
 #ifndef LACKS_STRING_H

+ 3 - 15
dtool/src/dtoolbase/dtoolbase.h

@@ -104,21 +104,9 @@
 #endif
 #endif
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON
-#  undef _POSIX_C_SOURCE
-#  undef _XOPEN_SOURCE
-// Some versions of python also define HAVE_LOCKF
-#  ifdef HAVE_LOCKF
-#    define PANDA_HAVE_LOCKF
-#    undef HAVE_LOCKF
-#  endif
-#  include "pyconfig.h"
-// Restore our HAVE_LOCKF if python didn't define it
-#  ifdef PANDA_HAVE_LOCKF
-#    undef PANDA_HAVE_LOCKF
-#    ifndef HAVE_LOCKF
-#      define HAVE_LOCKF 1
-#    endif
-#  endif
+#undef _POSIX_C_SOURCE
+#undef _XOPEN_SOURCE
+#include "pyconfig.h"
 #endif
 #endif
 
 
 #ifndef HAVE_EIGEN
 #ifndef HAVE_EIGEN