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

Commit98170fa

Browse files
committed
Declare mkdtemp() only if we're providing it.
Follow our usual style of providing an "extern" for a standard libraryfunction only when we're also providing the implementation. This avoidsissues when the system headers declare the function slightly differentlythan we do, as noted by Caleb Welton.We might have to go to the extent of probing to see if the system headersdeclare the function, but let's not do that until it's demonstrated to benecessary.Oversight in commit9e6b1bf. Back-patchto all supported branches, as that was.
1 parent31021e7 commit98170fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎src/include/port.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,10 @@ extern intgetopt(int nargc, char *const * nargv, const char *ostr);
403403
externintisinf(doublex);
404404
#endif
405405

406+
#ifndefHAVE_MKDTEMP
407+
externchar*mkdtemp(char*path);
408+
#endif
409+
406410
#ifndefHAVE_RINT
407411
externdoublerint(doublex);
408412
#endif
@@ -464,7 +468,4 @@ extern void qsort_arg(void *base, size_t nel, size_t elsize,
464468
/* port/chklocale.c */
465469
externintpg_get_encoding_from_locale(constchar*ctype);
466470

467-
/* port/mkdtemp.c */
468-
externchar*mkdtemp(char*path);
469-
470471
#endif/* PG_PORT_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp