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
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
037ab3f
)
Add comment about tmpnam().
author
Jarkko Hietaniemi
<jhi@iki.fi>
Wed, 28 May 2014 18:11:12 +0000
(14:11 -0400)
committer
Jarkko Hietaniemi
<jhi@iki.fi>
Wed, 28 May 2014 18:12:49 +0000
(14:12 -0400)
ext/POSIX/POSIX.xs
patch
|
blob
|
blame
|
history
diff --git
a/ext/POSIX/POSIX.xs
b/ext/POSIX/POSIX.xs
index
4122db9
..
85c7fc3
100644
(file)
--- a/
ext/POSIX/POSIX.xs
+++ b/
ext/POSIX/POSIX.xs
@@
-1424,6
+1424,12
@@
tmpnam()
CODE:
RETVAL = newSVpvn("", 0);
SvGROW(RETVAL, L_tmpnam);
+ /* Yes, we know tmpnam() is bad. So bad that some compilers
+ * and linkers warn against using it. But it is here for
+ * completeness. POSIX.pod warns against using it.
+ *
+ * Then again, maybe this should be removed at some point.
+ * No point in enabling dangerous interfaces. */
len = strlen(tmpnam(SvPV(RETVAL, i)));
SvCUR_set(RETVAL, len);
OUTPUT: