diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-17 17:36:33 +0100 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:59:39 +0100 |
commit | adf7d503e55721c500f0bf66560b8f5df7966fe7 (patch) | |
tree | 0bd1e8c6ddd1c43c4bb020e4f188a77c6cd5e11a /pod/perlhacktips.pod | |
parent | d54fbe846a9f98aaae47d79e46490ecda6819fe0 (diff) | |
download | perl-adf7d503e55721c500f0bf66560b8f5df7966fe7.tar.gz |
pod/perlhacktips.pod: remove some outdated portability notes
Diffstat (limited to 'pod/perlhacktips.pod')
-rw-r--r-- | pod/perlhacktips.pod | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/pod/perlhacktips.pod b/pod/perlhacktips.pod index 773b4dfdc9..a32997153f 100644 --- a/pod/perlhacktips.pod +++ b/pod/perlhacktips.pod @@ -20,8 +20,7 @@ to do that first. =head1 COMMON PROBLEMS -Perl source plays by ANSI C89 rules: no C99 (or C++) extensions. In -some cases we have to take pre-ANSI requirements into consideration. +Perl source plays by ANSI C89 rules: no C99 (or C++) extensions. You don't care about some particular platform having broken Perl? I hear there is still a strong demand for J2EE programmers. @@ -653,10 +652,6 @@ malloc(0), realloc(0), calloc(0, 0) are non-portable. To be portable allocate at least one byte. (In general you should rarely need to work at this low level, but instead use the various malloc wrappers.) -=item * - -snprintf() - the return type is unportable. Use my_snprintf() instead. - =back =head2 Security problems @@ -690,20 +685,12 @@ domain implementation of INN). Do not use sprintf() or vsprintf() -If you really want just plain byte strings, use my_snprintf() and -my_vsnprintf() instead, which will try to use snprintf() and -vsnprintf() if those safer APIs are available. If you want something +If you really want just plain byte strings, use snprintf() and +vsnprintf() instead. If you want something fancier than a plain byte string, use L<C<Perl_form>()|perlapi/form> or SVs and L<C<Perl_sv_catpvf()>|perlapi/sv_catpvf>. -Note that glibc C<printf()>, C<sprintf()>, etc. are buggy before glibc -version 2.17. They won't allow a C<%.s> format with a precision to -create a string that isn't valid UTF-8 if the current underlying locale -of the program is UTF-8. What happens is that the C<%s> and its operand are -simply skipped without any notice. -L<https://sourceware.org/bugzilla/show_bug.cgi?id=6530>. - =item * Do not use atoi() |