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

Commit11b5000

Browse files
committed
Portability hack for pg_global_prng_state.
PGDLLIMPORT is only appropriate for variables declared in the backend,not when the variable is coming from a library included in frontend code.(This isn't a particularly nice fix, but for now, use the same methodemployed elsewhere.)Discussion:https://postgr.es/m/E1mrWUD-000235-Hq@gemulon.postgresql.org
1 parent6fb7c5d commit11b5000

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/include/common/pg_prng.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ typedef struct pg_prng_state
2626
* Callers not needing local PRNG series may use this global state vector,
2727
* after initializing it with one of the pg_prng_...seed functions.
2828
*/
29+
#ifndefFRONTEND
2930
externPGDLLIMPORTpg_prng_statepg_global_prng_state;
31+
#else
32+
externpg_prng_statepg_global_prng_state;
33+
#endif
3034

3135
externvoidpg_prng_seed(pg_prng_state*state,uint64seed);
3236
externvoidpg_prng_fseed(pg_prng_state*state,doublefseed);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp