From eaeff009015ea520742eba0f2b7c329046a70e4d Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 18 Oct 2014 16:53:13 -0700 Subject: [PATCH] dtool: Undo a few changes to dtoolbase that aren't strictly necessary, to better parallel upstream. --- dtool/src/cppparser/cppBison.yxx | 2 +- dtool/src/dtoolbase/dlmalloc.h | 6 ------ dtool/src/dtoolbase/dlmalloc_src.cxx | 7 ------- dtool/src/dtoolbase/dtoolbase.h | 18 +++--------------- 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/dtool/src/cppparser/cppBison.yxx b/dtool/src/cppparser/cppBison.yxx index 29a230245b..238c4f578b 100644 --- a/dtool/src/cppparser/cppBison.yxx +++ b/dtool/src/cppparser/cppBison.yxx @@ -195,7 +195,7 @@ pop_struct() { /* This is a bison-specific declaration to enable recursive calls to yyparse(). It changes the calling sequence to yylex(), passing pointers to the current yylval and yylloc. */ -%pure-parser +%pure_parser %token REAL %token INTEGER diff --git a/dtool/src/dtoolbase/dlmalloc.h b/dtool/src/dtoolbase/dlmalloc.h index 9b3d4e628d..1bb3ed8abc 100644 --- a/dtool/src/dtoolbase/dlmalloc.h +++ b/dtool/src/dtoolbase/dlmalloc.h @@ -148,15 +148,9 @@ void* dlvalloc(size_t); */ int dlmallopt(int, int); -#ifndef M_TRIM_THRESHOLD #define M_TRIM_THRESHOLD (-1) -#endif - #define M_GRANULARITY (-2) - -#ifndef M_MMAP_THRESHOLD #define M_MMAP_THRESHOLD (-3) -#endif /* diff --git a/dtool/src/dtoolbase/dlmalloc_src.cxx b/dtool/src/dtoolbase/dlmalloc_src.cxx index 56c901251d..93e843ea75 100644 --- a/dtool/src/dtoolbase/dlmalloc_src.cxx +++ b/dtool/src/dtoolbase/dlmalloc_src.cxx @@ -597,15 +597,9 @@ DEFAULT_MMAP_THRESHOLD default: 256K malloc does support the following options. */ -#ifndef M_TRIM_THRESHOLD #define M_TRIM_THRESHOLD (-1) -#endif - #define M_GRANULARITY (-2) - -#ifndef M_MMAP_THRESHOLD #define M_MMAP_THRESHOLD (-3) -#endif /* ------------------------ Mallinfo declarations ------------------------ */ @@ -1186,7 +1180,6 @@ int mspace_mallopt(int, int); #include #endif /* ABORT_ON_ASSERT_FAILURE */ #else /* DEBUG */ -#undef assert #define assert(x) #endif /* DEBUG */ #ifndef LACKS_STRING_H diff --git a/dtool/src/dtoolbase/dtoolbase.h b/dtool/src/dtoolbase/dtoolbase.h index 92a76c34f4..8dfb7e2127 100644 --- a/dtool/src/dtoolbase/dtoolbase.h +++ b/dtool/src/dtoolbase/dtoolbase.h @@ -104,21 +104,9 @@ #endif #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 #ifndef HAVE_EIGEN