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

Commit60f8133

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 parent5ba062e commit60f8133

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
@@ -390,6 +390,10 @@ extern intgetpeereid(int sock, uid_t *uid, gid_t *gid);
390390
externintisinf(doublex);
391391
#endif
392392

393+
#ifndefHAVE_MKDTEMP
394+
externchar*mkdtemp(char*path);
395+
#endif
396+
393397
#ifndefHAVE_RINT
394398
externdoublerint(doublex);
395399
#endif
@@ -466,9 +470,6 @@ extern intpg_check_dir(const char *dir);
466470
/* port/pgmkdirp.c */
467471
externintpg_mkdir_p(char*path,intomode);
468472

469-
/* port/mkdtemp.c */
470-
externchar*mkdtemp(char*path);
471-
472473
/* port/pqsignal.c */
473474
typedefvoid (*pqsigfunc) (intsigno);
474475
externpqsigfuncpqsignal(intsigno,pqsigfuncfunc);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp