Skip to content
Snippets Groups Projects
Commit 2c9fa122 authored by Sebastien Ponce's avatar Sebastien Ponce Committed by Steven Murray
Browse files

Dropped support for old, unused thread implementations. Kept only POSIX.

Note that this is a noop as the code after precompilation did not change. This has been double checked.
parent ce8c221a
No related branches found
No related tags found
No related merge requests found
......@@ -22,12 +22,6 @@
struct group *Cgetgrnam(name)
const char *name;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE))
/*
* If single-threaded compilation we don't do anything.
*/
return(getgrnam(name));
#else
/*
* linux or APPLE
* The final POSIX.1c standard: the return value is int and
......@@ -52,18 +46,11 @@ const char *name;
rc = getgrnam_r(name,grp,grpbuf,grpbuflen,&result);
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
return(result);
#endif
}
struct group *Cgetgrgid(gid)
gid_t gid;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE))
/*
* If single-threaded compilation we don't do anything.
*/
return(getgrgid(gid));
#else
/*
* linux or APPLE
* The final POSIX.1c standard: the return value is int and
......@@ -88,6 +75,5 @@ gid_t gid;
rc = getgrgid_r(gid,grp,grpbuf,grpbuflen,&result);
serrno = ENOENT==errno?SEGROUPUNKN:SEINTERNAL;
return(result);
#endif
}
......@@ -21,7 +21,7 @@
struct hostent *Cgethostbyname(name)
const char *name;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE)) || defined(__APPLE__)
#if defined(__APPLE__)
/*
* If single-thread compilation we don't do anything.
* Also: Windows, MACOSX and Digital UNIX v4 and higher already
......@@ -62,7 +62,7 @@ const void *addr;
size_t len;
int type;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE)) || defined(__APPLE__)
#if defined(__APPLE__)
/*
* If single-thread compilation we don't do anything.
* Also: Windows, MACOSX and Digital UNIX v4 and higher already
......@@ -102,7 +102,7 @@ struct servent *Cgetservbyname(name,proto)
const char *name;
const char *proto;
{
#if (!defined(_REENTRANT) && !defined(_THREAD_SAFE)) || defined(__APPLE__)
#if defined(__APPLE__)
/*
* If single-thread compilation we don't do anything.
* Also: Windows, MACOSX and Digital UNIX v4 and higher already
......
......@@ -23,9 +23,7 @@
#include <serrno.h>
#include <Cnetdb.h>
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
#define strtok(X,Y) strtok_r(X,Y,&last)
#endif /* _REENTRANT || _THREAD_SAFE */
#ifndef LOCALHOSTSFILE
#define LOCALHOSTSFILE "/etc/shift.localhosts"
......@@ -60,9 +58,7 @@ int isremote(struct in_addr from_host,
} adr,*ladd;
struct in_addr in ;
struct sockaddr_in addr;
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
char *last = NULL;
#endif /* _REENTRANT || _THREAD_SAFE */
#if defined(__STDC__)
char lhfile[CA_MAXPATHLEN+1] = LOCALHOSTSFILE;
......
......@@ -472,7 +472,6 @@
*------------------------------------------------------------------------
*/
#if defined(_REENTRANT) || defined(_THREAD_SAFE)
/*
* Multi-thread (MT) environment
*/
......@@ -484,13 +483,6 @@ EXTERN_C int *C__serrno (void);
*/
#define serrno (*C__serrno())
#else /* _REENTRANT || _THREAD_SAFE ... */
/*
* non-MT environment
*/
extern int serrno; /* Global error number */
#endif /* _REENTRANT || _TREAD_SAFE */
EXTERN_C char *sstrerror_r (int,char *, size_t);
EXTERN_C char *sstrerror (int);
EXTERN_C void sperror (char *);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment