From: ellson Date: Fri, 11 Mar 2005 16:50:24 +0000 (+0000) Subject: trying to minimize changes needed to gd X-Git-Tag: LAST_LIBGRAPH~32^2~7832 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0e9925be2ebae331372a12545738af3a7a93e26;p=graphviz trying to minimize changes needed to gd - change USE_THREADS to DISABLE_THREADS in gdhelpers.h - remove change to NONDLL in gd.h - add "#DEFINE NONDLL 1" and "#define DISABLE_THREADS 1" to windows/config.h - fix entities.tcl to agree with entities.h that was supposed to be generated from it --- diff --git a/lib/gd/gd.h b/lib/gd/gd.h index 08c256b2f..03f3a018f 100644 --- a/lib/gd/gd.h +++ b/lib/gd/gd.h @@ -21,8 +21,6 @@ extern "C" { #ifndef WIN32 #define NONDLL 1 -#else -#define NONDLL 1 #endif /* WIN32 */ #ifdef NONDLL diff --git a/lib/gd/gdhelpers.h b/lib/gd/gdhelpers.h index 9a4496414..dfe5b4b1e 100644 --- a/lib/gd/gdhelpers.h +++ b/lib/gd/gdhelpers.h @@ -29,7 +29,13 @@ int overflow2(int a, int b); /* 2.0.16: portable mutex support for thread safety. */ -#ifdef USE_THREADS +#ifdef DISABLE_THREADS +# define gdMutexDeclare(x) +# define gdMutexSetup(x) +# define gdMutexShutdown(x) +# define gdMutexLock(x) +# define gdMutexUnlock(x) +#else # ifdef WIN32 /* 2.0.18: must include windows.h to get CRITICAL_SECTION. */ # include @@ -54,13 +60,7 @@ int overflow2(int a, int b); # define gdMutexUnlock(x) # endif /* HAVE_PTHREAD */ # endif /* WIN32 */ -#else -# define gdMutexDeclare(x) -# define gdMutexSetup(x) -# define gdMutexShutdown(x) -# define gdMutexLock(x) -# define gdMutexUnlock(x) -#endif /* USE_THREADS */ +#endif /* DISABLE_THREADS */ #endif /* GDHELPERS_H */ diff --git a/windows/config.h b/windows/config.h index 047c9301c..7c5b7ea00 100644 --- a/windows/config.h +++ b/windows/config.h @@ -250,6 +250,10 @@ extern "C" { /* Default DPI. */ #define DEFAULT_DPI 96 +/* Defines for GD */ +#define NONDLL 1 +#define DISABLE_THREADS 1 + #endif #ifdef __cplusplus