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

Commit8cf64d3

Browse files
committed
Mark all symbols exported from extension libraries PGDLLEXPORT.
This is in preparation for defaulting to -fvisibility=hidden in extensions,instead of relying on all symbols in extensions to be exported.This should have been committed before089480c, but something in my commitscripts went wrong.Author: Andres Freund <andres@anarazel.de>Reviewed-By: Tom Lane <tgl@sss.pgh.pa.us>Discussion:https://postgr.es/m/20211101020311.av6hphdl6xbjbuif@alap3.anarazel.de
1 parent5050fe5 commit8cf64d3

File tree

8 files changed

+58
-58
lines changed

8 files changed

+58
-58
lines changed

‎contrib/hstore/hstore.h

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ typedef struct
147147
} while (0)
148148

149149
/* DatumGetHStoreP includes support for reading old-format hstore values */
150-
externHStore*hstoreUpgrade(Datumorig);
150+
externPGDLLEXPORTHStore*hstoreUpgrade(Datumorig);
151151

152152
#defineDatumGetHStoreP(d) hstoreUpgrade(d)
153153

@@ -168,14 +168,14 @@ typedef struct
168168
boolneedfree;/* need to pfree the value? */
169169
}Pairs;
170170

171-
externinthstoreUniquePairs(Pairs*a,int32l,int32*buflen);
172-
externHStore*hstorePairs(Pairs*pairs,int32pcount,int32buflen);
171+
externPGDLLEXPORTinthstoreUniquePairs(Pairs*a,int32l,int32*buflen);
172+
externPGDLLEXPORTHStore*hstorePairs(Pairs*pairs,int32pcount,int32buflen);
173173

174-
externsize_thstoreCheckKeyLen(size_tlen);
175-
externsize_thstoreCheckValLen(size_tlen);
174+
externPGDLLEXPORTsize_thstoreCheckKeyLen(size_tlen);
175+
externPGDLLEXPORTsize_thstoreCheckValLen(size_tlen);
176176

177-
externinthstoreFindKey(HStore*hs,int*lowbound,char*key,intkeylen);
178-
externPairs*hstoreArrayToPairs(ArrayType*a,int*npairs);
177+
externPGDLLEXPORTinthstoreFindKey(HStore*hs,int*lowbound,char*key,intkeylen);
178+
externPGDLLEXPORTPairs*hstoreArrayToPairs(ArrayType*a,int*npairs);
179179

180180
#defineHStoreContainsStrategyNumber7
181181
#defineHStoreExistsStrategyNumber9
@@ -194,7 +194,7 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
194194
#ifHSTORE_POLLUTE_NAMESPACE
195195
#defineHSTORE_POLLUTE(newname_,oldname_) \
196196
PG_FUNCTION_INFO_V1(oldname_); \
197-
Datum newname_(PG_FUNCTION_ARGS); \
197+
extern PGDLLEXPORTDatum newname_(PG_FUNCTION_ARGS); \
198198
Datum oldname_(PG_FUNCTION_ARGS) { return newname_(fcinfo); } \
199199
extern int no_such_variable
200200
#else

‎contrib/ltree/ltree.h

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -176,30 +176,30 @@ typedef struct
176176

177177

178178
/* use in array iterator */
179-
Datumltree_isparent(PG_FUNCTION_ARGS);
180-
Datumltree_risparent(PG_FUNCTION_ARGS);
181-
Datumltq_regex(PG_FUNCTION_ARGS);
182-
Datumltq_rregex(PG_FUNCTION_ARGS);
183-
Datumlt_q_regex(PG_FUNCTION_ARGS);
184-
Datumlt_q_rregex(PG_FUNCTION_ARGS);
185-
Datumltxtq_exec(PG_FUNCTION_ARGS);
186-
Datumltxtq_rexec(PG_FUNCTION_ARGS);
187-
Datum_ltq_regex(PG_FUNCTION_ARGS);
188-
Datum_ltq_rregex(PG_FUNCTION_ARGS);
189-
Datum_lt_q_regex(PG_FUNCTION_ARGS);
190-
Datum_lt_q_rregex(PG_FUNCTION_ARGS);
191-
Datum_ltxtq_exec(PG_FUNCTION_ARGS);
192-
Datum_ltxtq_rexec(PG_FUNCTION_ARGS);
193-
Datum_ltree_isparent(PG_FUNCTION_ARGS);
194-
Datum_ltree_risparent(PG_FUNCTION_ARGS);
179+
PGDLLEXPORTDatumltree_isparent(PG_FUNCTION_ARGS);
180+
PGDLLEXPORTDatumltree_risparent(PG_FUNCTION_ARGS);
181+
PGDLLEXPORTDatumltq_regex(PG_FUNCTION_ARGS);
182+
PGDLLEXPORTDatumltq_rregex(PG_FUNCTION_ARGS);
183+
PGDLLEXPORTDatumlt_q_regex(PG_FUNCTION_ARGS);
184+
PGDLLEXPORTDatumlt_q_rregex(PG_FUNCTION_ARGS);
185+
PGDLLEXPORTDatumltxtq_exec(PG_FUNCTION_ARGS);
186+
PGDLLEXPORTDatumltxtq_rexec(PG_FUNCTION_ARGS);
187+
PGDLLEXPORTDatum_ltq_regex(PG_FUNCTION_ARGS);
188+
PGDLLEXPORTDatum_ltq_rregex(PG_FUNCTION_ARGS);
189+
PGDLLEXPORTDatum_lt_q_regex(PG_FUNCTION_ARGS);
190+
PGDLLEXPORTDatum_lt_q_rregex(PG_FUNCTION_ARGS);
191+
PGDLLEXPORTDatum_ltxtq_exec(PG_FUNCTION_ARGS);
192+
PGDLLEXPORTDatum_ltxtq_rexec(PG_FUNCTION_ARGS);
193+
PGDLLEXPORTDatum_ltree_isparent(PG_FUNCTION_ARGS);
194+
PGDLLEXPORTDatum_ltree_risparent(PG_FUNCTION_ARGS);
195195

196196
/* Concatenation functions */
197-
Datumltree_addltree(PG_FUNCTION_ARGS);
198-
Datumltree_addtext(PG_FUNCTION_ARGS);
199-
Datumltree_textadd(PG_FUNCTION_ARGS);
197+
PGDLLEXPORTDatumltree_addltree(PG_FUNCTION_ARGS);
198+
PGDLLEXPORTDatumltree_addtext(PG_FUNCTION_ARGS);
199+
PGDLLEXPORTDatumltree_textadd(PG_FUNCTION_ARGS);
200200

201201
/* Util function */
202-
Datumltree_in(PG_FUNCTION_ARGS);
202+
PGDLLEXPORTDatumltree_in(PG_FUNCTION_ARGS);
203203

204204
boolltree_execute(ITEM*curitem,void*checkval,
205205
boolcalcnot,bool (*chkcond) (void*checkval,ITEM*val));

‎src/include/fmgr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
413413
*info function, since authors shouldn't need to be explicitly aware of it.
414414
*/
415415
#definePG_FUNCTION_INFO_V1(funcname) \
416-
extern Datum funcname(PG_FUNCTION_ARGS); \
416+
externPGDLLEXPORTDatum funcname(PG_FUNCTION_ARGS); \
417417
extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
418418
const Pg_finfo_record * \
419419
CppConcat(pg_finfo_,funcname) (void) \

‎src/pl/plpython/plpy_elog.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ extern PyObject *PLy_exc_spi_error;
3434
} while(0)
3535
#endif/* HAVE__BUILTIN_CONSTANT_P */
3636

37-
externvoidPLy_elog_impl(intelevel,constchar*fmt,...)pg_attribute_printf(2,3);
37+
externPGDLLEXPORTvoidPLy_elog_impl(intelevel,constchar*fmt,...)pg_attribute_printf(2,3);
3838

39-
externvoidPLy_exception_set(PyObject*exc,constchar*fmt,...)pg_attribute_printf(2,3);
39+
externPGDLLEXPORTvoidPLy_exception_set(PyObject*exc,constchar*fmt,...)pg_attribute_printf(2,3);
4040

41-
externvoidPLy_exception_set_plural(PyObject*exc,constchar*fmt_singular,constchar*fmt_plural,
42-
unsigned longn,...)pg_attribute_printf(2,5)pg_attribute_printf(3,5);
41+
externPGDLLEXPORTvoidPLy_exception_set_plural(PyObject*exc,constchar*fmt_singular,constchar*fmt_plural,
42+
unsigned longn,...)pg_attribute_printf(2,5)pg_attribute_printf(3,5);
4343

44-
externvoidPLy_exception_set_with_details(PyObject*excclass,ErrorData*edata);
44+
externPGDLLEXPORTvoidPLy_exception_set_with_details(PyObject*excclass,ErrorData*edata);
4545

4646
#endif/* PLPY_ELOG_H */

‎src/pl/plpython/plpy_typeio.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -147,29 +147,29 @@ struct PLyObToDatum
147147
};
148148

149149

150-
externPyObject*PLy_input_convert(PLyDatumToOb*arg,Datumval);
151-
externDatumPLy_output_convert(PLyObToDatum*arg,PyObject*val,
152-
bool*isnull);
150+
externPGDLLEXPORTPyObject*PLy_input_convert(PLyDatumToOb*arg,Datumval);
151+
externPGDLLEXPORTDatumPLy_output_convert(PLyObToDatum*arg,PyObject*val,
152+
bool*isnull);
153153

154-
externPyObject*PLy_input_from_tuple(PLyDatumToOb*arg,HeapTupletuple,
155-
TupleDescdesc,boolinclude_generated);
154+
externPGDLLEXPORTPyObject*PLy_input_from_tuple(PLyDatumToOb*arg,HeapTupletuple,
155+
TupleDescdesc,boolinclude_generated);
156156

157-
externvoidPLy_input_setup_func(PLyDatumToOb*arg,MemoryContextarg_mcxt,
158-
OidtypeOid,int32typmod,
159-
structPLyProcedure*proc);
160-
externvoidPLy_output_setup_func(PLyObToDatum*arg,MemoryContextarg_mcxt,
161-
OidtypeOid,int32typmod,
162-
structPLyProcedure*proc);
157+
externPGDLLEXPORTvoidPLy_input_setup_func(PLyDatumToOb*arg,MemoryContextarg_mcxt,
158+
OidtypeOid,int32typmod,
159+
structPLyProcedure*proc);
160+
externPGDLLEXPORTvoidPLy_output_setup_func(PLyObToDatum*arg,MemoryContextarg_mcxt,
161+
OidtypeOid,int32typmod,
162+
structPLyProcedure*proc);
163163

164-
externvoidPLy_input_setup_tuple(PLyDatumToOb*arg,TupleDescdesc,
165-
structPLyProcedure*proc);
166-
externvoidPLy_output_setup_tuple(PLyObToDatum*arg,TupleDescdesc,
167-
structPLyProcedure*proc);
164+
externPGDLLEXPORTvoidPLy_input_setup_tuple(PLyDatumToOb*arg,TupleDescdesc,
165+
structPLyProcedure*proc);
166+
externPGDLLEXPORTvoidPLy_output_setup_tuple(PLyObToDatum*arg,TupleDescdesc,
167+
structPLyProcedure*proc);
168168

169-
externvoidPLy_output_setup_record(PLyObToDatum*arg,TupleDescdesc,
170-
structPLyProcedure*proc);
169+
externPGDLLEXPORTvoidPLy_output_setup_record(PLyObToDatum*arg,TupleDescdesc,
170+
structPLyProcedure*proc);
171171

172172
/* conversion from Python objects to C strings --- exported for transforms */
173-
externchar*PLyObject_AsString(PyObject*plrv);
173+
externPGDLLEXPORTchar*PLyObject_AsString(PyObject*plrv);
174174

175175
#endif/* PLPY_TYPEIO_H */

‎src/pl/plpython/plpy_util.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
#include"plpython.h"
1010

11-
externPyObject*PLyUnicode_Bytes(PyObject*unicode);
12-
externchar*PLyUnicode_AsString(PyObject*unicode);
11+
externPGDLLEXPORTPyObject*PLyUnicode_Bytes(PyObject*unicode);
12+
externPGDLLEXPORTchar*PLyUnicode_AsString(PyObject*unicode);
1313

14-
externPyObject*PLyUnicode_FromString(constchar*s);
15-
externPyObject*PLyUnicode_FromStringAndSize(constchar*s,Py_ssize_tsize);
14+
externPGDLLEXPORTPyObject*PLyUnicode_FromString(constchar*s);
15+
externPGDLLEXPORTPyObject*PLyUnicode_FromStringAndSize(constchar*s,Py_ssize_tsize);
1616

1717
#endif/* PLPY_UTIL_H */

‎src/test/modules/test_shm_mq/test_shm_mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
4040
shm_mq_handle**input);
4141

4242
/* Main entrypoint for a worker. */
43-
externvoidtest_shm_mq_main(Datum)pg_attribute_noreturn();
43+
externPGDLLEXPORTvoidtest_shm_mq_main(Datum)pg_attribute_noreturn();
4444

4545
#endif

‎src/test/modules/worker_spi/worker_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ PG_MODULE_MAGIC;
4646

4747
PG_FUNCTION_INFO_V1(worker_spi_launch);
4848

49-
voidworker_spi_main(Datum)pg_attribute_noreturn();
49+
PGDLLEXPORTvoidworker_spi_main(Datum)pg_attribute_noreturn();
5050

5151
/* GUC variables */
5252
staticintworker_spi_naptime=10;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp