Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit49c534f

Browse files
committed
Throw compile error if our non-thread-safe snprintf is used.
1 parent8c3f859 commit49c534f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

‎src/port/snprintf.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
/* might be in either frontend or backend */
3636
#include"postgres_fe.h"
3737

38+
#ifdefENABLE_THREAD_SAFETY
39+
#errorThe replacement snprintf() is not thread-safe. \
40+
Your platform must have a thread-safe snprintf() to compile with threads.
41+
#endif
42+
3843
#include<sys/ioctl.h>
3944
#include<sys/param.h>
4045

@@ -74,7 +79,7 @@ typedef unsigned long ulong_long;
7479
* causing nast effects.
7580
**************************************************************/
7681

77-
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.2 2003/11/29 22:41:31 pgsql Exp $";*/
82+
/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.3 2004/01/08 17:15:54 momjian Exp $";*/
7883
staticchar*end;
7984
staticintSnprfOverflow;
8085

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp