Index: trunk/src/compat_inc.h.in =================================================================== --- trunk/src/compat_inc.h.in (revision 15405) +++ trunk/src/compat_inc.h.in (revision 15406) @@ -22,13 +22,21 @@ @] put /tmpasm/IFS {\n} -uniq /local/pcb/compat_inc +put /local/OFS_save /tmpasm/OFS +put /tmpasm/OFS {\n} gsub /local/pcb/compat_inc {\\\\n *} {\n} +uniq /local/pcb/compat_inc /local/pcb/compat_inc {#define} {#include} +# do not redefine _XOPEN_SOURCE, which is hardwired in this template +gsub /local/pcb/compat_inc {#define *_XOPEN_SOURCE} {} +put /tmpasm/OFS /local/OFS_save + + print [@ /*** DO NOT EDIT - automatically generated by scconfig ***/ +#define _DEFAULT_SOURCE #define _XOPEN_SOURCE 500 /* system-dependent includes, as detected in ./configure */ Index: trunk/src/safe_fs.c =================================================================== --- trunk/src/safe_fs.c (revision 15405) +++ trunk/src/safe_fs.c (revision 15406) @@ -24,14 +24,15 @@ * mailing list: pcb-rnd (at) list.repo.hu (send "subscribe") */ -/* for popen() */ -#define _DEFAULT_SOURCE -#define _BSD_SOURCE - /* permit direct access to the libc calls (turn off config.h masking) */ #define PCB_SAFE_FS +/* opendir, readdir */ +#include "compat_inc.h" + #include "config.h" + + #include #include @@ -43,8 +44,6 @@ #include "globalconst.h" #include "paths.h" -/* opendir, readdir */ -#include "compat_inc.h" /* Evaluates op(arg1,arg2); returns 0 if the operation is permitted */ static int pcb_safe_fs_check(const char *op, const char *arg1, const char *arg2)