diff options
author | Bruce Momjian <bruce@momjian.us> | 2004-01-08 17:15:54 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2004-01-08 17:15:54 +0000 |
commit | 49c534fccbf412921764cf521629cf60fbc80b01 (patch) | |
tree | 8dcdf77da0cd842655b8e575faaef35108389ebd /src | |
parent | 8c3f859ecf235d65647ca9ea91dc2d60832af2ab (diff) | |
download | postgresql-49c534fccbf412921764cf521629cf60fbc80b01.tar.gz postgresql-49c534fccbf412921764cf521629cf60fbc80b01.zip |
Throw compile error if our non-thread-safe snprintf is used.
Diffstat (limited to 'src')
-rw-r--r-- | src/port/snprintf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/port/snprintf.c b/src/port/snprintf.c index e774f4261c8..83f7b5886c7 100644 --- a/src/port/snprintf.c +++ b/src/port/snprintf.c @@ -35,6 +35,11 @@ /* might be in either frontend or backend */ #include "postgres_fe.h" +#ifdef ENABLE_THREAD_SAFETY +#error The replacement snprintf() is not thread-safe. \ +Your platform must have a thread-safe snprintf() to compile with threads. +#endif + #include <sys/ioctl.h> #include <sys/param.h> @@ -74,7 +79,7 @@ typedef unsigned long ulong_long; * causing nast effects. **************************************************************/ -/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.2 2003/11/29 22:41:31 pgsql Exp $";*/ +/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.3 2004/01/08 17:15:54 momjian Exp $";*/ static char *end; static int SnprfOverflow; |