diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-05-14 06:07:31 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-05-14 06:07:31 +0000 |
commit | c3a27f5095a50bef9e56f19eeed1176319e189e2 (patch) | |
tree | 80804af6dd3e113d1a37cd648a5b50fdd26b78f0 /libc/inet | |
parent | e9efa23ae121c8976e5dc2bbcf29e029b5087e76 (diff) |
Some makefile updates to make it behave a bit better/consistently.
-Erik
Diffstat (limited to 'libc/inet')
-rw-r--r-- | libc/inet/Makefile | 11 | ||||
-rw-r--r-- | libc/inet/rpc/Makefile | 7 | ||||
-rw-r--r-- | libc/inet/rpc/clnt_generic.c | 4 | ||||
-rw-r--r-- | libc/inet/rpc/get_myaddress.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/getrpcent.c | 16 | ||||
-rw-r--r-- | libc/inet/rpc/pmap_rmt.c | 2 | ||||
-rw-r--r-- | libc/inet/rpc/svc.c | 6 | ||||
-rw-r--r-- | libc/inet/rpc/xdr_float.c | 2 |
8 files changed, 21 insertions, 29 deletions
diff --git a/libc/inet/Makefile b/libc/inet/Makefile index 0b8797488..1e954307f 100644 --- a/libc/inet/Makefile +++ b/libc/inet/Makefile @@ -4,13 +4,10 @@ # Copyright (C) 1999 D. Jeff Dionne <jeff@rt-control.com> # under the GNU Library General Public License. -LIBC=../libc.a - -CC=$(CROSS)gcc -AR=$(CROSS)ar -RANLIB=$(CROSS)ranlib +TOPDIR=../ +include Rules.make -CCFLAGS= -O2 $(CPUFLAGS) -fno-builtin -I../include +LIBC=../libc.a ASRC=addr.c AOBJ=inet_aton.o inet_addr.o inet_ntoa.o @@ -24,8 +21,6 @@ gethostbyaddr.o OBJ=$(AOBJ) $(ROBJ) -CFLAGS=$(ARCH) $(CCFLAGS) $(DEFS) - all: $(LIBC) @$(RM) $(OBJ) diff --git a/libc/inet/rpc/Makefile b/libc/inet/rpc/Makefile index 8c2229374..b2d7c6d4a 100644 --- a/libc/inet/rpc/Makefile +++ b/libc/inet/rpc/Makefile @@ -1,8 +1,5 @@ -CC=$(CROSS)gcc -AR=$(CROSS)ar -RANLIB=$(CROSS)ranlib - -CFLAGS= -O2 -fomit-frame-pointer -Dlinux -I../include +TOPDIR=../ +include $(TOPDIR)Rules.make OBJS = auth_none.o auth_unix.o authunix_prot.o \ bindresvport.o clnt_generic.o clnt_perror.o \ diff --git a/libc/inet/rpc/clnt_generic.c b/libc/inet/rpc/clnt_generic.c index 9124ccf16..fabcc2b32 100644 --- a/libc/inet/rpc/clnt_generic.c +++ b/libc/inet/rpc/clnt_generic.c @@ -70,12 +70,12 @@ clnt_create(hostname, prog, vers, proto) rpc_createerr.cf_error.re_errno = EAFNOSUPPORT; return (NULL); } -#ifdef linux +#ifdef __linux__ bzero((char *) &sin, sizeof(sin)); #endif sin.sin_family = h->h_addrtype; sin.sin_port = 0; -#ifndef linux +#ifndef __linux__ bzero(sin.sin_zero, sizeof(sin.sin_zero)); #endif bcopy(h->h_addr, (char*)&sin.sin_addr, h->h_length); diff --git a/libc/inet/rpc/get_myaddress.c b/libc/inet/rpc/get_myaddress.c index 44a6eb38c..1940d3e27 100644 --- a/libc/inet/rpc/get_myaddress.c +++ b/libc/inet/rpc/get_myaddress.c @@ -47,7 +47,7 @@ static char sccsid[] = "@(#)get_myaddress.c 1.4 87/08/11 Copyr 1984 Sun Micro"; #include <arpa/inet.h> #include <netinet/in.h> -#ifdef linux +#ifdef __linux__ /* DO use gethostbyname because it's portable */ #include <netdb.h> get_myaddress(addr) diff --git a/libc/inet/rpc/getrpcent.c b/libc/inet/rpc/getrpcent.c index e0b7342cc..b3b3ece4c 100644 --- a/libc/inet/rpc/getrpcent.c +++ b/libc/inet/rpc/getrpcent.c @@ -60,7 +60,7 @@ struct rpcdata { static struct rpcent *interpret(); struct hostent *gethostent(); char *inet_ntoa(); -#ifndef linux +#ifndef __linux__ static char *index(); #else char *index(); @@ -102,7 +102,7 @@ getrpcbynumber(number) } struct rpcent * -#ifdef linux +#ifdef __linux__ getrpcbyname(const char *name) #else getrpcbyname(name) @@ -125,7 +125,7 @@ getrpcbyname(name) return (NULL); } -#ifdef linux +#ifdef __linux__ void #endif setrpcent(f) @@ -145,7 +145,7 @@ setrpcent(f) d->stayopen |= f; } -#ifdef linux +#ifdef __linux__ void #endif endrpcent() @@ -182,7 +182,7 @@ getrpcent() return interpret(d->line, strlen(d->line)); } -#ifdef linux +#ifdef __linux__ static char * firstwhite(s) char *s; @@ -224,7 +224,7 @@ interpret(val, len) return (getrpcent()); } *cp = '\0'; -#ifdef linux +#ifdef __linux__ if ((cp = firstwhite(p))) *cp++ = 0; else @@ -245,7 +245,7 @@ interpret(val, len) cp++; d->rpc.r_number = atoi(cp); q = d->rpc.r_aliases = d->rpc_aliases; -#ifdef linux +#ifdef __linux__ if ((cp = firstwhite(cp))) *cp++ = '\0'; #else @@ -266,7 +266,7 @@ interpret(val, len) } if (q < &(d->rpc_aliases[MAXALIASES - 1])) *q++ = cp; -#ifdef linux +#ifdef __linux__ if ((cp = firstwhite(cp))) *cp++ = '\0'; #else diff --git a/libc/inet/rpc/pmap_rmt.c b/libc/inet/rpc/pmap_rmt.c index 08b6bebd3..336d0c112 100644 --- a/libc/inet/rpc/pmap_rmt.c +++ b/libc/inet/rpc/pmap_rmt.c @@ -164,7 +164,7 @@ getbroadcastnets(addrs, sock, buf) int sock; /* any valid socket will do */ char *buf; /* why allocxate more when we can use existing... */ { -#ifdef linux +#ifdef __linux__ struct sockaddr_in addr; get_myaddress(&addr); diff --git a/libc/inet/rpc/svc.c b/libc/inet/rpc/svc.c index feac64628..9d0092d8a 100644 --- a/libc/inet/rpc/svc.c +++ b/libc/inet/rpc/svc.c @@ -44,7 +44,7 @@ static char sccsid[] = "@(#)svc.c 1.41 87/10/13 Copyr 1984 Sun Micro"; #include <sys/errno.h> #include <rpc/rpc.h> #include <rpc/pmap_clnt.h> -#ifdef linux +#ifdef __linux__ #include <sys/types.h> #endif @@ -375,7 +375,7 @@ svc_getreq(rdfds) fd_set readfds; FD_ZERO(&readfds); -/*#ifdef linux*/ +/*#ifdef __linux__*/ #if 0 readfds = rdfds; #else @@ -419,7 +419,7 @@ svc_getreqset(readfds) #ifdef FD_SETSIZE setsize = _rpc_dtablesize(); -#ifdef linux +#ifdef __linux__ /*#define NFDBITS 32*/ maskp = (u_long *)readfds; #else diff --git a/libc/inet/rpc/xdr_float.c b/libc/inet/rpc/xdr_float.c index ad221a79f..ce7b6e07f 100644 --- a/libc/inet/rpc/xdr_float.c +++ b/libc/inet/rpc/xdr_float.c @@ -51,7 +51,7 @@ static char sccsid[] = "@(#)xdr_float.c 1.12 87/08/11 Copyr 1984 Sun Micro"; * This routine works on Suns (Sky / 68000's) and Vaxen. */ -#ifdef linux +#ifdef __linux__ /* cheat big time */ #define sparc #endif |