Changeset 41651


Ignore:
Timestamp:
Nov 8, 2008, 9:33:01 AM (12 years ago)
Author:
afb@…
Message:

use clearenv(3) where available

Location:
trunk/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/configure

    r41389 r41651  
    88318831
    88328832
    8833 for ac_func in bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile
     8833
     8834for ac_func in bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile clearenv
    88348835do
    88358836as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
  • trunk/base/configure.ac

    r41015 r41651  
    169169AC_FUNC_FORK
    170170AC_FUNC_STRERROR_R
    171 AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile])
     171AC_CHECK_FUNCS([bzero memset dup2 regcomp strdup strerror strtol fgetln lockf flock setmode strcasecmp strncasecmp strlcpy copyfile clearenv])
    172172MP_CHECK_READLINK_IS_P1003_1A
    173173
  • trunk/base/src/config.h.in

    r28743 r41651  
    1818/* Define to 1 if you have the `bzero' function. */
    1919#undef HAVE_BZERO
     20
     21/* Define to 1 if you have the `clearenv' function. */
     22#undef HAVE_CLEARENV
    2023
    2124/* Define to 1 if you have the `copyfile' function. */
  • trunk/base/src/pextlib1.0/Pextlib.c

    r41650 r41651  
    11501150
    11511151    if (strcmp(name, "*") == 0) {
     1152#ifndef HAVE_CLEARENV
    11521153        /* unset all current environment variables; it'd be best to use
    11531154           clearenv() but that is not yet standardized, instead use Tcl's
     
    11691170        }
    11701171        Tcl_DecrRefCount( tclList );
     1172#else
     1173        clearenv();
     1174#endif
    11711175    } else {
    11721176        (void) unsetenv(name);
Note: See TracChangeset for help on using the changeset viewer.