This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
perlguts: Make verbatim lines fit in 79 cols
[perl5.git]
/
perlio.c
diff --git
a/perlio.c
b/perlio.c
index
343c62e
..
11a66d0
100644
(file)
--- a/
perlio.c
+++ b/
perlio.c
@@
-3126,7
+3126,9
@@
PerlIOStdio_invalidate_fileno(pTHX_ FILE *f)
/* XXX this could use PerlIO_canset_fileno() and
* PerlIO_set_fileno() support from Configure
*/
/* XXX this could use PerlIO_canset_fileno() and
* PerlIO_set_fileno() support from Configure
*/
-# if defined(__UCLIBC__)
+# if defined(HAS_FDCLOSE)
+ return fdclose(f, NULL) == 0 ? 1 : 0;
+# elif defined(__UCLIBC__)
/* uClibc must come before glibc because it defines __GLIBC__ as well. */
f->__filedes = -1;
return 1;
/* uClibc must come before glibc because it defines __GLIBC__ as well. */
f->__filedes = -1;
return 1;
@@
-5007,7
+5009,7
@@
PerlIO_tmpfile(void)
char tempname[] = "/tmp/PerlIO_XXXXXX";
const char * const tmpdir = TAINTING_get ? NULL : PerlEnv_getenv("TMPDIR");
SV * sv = NULL;
char tempname[] = "/tmp/PerlIO_XXXXXX";
const char * const tmpdir = TAINTING_get ? NULL : PerlEnv_getenv("TMPDIR");
SV * sv = NULL;
- int old_umask = umask(0
600
);
+ int old_umask = umask(0
177
);
/*
* I have no idea how portable mkstemp() is ... NI-S
*/
/*
* I have no idea how portable mkstemp() is ... NI-S
*/