This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Synchronize with CPAN Time-HiRes 1.9733
[perl5.git] / reentr.c
index a5ea192..c464acc 100644 (file)
--- a/reentr.c
+++ b/reentr.c
  * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
  * This file is built by regen/reentr.pl from data in regen/reentr.pl.
  * Any changes made here will be lost!
- *
+ */
+
+/*
  * "Saruman," I said, standing away from him, "only one hand at a time can
  *  wield the One, and you know that well, so do not trouble to say we!"
  *
+ *     [p.260 of _The Lord of the Rings_, II/ii: "The Council of Elrond"]
+ */
+
+/*
  * This file contains a collection of automatically created wrappers
  * (created by running reentr.pl) for reentrant (thread-safe) versions of
  * various library calls, such as getpwent_r.  The wrapping is done so
@@ -29,6 +35,7 @@
 
 void
 Perl_reentrant_size(pTHX) {
+       PERL_UNUSED_CONTEXT;
 #ifdef USE_REENTRANT_API
 #define REENTRANTSMALLSIZE      256    /* Make something up. */
 #define REENTRANTUSUALSIZE     4096    /* Make something up. */
@@ -139,6 +146,7 @@ Perl_reentrant_size(pTHX) {
 
 void
 Perl_reentrant_init(pTHX) {
+       PERL_UNUSED_CONTEXT;
 #ifdef USE_REENTRANT_API
        Newx(PL_reentrant_buffer, 1, REENTR);
        Perl_reentrant_size(aTHX);
@@ -215,6 +223,7 @@ Perl_reentrant_init(pTHX) {
 
 void
 Perl_reentrant_free(pTHX) {
+       PERL_UNUSED_CONTEXT;
 #ifdef USE_REENTRANT_API
 #ifdef HAS_ASCTIME_R
        Safefree(PL_reentrant_buffer->_asctime_buffer);
@@ -431,8 +440,10 @@ Perl_reentrant_retry(const char *f, ...)
                    uid = va_arg(ap, Uid_t);
 #endif
                    retptr = getpwuid(uid); break;
+#if defined(HAS_GETPWENT) || defined(HAS_GETPWENT_R)
                case OP_GPWENT:
                    retptr = getpwent(); break;
+#endif
                default:
                    SETERRNO(ERANGE, LIB_INVARG);
                    break;