diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:53:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-05-22 20:53:24 (GMT) |
commit | ce025f259b91e61857e70c6690d5db631b5dc747 (patch) | |
tree | f175e43fb180d0b756186a839cbeee766ec8e27c /unix/tclUnixCompat.c | |
parent | f6af18a9476f566a34901b828e33f7141266174c (diff) | |
download | tcl-ce025f259b91e61857e70c6690d5db631b5dc747.zip tcl-ce025f259b91e61857e70c6690d5db631b5dc747.tar.gz tcl-ce025f259b91e61857e70c6690d5db631b5dc747.tar.bz2 |
Simplify usage of TCL_THREAD, along the lines of [eeddb0693a950be980a66de3811630a00c7bab54|eeddb0693a]. Suggested by DKF
Diffstat (limited to 'unix/tclUnixCompat.c')
-rw-r--r-- | unix/tclUnixCompat.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 2d2e53b..aa25c6b 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -47,7 +47,7 @@ * library calls. */ -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS typedef struct { struct passwd pwd; @@ -182,7 +182,7 @@ struct passwd * TclpGetPwNam( const char *name) { -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS return getpwnam(name); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -262,7 +262,7 @@ struct passwd * TclpGetPwUid( uid_t uid) { -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS return getpwuid(uid); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -365,7 +365,7 @@ struct group * TclpGetGrNam( const char *name) { -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS return getgrnam(name); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -445,7 +445,7 @@ struct group * TclpGetGrGid( gid_t gid) { -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS return getgrgid(gid); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -548,7 +548,7 @@ struct hostent * TclpGetHostByName( const char *name) { -#if (defined(TCL_THREADS) && !TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYNAME) +#if !TCL_THREADS || defined(HAVE_MTSAFE_GETHOSTBYNAME) return gethostbyname(name); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); @@ -618,7 +618,7 @@ TclpGetHostByAddr( int length, int type) { -#if (defined(TCL_THREADS) && !TCL_THREADS) || defined(HAVE_MTSAFE_GETHOSTBYADDR) +#if !TCL_THREADS || defined(HAVE_MTSAFE_GETHOSTBYADDR) return gethostbyaddr(addr, length, type); #else ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); |