/* -*- mode: C; buffer-read-only: t -*-
 *
 *    perl_lock_definitions.h
 *
 *    Copyright (C) 2023, 2024, 2025, 2026 by Larry Wall and others
 *
 *    You may distribute under the terms of either the GNU General Public
 *    License or the Artistic License, as specified in the README file.
 *
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 * This file is built by regen/lock_definitions.pl from data in
 * regen/lock_definitions.pl.
 * Any changes made here will be lost!
 */

/* This file contains macros to wrap their respective libc uses to ensure that
 * those uses are thread-safe in a multi-threaded environment.  It is ordered
 * alphabetically by function name.
 *
 * Most libc uses are already thread-safe without these wrappers, so do not
 * appear here.  But there are still many uses that do have multi-thread
 * issues.  This file lists all of them we know about.  Many of those uses can
 * be made thread-safe if every running thread submits to being controlled by
 * an appropriate mutex.  The wrapper macros defined in this file create
 * other macros that do this.  Take all libc calls that have corresponding
 * macros in this file, and precede each with the LOCK macro, and make sure
 * that all code paths afterwards include its UNLOCK mate.  In some cases, the
 * function's result must be copied to a safe place before unlocking.
 *
 * Macros are generated only for cases where they actually solve a function's
 * thread-safety, and do not create potential deadlock nor unacceptable
 * slowdown in typical uses.  They assume that the libc function executes
 * quickly, and that your code keeps the lock for as short an interval as
 * possible.
 *
 * This means that no macros are generated for functions whose operation
 * require locking across calls to other functions.  An example is a database
 * where one function opens it, others read/write it, and another closes it.
 * It is possible to automatically generate macros that would work in this
 * situation without the possibility of deadlock, but doing so could
 * reasonable cause unacceptably delay other executing threads.  Dealing with
 * this is hence left to the programmer.
 *
 * There are other reasons for a macro to not be generated for functions that
 * could benefit from one.  If no macro is generated, the reason why is listed
 * instead.
 *
 * See "Dealing with embedded perls and threads" in perlclib for further
 * information.
 *
 * The macros generated here expand to other macro calls that are expected to
 * be #defined in perl.h.  The expansion depends on the platform and
 * Configuration.  All expand to no-ops when compiled without threading; in
 * some threaded Configurations many still will expand to no-ops.  Some
 * definitions are no-ops in all current cases, but you should wrap their
 * functions with them anyway, as future work likely will yield Configurations
 * where they aren't just no-ops.
 *
 * perlclib lists some functions that need to be called in single-thread mode
 * at least once, before switching to multi-threaded operation.  The locking
 * macros in this file assume that has been done.
 *
 * perlclib also lists some functions that can't be made thread-safe.  This
 * file defines macros for them that will result in a C compilation error if
 * used.
 *
 * The macros provided here do not protect your code from calls that are
 * susceptible to asynchronous signal issues.
 *
 * Some libc uses are not functions but expand to something that C code can
 * use as lvalues; for example, they can be assigned to.  The macros in this
 * file are not valid for lvalues.
 *
 * Individual uses may have additional caveats.  See their entries below for
 * these, and any additional specific information.
 *
 * You shouldn't use these locking macros for calls that happen so early in
 * the start-up procedure or late in the tear-down one that the appropriate
 * mutex operations aren't fully functional.  These are not likely to be
 * running multi-threaded at that time anyway.
 *
 * Also, the locale-related functions introduced in POSIX 2008 are not
 * portable to platforms that don't support them; for example any Windows one.
 * Perl has extensive code to hide the differences from your code.  You should
 * be using Perl_setlocale() to change and query the locale; and don't use
 * functions like uselocale(), or any function that takes a locale_t parameter
 * (typically such functions have the suffix "_l" in their names).  Keep in
 * mind that the current locale is assumed to be "C" for all Perl programs
 * except within the scope of "use locale", or when calling certain functions
 * in the POSIX module.  The perl core sorts all of this out for you; most
 * functions that deal directly with locale information should not be used.
 *
 * You may override any definitions here simply by #defining your own before
 * #including this file (which likely means before #including perl.h).
 *
 * Best practice is to call the LOCK macro; call the function and copy the
 * result to a per-thread place if that result points to a buffer internal to
 * libc; then UNLOCK it immediately.  After that, you can act on the result.
 *
 * The macros here are generated from an internal DATA section in
 * regen/lock_definitions.pl, populated from information derived from the
 * POSIX 2017 Standard and Linux glibc section 3 man pages (supplemented by
 * other vendor man pages).  (Linux tends to have extra restrictions not in
 * the Standard, and its man pages are typically more detailed than the
 * Standard and other vendors, who may also have the same restrictions, but
 * just don't document them.) The data can easily be adjusted as necessary.
 *
 * Many of the thread vulnerabilities involve the program's environment and
 * locale, so perl has separate mutexes for each of those two types of access.
 * There are a few others, all rare or obsolete.   There are also many races,
 * where certain functions concurrently executing in different threads can
 * interfere with each other unpredictably.  This header file currently lumps
 * all races and non-environment/locale vulnerabilities into a third, generic,
 * mutex.  So the macro names are various combinations of the three mutexes,
 * and whether the lock needs to be exclusive (suffix "x" in the lock name) or
 * non-exclusive (suffix "r" for read-only).  GEN means the generic mutex; ENV
 * the environment one; and LC the locale one.
 *
 * The lumping into the single generic mutex is due to the expectation that
 * such calls are infrequent enough that having a single mutex for all won't
 * noticeably affect performance, and that the more mutexes you have, the more
 * likely deadlock can occur.  Individual cases could be separated into
 * separate mutexes if necessary.  perl.h takes further steps in the expansion
 * of these macros to avoid deadlock altogether.
 */

#ifndef PERL_ADDMNTENT_LOCK

   /* addmntent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * addmntent() has potential races with other threads concurrently using
    *             any of: itself, clearerr_unlocked(), __fbufsize(),
    *             fflush_unlocked(), fgetc_unlocked(), fgets_unlocked(),
    *             fgetwc_unlocked(), fgetws_unlocked(), __fpending(),
    *             __fpurge(), fputc_unlocked(), fputs_unlocked(),
    *             fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *             __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *             getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * NO LOCK IS CREATED for 'addmntent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ALPHASORT_LOCK
#  define PERL_ALPHASORT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ALPHASORT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ASCTIME_LOCK

   /* asctime() Obsolete; use Perl_sv_strftime_tm() instead
    * asctime() has potential races with other threads concurrently using
    *           either itself or ctime(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_ASCTIME_R)
#    define PERL_ASCTIME_LOCK    PERL_ASCTIME_R_LOCK
#    define PERL_ASCTIME_UNLOCK  PERL_ASCTIME_R_UNLOCK
#  else
#    define PERL_ASCTIME_LOCK    PERL_LCx_LOCK(0)
#    define PERL_ASCTIME_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef ASCTIME_LOCK
#    define ASCTIME_LOCK    PERL_ASCTIME_LOCK
#    define ASCTIME_UNLOCK  PERL_ASCTIME_UNLOCK
#  endif
#endif

#ifndef PERL_ASCTIME_R_LOCK

   /* asctime_r() Obsolete; use Perl_sv_strftime_tm() instead */
#  define PERL_ASCTIME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ASCTIME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ASPRINTF_LOCK

   /* asprintf() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  define PERL_ASPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ASPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ATOF_LOCK
#  define PERL_ATOF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ATOF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ATOI_LOCK
#  define PERL_ATOI_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ATOI_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ATOL_LOCK
#  define PERL_ATOL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ATOL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ATOLL_LOCK
#  define PERL_ATOLL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ATOLL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ATOMIC_INIT_LOCK
#  define PERL_ATOMIC_INIT_LOCK    PERL_GENx_LOCK
#  define PERL_ATOMIC_INIT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_BASENAME_LOCK
#  ifndef __GLIBC__
#    define PERL_BASENAME_LOCK    PERL_GENx_LOCK
#    define PERL_BASENAME_UNLOCK  PERL_GENx_UNLOCK
#  else
#    define PERL_BASENAME_LOCK    NOOP
#    define PERL_BASENAME_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_BTOWC_LOCK
#  define PERL_BTOWC_LOCK
#  define PERL_BTOWC_UNLOCK
#endif

#ifndef PERL_C16RTOMB_LOCK

   /* c16rtomb() locking macros are only valid if '!ps' */
#  define PERL_C16RTOMB_LOCK
#  define PERL_C16RTOMB_UNLOCK
#endif

#ifndef PERL_C32RTOMB_LOCK

   /* c32rtomb() locking macros are only valid if '!ps' */
#  define PERL_C32RTOMB_LOCK
#  define PERL_C32RTOMB_UNLOCK
#endif

#ifndef PERL_CATCLOSE_LOCK

   /* NO LOCK IS CREATED for 'catclose' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_CATGETS_LOCK
#  ifndef __GLIBC__

     /* NO LOCK IS CREATED for 'catgets' because it is used in
      * conjunction with other functions that all need to be executed
      * atomically as a unit.  So an individual lock doesn't make
      * sense, and a group lock could result in unacceptable
      * performance or deadlock.  The circumstances might require a
      * whole new mutex, or it could be that only one thread at a time
      * will be running that uses the shared resources, so no mutex at
      * all is needed. */
#  else

     /* NO LOCK IS CREATED for 'catgets' because it is used in
      * conjunction with other functions that all need to be executed
      * atomically as a unit.  So an individual lock doesn't make
      * sense, and a group lock could result in unacceptable
      * performance or deadlock.  The circumstances might require a
      * whole new mutex, or it could be that only one thread at a time
      * will be running that uses the shared resources, so no mutex at
      * all is needed. */
#  endif
#endif

#ifndef PERL_CATOPEN_LOCK

   /* NO LOCK IS CREATED for 'catopen' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_CLEARENV_LOCK
#  define PERL_CLEARENV_LOCK    PERL_ENVx_LOCK
#  define PERL_CLEARENV_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_CLEARERR_UNLOCKED_LOCK

   /* clearerr_unlocked() either was never in the POSIX Standard, or was
    *                     removed as of POSIX 2001.
    * clearerr_unlocked() has potential races with other threads concurrently
    *                     using any of: itself, addmntent(), __fbufsize(),
    *                     fflush_unlocked(), fgetc_unlocked(),
    *                     fgets_unlocked(), fgetwc_unlocked(),
    *                     fgetws_unlocked(), __fpending(), __fpurge(),
    *                     fputc_unlocked(), fputs_unlocked(),
    *                     fputwc_unlocked(), fputws_unlocked(),
    *                     fread_unlocked(), __fsetlocking(),
    *                     fwrite_unlocked(), getc_unlocked(),
    *                     getwc_unlocked(), putc_unlocked(), or
    *                     putwc_unlocked().
    * clearerr_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                     locked the stream, but should not be used since not
    *                     standardized and not widely implemented */
#  define PERL_CLEARERR_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_CLEARERR_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_CRYPT_LOCK

   /* crypt() has potential races with other threads concurrently using any
    *         of: itself, encrypt(), or setkey(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_CRYPT_R)
#    define PERL_CRYPT_LOCK    PERL_CRYPT_R_LOCK
#    define PERL_CRYPT_UNLOCK  PERL_CRYPT_R_UNLOCK
#  else
#    define PERL_CRYPT_LOCK    PERL_GENx_LOCK
#    define PERL_CRYPT_UNLOCK  PERL_GENx_UNLOCK
#  endif
#endif

#ifndef PERL_CRYPT_GENSALT_LOCK

   /* crypt_gensalt() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001. */
#  define PERL_CRYPT_GENSALT_LOCK    PERL_GENx_LOCK
#  define PERL_CRYPT_GENSALT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_CRYPT_R_LOCK

   /* crypt_r() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_CRYPT_R_LOCK    NOOP
#  define PERL_CRYPT_R_UNLOCK  NOOP
#endif

#ifndef PERL_CTERMID_LOCK
#  ifndef __GLIBC__

     /* ctermid() locking macros are only valid if '!s' */
#    define PERL_CTERMID_LOCK    NOOP
#    define PERL_CTERMID_UNLOCK  NOOP
#  else
#    define PERL_CTERMID_LOCK    NOOP
#    define PERL_CTERMID_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_CTERMID_R_LOCK

   /* ctermid_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_CTERMID_R_LOCK    NOOP
#  define PERL_CTERMID_R_UNLOCK  NOOP
#endif

#ifndef PERL_CTIME_LOCK

   /* ctime() Obsolete; use Perl_sv_strftime_ints() instead
    * ctime() has potential races with other threads concurrently using any
    *         of: itself, asctime(), ctime_r(), daylight, gmtime(),
    *         localtime(), localtime_r(), mktime(), strftime(), timezone,
    *         tzname, or tzset(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_CTIME_R)
#    define PERL_CTIME_LOCK    PERL_CTIME_R_LOCK
#    define PERL_CTIME_UNLOCK  PERL_CTIME_R_UNLOCK
#  else
#    define PERL_CTIME_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_CTIME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef CTIME_LOCK
#    define CTIME_LOCK    PERL_CTIME_LOCK
#    define CTIME_UNLOCK  PERL_CTIME_UNLOCK
#  endif
#endif

#ifndef PERL_CTIME_R_LOCK

   /* ctime_r() Obsolete; use Perl_sv_strftime_ints() instead
    * ctime_r() has potential races with other threads concurrently using any
    *           of: itself, ctime(), daylight, localtime(), localtime_r(),
    *           mktime(), strftime(), timezone, tzname, or tzset(). */
#  define PERL_CTIME_R_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_CTIME_R_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#endif

#ifndef PERL_CUSERID_LOCK

   /* cuserid() Obsolete; DO NOT USE; see its man page
    * cuserid() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * cuserid() locking macros are only valid if '!string' */
#  define PERL_CUSERID_LOCK    PERL_LCr_LOCK(0)
#  define PERL_CUSERID_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_DAYLIGHT_LOCK

   /* daylight has potential races with other threads concurrently using any
    *          of: itself, ctime(), ctime_r(), localtime(), localtime_r(),
    *          mktime(), strftime(), timezone, tzname, or tzset().
    * daylight locking macros are only valid if its value is used read-only */
#  define PERL_DAYLIGHT_LOCK    PERL_LCx_LOCK(0)
#  define PERL_DAYLIGHT_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_DBM_CLEARERR_LOCK

   /* dbm_clearerr() has potential races with other threads concurrently using
    *                any of: itself, dbm_close(), dbm_delete(), dbm_error(),
    *                dbm_fetch(), dbm_firstkey(), dbm_nextkey(), dbm_open(),
    *                or dbm_store().
    * NO LOCK IS CREATED for 'dbm_clearerr' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_CLOSE_LOCK

   /* dbm_close() has potential races with other threads concurrently using
    *             any of: itself, dbm_clearerr(), dbm_delete(), dbm_error(),
    *             dbm_fetch(), dbm_firstkey(), dbm_nextkey(), dbm_open(), or
    *             dbm_store().
    * NO LOCK IS CREATED for 'dbm_close' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_DELETE_LOCK

   /* dbm_delete() has potential races with other threads concurrently using
    *              any of: itself, dbm_clearerr(), dbm_close(), dbm_error(),
    *              dbm_fetch(), dbm_firstkey(), dbm_nextkey(), dbm_open(), or
    *              dbm_store().
    * NO LOCK IS CREATED for 'dbm_delete' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_ERROR_LOCK

   /* dbm_error() has potential races with other threads concurrently using
    *             any of: itself, dbm_clearerr(), dbm_close(), dbm_delete(),
    *             dbm_fetch(), dbm_firstkey(), dbm_nextkey(), dbm_open(), or
    *             dbm_store().
    * NO LOCK IS CREATED for 'dbm_error' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_FETCH_LOCK

   /* dbm_fetch() has potential races with other threads concurrently using
    *             any of: itself, dbm_clearerr(), dbm_close(), dbm_delete(),
    *             dbm_error(), dbm_firstkey(), dbm_nextkey(), dbm_open(), or
    *             dbm_store().
    * NO LOCK IS CREATED for 'dbm_fetch' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_FIRSTKEY_LOCK

   /* dbm_firstkey() has potential races with other threads concurrently using
    *                any of: itself, dbm_clearerr(), dbm_close(),
    *                dbm_delete(), dbm_error(), dbm_fetch(), dbm_nextkey(),
    *                dbm_open(), or dbm_store().
    * NO LOCK IS CREATED for 'dbm_firstkey' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_NEXTKEY_LOCK

   /* dbm_nextkey() has potential races with other threads concurrently using
    *               any of: itself, dbm_clearerr(), dbm_close(), dbm_delete(),
    *               dbm_error(), dbm_fetch(), dbm_firstkey(), dbm_open(), or
    *               dbm_store().
    * NO LOCK IS CREATED for 'dbm_nextkey' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_OPEN_LOCK

   /* dbm_open() has potential races with other threads concurrently using any
    *            of: itself, dbm_clearerr(), dbm_close(), dbm_delete(),
    *            dbm_error(), dbm_fetch(), dbm_firstkey(), dbm_nextkey(), or
    *            dbm_store().
    * NO LOCK IS CREATED for 'dbm_open' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DBM_STORE_LOCK

   /* dbm_store() has potential races with other threads concurrently using
    *             any of: itself, dbm_clearerr(), dbm_close(), dbm_delete(),
    *             dbm_error(), dbm_fetch(), dbm_firstkey(), dbm_nextkey(), or
    *             dbm_open().
    * NO LOCK IS CREATED for 'dbm_store' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_DIRNAME_LOCK
#  ifndef __GLIBC__
#    define PERL_DIRNAME_LOCK    PERL_LCr_LOCK(0)
#    define PERL_DIRNAME_UNLOCK  PERL_LCr_UNLOCK(0)
#  else
#    define PERL_DIRNAME_LOCK    NOOP
#    define PERL_DIRNAME_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_DLERROR_LOCK
#  ifndef __GLIBC__
#    define PERL_DLERROR_LOCK    PERL_GENx_LOCK
#    define PERL_DLERROR_UNLOCK  PERL_GENx_UNLOCK
#  else
#    define PERL_DLERROR_LOCK    NOOP
#    define PERL_DLERROR_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_DPRINTF_LOCK
#  define PERL_DPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_DPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_DRAND48_LOCK

   /* drand48() has potential races with other threads concurrently using any
    *           of: itself, erand48(), jrand48(), lcong48(), lrand48(),
    *           mrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_DRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_DRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_DRAND48_R_LOCK

   /* drand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * drand48_r() has potential races with other threads concurrently using
    *             any of: itself, erand48_r(), jrand48_r(), lcong48_r(),
    *             lrand48_r(), mrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_DRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_DRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ECVT_LOCK

   /* ecvt() Obsolete; use snprintf() instead */
#  define PERL_ECVT_LOCK    PERL_GENx_LOCK
#  define PERL_ECVT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ENCRYPT_LOCK

   /* encrypt() has potential races with other threads concurrently using any
    *           of: itself, crypt(), or setkey(). */
#  define PERL_ENCRYPT_LOCK    PERL_GENx_LOCK
#  define PERL_ENCRYPT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ENDALIASENT_LOCK

   /* endaliasent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'endaliasent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDFSENT_LOCK

   /* endfsent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * endfsent() has potential races with other threads concurrently using any
    *            of: itself, getfsent(), getfsfile(), getfsspec(), or
    *            setfsent().
    * NO LOCK IS CREATED for 'endfsent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDGRENT_LOCK

   /* endgrent() has potential races with other threads concurrently using any
    *            of: itself, endgrent_r(), getgrent(), getgrent_r(),
    *            setgrent(), or setgrent_r().
    * NO LOCK IS CREATED for 'endgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDGRENT_R_LOCK

   /* endgrent_r() Obsolete; use endgrent() instead
    * endgrent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * endgrent_r() has potential races with other threads concurrently using
    *              any of: itself, endgrent(), getgrent(), getgrent_r(),
    *              setgrent(), or setgrent_r().
    * NO LOCK IS CREATED for 'endgrent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDHOSTENT_LOCK

   /* endhostent() has potential races with other threads concurrently using
    *              any of: itself, endhostent_r(), gethostent(),
    *              gethostent_r(), sethostent(), or sethostent_r().
    * NO LOCK IS CREATED for 'endhostent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDHOSTENT_R_LOCK

   /* endhostent_r() Obsolete; use endhostent() instead
    * endhostent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * endhostent_r() has potential races with other threads concurrently using
    *                any of: itself, endhostent(), gethostent(),
    *                gethostent_r(), sethostent(), or sethostent_r().
    * NO LOCK IS CREATED for 'endhostent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDNETENT_LOCK

   /* endnetent() has potential races with other threads concurrently using
    *             any of: itself, endnetent_r(), getnetent(), setnetent(), or
    *             setnetent_r().
    * NO LOCK IS CREATED for 'endnetent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDNETENT_R_LOCK

   /* endnetent_r() Obsolete; use endnetent() instead
    * endnetent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * endnetent_r() has potential races with other threads concurrently using
    *               any of: itself, endnetent(), getnetent(), setnetent(), or
    *               setnetent_r().
    * NO LOCK IS CREATED for 'endnetent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDNETGRENT_LOCK

   /* endnetgrent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * endnetgrent() has potential races with other threads concurrently using
    *               any of: itself, getnetgrent(), getnetgrent_r(), innetgr(),
    *               or setnetgrent().
    * NO LOCK IS CREATED for 'endnetgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDPROTOENT_LOCK

   /* endprotoent() has potential races with other threads concurrently using
    *               any of: itself, endprotoent_r(), getprotoent(),
    *               setprotoent(), or setprotoent_r().
    * NO LOCK IS CREATED for 'endprotoent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDPROTOENT_R_LOCK

   /* endprotoent_r() Obsolete; use endprotoent() instead
    * endprotoent_r() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * endprotoent_r() has potential races with other threads concurrently
    *                 using any of: itself, endprotoent(), getprotoent(),
    *                 setprotoent(), or setprotoent_r().
    * NO LOCK IS CREATED for 'endprotoent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDPWENT_LOCK

   /* endpwent() has potential races with other threads concurrently using any
    *            of: itself, endpwent_r(), getpwent(), getpwent_r(),
    *            setpwent(), or setpwent_r().
    * NO LOCK IS CREATED for 'endpwent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDPWENT_R_LOCK

   /* endpwent_r() Obsolete; use endpwent() instead
    * endpwent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * endpwent_r() has potential races with other threads concurrently using
    *              any of: itself, endpwent(), getpwent(), getpwent_r(),
    *              setpwent(), or setpwent_r().
    * NO LOCK IS CREATED for 'endpwent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDRPCENT_LOCK

   /* endrpcent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'endrpcent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDSERVENT_LOCK

   /* endservent() has potential races with other threads concurrently using
    *              any of: itself, endservent_r(), getservent(), setservent(),
    *              or setservent_r().
    * NO LOCK IS CREATED for 'endservent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDSERVENT_R_LOCK

   /* endservent_r() Obsolete; use endservent() instead
    * endservent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * endservent_r() has potential races with other threads concurrently using
    *                any of: itself, endservent(), getservent(), setservent(),
    *                or setservent_r().
    * NO LOCK IS CREATED for 'endservent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDSPENT_LOCK

   /* endspent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * endspent() has potential races with other threads concurrently using any
    *            of: itself, getspent(), getspent_r(), or setspent().
    * NO LOCK IS CREATED for 'endspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDTTYENT_LOCK

   /* endttyent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * endttyent() has potential races with other threads concurrently using
    *             any of: itself, getttyent(), getttynam(), or setttyent().
    * NO LOCK IS CREATED for 'endttyent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDUSERSHELL_LOCK

   /* endusershell() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * NO LOCK IS CREATED for 'endusershell' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDUTENT_LOCK

   /* endutent() Obsolete; use endutxent() instead
    * endutent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * endutent() has potential races with other threads concurrently using any
    *            of: itself, endutxent(), getlogin(), getlogin_r(),
    *            getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *            getutxline(), glob(), login(), logout(), pututline(),
    *            pututxline(), setutent(), setutxent(), utmpname(), or
    *            wordexp().
    * NO LOCK IS CREATED for 'endutent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ENDUTXENT_LOCK

   /* endutxent() has potential races with other threads concurrently using
    *             any of: itself, endutent(), getlogin(), getlogin_r(),
    *             getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *             getutxline(), glob(), login(), logout(), pututline(),
    *             pututxline(), setutent(), setutxent(), utmpname(), or
    *             wordexp().
    * NO LOCK IS CREATED for 'endutxent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_ERAND48_LOCK

   /* erand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), jrand48(), lcong48(), lrand48(),
    *           mrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_ERAND48_LOCK    PERL_GENx_LOCK
#  define PERL_ERAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ERAND48_R_LOCK

   /* erand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * erand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), jrand48_r(), lcong48_r(),
    *             lrand48_r(), mrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_ERAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_ERAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ERR_LOCK

   /* err() either was never in the POSIX Standard, or was removed as of POSIX
    *       2001. */
#  define PERL_ERR_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ERR_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ERROR_LOCK

   /* error() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_ERROR_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ERROR_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ERROR_AT_LINE_LOCK

   /* error_at_line() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * error_at_line() locking macros are only valid if 'error_one_per_line' */
#  define PERL_ERROR_AT_LINE_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ERROR_AT_LINE_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ERRX_LOCK

   /* errx() either was never in the POSIX Standard, or was removed as of
    *        POSIX 2001. */
#  define PERL_ERRX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ERRX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ETHER_ATON_LOCK

   /* ether_aton() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_ETHER_ATON_LOCK                              \
  error_ether_aton_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_ETHER_NTOA_LOCK

   /* ether_ntoa() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_ETHER_NTOA_LOCK                              \
  error_ether_ntoa_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_EXECLP_LOCK
#  define PERL_EXECLP_LOCK    PERL_ENVr_LOCK
#  define PERL_EXECLP_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_EXECVP_LOCK
#  define PERL_EXECVP_LOCK    PERL_ENVr_LOCK
#  define PERL_EXECVP_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_EXECVPE_LOCK

   /* execvpe() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_EXECVPE_LOCK    PERL_ENVr_LOCK
#  define PERL_EXECVPE_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_EXIT_LOCK
#  define PERL_EXIT_LOCK    PERL_GENx_LOCK
#  define PERL_EXIT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_FBUFSIZE_LOCK

   /* __fbufsize() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * __fbufsize() has potential races with other threads concurrently using
    *              any of: itself, addmntent(), clearerr_unlocked(),
    *              fflush_unlocked(), fgetc_unlocked(), fgets_unlocked(),
    *              fgetwc_unlocked(), fgetws_unlocked(), __fpending(),
    *              __fpurge(), fputc_unlocked(), fputs_unlocked(),
    *              fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *              __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *              getwc_unlocked(), putc_unlocked(), or putwc_unlocked(). */
#  define PERL_FBUFSIZE_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FBUFSIZE_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FCLOSEALL_LOCK

   /* fcloseall() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_FCLOSEALL_LOCK    PERL_GENx_LOCK
#  define PERL_FCLOSEALL_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_FCVT_LOCK

   /* fcvt() Obsolete; use snprintf() instead */
#  define PERL_FCVT_LOCK    PERL_GENx_LOCK
#  define PERL_FCVT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_FFLUSH_UNLOCKED_LOCK

   /* fflush_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fflush_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fgetc_unlocked(),
    *                   fgets_unlocked(), fgetwc_unlocked(),
    *                   fgetws_unlocked(), __fpending(), __fpurge(),
    *                   fputc_unlocked(), fputs_unlocked(), fputwc_unlocked(),
    *                   fputws_unlocked(), fread_unlocked(), __fsetlocking(),
    *                   fwrite_unlocked(), getc_unlocked(), getwc_unlocked(),
    *                   putc_unlocked(), or putwc_unlocked().
    * fflush_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FFLUSH_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FFLUSH_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FGETC_UNLOCKED_LOCK

   /* fgetc_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * fgetc_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgets_unlocked(),
    *                  fgetwc_unlocked(), fgetws_unlocked(), __fpending(),
    *                  __fpurge(), fputc_unlocked(), fputs_unlocked(),
    *                  fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *                  __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *                  getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * fgetc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_FGETC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FGETC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FGETGRENT_LOCK

   /* fgetgrent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'fgetgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_FGETPWENT_LOCK

   /* fgetpwent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'fgetpwent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_FGETSPENT_LOCK

   /* fgetspent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'fgetspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_FGETS_UNLOCKED_LOCK

   /* fgets_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * fgets_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgetwc_unlocked(), fgetws_unlocked(), __fpending(),
    *                  __fpurge(), fputc_unlocked(), fputs_unlocked(),
    *                  fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *                  __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *                  getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * fgets_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_FGETS_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FGETS_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FGETWC_LOCK
#  define PERL_FGETWC_LOCK
#  define PERL_FGETWC_UNLOCK
#endif

#ifndef PERL_FGETWC_UNLOCKED_LOCK

   /* fgetwc_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fgetwc_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fflush_unlocked(),
    *                   fgetc_unlocked(), fgets_unlocked(), fgetws_unlocked(),
    *                   __fpending(), __fpurge(), fputc_unlocked(),
    *                   fputs_unlocked(), fputwc_unlocked(),
    *                   fputws_unlocked(), fread_unlocked(), __fsetlocking(),
    *                   fwrite_unlocked(), getc_unlocked(), getwc_unlocked(),
    *                   putc_unlocked(), or putwc_unlocked().
    * fgetwc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FGETWC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FGETWC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FGETWS_LOCK
#  define PERL_FGETWS_LOCK
#  define PERL_FGETWS_UNLOCK
#endif

#ifndef PERL_FGETWS_UNLOCKED_LOCK

   /* fgetws_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fgetws_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fflush_unlocked(),
    *                   fgetc_unlocked(), fgets_unlocked(), fgetwc_unlocked(),
    *                   __fpending(), __fpurge(), fputc_unlocked(),
    *                   fputs_unlocked(), fputwc_unlocked(),
    *                   fputws_unlocked(), fread_unlocked(), __fsetlocking(),
    *                   fwrite_unlocked(), getc_unlocked(), getwc_unlocked(),
    *                   putc_unlocked(), or putwc_unlocked().
    * fgetws_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FGETWS_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FGETWS_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FNMATCH_LOCK
#  define PERL_FNMATCH_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_FNMATCH_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_FORKPTY_LOCK

   /* forkpty() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_FORKPTY_LOCK    PERL_LCr_LOCK(0)
#  define PERL_FORKPTY_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_FPENDING_LOCK

   /* __fpending() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * __fpending() has potential races with other threads concurrently using
    *              any of: itself, addmntent(), clearerr_unlocked(),
    *              __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *              fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *              __fpurge(), fputc_unlocked(), fputs_unlocked(),
    *              fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *              __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *              getwc_unlocked(), putc_unlocked(), or putwc_unlocked(). */
#  define PERL_FPENDING_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPENDING_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FPRINTF_LOCK
#  define PERL_FPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_FPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_FPURGE_LOCK

   /* __fpurge() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * __fpurge() has potential races with other threads concurrently using any
    *            of: itself, addmntent(), clearerr_unlocked(), __fbufsize(),
    *            fflush_unlocked(), fgetc_unlocked(), fgets_unlocked(),
    *            fgetwc_unlocked(), fgetws_unlocked(), __fpending(),
    *            fputc_unlocked(), fputs_unlocked(), fputwc_unlocked(),
    *            fputws_unlocked(), fread_unlocked(), __fsetlocking(),
    *            fwrite_unlocked(), getc_unlocked(), getwc_unlocked(),
    *            putc_unlocked(), or putwc_unlocked(). */
#  define PERL_FPURGE_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPURGE_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FPUTC_UNLOCKED_LOCK

   /* fputc_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * fputc_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                  __fpending(), __fpurge(), fputs_unlocked(),
    *                  fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *                  __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *                  getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * fputc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_FPUTC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPUTC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FPUTS_UNLOCKED_LOCK

   /* fputs_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * fputs_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                  __fpending(), __fpurge(), fputc_unlocked(),
    *                  fputwc_unlocked(), fputws_unlocked(), fread_unlocked(),
    *                  __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *                  getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * fputs_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_FPUTS_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPUTS_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FPUTWC_LOCK
#  define PERL_FPUTWC_LOCK
#  define PERL_FPUTWC_UNLOCK
#endif

#ifndef PERL_FPUTWC_UNLOCKED_LOCK

   /* fputwc_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fputwc_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fflush_unlocked(),
    *                   fgetc_unlocked(), fgets_unlocked(), fgetwc_unlocked(),
    *                   fgetws_unlocked(), __fpending(), __fpurge(),
    *                   fputc_unlocked(), fputs_unlocked(), fputws_unlocked(),
    *                   fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                   getc_unlocked(), getwc_unlocked(), putc_unlocked(), or
    *                   putwc_unlocked().
    * fputwc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FPUTWC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPUTWC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FPUTWS_LOCK
#  define PERL_FPUTWS_LOCK
#  define PERL_FPUTWS_UNLOCK
#endif

#ifndef PERL_FPUTWS_UNLOCKED_LOCK

   /* fputws_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fputws_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fflush_unlocked(),
    *                   fgetc_unlocked(), fgets_unlocked(), fgetwc_unlocked(),
    *                   fgetws_unlocked(), __fpending(), __fpurge(),
    *                   fputc_unlocked(), fputs_unlocked(), fputwc_unlocked(),
    *                   fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                   getc_unlocked(), getwc_unlocked(), putc_unlocked(), or
    *                   putwc_unlocked().
    * fputws_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FPUTWS_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FPUTWS_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FREAD_UNLOCKED_LOCK

   /* fread_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * fread_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                  __fpending(), __fpurge(), fputc_unlocked(),
    *                  fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                  __fsetlocking(), fwrite_unlocked(), getc_unlocked(),
    *                  getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * fread_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_FREAD_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FREAD_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FSCANF_LOCK
#  define PERL_FSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_FSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_FSETLOCKING_LOCK

   /* __fsetlocking() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * __fsetlocking() has potential races with other threads concurrently
    *                 using any of: itself, addmntent(), clearerr_unlocked(),
    *                 __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                 fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                 __fpending(), __fpurge(), fputc_unlocked(),
    *                 fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                 fread_unlocked(), fwrite_unlocked(), getc_unlocked(),
    *                 getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    */
#  define PERL_FSETLOCKING_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FSETLOCKING_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FTS_CHILDREN_LOCK

   /* fts_children() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * NO LOCK IS CREATED for 'fts_children' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_FTS_READ_LOCK

   /* fts_read() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * NO LOCK IS CREATED for 'fts_read' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_FTW_LOCK

   /* ftw() Obsolete; use nftw() instead */
#  define PERL_FTW_LOCK    PERL_GENx_LOCK
#  define PERL_FTW_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_FWPRINTF_LOCK
#  define PERL_FWPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_FWPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_FWRITE_UNLOCKED_LOCK

   /* fwrite_unlocked() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * fwrite_unlocked() has potential races with other threads concurrently
    *                   using any of: itself, addmntent(),
    *                   clearerr_unlocked(), __fbufsize(), fflush_unlocked(),
    *                   fgetc_unlocked(), fgets_unlocked(), fgetwc_unlocked(),
    *                   fgetws_unlocked(), __fpending(), __fpurge(),
    *                   fputc_unlocked(), fputs_unlocked(), fputwc_unlocked(),
    *                   fputws_unlocked(), fread_unlocked(), __fsetlocking(),
    *                   getc_unlocked(), getwc_unlocked(), putc_unlocked(), or
    *                   putwc_unlocked().
    * fwrite_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                   locked the stream, but should not be used since not
    *                   standardized and not widely implemented */
#  define PERL_FWRITE_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_FWRITE_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_FWSCANF_LOCK
#  define PERL_FWSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_FWSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GAMMA_LOCK

   /* gamma() has potential races with other threads concurrently using any
    *         of: itself, gammaf(), gammal(), lgamma(), lgammaf(), or
    *         lgammal(). */
#  define PERL_GAMMA_LOCK    PERL_GENx_LOCK
#  define PERL_GAMMA_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GAMMAF_LOCK

   /* gammaf() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * gammaf() has potential races with other threads concurrently using any
    *          of: itself, gamma(), gammal(), lgamma(), lgammaf(), or
    *          lgammal(). */
#  define PERL_GAMMAF_LOCK    PERL_GENx_LOCK
#  define PERL_GAMMAF_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GAMMAL_LOCK

   /* gammal() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * gammal() has potential races with other threads concurrently using any
    *          of: itself, gamma(), gammaf(), lgamma(), lgammaf(), or
    *          lgammal(). */
#  define PERL_GAMMAL_LOCK    PERL_GENx_LOCK
#  define PERL_GAMMAL_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GETADDRINFO_LOCK
#  define PERL_GETADDRINFO_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETADDRINFO_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETALIASBYNAME_LOCK

   /* getaliasbyname() Use getaliasbyname_r() instead
    * getaliasbyname() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETALIASBYNAME_LOCK                              \
  error_getaliasbyname_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_GETALIASBYNAME_R_LOCK

   /* getaliasbyname_r() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001. */
#  define PERL_GETALIASBYNAME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETALIASBYNAME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETALIASENT_LOCK

   /* getaliasent() Use getaliasent_r() instead
    * getaliasent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'getaliasent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETALIASENT_R_LOCK

   /* getaliasent_r() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * NO LOCK IS CREATED for 'getaliasent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETCHAR_UNLOCKED_LOCK

   /* getchar_unlocked() has potential races with other threads concurrently
    *                    using either itself or getwchar_unlocked().
    * getchar_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                    locked stdin */
#  define PERL_GETCHAR_UNLOCKED_LOCK    PERL_GENx_LOCK
#  define PERL_GETCHAR_UNLOCKED_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GETCONTEXT_LOCK

   /* getcontext() has potential races with other threads concurrently using
    *              any of: itself, makecontext(), setcontext(), or
    *              swapcontext(). */
#  define PERL_GETCONTEXT_LOCK    PERL_GENx_LOCK
#  define PERL_GETCONTEXT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GETC_UNLOCKED_LOCK

   /* getc_unlocked() has potential races with other threads concurrently
    *                 using any of: itself, addmntent(), clearerr_unlocked(),
    *                 __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                 fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                 __fpending(), __fpurge(), fputc_unlocked(),
    *                 fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                 fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                 getwc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * getc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                 locked the stream */
#  define PERL_GETC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_GETC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_GET_CURRENT_DIR_NAME_LOCK

   /* get_current_dir_name() either was never in the POSIX Standard, or was
    *                        removed as of POSIX 2001. */
#  define PERL_GET_CURRENT_DIR_NAME_LOCK    PERL_ENVr_LOCK
#  define PERL_GET_CURRENT_DIR_NAME_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_GETDATE_LOCK
#  define PERL_GETDATE_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_GETDATE_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#endif

#ifndef PERL_GETDATE_R_LOCK

   /* getdate_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_GETDATE_R_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETDATE_R_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETENV_LOCK
#  ifdef GETENV_PRESERVES_OTHER_THREAD
#    define PERL_GETENV_LOCK    PERL_ENVr_LOCK
#    define PERL_GETENV_UNLOCK  PERL_ENVr_UNLOCK
#    ifndef GETENV_LOCK
#      define GETENV_LOCK    PERL_GETENV_LOCK
#      define GETENV_UNLOCK  PERL_GETENV_UNLOCK
#    endif
#  else
#    define PERL_GETENV_LOCK    PERL_ENVx_LOCK
#    define PERL_GETENV_UNLOCK  PERL_ENVx_UNLOCK
#    ifndef GETENV_LOCK
#      define GETENV_LOCK    PERL_GETENV_LOCK
#      define GETENV_UNLOCK  PERL_GETENV_UNLOCK
#    endif
#  endif
#endif

#ifndef PERL_GETFSENT_LOCK

   /* getfsent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * getfsent() has potential races with other threads concurrently using any
    *            of: itself, endfsent(), getfsfile(), getfsspec(), or
    *            setfsent().
    * NO LOCK IS CREATED for 'getfsent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETFSFILE_LOCK

   /* getfsfile() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * getfsfile() has potential races with other threads concurrently using
    *             any of: itself, endfsent(), getfsent(), getfsspec(), or
    *             setfsent().
    * NO LOCK IS CREATED for 'getfsfile' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETFSSPEC_LOCK

   /* getfsspec() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * getfsspec() has potential races with other threads concurrently using
    *             any of: itself, endfsent(), getfsent(), getfsfile(), or
    *             setfsent().
    * NO LOCK IS CREATED for 'getfsspec' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETGRENT_LOCK

   /* getgrent() has potential races with other threads concurrently using any
    *            of: itself, endgrent(), endgrent_r(), getgrent_r(),
    *            setgrent(), or setgrent_r().
    * NO LOCK IS CREATED for 'getgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETGRENT_R_LOCK

   /* getgrent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * getgrent_r() has potential races with other threads concurrently using
    *              any of: itself, endgrent(), endgrent_r(), getgrent(),
    *              setgrent(), or setgrent_r().
    * NO LOCK IS CREATED for 'getgrent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETGRGID_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETGRGID_R)
#    define PERL_GETGRGID_LOCK    PERL_GETGRGID_R_LOCK
#    define PERL_GETGRGID_UNLOCK  PERL_GETGRGID_R_UNLOCK
#  else
#    define PERL_GETGRGID_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETGRGID_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#endif

#ifndef PERL_GETGRGID_R_LOCK
#  define PERL_GETGRGID_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETGRGID_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETGRNAM_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETGRNAM_R)
#    define PERL_GETGRNAM_LOCK    PERL_GETGRNAM_R_LOCK
#    define PERL_GETGRNAM_UNLOCK  PERL_GETGRNAM_R_UNLOCK
#  else
#    define PERL_GETGRNAM_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETGRNAM_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#endif

#ifndef PERL_GETGRNAM_R_LOCK
#  define PERL_GETGRNAM_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETGRNAM_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETGROUPLIST_LOCK

   /* getgrouplist() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001. */
#  define PERL_GETGROUPLIST_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETGROUPLIST_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETHOSTBYADDR_LOCK

   /* gethostbyaddr() Obsolete; use getnameinfo() instead
    * gethostbyaddr() return needs a deep copy for safety */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETHOSTBYADDR_R)
#    define PERL_GETHOSTBYADDR_LOCK    PERL_GETHOSTBYADDR_R_LOCK
#    define PERL_GETHOSTBYADDR_UNLOCK  PERL_GETHOSTBYADDR_R_UNLOCK
#  else
#    define PERL_GETHOSTBYADDR_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_GETHOSTBYADDR_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef GETHOSTBYADDR_LOCK
#    define GETHOSTBYADDR_LOCK    PERL_GETHOSTBYADDR_LOCK
#    define GETHOSTBYADDR_UNLOCK  PERL_GETHOSTBYADDR_UNLOCK
#  endif
#endif

#ifndef PERL_GETHOSTBYADDR_R_LOCK

   /* gethostbyaddr_r() Obsolete; use getnameinfo() instead
    * gethostbyaddr_r() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001. */
#  define PERL_GETHOSTBYADDR_R_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETHOSTBYADDR_R_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETHOSTBYNAME_LOCK

   /* gethostbyname() Obsolete; use getaddrinfo() instead
    * gethostbyname() return needs a deep copy for safety */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETHOSTBYNAME_R)
#    define PERL_GETHOSTBYNAME_LOCK    PERL_GETHOSTBYNAME_R_LOCK
#    define PERL_GETHOSTBYNAME_UNLOCK  PERL_GETHOSTBYNAME_R_UNLOCK
#  else
#    define PERL_GETHOSTBYNAME_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_GETHOSTBYNAME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef GETHOSTBYNAME_LOCK
#    define GETHOSTBYNAME_LOCK    PERL_GETHOSTBYNAME_LOCK
#    define GETHOSTBYNAME_UNLOCK  PERL_GETHOSTBYNAME_UNLOCK
#  endif
#endif

#ifndef PERL_GETHOSTBYNAME2_LOCK

   /* gethostbyname2() Obsolete; use getaddrinfo() instead
    * gethostbyname2() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETHOSTBYNAME2_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_GETHOSTBYNAME2_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#endif

#ifndef PERL_GETHOSTBYNAME2_R_LOCK

   /* gethostbyname2_r() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001. */
#  define PERL_GETHOSTBYNAME2_R_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETHOSTBYNAME2_R_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETHOSTBYNAME_R_LOCK

   /* gethostbyname_r() Obsolete; use getaddrinfo() instead
    * gethostbyname_r() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001. */
#  define PERL_GETHOSTBYNAME_R_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETHOSTBYNAME_R_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETHOSTENT_LOCK

   /* gethostent() has potential races with other threads concurrently using
    *              any of: itself, endhostent(), endhostent_r(),
    *              gethostent_r(), sethostent(), or sethostent_r().
    * NO LOCK IS CREATED for 'gethostent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETHOSTENT_R_LOCK

   /* gethostent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * gethostent_r() has potential races with other threads concurrently using
    *                any of: itself, endhostent(), endhostent_r(),
    *                gethostent(), sethostent(), or sethostent_r().
    * NO LOCK IS CREATED for 'gethostent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETHOSTID_LOCK
#  define PERL_GETHOSTID_LOCK    PERL_GENr_ENVr_LCr_LOCK(0)
#  define PERL_GETHOSTID_UNLOCK  PERL_GENr_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETLOGIN_LOCK

   /* getlogin() is vulnerable to signal ALRM
    * getlogin() has potential races with other threads concurrently using any
    *            of: itself, endutent(), endutxent(), getlogin_r(),
    *            getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *            getutxline(), glob(), login(), logout(), pututline(),
    *            pututxline(), setutent(), setutxent(), utmpname(), or
    *            wordexp(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETLOGIN_R)
#    define PERL_GETLOGIN_LOCK    PERL_GETLOGIN_R_LOCK
#    define PERL_GETLOGIN_UNLOCK  PERL_GETLOGIN_R_UNLOCK
#  else
#    define PERL_GETLOGIN_LOCK    PERL_ENVx_LCr_LOCK(0)
#    define PERL_GETLOGIN_UNLOCK  PERL_ENVx_LCr_UNLOCK(0)
#  endif
#endif

#ifndef PERL_GETLOGIN_R_LOCK

   /* getlogin_r() is vulnerable to signal ALRM
    * getlogin_r() has potential races with other threads concurrently using
    *              any of: itself, endutent(), endutxent(), getlogin(),
    *              getutent(), getutid(), getutline(), getutxent(),
    *              getutxid(), getutxline(), glob(), login(), logout(),
    *              pututline(), pututxline(), setutent(), setutxent(),
    *              utmpname(), or wordexp(). */
#  define PERL_GETLOGIN_R_LOCK    PERL_ENVx_LCr_LOCK(0)
#  define PERL_GETLOGIN_R_UNLOCK  PERL_ENVx_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETMNTENT_LOCK

   /* getmntent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'getmntent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETMNTENT_R_LOCK

   /* getmntent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'getmntent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETNAMEINFO_LOCK
#  define PERL_GETNAMEINFO_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETNAMEINFO_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETNETBYADDR_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETNETBYADDR_R)
#    define PERL_GETNETBYADDR_LOCK    PERL_GETNETBYADDR_R_LOCK
#    define PERL_GETNETBYADDR_UNLOCK  PERL_GETNETBYADDR_R_UNLOCK
#  else
#    define PERL_GETNETBYADDR_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETNETBYADDR_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETNETBYADDR_LOCK
#    define GETNETBYADDR_LOCK    PERL_GETNETBYADDR_LOCK
#    define GETNETBYADDR_UNLOCK  PERL_GETNETBYADDR_UNLOCK
#  endif
#endif

#ifndef PERL_GETNETBYADDR_R_LOCK

   /* getnetbyaddr_r() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETNETBYADDR_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETNETBYADDR_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETNETBYNAME_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETNETBYNAME_R)
#    define PERL_GETNETBYNAME_LOCK    PERL_GETNETBYNAME_R_LOCK
#    define PERL_GETNETBYNAME_UNLOCK  PERL_GETNETBYNAME_R_UNLOCK
#  else
#    define PERL_GETNETBYNAME_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_GETNETBYNAME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef GETNETBYNAME_LOCK
#    define GETNETBYNAME_LOCK    PERL_GETNETBYNAME_LOCK
#    define GETNETBYNAME_UNLOCK  PERL_GETNETBYNAME_UNLOCK
#  endif
#endif

#ifndef PERL_GETNETBYNAME_R_LOCK

   /* getnetbyname_r() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETNETBYNAME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETNETBYNAME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETNETENT_LOCK

   /* getnetent() has potential races with other threads concurrently using
    *             any of: itself, endnetent(), endnetent_r(), setnetent(), or
    *             setnetent_r().
    * NO LOCK IS CREATED for 'getnetent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETNETENT_R_LOCK

   /* getnetent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'getnetent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETNETGRENT_LOCK

   /* getnetgrent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * getnetgrent() has potential races with other threads concurrently using
    *               any of: itself, endnetgrent(), getnetgrent_r(), innetgr(),
    *               or setnetgrent().
    * NO LOCK IS CREATED for 'getnetgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETNETGRENT_R_LOCK

   /* getnetgrent_r() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * getnetgrent_r() has potential races with other threads concurrently
    *                 using any of: itself, endnetgrent(), getnetgrent(),
    *                 innetgr(), or setnetgrent().
    * NO LOCK IS CREATED for 'getnetgrent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETOPT_LOCK

   /* getopt() has potential races with other threads concurrently using any
    *          of: itself, getopt_long(), or getopt_long_only(). */
#  define PERL_GETOPT_LOCK    PERL_ENVx_LOCK
#  define PERL_GETOPT_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_GETOPT_LONG_LOCK

   /* getopt_long() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * getopt_long() has potential races with other threads concurrently using
    *               any of: itself, getopt(), or getopt_long_only(). */
#  define PERL_GETOPT_LONG_LOCK    PERL_ENVx_LOCK
#  define PERL_GETOPT_LONG_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_GETOPT_LONG_ONLY_LOCK

   /* getopt_long_only() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001.
    * getopt_long_only() has potential races with other threads concurrently
    *                    using any of: itself, getopt(), or getopt_long(). */
#  define PERL_GETOPT_LONG_ONLY_LOCK    PERL_ENVx_LOCK
#  define PERL_GETOPT_LONG_ONLY_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_GETPASS_LOCK

   /* getpass() Obsolete; DO NOT USE; see its man page
    * getpass() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_GETPASS_LOCK    PERL_GENr_LOCK
#  define PERL_GETPASS_UNLOCK  PERL_GENr_UNLOCK
#endif

#ifndef PERL_GETPROTOBYNAME_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETPROTOBYNAME_R)
#    define PERL_GETPROTOBYNAME_LOCK    PERL_GETPROTOBYNAME_R_LOCK
#    define PERL_GETPROTOBYNAME_UNLOCK  PERL_GETPROTOBYNAME_R_UNLOCK
#  else
#    define PERL_GETPROTOBYNAME_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETPROTOBYNAME_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETPROTOBYNAME_LOCK
#    define GETPROTOBYNAME_LOCK    PERL_GETPROTOBYNAME_LOCK
#    define GETPROTOBYNAME_UNLOCK  PERL_GETPROTOBYNAME_UNLOCK
#  endif
#endif

#ifndef PERL_GETPROTOBYNAME_R_LOCK

   /* getprotobyname_r() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001. */
#  define PERL_GETPROTOBYNAME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETPROTOBYNAME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETPROTOBYNUMBER_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETPROTOBYNUMBER_R)
#    define PERL_GETPROTOBYNUMBER_LOCK    PERL_GETPROTOBYNUMBER_R_LOCK
#    define PERL_GETPROTOBYNUMBER_UNLOCK  PERL_GETPROTOBYNUMBER_R_UNLOCK
#  else
#    define PERL_GETPROTOBYNUMBER_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETPROTOBYNUMBER_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETPROTOBYNUMBER_LOCK
#    define GETPROTOBYNUMBER_LOCK    PERL_GETPROTOBYNUMBER_LOCK
#    define GETPROTOBYNUMBER_UNLOCK  PERL_GETPROTOBYNUMBER_UNLOCK
#  endif
#endif

#ifndef PERL_GETPROTOBYNUMBER_R_LOCK

   /* getprotobynumber_r() either was never in the POSIX Standard, or was
    *                      removed as of POSIX 2001. */
#  define PERL_GETPROTOBYNUMBER_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETPROTOBYNUMBER_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETPROTOENT_LOCK

   /* getprotoent() has potential races with other threads concurrently using
    *               any of: itself, endprotoent(), endprotoent_r(),
    *               setprotoent(), or setprotoent_r().
    * NO LOCK IS CREATED for 'getprotoent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETPROTOENT_R_LOCK

   /* getprotoent_r() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * NO LOCK IS CREATED for 'getprotoent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETPW_LOCK

   /* getpw() Obsolete; use getpwuid() instead
    * getpw() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_GETPW_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETPW_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETPWENT_LOCK

   /* getpwent() has potential races with other threads concurrently using any
    *            of: itself, endpwent(), endpwent_r(), getpwent_r(),
    *            setpwent(), or setpwent_r().
    * NO LOCK IS CREATED for 'getpwent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETPWENT_R_LOCK

   /* getpwent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * getpwent_r() has potential races with other threads concurrently using
    *              any of: itself, endpwent(), endpwent_r(), getpwent(),
    *              setpwent(), or setpwent_r().
    * NO LOCK IS CREATED for 'getpwent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETPWNAM_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETPWNAM_R)
#    define PERL_GETPWNAM_LOCK    PERL_GETPWNAM_R_LOCK
#    define PERL_GETPWNAM_UNLOCK  PERL_GETPWNAM_R_UNLOCK
#  else
#    define PERL_GETPWNAM_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETPWNAM_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETPWNAM_LOCK
#    define GETPWNAM_LOCK    PERL_GETPWNAM_LOCK
#    define GETPWNAM_UNLOCK  PERL_GETPWNAM_UNLOCK
#  endif
#endif

#ifndef PERL_GETPWNAM_R_LOCK
#  define PERL_GETPWNAM_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETPWNAM_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETPWUID_LOCK
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETPWUID_R)
#    define PERL_GETPWUID_LOCK    PERL_GETPWUID_R_LOCK
#    define PERL_GETPWUID_UNLOCK  PERL_GETPWUID_R_UNLOCK
#  else
#    define PERL_GETPWUID_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETPWUID_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETPWUID_LOCK
#    define GETPWUID_LOCK    PERL_GETPWUID_LOCK
#    define GETPWUID_UNLOCK  PERL_GETPWUID_UNLOCK
#  endif
#endif

#ifndef PERL_GETPWUID_R_LOCK
#  define PERL_GETPWUID_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETPWUID_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETRPCBYNAME_LOCK

   /* getrpcbyname() Use getrpcbyname_r() instead
    * getrpcbyname() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001. */
#  define PERL_GETRPCBYNAME_LOCK                              \
  error_getrpcbyname_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_GETRPCBYNAME_R_LOCK

   /* getrpcbyname_r() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETRPCBYNAME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETRPCBYNAME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETRPCBYNUMBER_LOCK

   /* getrpcbynumber() Use getrpcbynumber_r() instead
    * getrpcbynumber() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001. */
#  define PERL_GETRPCBYNUMBER_LOCK                              \
  error_getrpcbynumber_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_GETRPCBYNUMBER_R_LOCK

   /* getrpcbynumber_r() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001. */
#  define PERL_GETRPCBYNUMBER_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETRPCBYNUMBER_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETRPCENT_LOCK

   /* getrpcent() Use getrpcent_r() instead
    * getrpcent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'getrpcent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETRPCENT_R_LOCK

   /* getrpcent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'getrpcent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETRPCPORT_LOCK

   /* getrpcport() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_GETRPCPORT_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GETRPCPORT_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETSERVBYNAME_LOCK

   /* getservbyname() Obsolete; use getaddrinfo() instead */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETSERVBYNAME_R)
#    define PERL_GETSERVBYNAME_LOCK    PERL_GETSERVBYNAME_R_LOCK
#    define PERL_GETSERVBYNAME_UNLOCK  PERL_GETSERVBYNAME_R_UNLOCK
#  else
#    define PERL_GETSERVBYNAME_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETSERVBYNAME_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETSERVBYNAME_LOCK
#    define GETSERVBYNAME_LOCK    PERL_GETSERVBYNAME_LOCK
#    define GETSERVBYNAME_UNLOCK  PERL_GETSERVBYNAME_UNLOCK
#  endif
#endif

#ifndef PERL_GETSERVBYNAME_R_LOCK

   /* getservbyname_r() Obsolete; use getaddrinfo() instead
    * getservbyname_r() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001. */
#  define PERL_GETSERVBYNAME_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETSERVBYNAME_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETSERVBYPORT_LOCK

   /* getservbyport() Obsolete; use getnameinfo() instead */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETSERVBYPORT_R)
#    define PERL_GETSERVBYPORT_LOCK    PERL_GETSERVBYPORT_R_LOCK
#    define PERL_GETSERVBYPORT_UNLOCK  PERL_GETSERVBYPORT_R_UNLOCK
#  else
#    define PERL_GETSERVBYPORT_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETSERVBYPORT_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETSERVBYPORT_LOCK
#    define GETSERVBYPORT_LOCK    PERL_GETSERVBYPORT_LOCK
#    define GETSERVBYPORT_UNLOCK  PERL_GETSERVBYPORT_UNLOCK
#  endif
#endif

#ifndef PERL_GETSERVBYPORT_R_LOCK

   /* getservbyport_r() Obsolete; use getnameinfo() instead
    * getservbyport_r() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001. */
#  define PERL_GETSERVBYPORT_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETSERVBYPORT_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETSERVENT_LOCK

   /* getservent() has potential races with other threads concurrently using
    *              any of: itself, endservent(), endservent_r(), setservent(),
    *              or setservent_r().
    * NO LOCK IS CREATED for 'getservent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETSERVENT_R_LOCK

   /* getservent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * NO LOCK IS CREATED for 'getservent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETSPENT_LOCK

   /* getspent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * getspent() has potential races with other threads concurrently using any
    *            of: itself, endspent(), getspent_r(), or setspent().
    * NO LOCK IS CREATED for 'getspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETSPENT_R_LOCK

   /* getspent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * getspent_r() has potential races with other threads concurrently using
    *              any of: itself, endspent(), getspent(), or setspent().
    * NO LOCK IS CREATED for 'getspent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETSPNAM_LOCK

   /* getspnam() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GETSPNAM_R)
#    define PERL_GETSPNAM_LOCK    PERL_GETSPNAM_R_LOCK
#    define PERL_GETSPNAM_UNLOCK  PERL_GETSPNAM_R_UNLOCK
#  else
#    define PERL_GETSPNAM_LOCK    PERL_LCx_LOCK(0)
#    define PERL_GETSPNAM_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#  ifndef GETSPNAM_LOCK
#    define GETSPNAM_LOCK    PERL_GETSPNAM_LOCK
#    define GETSPNAM_UNLOCK  PERL_GETSPNAM_UNLOCK
#  endif
#endif

#ifndef PERL_GETSPNAM_R_LOCK

   /* getspnam_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_GETSPNAM_R_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GETSPNAM_R_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_GETTTYENT_LOCK

   /* getttyent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * getttyent() has potential races with other threads concurrently using
    *             any of: itself, endttyent(), getttynam(), or setttyent().
    * NO LOCK IS CREATED for 'getttyent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETTTYNAM_LOCK

   /* getttynam() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * getttynam() has potential races with other threads concurrently using
    *             any of: itself, endttyent(), getttyent(), or setttyent().
    * NO LOCK IS CREATED for 'getttynam' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUSERSHELL_LOCK

   /* getusershell() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * NO LOCK IS CREATED for 'getusershell' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTENT_LOCK

   /* getutent() Obsolete; use getutxent() instead
    * getutent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * getutent() is vulnerable to signal ALRM
    * getutent() has potential races with other threads concurrently using any
    *            of: itself, endutent(), endutxent(), getlogin(),
    *            getlogin_r(), getutid(), getutline(), getutxent(),
    *            getutxid(), getutxline(), glob(), login(), logout(),
    *            pututline(), pututxline(), setutent(), setutxent(),
    *            utmpname(), or wordexp().
    * getutent() must be called at least once in single-threaded mode to
    *            enable thread-safety in subsequent calls when in
    *            multi-threaded mode.
    * NO LOCK IS CREATED for 'getutent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTID_LOCK

   /* getutid() Obsolete; use getutxid() instead
    * getutid() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * getutid() is vulnerable to signal ALRM
    * getutid() has potential races with other threads concurrently using any
    *           of: itself, endutent(), endutxent(), getlogin(), getlogin_r(),
    *           getutent(), getutline(), getutxent(), getutxid(),
    *           getutxline(), glob(), login(), logout(), pututline(),
    *           pututxline(), setutent(), setutxent(), utmpname(), or
    *           wordexp().
    * getutid() must be called at least once in single-threaded mode to enable
    *           thread-safety in subsequent calls when in multi-threaded mode.
    * NO LOCK IS CREATED for 'getutid' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTLINE_LOCK

   /* getutline() Obsolete; use getutxline() instead
    * getutline() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * getutline() is vulnerable to signal ALRM
    * getutline() has potential races with other threads concurrently using
    *             any of: itself, endutent(), endutxent(), getlogin(),
    *             getlogin_r(), getutent(), getutid(), getutxent(),
    *             getutxid(), getutxline(), glob(), login(), logout(),
    *             pututline(), pututxline(), setutent(), setutxent(),
    *             utmpname(), or wordexp().
    * getutline() must be called at least once in single-threaded mode to
    *             enable thread-safety in subsequent calls when in
    *             multi-threaded mode.
    * NO LOCK IS CREATED for 'getutline' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTXENT_LOCK

   /* getutxent() is vulnerable to signal ALRM
    * getutxent() has potential races with other threads concurrently using
    *             any of: itself, endutent(), endutxent(), getlogin(),
    *             getlogin_r(), getutent(), getutid(), getutline(),
    *             getutxid(), getutxline(), glob(), login(), logout(),
    *             pututline(), pututxline(), setutent(), setutxent(),
    *             utmpname(), or wordexp().
    * getutxent() must be called at least once in single-threaded mode to
    *             enable thread-safety in subsequent calls when in
    *             multi-threaded mode.
    * NO LOCK IS CREATED for 'getutxent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTXID_LOCK

   /* getutxid() is vulnerable to signal ALRM
    * getutxid() has potential races with other threads concurrently using any
    *            of: itself, endutent(), endutxent(), getlogin(),
    *            getlogin_r(), getutent(), getutid(), getutline(),
    *            getutxent(), getutxline(), glob(), login(), logout(),
    *            pututline(), pututxline(), setutent(), setutxent(),
    *            utmpname(), or wordexp().
    * getutxid() must be called at least once in single-threaded mode to
    *            enable thread-safety in subsequent calls when in
    *            multi-threaded mode.
    * NO LOCK IS CREATED for 'getutxid' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETUTXLINE_LOCK

   /* getutxline() is vulnerable to signal ALRM
    * getutxline() has potential races with other threads concurrently using
    *              any of: itself, endutent(), endutxent(), getlogin(),
    *              getlogin_r(), getutent(), getutid(), getutline(),
    *              getutxent(), getutxid(), glob(), login(), logout(),
    *              pututline(), pututxline(), setutent(), setutxent(),
    *              utmpname(), or wordexp().
    * getutxline() must be called at least once in single-threaded mode to
    *              enable thread-safety in subsequent calls when in
    *              multi-threaded mode.
    * NO LOCK IS CREATED for 'getutxline' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_GETWC_LOCK
#  define PERL_GETWC_LOCK
#  define PERL_GETWC_UNLOCK
#endif

#ifndef PERL_GETWCHAR_LOCK
#  define PERL_GETWCHAR_LOCK
#  define PERL_GETWCHAR_UNLOCK
#endif

#ifndef PERL_GETWCHAR_UNLOCKED_LOCK

   /* getwchar_unlocked() either was never in the POSIX Standard, or was
    *                     removed as of POSIX 2001.
    * getwchar_unlocked() has potential races with other threads concurrently
    *                     using either itself or getchar_unlocked().
    * getwchar_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                     locked stdin, but should not be used since not
    *                     standardized and not widely implemented */
#  define PERL_GETWCHAR_UNLOCKED_LOCK    PERL_GENx_LOCK
#  define PERL_GETWCHAR_UNLOCKED_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_GETWC_UNLOCKED_LOCK

   /* getwc_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * getwc_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                  __fpending(), __fpurge(), fputc_unlocked(),
    *                  fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                  fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                  getc_unlocked(), putc_unlocked(), or putwc_unlocked().
    * getwc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_GETWC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_GETWC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_GLOB_LOCK

   /* glob() is vulnerable to signal ALRM
    * glob() has potential races with other threads concurrently using any of:
    *        itself, endutent(), endutxent(), getlogin(), getlogin_r(),
    *        getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *        getutxline(), login(), logout(), pututline(), pututxline(),
    *        setutent(), setutxent(), utmpname(), or wordexp(). */
#  define PERL_GLOB_LOCK    PERL_ENVx_LCr_LOCK(0)
#  define PERL_GLOB_UNLOCK  PERL_ENVx_LCr_UNLOCK(0)
#endif

#ifndef PERL_GMTIME_LOCK

   /* gmtime() has potential races with other threads concurrently using any
    *          of: itself, ctime(), or localtime(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_GMTIME_R)
#    define PERL_GMTIME_LOCK    PERL_GMTIME_R_LOCK
#    define PERL_GMTIME_UNLOCK  PERL_GMTIME_R_UNLOCK
#  else
#    define PERL_GMTIME_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_GMTIME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef GMTIME_LOCK
#    define GMTIME_LOCK    PERL_GMTIME_LOCK
#    define GMTIME_UNLOCK  PERL_GMTIME_UNLOCK
#  endif
#endif

#ifndef PERL_GMTIME_R_LOCK
#  define PERL_GMTIME_R_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_GMTIME_R_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_GRANTPT_LOCK
#  define PERL_GRANTPT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_GRANTPT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_HCREATE_LOCK

   /* hcreate() has potential races with other threads concurrently using any
    *           of: itself, hdestroy(), or hsearch(). */
#  define PERL_HCREATE_LOCK    PERL_GENx_LOCK
#  define PERL_HCREATE_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_HCREATE_R_LOCK

   /* hcreate_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * hcreate_r() has potential races with other threads concurrently using
    *             any of: itself, hdestroy_r(), or hsearch_r(). */
#  define PERL_HCREATE_R_LOCK    PERL_GENx_LOCK
#  define PERL_HCREATE_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_HDESTROY_LOCK

   /* hdestroy() has potential races with other threads concurrently using any
    *            of: itself, hcreate(), or hsearch(). */
#  define PERL_HDESTROY_LOCK    PERL_GENx_LOCK
#  define PERL_HDESTROY_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_HDESTROY_R_LOCK

   /* hdestroy_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * hdestroy_r() has potential races with other threads concurrently using
    *              any of: itself, hcreate_r(), or hsearch_r(). */
#  define PERL_HDESTROY_R_LOCK    PERL_GENx_LOCK
#  define PERL_HDESTROY_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_HSEARCH_LOCK

   /* hsearch() has potential races with other threads concurrently using any
    *           of: itself, hcreate(), or hdestroy(). */
#  define PERL_HSEARCH_LOCK    PERL_GENx_LOCK
#  define PERL_HSEARCH_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_HSEARCH_R_LOCK

   /* hsearch_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * hsearch_r() has potential races with other threads concurrently using
    *             any of: itself, hcreate_r(), or hdestroy_r(). */
#  define PERL_HSEARCH_R_LOCK    PERL_GENx_LOCK
#  define PERL_HSEARCH_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ICONV_LOCK
#  define PERL_ICONV_LOCK    PERL_GENx_LOCK
#  define PERL_ICONV_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_ICONV_OPEN_LOCK
#  define PERL_ICONV_OPEN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ICONV_OPEN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_ADDR_LOCK
#  define PERL_INET_ADDR_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_ADDR_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_ATON_LOCK

   /* inet_aton() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_INET_ATON_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_ATON_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_NETWORK_LOCK

   /* inet_network() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001. */
#  define PERL_INET_NETWORK_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_NETWORK_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_NTOA_LOCK
#  define PERL_INET_NTOA_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_NTOA_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_NTOP_LOCK
#  define PERL_INET_NTOP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_NTOP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INET_PTON_LOCK
#  define PERL_INET_PTON_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INET_PTON_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INITGROUPS_LOCK

   /* initgroups() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_INITGROUPS_LOCK    PERL_LCr_LOCK(0)
#  define PERL_INITGROUPS_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_INITSTATE_R_LOCK

   /* initstate_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * initstate_r() has potential races with other threads concurrently using
    *               any of: itself, random_r(), setstate_r(), or srandom_r().
    */
#  define PERL_INITSTATE_R_LOCK    PERL_GENx_LOCK
#  define PERL_INITSTATE_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_INNETGR_LOCK

   /* innetgr() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * innetgr() has potential races with other threads concurrently using any
    *           of: itself, endnetgrent(), getnetgrent(), getnetgrent_r(), or
    *           setnetgrent().
    * NO LOCK IS CREATED for 'innetgr' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_IRUSEROK_LOCK

   /* iruserok() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  define PERL_IRUSEROK_LOCK    PERL_LCr_LOCK(0)
#  define PERL_IRUSEROK_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_IRUSEROK_AF_LOCK

   /* iruserok_af() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001. */
#  define PERL_IRUSEROK_AF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_IRUSEROK_AF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISALNUM_LOCK

   /* isalnum() Use a Perl isALNUM-family macro instead */
#  define PERL_ISALNUM_LOCK
#  define PERL_ISALNUM_UNLOCK
#endif

#ifndef PERL_ISALNUM_L_LOCK
#  define PERL_ISALNUM_L_LOCK
#  define PERL_ISALNUM_L_UNLOCK
#endif

#ifndef PERL_ISALPHA_LOCK

   /* isalpha() Use a Perl isALPHA-family macro instead */
#  define PERL_ISALPHA_LOCK
#  define PERL_ISALPHA_UNLOCK
#endif

#ifndef PERL_ISALPHA_L_LOCK
#  define PERL_ISALPHA_L_LOCK
#  define PERL_ISALPHA_L_UNLOCK
#endif

#ifndef PERL_ISASCII_LOCK

   /* isascii() Use a Perl isASCII-family macro instead
    * isascii() Considered obsolete as being non-portable, but Perl makes it
    *           portable when using a macro */
#  define PERL_ISASCII_LOCK
#  define PERL_ISASCII_UNLOCK
#endif

#ifndef PERL_ISASCII_L_LOCK

   /* isascii_l() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_ISASCII_L_LOCK
#  define PERL_ISASCII_L_UNLOCK
#endif

#ifndef PERL_ISBLANK_LOCK

   /* isblank() Use a Perl isBLANK-family macro instead */
#  define PERL_ISBLANK_LOCK
#  define PERL_ISBLANK_UNLOCK
#endif

#ifndef PERL_ISBLANK_L_LOCK
#  define PERL_ISBLANK_L_LOCK
#  define PERL_ISBLANK_L_UNLOCK
#endif

#ifndef PERL_ISCNTRL_LOCK

   /* iscntrl() Use a Perl isCNTRL-family macro instead */
#  define PERL_ISCNTRL_LOCK
#  define PERL_ISCNTRL_UNLOCK
#endif

#ifndef PERL_ISCNTRL_L_LOCK
#  define PERL_ISCNTRL_L_LOCK
#  define PERL_ISCNTRL_L_UNLOCK
#endif

#ifndef PERL_ISDIGIT_LOCK

   /* isdigit() Use a Perl isDIGIT-family macro instead */
#  define PERL_ISDIGIT_LOCK
#  define PERL_ISDIGIT_UNLOCK
#endif

#ifndef PERL_ISDIGIT_L_LOCK
#  define PERL_ISDIGIT_L_LOCK
#  define PERL_ISDIGIT_L_UNLOCK
#endif

#ifndef PERL_ISGRAPH_LOCK

   /* isgraph() Use a Perl isGRAPH-family macro instead */
#  define PERL_ISGRAPH_LOCK
#  define PERL_ISGRAPH_UNLOCK
#endif

#ifndef PERL_ISGRAPH_L_LOCK
#  define PERL_ISGRAPH_L_LOCK
#  define PERL_ISGRAPH_L_UNLOCK
#endif

#ifndef PERL_ISLOWER_LOCK

   /* islower() Use a Perl isLOWER-family macro instead */
#  define PERL_ISLOWER_LOCK
#  define PERL_ISLOWER_UNLOCK
#endif

#ifndef PERL_ISLOWER_L_LOCK
#  define PERL_ISLOWER_L_LOCK
#  define PERL_ISLOWER_L_UNLOCK
#endif

#ifndef PERL_ISPRINT_LOCK

   /* isprint() Use a Perl isPRINT-family macro instead */
#  define PERL_ISPRINT_LOCK
#  define PERL_ISPRINT_UNLOCK
#endif

#ifndef PERL_ISPRINT_L_LOCK
#  define PERL_ISPRINT_L_LOCK
#  define PERL_ISPRINT_L_UNLOCK
#endif

#ifndef PERL_ISPUNCT_LOCK

   /* ispunct() Use a Perl isPUNCT-family macro instead */
#  define PERL_ISPUNCT_LOCK
#  define PERL_ISPUNCT_UNLOCK
#endif

#ifndef PERL_ISPUNCT_L_LOCK
#  define PERL_ISPUNCT_L_LOCK
#  define PERL_ISPUNCT_L_UNLOCK
#endif

#ifndef PERL_ISSPACE_LOCK

   /* isspace() Use a Perl isSPACE-family macro instead */
#  define PERL_ISSPACE_LOCK
#  define PERL_ISSPACE_UNLOCK
#endif

#ifndef PERL_ISSPACE_L_LOCK
#  define PERL_ISSPACE_L_LOCK
#  define PERL_ISSPACE_L_UNLOCK
#endif

#ifndef PERL_ISUPPER_LOCK

   /* isupper() Use a Perl isUPPER-family macro instead */
#  define PERL_ISUPPER_LOCK
#  define PERL_ISUPPER_UNLOCK
#endif

#ifndef PERL_ISUPPER_L_LOCK
#  define PERL_ISUPPER_L_LOCK
#  define PERL_ISUPPER_L_UNLOCK
#endif

#ifndef PERL_ISWALNUM_LOCK

   /* iswalnum() Use a Perl isALNUM-family macro instead */
#  define PERL_ISWALNUM_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWALNUM_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWALNUM_L_LOCK
#  define PERL_ISWALNUM_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWALNUM_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWALPHA_LOCK

   /* iswalpha() Use a Perl isALPHA-family macro instead */
#  define PERL_ISWALPHA_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWALPHA_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWALPHA_L_LOCK
#  define PERL_ISWALPHA_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWALPHA_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWBLANK_LOCK

   /* iswblank() Use a Perl isBLANK-family macro instead */
#  define PERL_ISWBLANK_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWBLANK_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWBLANK_L_LOCK
#  define PERL_ISWBLANK_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWBLANK_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWCNTRL_LOCK

   /* iswcntrl() Use a Perl isCNTRL-family macro instead */
#  define PERL_ISWCNTRL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWCNTRL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWCNTRL_L_LOCK
#  define PERL_ISWCNTRL_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWCNTRL_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWDIGIT_LOCK

   /* iswdigit() Use a Perl isDIGIT-family macro instead */
#  define PERL_ISWDIGIT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWDIGIT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWDIGIT_L_LOCK
#  define PERL_ISWDIGIT_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWDIGIT_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWGRAPH_LOCK

   /* iswgraph() Use a Perl isGRAPH-family macro instead */
#  define PERL_ISWGRAPH_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWGRAPH_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWGRAPH_L_LOCK
#  define PERL_ISWGRAPH_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWGRAPH_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWLOWER_LOCK

   /* iswlower() Use a Perl isLOWER-family macro instead */
#  define PERL_ISWLOWER_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWLOWER_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWLOWER_L_LOCK
#  define PERL_ISWLOWER_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWLOWER_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWPRINT_LOCK

   /* iswprint() Use a Perl isPRINT-family macro instead */
#  define PERL_ISWPRINT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWPRINT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWPRINT_L_LOCK
#  define PERL_ISWPRINT_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWPRINT_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWPUNCT_LOCK

   /* iswpunct() Use a Perl isPUNCT-family macro instead */
#  define PERL_ISWPUNCT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWPUNCT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWPUNCT_L_LOCK
#  define PERL_ISWPUNCT_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWPUNCT_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWSPACE_LOCK

   /* iswspace() Use a Perl isSPACE-family macro instead */
#  define PERL_ISWSPACE_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWSPACE_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWSPACE_L_LOCK
#  define PERL_ISWSPACE_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWSPACE_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWUPPER_LOCK

   /* iswupper() Use a Perl isUPPER-family macro instead */
#  define PERL_ISWUPPER_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWUPPER_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWUPPER_L_LOCK
#  define PERL_ISWUPPER_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWUPPER_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWXDIGIT_LOCK

   /* iswxdigit() Use a Perl isXDIGIT-family macro instead */
#  define PERL_ISWXDIGIT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWXDIGIT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISWXDIGIT_L_LOCK
#  define PERL_ISWXDIGIT_L_LOCK    PERL_LCr_LOCK(0)
#  define PERL_ISWXDIGIT_L_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_ISXDIGIT_LOCK

   /* isxdigit() Use a Perl isXDIGIT-family macro instead */
#  define PERL_ISXDIGIT_LOCK
#  define PERL_ISXDIGIT_UNLOCK
#endif

#ifndef PERL_ISXDIGIT_L_LOCK
#  define PERL_ISXDIGIT_L_LOCK
#  define PERL_ISXDIGIT_L_UNLOCK
#endif

#ifndef PERL_JRAND48_LOCK

   /* jrand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), lcong48(), lrand48(),
    *           mrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_JRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_JRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_JRAND48_R_LOCK

   /* jrand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * jrand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), lcong48_r(),
    *             lrand48_r(), mrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_JRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_JRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_L64A_LOCK
#  define PERL_L64A_LOCK    PERL_GENx_LOCK
#  define PERL_L64A_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LCONG48_LOCK

   /* lcong48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), jrand48(), lrand48(),
    *           mrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_LCONG48_LOCK    PERL_GENx_LOCK
#  define PERL_LCONG48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LCONG48_R_LOCK

   /* lcong48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * lcong48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *             lrand48_r(), mrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_LCONG48_R_LOCK    PERL_GENx_LOCK
#  define PERL_LCONG48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LGAMMA_LOCK

   /* lgamma() has potential races with other threads concurrently using any
    *          of: itself, gamma(), gammaf(), gammal(), lgammaf(), or
    *          lgammal(). */
#  define PERL_LGAMMA_LOCK    PERL_GENx_LOCK
#  define PERL_LGAMMA_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LGAMMAF_LOCK

   /* lgammaf() has potential races with other threads concurrently using any
    *           of: itself, gamma(), gammaf(), gammal(), lgamma(), or
    *           lgammal(). */
#  define PERL_LGAMMAF_LOCK    PERL_GENx_LOCK
#  define PERL_LGAMMAF_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LGAMMAL_LOCK

   /* lgammal() has potential races with other threads concurrently using any
    *           of: itself, gamma(), gammaf(), gammal(), lgamma(), or
    *           lgammaf(). */
#  define PERL_LGAMMAL_LOCK    PERL_GENx_LOCK
#  define PERL_LGAMMAL_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LOCALECONV_LOCK
#  if defined(WIN32) && (defined(_MSC_VER) || (defined(_UCRT)))

     /* localeconv() Use Perl_localeconv() instead
      * localeconv() localeconv() is thread safe on all Wndows versions we
      *              support, returning into a per-thread buffer. MingW when
      *              built with a modern MS C runtime (UCRT as of this
      *              writing), also is; we dont know about other MingW builds
      */
#    define PERL_LOCALECONV_LOCK
#    define PERL_LOCALECONV_UNLOCK
#  else

     /* localeconv() Use Perl_localeconv() instead
      * localeconv() FreeBSDs localeconv() when used with uselocale() is
      *              supposed to be thread-safe (as is their localeconv_l()),
      *              but we currently dont use thread-safe locales there
      *              because of bugs. There may be other thread-safe
      *              localeconv() implementations, especially on *BSD
      *              derivatives, but khw knows of none, and hasnt really
      *              investigated, in part because of the past unreliability
      *              of vendor thread-safety claims. */
#    define PERL_LOCALECONV_LOCK    PERL_LCx_LOCK(0)
#    define PERL_LOCALECONV_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#endif

#ifndef PERL_LOCALTIME_LOCK

   /* localtime() has potential races with other threads concurrently using
    *             any of: itself, ctime(), ctime_r(), daylight, gmtime(),
    *             localtime_r(), mktime(), strftime(), timezone, tzname, or
    *             tzset(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_LOCALTIME_R)
#    define PERL_LOCALTIME_LOCK    PERL_LOCALTIME_R_LOCK
#    define PERL_LOCALTIME_UNLOCK  PERL_LOCALTIME_R_UNLOCK
#  else
#    define PERL_LOCALTIME_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_LOCALTIME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#  ifndef LOCALTIME_LOCK
#    define LOCALTIME_LOCK    PERL_LOCALTIME_LOCK
#    define LOCALTIME_UNLOCK  PERL_LOCALTIME_UNLOCK
#  endif
#endif

#ifndef PERL_LOCALTIME_R_LOCK

   /* localtime_r() has potential races with other threads concurrently using
    *               any of: itself, ctime(), ctime_r(), daylight, localtime(),
    *               mktime(), strftime(), timezone, tzname, or tzset(). */
#  define PERL_LOCALTIME_R_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_LOCALTIME_R_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#endif

#ifndef PERL_LOGIN_LOCK

   /* login() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001.
    * login() is vulnerable to signal ALRM
    * login() has potential races with other threads concurrently using any
    *         of: itself, endutent(), endutxent(), getlogin(), getlogin_r(),
    *         getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *         getutxline(), glob(), logout(), pututline(), pututxline(),
    *         setutent(), setutxent(), utmpname(), or wordexp(). */
#  define PERL_LOGIN_LOCK    PERL_ENVx_LOCK
#  define PERL_LOGIN_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_LOGIN_TTY_LOCK

   /* login_tty() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * login_tty() has potential races with other threads concurrently using
    *             either itself or ttyname(). */
#  define PERL_LOGIN_TTY_LOCK    PERL_GENx_LOCK
#  define PERL_LOGIN_TTY_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LOGOUT_LOCK

   /* logout() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * logout() is vulnerable to signal ALRM
    * logout() has potential races with other threads concurrently using any
    *          of: itself, endutent(), endutxent(), getlogin(), getlogin_r(),
    *          getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *          getutxline(), glob(), login(), pututline(), pututxline(),
    *          setutent(), setutxent(), utmpname(), or wordexp(). */
#  define PERL_LOGOUT_LOCK    PERL_ENVx_LOCK
#  define PERL_LOGOUT_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_LOGWTMP_LOCK

   /* logwtmp() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * logwtmp() is vulnerable to signal ALRM */
#  define PERL_LOGWTMP_LOCK    NOOP
#  define PERL_LOGWTMP_UNLOCK  NOOP
#endif

#ifndef PERL_LRAND48_LOCK

   /* lrand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), jrand48(), lcong48(),
    *           mrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_LRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_LRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_LRAND48_R_LOCK

   /* lrand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * lrand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *             lcong48_r(), mrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_LRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_LRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MAKECONTEXT_LOCK

   /* makecontext() has potential races with other threads concurrently using
    *               any of: itself, getcontext(), setcontext(), or
    *               swapcontext(). */
#  define PERL_MAKECONTEXT_LOCK    PERL_GENx_LOCK
#  define PERL_MAKECONTEXT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MALLINFO_LOCK

   /* mallinfo() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * mallinfo() must be called at least once in single-threaded mode to
    *            enable thread-safety in subsequent calls when in
    *            multi-threaded mode. */
#  define PERL_MALLINFO_LOCK    PERL_GENx_LOCK
#  define PERL_MALLINFO_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MB_CUR_MAX_LOCK

   /* MB_CUR_MAX locking macros are only valid if its value is used read-only
    */
#  define PERL_MB_CUR_MAX_LOCK
#  define PERL_MB_CUR_MAX_UNLOCK
#endif

#ifndef PERL_MBLEN_LOCK

   /* mblen() Use mbrlen() instead */
#  define PERL_MBLEN_LOCK    PERL_LCx_LOCK(0)
#  define PERL_MBLEN_UNLOCK  PERL_LCx_UNLOCK(0)
#  ifndef MBLEN_LOCK_
#    define MBLEN_LOCK_    PERL_MBLEN_LOCK
#    define MBLEN_UNLOCK_  PERL_MBLEN_UNLOCK
#  endif
#endif

#ifndef PERL_MBRLEN_LOCK

   /* mbrlen() locking macros are only valid if '!ps' */
#  define PERL_MBRLEN_LOCK
#  define PERL_MBRLEN_UNLOCK
#  ifndef MBRLEN_LOCK_
#    define MBRLEN_LOCK_    PERL_MBRLEN_LOCK
#    define MBRLEN_UNLOCK_  PERL_MBRLEN_UNLOCK
#  endif
#endif

#ifndef PERL_MBRTOC16_LOCK

   /* mbrtoc16() locking macros are only valid if '!ps' */
#  define PERL_MBRTOC16_LOCK
#  define PERL_MBRTOC16_UNLOCK
#endif

#ifndef PERL_MBRTOC32_LOCK

   /* mbrtoc32() locking macros are only valid if '!ps' */
#  define PERL_MBRTOC32_LOCK
#  define PERL_MBRTOC32_UNLOCK
#endif

#ifndef PERL_MBRTOWC_LOCK

   /* mbrtowc() locking macros are only valid if '!ps' */
#  define PERL_MBRTOWC_LOCK
#  define PERL_MBRTOWC_UNLOCK
#  ifndef MBRTOWC_LOCK_
#    define MBRTOWC_LOCK_    PERL_MBRTOWC_LOCK
#    define MBRTOWC_UNLOCK_  PERL_MBRTOWC_UNLOCK
#  endif
#endif

#ifndef PERL_MBSINIT_LOCK
#  define PERL_MBSINIT_LOCK
#  define PERL_MBSINIT_UNLOCK
#endif

#ifndef PERL_MBSNRTOWCS_LOCK

   /* mbsnrtowcs() locking macros are only valid if '!ps' */
#  define PERL_MBSNRTOWCS_LOCK
#  define PERL_MBSNRTOWCS_UNLOCK
#endif

#ifndef PERL_MBSRTOWCS_LOCK

   /* mbsrtowcs() locking macros are only valid if '!ps' */
#  define PERL_MBSRTOWCS_LOCK
#  define PERL_MBSRTOWCS_UNLOCK
#endif

#ifndef PERL_MBSTOWCS_LOCK
#  define PERL_MBSTOWCS_LOCK
#  define PERL_MBSTOWCS_UNLOCK
#endif

#ifndef PERL_MBTOWC_LOCK

   /* mbtowc() Use mbrtowc() instead */
#  define PERL_MBTOWC_LOCK    PERL_LCx_LOCK(0)
#  define PERL_MBTOWC_UNLOCK  PERL_LCx_UNLOCK(0)
#  ifndef MBTOWC_LOCK_
#    define MBTOWC_LOCK_    PERL_MBTOWC_LOCK
#    define MBTOWC_UNLOCK_  PERL_MBTOWC_UNLOCK
#  endif
#endif

#ifndef PERL_MCHECK_LOCK

   /* mcheck() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * mcheck() has potential races with other threads concurrently using any
    *          of: itself, mcheck_check_all(), mcheck_pedantic(), or mprobe().
    */
#  define PERL_MCHECK_LOCK    PERL_GENx_LOCK
#  define PERL_MCHECK_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MCHECK_CHECK_ALL_LOCK

   /* mcheck_check_all() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001.
    * mcheck_check_all() has potential races with other threads concurrently
    *                    using any of: itself, mcheck(), mcheck_pedantic(), or
    *                    mprobe(). */
#  define PERL_MCHECK_CHECK_ALL_LOCK    PERL_GENx_LOCK
#  define PERL_MCHECK_CHECK_ALL_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MCHECK_PEDANTIC_LOCK

   /* mcheck_pedantic() either was never in the POSIX Standard, or was removed
    *                   as of POSIX 2001.
    * mcheck_pedantic() has potential races with other threads concurrently
    *                   using any of: itself, mcheck(), mcheck_check_all(), or
    *                   mprobe(). */
#  define PERL_MCHECK_PEDANTIC_LOCK    PERL_GENx_LOCK
#  define PERL_MCHECK_PEDANTIC_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MKTIME_LOCK

   /* mktime() has potential races with other threads concurrently using any
    *          of: itself, ctime(), ctime_r(), daylight, localtime(),
    *          localtime_r(), strftime(), timezone, tzname, or tzset(). */
#  define PERL_MKTIME_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_MKTIME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  ifndef MKTIME_LOCK
#    define MKTIME_LOCK    PERL_MKTIME_LOCK
#    define MKTIME_UNLOCK  PERL_MKTIME_UNLOCK
#  endif
#endif

#ifndef PERL_MPROBE_LOCK

   /* mprobe() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * mprobe() has potential races with other threads concurrently using any
    *          of: itself, mcheck(), mcheck_check_all(), or mcheck_pedantic().
    */
#  define PERL_MPROBE_LOCK    PERL_GENx_LOCK
#  define PERL_MPROBE_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MRAND48_LOCK

   /* mrand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), jrand48(), lcong48(),
    *           lrand48(), nrand48(), seed48(), or srand48(). */
#  define PERL_MRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_MRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MRAND48_R_LOCK

   /* mrand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * mrand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *             lcong48_r(), lrand48_r(), nrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_MRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_MRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_MTRACE_LOCK

   /* mtrace() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001. */
#  define PERL_MTRACE_LOCK                              \
  error_mtrace_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_MUNTRACE_LOCK

   /* muntrace() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  define PERL_MUNTRACE_LOCK                              \
  error_muntrace_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_NAN_LOCK
#  define PERL_NAN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_NAN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_NANF_LOCK
#  define PERL_NANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_NANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_NANL_LOCK
#  define PERL_NANL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_NANL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_NEWLOCALE_LOCK
#  define PERL_NEWLOCALE_LOCK    PERL_ENVr_LOCK
#  define PERL_NEWLOCALE_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_NFTW_LOCK

   /* nftw() chdir() in another thread will mess this up */
#  define PERL_NFTW_LOCK    PERL_GENr_LOCK
#  define PERL_NFTW_UNLOCK  PERL_GENr_UNLOCK
#endif

#ifndef PERL_NL_LANGINFO_LOCK
#  define PERL_NL_LANGINFO_LOCK    PERL_LCx_LOCK(0)
#  define PERL_NL_LANGINFO_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_NRAND48_LOCK

   /* nrand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), jrand48(), lcong48(),
    *           lrand48(), mrand48(), seed48(), or srand48(). */
#  define PERL_NRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_NRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_NRAND48_R_LOCK

   /* nrand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * nrand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *             lcong48_r(), lrand48_r(), mrand48_r(), seed48_r(), or
    *             srand48_r(). */
#  define PERL_NRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_NRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_OPENPTY_LOCK

   /* openpty() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_OPENPTY_LOCK    PERL_LCr_LOCK(0)
#  define PERL_OPENPTY_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_PERROR_LOCK
#  define PERL_PERROR_LOCK    PERL_GENx_LOCK
#  define PERL_PERROR_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_POSIX_FALLOCATE_LOCK

   /* posix_fallocate() The safety in glibc depends on the file system.
    *                   Generally safe */
#  define PERL_POSIX_FALLOCATE_LOCK    NOOP
#  define PERL_POSIX_FALLOCATE_UNLOCK  NOOP
#endif

#ifndef PERL_PRINTF_LOCK
#  define PERL_PRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_PRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_PROFIL_LOCK

   /* profil() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001. */
#  define PERL_PROFIL_LOCK                              \
  error_profil_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_PSIGINFO_LOCK
#  define PERL_PSIGINFO_LOCK    PERL_LCr_LOCK(0)
#  define PERL_PSIGINFO_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_PSIGNAL_LOCK
#  define PERL_PSIGNAL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_PSIGNAL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_PTSNAME_LOCK
#  define PERL_PTSNAME_LOCK    PERL_GENx_LOCK
#  define PERL_PTSNAME_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_PUTCHAR_UNLOCKED_LOCK

   /* putchar_unlocked() has potential races with other threads concurrently
    *                    using either itself or putwchar_unlocked().
    * putchar_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                    locked stdin */
#  define PERL_PUTCHAR_UNLOCKED_LOCK    PERL_GENx_LOCK
#  define PERL_PUTCHAR_UNLOCKED_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_PUTC_UNLOCKED_LOCK

   /* putc_unlocked() has potential races with other threads concurrently
    *                 using any of: itself, addmntent(), clearerr_unlocked(),
    *                 __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                 fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                 __fpending(), __fpurge(), fputc_unlocked(),
    *                 fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                 fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                 getc_unlocked(), getwc_unlocked(), or putwc_unlocked().
    * putc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                 locked the stream */
#  define PERL_PUTC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_PUTC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_PUTENV_LOCK
#  define PERL_PUTENV_LOCK    PERL_ENVx_LOCK
#  define PERL_PUTENV_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_PUTPWENT_LOCK

   /* NO LOCK IS CREATED for 'putpwent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_PUTSPENT_LOCK

   /* putspent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * NO LOCK IS CREATED for 'putspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_PUTUTLINE_LOCK

   /* pututline() Obsolete; use pututxline() instead
    * pututline() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * pututline() is vulnerable to signal ALRM
    * pututline() has potential races with other threads concurrently using
    *             any of: itself, endutent(), endutxent(), getlogin(),
    *             getlogin_r(), getutent(), getutid(), getutline(),
    *             getutxent(), getutxid(), getutxline(), glob(), login(),
    *             logout(), pututxline(), setutent(), setutxent(), utmpname(),
    *             or wordexp().
    * NO LOCK IS CREATED for 'pututline' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_PUTUTXLINE_LOCK

   /* pututxline() is vulnerable to signal ALRM
    * pututxline() has potential races with other threads concurrently using
    *              any of: itself, endutent(), endutxent(), getlogin(),
    *              getlogin_r(), getutent(), getutid(), getutline(),
    *              getutxent(), getutxid(), getutxline(), glob(), login(),
    *              logout(), pututline(), setutent(), setutxent(), utmpname(),
    *              or wordexp().
    * NO LOCK IS CREATED for 'pututxline' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_PUTWC_LOCK
#  define PERL_PUTWC_LOCK
#  define PERL_PUTWC_UNLOCK
#endif

#ifndef PERL_PUTWCHAR_LOCK
#  define PERL_PUTWCHAR_LOCK
#  define PERL_PUTWCHAR_UNLOCK
#endif

#ifndef PERL_PUTWCHAR_UNLOCKED_LOCK

   /* putwchar_unlocked() either was never in the POSIX Standard, or was
    *                     removed as of POSIX 2001.
    * putwchar_unlocked() has potential races with other threads concurrently
    *                     using either itself or putchar_unlocked().
    * putwchar_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                     locked stdout, but should not be used since not
    *                     standardized and not widely implemented */
#  define PERL_PUTWCHAR_UNLOCKED_LOCK    PERL_GENx_LOCK
#  define PERL_PUTWCHAR_UNLOCKED_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_PUTWC_UNLOCKED_LOCK

   /* putwc_unlocked() either was never in the POSIX Standard, or was removed
    *                  as of POSIX 2001.
    * putwc_unlocked() has potential races with other threads concurrently
    *                  using any of: itself, addmntent(), clearerr_unlocked(),
    *                  __fbufsize(), fflush_unlocked(), fgetc_unlocked(),
    *                  fgets_unlocked(), fgetwc_unlocked(), fgetws_unlocked(),
    *                  __fpending(), __fpurge(), fputc_unlocked(),
    *                  fputs_unlocked(), fputwc_unlocked(), fputws_unlocked(),
    *                  fread_unlocked(), __fsetlocking(), fwrite_unlocked(),
    *                  getc_unlocked(), getwc_unlocked(), or putc_unlocked().
    * putwc_unlocked() Is thread-safe if flockfile() or ftrylockfile() have
    *                  locked the stream, but should not be used since not
    *                  standardized and not widely implemented */
#  define PERL_PUTWC_UNLOCKED_LOCK    PERL_LCx_LOCK(0)
#  define PERL_PUTWC_UNLOCKED_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_PVALLOC_LOCK

   /* pvalloc() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * pvalloc() must be called at least once in single-threaded mode to enable
    *           thread-safety in subsequent calls when in multi-threaded mode.
    */
#  define PERL_PVALLOC_LOCK    NOOP
#  define PERL_PVALLOC_UNLOCK  NOOP
#endif

#ifndef PERL_QECVT_LOCK

   /* qecvt() Obsolete; use snprintf() instead
    * qecvt() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_QECVT_LOCK    PERL_GENx_LOCK
#  define PERL_QECVT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_QFCVT_LOCK

   /* qfcvt() Obsolete; use snprintf() instead
    * qfcvt() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_QFCVT_LOCK    PERL_GENx_LOCK
#  define PERL_QFCVT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_QUERYLOCALE_LOCK
#  ifdef NO_THREAD_SAFE_QUERYLOCALE

     /* querylocale() Use Perl_setlocale() instead
      * querylocale() either was never in the POSIX Standard, or was removed
      *               as of POSIX 2001.
      * querylocale() This function is non-portable, found usually only on
      *               *BSD-derived platforms, and is buggy in various ways. DO
      *               NOT USE.  POSIX 2024 adds getlocalename_l as a
      *               replacement for this, but you should be using
      *               Perl_setlocale() which copes with the deficiencies in
      *               this.  There is no standard for this function, and khw
      *               has never seen anything beyond minimal vendor
      *               documentation, lacking important details.  Experience
      *               has shown that some implementations have race
      *               conditions, and their returns may not be thread safe. It
      *               would be unreliable to test for complete thread safety
      *               in Configure.  What we do instead is to assume that it
      *               is thread-safe, unless overriden by, say, a hints file
      *               specifying -Accflags='-DNO_THREAD_SAFE_QUERYLOCALE */
#    define PERL_QUERYLOCALE_LOCK    PERL_LCx_LOCK(0)
#    define PERL_QUERYLOCALE_UNLOCK  PERL_LCx_UNLOCK(0)
#  else

     /* querylocale() Use Perl_setlocale() instead
      * querylocale() either was never in the POSIX Standard, or was removed
      *               as of POSIX 2001.
      * querylocale() This function is non-portable, found usually only on
      *               *BSD-derived platforms, and is buggy in various ways. DO
      *               NOT USE.  POSIX 2024 adds getlocalename_l as a
      *               replacement for this, but you should be using
      *               Perl_setlocale() which copes with the deficiencies in
      *               this. */
#    define PERL_QUERYLOCALE_LOCK    PERL_LCr_LOCK(0)
#    define PERL_QUERYLOCALE_UNLOCK  PERL_LCr_UNLOCK(0)
#  endif
#endif

#ifndef PERL_RAND_LOCK
#  ifndef __GLIBC__

     /* rand() Problematic and should be avoided; See POSIX Standard */
#    define PERL_RAND_LOCK    NOOP
#    define PERL_RAND_UNLOCK  NOOP
#  else
#    define PERL_RAND_LOCK    NOOP
#    define PERL_RAND_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_RANDOM_R_LOCK

   /* random_r() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * random_r() has potential races with other threads concurrently using any
    *            of: itself, initstate_r(), setstate_r(), or srandom_r(). */
#  define PERL_RANDOM_R_LOCK    PERL_GENx_LOCK
#  define PERL_RANDOM_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_RCMD_LOCK

   /* rcmd() either was never in the POSIX Standard, or was removed as of
    *        POSIX 2001. */
#  define PERL_RCMD_LOCK                              \
  error_rcmd_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_RCMD_AF_LOCK

   /* rcmd_af() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_RCMD_AF_LOCK                              \
  error_rcmd_af_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_READDIR_LOCK

   /* readdir() has potential races with other threads concurrently using
    *           either itself or readdir64().
    * readdir() POSIX 2024 requires this to be thread-safe for unique values
    *           of dirstream. */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_READDIR_R)
#    define PERL_READDIR_LOCK    PERL_READDIR_R_LOCK
#    define PERL_READDIR_UNLOCK  PERL_READDIR_R_UNLOCK
#  else
#    define PERL_READDIR_LOCK    PERL_GENx_LOCK
#    define PERL_READDIR_UNLOCK  PERL_GENx_UNLOCK
#  endif
#endif

#ifndef PERL_READDIR64_LOCK

   /* readdir64() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * readdir64() has potential races with other threads concurrently using
    *             either itself or readdir(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_READDIR64_R)
#    define PERL_READDIR64_LOCK    PERL_READDIR64_R_LOCK
#    define PERL_READDIR64_UNLOCK  PERL_READDIR64_R_UNLOCK
#  else
#    define PERL_READDIR64_LOCK    PERL_GENx_LOCK
#    define PERL_READDIR64_UNLOCK  PERL_GENx_UNLOCK
#  endif
#endif

#ifndef PERL_READDIR64_R_LOCK

   /* readdir64_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001. */
#  define PERL_READDIR64_R_LOCK    NOOP
#  define PERL_READDIR64_R_UNLOCK  NOOP
#endif

#ifndef PERL_READDIR_R_LOCK

   /* readdir_r() Obsolete; use readdir() instead
    * readdir_r() Deprecated by glibc; marked obsolete by POSIX It is
    *             recommended to use plain readdir() instead due to various
    *             limitations, and modern implementations of readdir tend to
    *             be thread-safe if concurrent calls use different directory
    *             streams.  This is required as of POSIX 2024 */
#  define PERL_READDIR_R_LOCK    NOOP
#  define PERL_READDIR_R_UNLOCK  NOOP
#endif

#ifndef PERL_RE_COMP_LOCK

   /* re_comp() Obsolete; use regcomp() instead
    * re_comp() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_RE_COMP_LOCK                              \
  error_re_comp_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_RE_EXEC_LOCK

   /* re_exec() Obsolete; use regexec() instead
    * re_exec() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_RE_EXEC_LOCK                              \
  error_re_exec_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_REGCOMP_LOCK
#  define PERL_REGCOMP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_REGCOMP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_REGERROR_LOCK
#  define PERL_REGERROR_LOCK    PERL_ENVr_LOCK
#  define PERL_REGERROR_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_REGEXEC_LOCK
#  define PERL_REGEXEC_LOCK    PERL_LCr_LOCK(0)
#  define PERL_REGEXEC_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NCLOSE_LOCK

   /* res_nclose() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_RES_NCLOSE_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NCLOSE_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NINIT_LOCK

   /* res_ninit() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_RES_NINIT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NINIT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NQUERY_LOCK

   /* res_nquery() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_RES_NQUERY_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NQUERY_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NQUERYDOMAIN_LOCK

   /* res_nquerydomain() either was never in the POSIX Standard, or was
    *                    removed as of POSIX 2001. */
#  define PERL_RES_NQUERYDOMAIN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NQUERYDOMAIN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NSEARCH_LOCK

   /* res_nsearch() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001. */
#  define PERL_RES_NSEARCH_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NSEARCH_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RES_NSEND_LOCK

   /* res_nsend() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_RES_NSEND_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RES_NSEND_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_REXEC_LOCK

   /* rexec() Obsolete; use rcmd() instead
    * rexec() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_REXEC_LOCK                              \
  error_rexec_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_REXEC_AF_LOCK

   /* rexec_af() Obsolete; use rcmd() instead
    * rexec_af() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  define PERL_REXEC_AF_LOCK                              \
  error_rexec_af_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_RPMATCH_LOCK

   /* rpmatch() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_RPMATCH_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RPMATCH_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RUSEROK_LOCK

   /* ruserok() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_RUSEROK_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RUSEROK_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_RUSEROK_AF_LOCK

   /* ruserok_af() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_RUSEROK_AF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_RUSEROK_AF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SCANDIR_LOCK
#  define PERL_SCANDIR_LOCK
#  define PERL_SCANDIR_UNLOCK
#endif

#ifndef PERL_SCANF_LOCK
#  define PERL_SCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SECURE_GETENV_LOCK
#  ifdef GETENV_PRESERVES_OTHER_THREAD

     /* secure_getenv() either was never in the POSIX Standard, or was removed
      *                 as of POSIX 2001. */
#    define PERL_SECURE_GETENV_LOCK    PERL_ENVr_LOCK
#    define PERL_SECURE_GETENV_UNLOCK  PERL_ENVr_UNLOCK
#  else

     /* secure_getenv() either was never in the POSIX Standard, or was removed
      *                 as of POSIX 2001. */
#    define PERL_SECURE_GETENV_LOCK    PERL_ENVx_LOCK
#    define PERL_SECURE_GETENV_UNLOCK  PERL_ENVx_UNLOCK
#  endif
#endif

#ifndef PERL_SEED48_LOCK

   /* seed48() has potential races with other threads concurrently using any
    *          of: itself, drand48(), erand48(), jrand48(), lcong48(),
    *          lrand48(), mrand48(), nrand48(), or srand48(). */
#  define PERL_SEED48_LOCK    PERL_GENx_LOCK
#  define PERL_SEED48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SEED48_R_LOCK

   /* seed48_r() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * seed48_r() has potential races with other threads concurrently using any
    *            of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *            lcong48_r(), lrand48_r(), mrand48_r(), nrand48_r(), or
    *            srand48_r(). */
#  define PERL_SEED48_R_LOCK    PERL_GENx_LOCK
#  define PERL_SEED48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETALIASENT_LOCK

   /* setaliasent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'setaliasent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETCONTEXT_LOCK

   /* setcontext() has potential races with other threads concurrently using
    *              any of: itself, getcontext(), makecontext(), or
    *              swapcontext(). */
#  define PERL_SETCONTEXT_LOCK    PERL_GENx_LOCK
#  define PERL_SETCONTEXT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETENV_LOCK
#  define PERL_SETENV_LOCK    PERL_ENVx_LOCK
#  define PERL_SETENV_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_SETFSENT_LOCK

   /* setfsent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * setfsent() has potential races with other threads concurrently using any
    *            of: itself, endfsent(), getfsent(), getfsfile(), or
    *            getfsspec().
    * NO LOCK IS CREATED for 'setfsent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETGRENT_LOCK

   /* setgrent() has potential races with other threads concurrently using any
    *            of: itself, endgrent(), endgrent_r(), getgrent(),
    *            getgrent_r(), or setgrent_r().
    * NO LOCK IS CREATED for 'setgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETGRENT_R_LOCK

   /* setgrent_r() Obsolete; use setgrent() instead
    * setgrent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * setgrent_r() has potential races with other threads concurrently using
    *              any of: itself, endgrent(), endgrent_r(), getgrent(),
    *              getgrent_r(), or setgrent().
    * NO LOCK IS CREATED for 'setgrent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETHOSTENT_LOCK

   /* sethostent() has potential races with other threads concurrently using
    *              any of: itself, endhostent(), endhostent_r(), gethostent(),
    *              gethostent_r(), or sethostent_r().
    * NO LOCK IS CREATED for 'sethostent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETHOSTENT_R_LOCK

   /* sethostent_r() Obsolete; use sethostent() instead
    * sethostent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * sethostent_r() has potential races with other threads concurrently using
    *                any of: itself, endhostent(), endhostent_r(),
    *                gethostent(), gethostent_r(), or sethostent().
    * NO LOCK IS CREATED for 'sethostent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETHOSTID_LOCK
#  define PERL_SETHOSTID_LOCK    PERL_GENx_LOCK
#  define PERL_SETHOSTID_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETKEY_LOCK

   /* setkey() has potential races with other threads concurrently using any
    *          of: itself, crypt(), or encrypt(). */
#  define PERL_SETKEY_LOCK    PERL_GENx_LOCK
#  define PERL_SETKEY_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETLOCALE_LOCK

   /* setlocale() Use Perl_setlocale() instead */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_SETLOCALE_R)
#    define PERL_SETLOCALE_LOCK    PERL_SETLOCALE_R_LOCK
#    define PERL_SETLOCALE_UNLOCK  PERL_SETLOCALE_R_UNLOCK
#  else
#    define PERL_SETLOCALE_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_SETLOCALE_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  endif
#endif

#ifndef PERL_SETLOCALE_R_LOCK
#  ifndef WIN32

     /* setlocale_r() Obsolete; use Perl_setlocale() instead
      * setlocale_r() Use Perl_setlocale() instead
      * setlocale_r() either was never in the POSIX Standard, or was removed
      *               as of POSIX 2001. */
#    define PERL_SETLOCALE_R_LOCK    PERL_ENVr_LCx_LOCK(0)
#    define PERL_SETLOCALE_R_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  else
#    define PERL_SETLOCALE_R_LOCK    NOOP
#    define PERL_SETLOCALE_R_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_SETLOGMASK_LOCK
#  define PERL_SETLOGMASK_LOCK    PERL_GENx_LOCK
#  define PERL_SETLOGMASK_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETNETENT_LOCK

   /* setnetent() has potential races with other threads concurrently using
    *             any of: itself, endnetent(), endnetent_r(), getnetent(), or
    *             setnetent_r().
    * NO LOCK IS CREATED for 'setnetent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETNETENT_R_LOCK

   /* setnetent_r() Obsolete; use setnetent() instead
    * setnetent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * setnetent_r() has potential races with other threads concurrently using
    *               any of: itself, endnetent(), endnetent_r(), getnetent(),
    *               or setnetent().
    * NO LOCK IS CREATED for 'setnetent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETNETGRENT_LOCK

   /* setnetgrent() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * setnetgrent() has potential races with other threads concurrently using
    *               any of: itself, endnetgrent(), getnetgrent(),
    *               getnetgrent_r(), or innetgr().
    * NO LOCK IS CREATED for 'setnetgrent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETPROTOENT_LOCK

   /* setprotoent() has potential races with other threads concurrently using
    *               any of: itself, endprotoent(), endprotoent_r(),
    *               getprotoent(), or setprotoent_r().
    * NO LOCK IS CREATED for 'setprotoent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETPROTOENT_R_LOCK

   /* setprotoent_r() Obsolete; use setprotoent() instead
    * setprotoent_r() either was never in the POSIX Standard, or was removed
    *                 as of POSIX 2001.
    * setprotoent_r() has potential races with other threads concurrently
    *                 using any of: itself, endprotoent(), endprotoent_r(),
    *                 getprotoent(), or setprotoent().
    * NO LOCK IS CREATED for 'setprotoent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETPWENT_LOCK

   /* setpwent() has potential races with other threads concurrently using any
    *            of: itself, endpwent(), endpwent_r(), getpwent(),
    *            getpwent_r(), or setpwent_r().
    * NO LOCK IS CREATED for 'setpwent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETPWENT_R_LOCK

   /* setpwent_r() Obsolete; use setpwent() instead
    * setpwent_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * setpwent_r() has potential races with other threads concurrently using
    *              any of: itself, endpwent(), endpwent_r(), getpwent(),
    *              getpwent_r(), or setpwent().
    * NO LOCK IS CREATED for 'setpwent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETRPCENT_LOCK

   /* setrpcent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_SETRPCENT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SETRPCENT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SETSERVENT_LOCK

   /* setservent() has potential races with other threads concurrently using
    *              any of: itself, endservent(), endservent_r(), getservent(),
    *              or setservent_r().
    * NO LOCK IS CREATED for 'setservent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETSERVENT_R_LOCK

   /* setservent_r() Obsolete; use setservent() instead
    * setservent_r() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * setservent_r() has potential races with other threads concurrently using
    *                any of: itself, endservent(), endservent_r(),
    *                getservent(), or setservent().
    * NO LOCK IS CREATED for 'setservent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETSPENT_LOCK

   /* setspent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * setspent() has potential races with other threads concurrently using any
    *            of: itself, endspent(), getspent(), or getspent_r().
    * NO LOCK IS CREATED for 'setspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETSTATE_R_LOCK

   /* setstate_r() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001.
    * setstate_r() has potential races with other threads concurrently using
    *              any of: itself, initstate_r(), random_r(), or srandom_r().
    */
#  define PERL_SETSTATE_R_LOCK    PERL_GENx_LOCK
#  define PERL_SETSTATE_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SETTTYENT_LOCK

   /* setttyent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * setttyent() has potential races with other threads concurrently using
    *             any of: itself, endttyent(), getttyent(), or getttynam().
    * NO LOCK IS CREATED for 'setttyent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETUSERSHELL_LOCK

   /* setusershell() either was never in the POSIX Standard, or was removed as
    *                of POSIX 2001.
    * NO LOCK IS CREATED for 'setusershell' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETUTENT_LOCK

   /* setutent() Obsolete; use setutxent() instead
    * setutent() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * setutent() has potential races with other threads concurrently using any
    *            of: itself, endutent(), endutxent(), getlogin(),
    *            getlogin_r(), getutent(), getutid(), getutline(),
    *            getutxent(), getutxid(), getutxline(), glob(), login(),
    *            logout(), pututline(), pututxline(), setutxent(), utmpname(),
    *            or wordexp().
    * NO LOCK IS CREATED for 'setutent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SETUTXENT_LOCK

   /* setutxent() has potential races with other threads concurrently using
    *             any of: itself, endutent(), endutxent(), getlogin(),
    *             getlogin_r(), getutent(), getutid(), getutline(),
    *             getutxent(), getutxid(), getutxline(), glob(), login(),
    *             logout(), pututline(), pututxline(), setutent(), utmpname(),
    *             or wordexp().
    * NO LOCK IS CREATED for 'setutxent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SGETSPENT_LOCK

   /* sgetspent() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * NO LOCK IS CREATED for 'sgetspent' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SGETSPENT_R_LOCK

   /* sgetspent_r() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001.
    * NO LOCK IS CREATED for 'sgetspent_r' because it is used in
    * conjunction with other functions that all need to be executed
    * atomically as a unit.  So an individual lock doesn't make
    * sense, and a group lock could result in unacceptable
    * performance or deadlock.  The circumstances might require a
    * whole new mutex, or it could be that only one thread at a time
    * will be running that uses the shared resources, so no mutex at
    * all is needed. */
#endif

#ifndef PERL_SHM_OPEN_LOCK
#  define PERL_SHM_OPEN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SHM_OPEN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SHM_UNLINK_LOCK
#  define PERL_SHM_UNLINK_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SHM_UNLINK_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SIGINTERRUPT_LOCK

   /* siginterrupt() Obsolete; Use sigaction(2) with the SA_RESTART flag
    *                instead */
#  define PERL_SIGINTERRUPT_LOCK    PERL_GENx_LOCK
#  define PERL_SIGINTERRUPT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SLEEP_LOCK

   /* sleep() is vulnerable to signal SIGCHLD/linux */
#  define PERL_SLEEP_LOCK    NOOP
#  define PERL_SLEEP_UNLOCK  NOOP
#endif

#ifndef PERL_SNPRINTF_LOCK
#  define PERL_SNPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SNPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SPRINTF_LOCK
#  define PERL_SPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SRAND48_LOCK

   /* srand48() has potential races with other threads concurrently using any
    *           of: itself, drand48(), erand48(), jrand48(), lcong48(),
    *           lrand48(), mrand48(), nrand48(), or seed48(). */
#  define PERL_SRAND48_LOCK    PERL_GENx_LOCK
#  define PERL_SRAND48_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SRAND48_R_LOCK

   /* srand48_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * srand48_r() has potential races with other threads concurrently using
    *             any of: itself, drand48_r(), erand48_r(), jrand48_r(),
    *             lcong48_r(), lrand48_r(), mrand48_r(), nrand48_r(), or
    *             seed48_r(). */
#  define PERL_SRAND48_R_LOCK    PERL_GENx_LOCK
#  define PERL_SRAND48_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SRANDOM_R_LOCK

   /* srandom_r() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001.
    * srandom_r() has potential races with other threads concurrently using
    *             any of: itself, initstate_r(), random_r(), or setstate_r().
    */
#  define PERL_SRANDOM_R_LOCK    PERL_GENx_LOCK
#  define PERL_SRANDOM_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SSCANF_LOCK
#  define PERL_SSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SSIGNAL_LOCK

   /* ssignal() Obsolete
    * ssignal() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_SSIGNAL_LOCK    PERL_GENr_LOCK
#  define PERL_SSIGNAL_UNLOCK  PERL_GENr_UNLOCK
#endif

#ifndef PERL_STRCASECMP_LOCK

   /* strcasecmp() The POSIX Standard says results are undefined unless
    *              LC_CTYPE is the POSIX locale */
#  define PERL_STRCASECMP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRCASECMP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRCASESTR_LOCK

   /* strcasestr() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_STRCASESTR_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRCASESTR_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRCOLL_LOCK
#  define PERL_STRCOLL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRCOLL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRERROR_LOCK

   /* strerror() Is thread-safe in gnulibc since 2.32, so could #ifdef and
    *            maybe make Strerror handle savepv */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_STRERROR_R)
#    define PERL_STRERROR_LOCK    PERL_STRERROR_R_LOCK
#    define PERL_STRERROR_UNLOCK  PERL_STRERROR_R_UNLOCK
#  else
#    define PERL_STRERROR_LOCK    PERL_LCx_LOCK(0)
#    define PERL_STRERROR_UNLOCK  PERL_LCx_UNLOCK(0)
#  endif
#endif

#ifndef PERL_STRERROR_L_LOCK
#  define PERL_STRERROR_L_LOCK
#  define PERL_STRERROR_L_UNLOCK
#endif

#ifndef PERL_STRERROR_R_LOCK
#  define PERL_STRERROR_R_LOCK
#  define PERL_STRERROR_R_UNLOCK
#endif

#ifndef PERL_STRFMON_LOCK
#  define PERL_STRFMON_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRFMON_UNLOCK  PERL_LCr_UNLOCK(0)
#  ifndef STRFMON_LOCK
#    define STRFMON_LOCK    PERL_STRFMON_LOCK
#    define STRFMON_UNLOCK  PERL_STRFMON_UNLOCK
#  endif
#endif

#ifndef PERL_STRFMON_L_LOCK
#  define PERL_STRFMON_L_LOCK
#  define PERL_STRFMON_L_UNLOCK
#endif

#ifndef PERL_STRFROMD_LOCK

   /* strfromd() Asynchronous unsafe */
#  define PERL_STRFROMD_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRFROMD_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRFROMF_LOCK

   /* strfromf() Asynchronous unsafe */
#  define PERL_STRFROMF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRFROMF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRFROML_LOCK

   /* strfroml() Asynchronous unsafe */
#  define PERL_STRFROML_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRFROML_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRFTIME_LOCK

   /* strftime() Use Perl_sv_strftime_tm() or Perl_sv_strftime_ints() instead
    * strftime() has potential races with other threads concurrently using any
    *            of: itself, ctime(), ctime_r(), daylight, localtime(),
    *            localtime_r(), mktime(), timezone, tzname, or tzset(). */
#  define PERL_STRFTIME_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_STRFTIME_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  ifndef STRFTIME_LOCK
#    define STRFTIME_LOCK    PERL_STRFTIME_LOCK
#    define STRFTIME_UNLOCK  PERL_STRFTIME_UNLOCK
#  endif
#endif

#ifndef PERL_STRFTIME_L_LOCK
#  define PERL_STRFTIME_L_LOCK
#  define PERL_STRFTIME_L_UNLOCK
#endif

#ifndef PERL_STRNCASECMP_LOCK

   /* strncasecmp() The POSIX Standard says results are undefined unless
    *               LC_CTYPE is the POSIX locale */
#  define PERL_STRNCASECMP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRNCASECMP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRPTIME_LOCK
#  define PERL_STRPTIME_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_STRPTIME_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRSIGNAL_LOCK
#  define PERL_STRSIGNAL_LOCK    PERL_LCx_LOCK(0)
#  define PERL_STRSIGNAL_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_STRTOD_LOCK
#  define PERL_STRTOD_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOD_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOF_LOCK
#  define PERL_STRTOF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOIMAX_LOCK
#  define PERL_STRTOIMAX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOIMAX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOK_LOCK

   /* strtok() Use strtok_r() instead */
#  define PERL_STRTOK_LOCK    PERL_GENx_LOCK
#  define PERL_STRTOK_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_STRTOL_LOCK
#  define PERL_STRTOL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOLD_LOCK
#  define PERL_STRTOLD_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOLD_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOLL_LOCK
#  define PERL_STRTOLL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOLL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOQ_LOCK

   /* strtoq() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001. */
#  define PERL_STRTOQ_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOQ_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOUL_LOCK
#  define PERL_STRTOUL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOUL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOULL_LOCK
#  define PERL_STRTOULL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOULL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOUMAX_LOCK
#  define PERL_STRTOUMAX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOUMAX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRTOUQ_LOCK

   /* strtouq() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_STRTOUQ_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRTOUQ_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_STRVERSCMP_LOCK

   /* strverscmp() either was never in the POSIX Standard, or was removed as
    *              of POSIX 2001. */
#  define PERL_STRVERSCMP_LOCK
#  define PERL_STRVERSCMP_UNLOCK
#endif

#ifndef PERL_STRXFRM_LOCK
#  define PERL_STRXFRM_LOCK    PERL_LCr_LOCK(0)
#  define PERL_STRXFRM_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SWAPCONTEXT_LOCK

   /* swapcontext() has potential races with other threads concurrently using
    *               any of: itself, getcontext(), makecontext(), or
    *               setcontext(). */
#  define PERL_SWAPCONTEXT_LOCK    PERL_GENx_LOCK
#  define PERL_SWAPCONTEXT_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_SWPRINTF_LOCK
#  define PERL_SWPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SWPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SWSCANF_LOCK
#  define PERL_SWSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_SWSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_SYSCONF_LOCK
#  define PERL_SYSCONF_LOCK    PERL_ENVr_LOCK
#  define PERL_SYSCONF_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_SYSLOG_LOCK
#  define PERL_SYSLOG_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_SYSLOG_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_SYSTEM_LOCK
#  ifndef __GLIBC__

     /* system() Some implementations are not-thread safe; See POSIX Standard
      */
#    define PERL_SYSTEM_LOCK    NOOP
#    define PERL_SYSTEM_UNLOCK  NOOP
#  else
#    define PERL_SYSTEM_LOCK    NOOP
#    define PERL_SYSTEM_UNLOCK  NOOP
#  endif
#endif

#ifndef PERL_TDELETE_LOCK

   /* tdelete() has potential races with other threads concurrently using any
    *           of: itself, tfind(), or tsearch(). */
#  define PERL_TDELETE_LOCK    PERL_GENx_LOCK
#  define PERL_TDELETE_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_TEMPNAM_LOCK

   /* tempnam() Obsolete; use mkstemp() or tmpfile() instead */
#  define PERL_TEMPNAM_LOCK    PERL_ENVr_LOCK
#  define PERL_TEMPNAM_UNLOCK  PERL_ENVr_UNLOCK
#endif

#ifndef PERL_TFIND_LOCK

   /* tfind() has potential races with other threads concurrently using any
    *         of: itself, tdelete(), or tsearch(). */
#  define PERL_TFIND_LOCK    PERL_GENx_LOCK
#  define PERL_TFIND_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_TIMEGM_LOCK

   /* timegm() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001. */
#  define PERL_TIMEGM_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_TIMEGM_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_TIMELOCAL_LOCK

   /* timelocal() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_TIMELOCAL_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_TIMELOCAL_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_TIMEZONE_LOCK

   /* timezone has potential races with other threads concurrently using any
    *          of: itself, ctime(), ctime_r(), daylight, localtime(),
    *          localtime_r(), mktime(), strftime(), tzname, or tzset().
    * timezone locking macros are only valid if its value is used read-only */
#  define PERL_TIMEZONE_LOCK    PERL_LCx_LOCK(0)
#  define PERL_TIMEZONE_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_TMPNAM_LOCK

   /* tmpnam() Obsolete; use mkstemp() or tmpfile() instead
    * tmpnam() locking macros are only valid if '!s' */
#  define PERL_TMPNAM_LOCK    NOOP
#  define PERL_TMPNAM_UNLOCK  NOOP
#endif

#ifndef PERL_TMPNAM_R_LOCK

   /* tmpnam_r() Use mkstemp() or tmpfile() instead
    * tmpnam_r() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001. */
#  define PERL_TMPNAM_R_LOCK    NOOP
#  define PERL_TMPNAM_R_UNLOCK  NOOP
#endif

#ifndef PERL_TOLOWER_LOCK

   /* tolower() Use a Perl toLOWER-family macro instead */
#  define PERL_TOLOWER_LOCK
#  define PERL_TOLOWER_UNLOCK
#endif

#ifndef PERL_TOLOWER_L_LOCK

   /* tolower_l() Use a Perl toLOWER-family macro instead */
#  define PERL_TOLOWER_L_LOCK
#  define PERL_TOLOWER_L_UNLOCK
#endif

#ifndef PERL_TOUPPER_LOCK

   /* toupper() Use a Perl toUPPER-family macro instead */
#  define PERL_TOUPPER_LOCK
#  define PERL_TOUPPER_UNLOCK
#endif

#ifndef PERL_TOUPPER_L_LOCK

   /* toupper_l() Use a Perl toUPPER-family macro instead */
#  define PERL_TOUPPER_L_LOCK
#  define PERL_TOUPPER_L_UNLOCK
#endif

#ifndef PERL_TOWCTRANS_LOCK
#  define PERL_TOWCTRANS_LOCK
#  define PERL_TOWCTRANS_UNLOCK
#endif

#ifndef PERL_TOWLOWER_LOCK

   /* towlower() Use a Perl toLOWER-family macro instead */
#  define PERL_TOWLOWER_LOCK
#  define PERL_TOWLOWER_UNLOCK
#endif

#ifndef PERL_TOWLOWER_L_LOCK

   /* towlower_l() Use a Perl toLOWER-family macro instead */
#  define PERL_TOWLOWER_L_LOCK
#  define PERL_TOWLOWER_L_UNLOCK
#endif

#ifndef PERL_TOWUPPER_LOCK

   /* towupper() Use a Perl toUPPER-family macro instead */
#  define PERL_TOWUPPER_LOCK
#  define PERL_TOWUPPER_UNLOCK
#endif

#ifndef PERL_TOWUPPER_L_LOCK

   /* towupper_l() Use a Perl toUPPER-family macro instead */
#  define PERL_TOWUPPER_L_LOCK
#  define PERL_TOWUPPER_L_UNLOCK
#endif

#ifndef PERL_TSEARCH_LOCK

   /* tsearch() has potential races with other threads concurrently using any
    *           of: itself, tdelete(), or tfind(). */
#  define PERL_TSEARCH_LOCK    PERL_GENx_LOCK
#  define PERL_TSEARCH_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_TTYNAME_LOCK

   /* ttyname() Use ttyname_r() instead
    * ttyname() has potential races with other threads concurrently using
    *           either itself or login_tty(). */
#  if PERL_REENTR_API && defined(PERL_REENTR_USING_TTYNAME_R)
#    define PERL_TTYNAME_LOCK    PERL_TTYNAME_R_LOCK
#    define PERL_TTYNAME_UNLOCK  PERL_TTYNAME_R_UNLOCK
#  else
#    define PERL_TTYNAME_LOCK    PERL_GENx_LOCK
#    define PERL_TTYNAME_UNLOCK  PERL_GENx_UNLOCK
#  endif
#endif

#ifndef PERL_TTYNAME_R_LOCK
#  define PERL_TTYNAME_R_LOCK    NOOP
#  define PERL_TTYNAME_R_UNLOCK  NOOP
#endif

#ifndef PERL_TTYSLOT_LOCK

   /* ttyslot() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_TTYSLOT_LOCK                              \
  error_ttyslot_not_suitable_for_multi-threaded_operation
#endif

#ifndef PERL_TWALK_LOCK

   /* twalk() has potential races with other threads concurrently using either
    *         itself or twalk_r(). */
#  define PERL_TWALK_LOCK    PERL_GENx_LOCK
#  define PERL_TWALK_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_TWALK_R_LOCK

   /* twalk_r() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * twalk_r() has potential races with other threads concurrently using
    *           either itself or twalk(). */
#  define PERL_TWALK_R_LOCK    PERL_GENx_LOCK
#  define PERL_TWALK_R_UNLOCK  PERL_GENx_UNLOCK
#endif

#ifndef PERL_TZNAME_LOCK

   /* tzname has potential races with other threads concurrently using any of:
    *        itself, ctime(), ctime_r(), daylight, localtime(), localtime_r(),
    *        mktime(), strftime(), timezone, or tzset().
    * tzname locking macros are only valid if its value is used read-only */
#  define PERL_TZNAME_LOCK    PERL_LCx_LOCK(0)
#  define PERL_TZNAME_UNLOCK  PERL_LCx_UNLOCK(0)
#endif

#ifndef PERL_TZSET_LOCK

   /* tzset() has potential races with other threads concurrently using any
    *         of: itself, ctime(), ctime_r(), daylight, localtime(),
    *         localtime_r(), mktime(), strftime(), timezone, or tzname. */
#  define PERL_TZSET_LOCK    PERL_ENVr_LCx_LOCK(0)
#  define PERL_TZSET_UNLOCK  PERL_ENVr_LCx_UNLOCK(0)
#  ifndef TZSET_LOCK
#    define TZSET_LOCK    PERL_TZSET_LOCK
#    define TZSET_UNLOCK  PERL_TZSET_UNLOCK
#  endif
#endif

#ifndef PERL_UNGETWC_LOCK
#  define PERL_UNGETWC_LOCK
#  define PERL_UNGETWC_UNLOCK
#endif

#ifndef PERL_UNSETENV_LOCK
#  define PERL_UNSETENV_LOCK    PERL_ENVx_LOCK
#  define PERL_UNSETENV_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_UPDWTMP_LOCK

   /* updwtmp() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001.
    * updwtmp() is vulnerable to signal ALRM */
#  define PERL_UPDWTMP_LOCK    NOOP
#  define PERL_UPDWTMP_UNLOCK  NOOP
#endif

#ifndef PERL_UTMPNAME_LOCK

   /* utmpname() either was never in the POSIX Standard, or was removed as of
    *            POSIX 2001.
    * utmpname() has potential races with other threads concurrently using any
    *            of: itself, endutent(), endutxent(), getlogin(),
    *            getlogin_r(), getutent(), getutid(), getutline(),
    *            getutxent(), getutxid(), getutxline(), glob(), login(),
    *            logout(), pututline(), pututxline(), setutent(), setutxent(),
    *            or wordexp(). */
#  define PERL_UTMPNAME_LOCK    PERL_ENVx_LOCK
#  define PERL_UTMPNAME_UNLOCK  PERL_ENVx_UNLOCK
#endif

#ifndef PERL_VA_ARG_LOCK

   /* va_arg() locking macros are only valid if 'arg-ap-is-local-to-its-thread'
    */
#  define PERL_VA_ARG_LOCK    NOOP
#  define PERL_VA_ARG_UNLOCK  NOOP
#endif

#ifndef PERL_VALLOC_LOCK

   /* valloc() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001.
    * valloc() must be called at least once in single-threaded mode to enable
    *          thread-safety in subsequent calls when in multi-threaded mode.
    */
#  define PERL_VALLOC_LOCK    NOOP
#  define PERL_VALLOC_UNLOCK  NOOP
#endif

#ifndef PERL_VASPRINTF_LOCK

   /* vasprintf() either was never in the POSIX Standard, or was removed as of
    *             POSIX 2001. */
#  define PERL_VASPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VASPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VDPRINTF_LOCK
#  define PERL_VDPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VDPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VERR_LOCK

   /* verr() either was never in the POSIX Standard, or was removed as of
    *        POSIX 2001. */
#  define PERL_VERR_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VERR_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VERRX_LOCK

   /* verrx() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_VERRX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VERRX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VERSIONSORT_LOCK

   /* versionsort() either was never in the POSIX Standard, or was removed as
    *               of POSIX 2001. */
#  define PERL_VERSIONSORT_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VERSIONSORT_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VFPRINTF_LOCK
#  define PERL_VFPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VFPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VFSCANF_LOCK
#  define PERL_VFSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VFSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VFWPRINTF_LOCK
#  define PERL_VFWPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VFWPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VPRINTF_LOCK
#  define PERL_VPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSCANF_LOCK
#  define PERL_VSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSNPRINTF_LOCK
#  define PERL_VSNPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VSNPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSPRINTF_LOCK
#  define PERL_VSPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VSPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSSCANF_LOCK
#  define PERL_VSSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VSSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSWPRINTF_LOCK
#  define PERL_VSWPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VSWPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VSYSLOG_LOCK

   /* vsyslog() either was never in the POSIX Standard, or was removed as of
    *           POSIX 2001. */
#  define PERL_VSYSLOG_LOCK    PERL_ENVr_LCr_LOCK(0)
#  define PERL_VSYSLOG_UNLOCK  PERL_ENVr_LCr_UNLOCK(0)
#endif

#ifndef PERL_VWARN_LOCK

   /* vwarn() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_VWARN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VWARN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VWARNX_LOCK

   /* vwarnx() either was never in the POSIX Standard, or was removed as of
    *          POSIX 2001. */
#  define PERL_VWARNX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VWARNX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_VWPRINTF_LOCK
#  define PERL_VWPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_VWPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WARN_LOCK

   /* warn() either was never in the POSIX Standard, or was removed as of
    *        POSIX 2001. */
#  define PERL_WARN_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WARN_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WARNX_LOCK

   /* warnx() either was never in the POSIX Standard, or was removed as of
    *         POSIX 2001. */
#  define PERL_WARNX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WARNX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCRTOMB_LOCK

   /* wcrtomb() locking macros are only valid if '!ps' */
#  define PERL_WCRTOMB_LOCK
#  define PERL_WCRTOMB_UNLOCK
#  ifndef WCRTOMB_LOCK_
#    define WCRTOMB_LOCK_    PERL_WCRTOMB_LOCK
#    define WCRTOMB_UNLOCK_  PERL_WCRTOMB_UNLOCK
#  endif
#endif

#ifndef PERL_WCSCASECMP_LOCK
#  define PERL_WCSCASECMP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSCASECMP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSCHR_LOCK
#  define PERL_WCSCHR_LOCK
#  define PERL_WCSCHR_UNLOCK
#endif

#ifndef PERL_WCSCOLL_LOCK
#  define PERL_WCSCOLL_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSCOLL_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSFTIME_LOCK
#  define PERL_WCSFTIME_LOCK
#  define PERL_WCSFTIME_UNLOCK
#endif

#ifndef PERL_WCSNCASECMP_LOCK
#  define PERL_WCSNCASECMP_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSNCASECMP_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSNRTOMBS_LOCK

   /* wcsnrtombs() locking macros are only valid if '!ps' */
#  define PERL_WCSNRTOMBS_LOCK
#  define PERL_WCSNRTOMBS_UNLOCK
#endif

#ifndef PERL_WCSRCHR_LOCK
#  define PERL_WCSRCHR_LOCK
#  define PERL_WCSRCHR_UNLOCK
#endif

#ifndef PERL_WCSRTOMBS_LOCK

   /* wcsrtombs() locking macros are only valid if '!ps' */
#  define PERL_WCSRTOMBS_LOCK
#  define PERL_WCSRTOMBS_UNLOCK
#endif

#ifndef PERL_WCSTOD_LOCK
#  define PERL_WCSTOD_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSTOD_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSTOF_LOCK
#  define PERL_WCSTOF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSTOF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSTOIMAX_LOCK
#  define PERL_WCSTOIMAX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSTOIMAX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSTOLD_LOCK
#  define PERL_WCSTOLD_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSTOLD_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSTOMBS_LOCK
#  define PERL_WCSTOMBS_LOCK
#  define PERL_WCSTOMBS_UNLOCK
#endif

#ifndef PERL_WCSTOUMAX_LOCK
#  define PERL_WCSTOUMAX_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSTOUMAX_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSWIDTH_LOCK
#  define PERL_WCSWIDTH_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSWIDTH_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCSXFRM_LOCK
#  define PERL_WCSXFRM_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCSXFRM_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCTOB_LOCK

   /* wctob() Use wctomb() or wcrtomb() instead */
#  define PERL_WCTOB_LOCK
#  define PERL_WCTOB_UNLOCK
#endif

#ifndef PERL_WCTOMB_LOCK

   /* wctomb() Use wcrtomb() instead */
#  define PERL_WCTOMB_LOCK    PERL_LCx_LOCK(0)
#  define PERL_WCTOMB_UNLOCK  PERL_LCx_UNLOCK(0)
#  ifndef WCTOMB_LOCK_
#    define WCTOMB_LOCK_    PERL_WCTOMB_LOCK
#    define WCTOMB_UNLOCK_  PERL_WCTOMB_UNLOCK
#  endif
#endif

#ifndef PERL_WCTRANS_LOCK
#  define PERL_WCTRANS_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCTRANS_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCTYPE_LOCK
#  define PERL_WCTYPE_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCTYPE_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WCWIDTH_LOCK
#  define PERL_WCWIDTH_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WCWIDTH_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WORDEXP_LOCK

   /* wordexp() is vulnerable to signal ALRM
    * wordexp() has potential races with other threads concurrently using any
    *           of: itself, endutent(), endutxent(), getlogin(), getlogin_r(),
    *           getutent(), getutid(), getutline(), getutxent(), getutxid(),
    *           getutxline(), glob(), login(), logout(), pututline(),
    *           pututxline(), setutent(), setutxent(), or utmpname(). */
#  define PERL_WORDEXP_LOCK    PERL_ENVx_LCr_LOCK(0)
#  define PERL_WORDEXP_UNLOCK  PERL_ENVx_LCr_UNLOCK(0)
#endif

#ifndef PERL_WPRINTF_LOCK
#  define PERL_WPRINTF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WPRINTF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WSCANF_LOCK
#  define PERL_WSCANF_LOCK    PERL_LCr_LOCK(0)
#  define PERL_WSCANF_UNLOCK  PERL_LCr_UNLOCK(0)
#endif

#ifndef PERL_WSETLOCALE_LOCK

   /* wsetlocale() Use Perl_setlocale() instead
    * wsetlocale() Actually "_wsetlocale()", and its macro name would be
    *              _WSETLOCALE_LOCK().  But any name beginning  with an
    *              underscore is technically reserved for the libc
    *              implementation itself; hence is illegal for perl to use. 
    *              The real definition of WSETLOCALE_LOCK() is in perl.h, as
    *              is too complicated to define here.  But you should be using
    *              Perl_setlocale() anyway. */
#endif

/* ex: set ro ft=c: */
