forked from Imagelibrary/rtems
2003-01-27 Till Straumann <strauman@SLAC.Stanford.edu>
* libc/getproto.c, libc/getprotoname.c: modification to call getprotoent_static() if fopen() on /etc/protocols fails.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2003-01-27 Till Straumann <strauman@SLAC.Stanford.edu>
|
||||||
|
|
||||||
|
* libc/getproto.c, libc/getprotoname.c: modification to call
|
||||||
|
getprotoent_static() if fopen() on /etc/protocols fails.
|
||||||
|
|
||||||
2003-01-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
2003-01-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
|
||||||
|
|
||||||
* netinet/tcp_subr.c: Add args to INP_INFO_RLOCK, INP_INFO_RUNLOCK,
|
* netinet/tcp_subr.c: Add args to INP_INFO_RLOCK, INP_INFO_RUNLOCK,
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ static char sccsid[] = "@(#)getproto.c 8.1 (Berkeley) 6/4/93";
|
|||||||
|
|
||||||
extern int _proto_stayopen;
|
extern int _proto_stayopen;
|
||||||
|
|
||||||
|
extern struct protoent * getprotobynumber_static(int);
|
||||||
|
|
||||||
struct protoent *
|
struct protoent *
|
||||||
getprotobynumber(proto)
|
getprotobynumber(proto)
|
||||||
register int proto;
|
register int proto;
|
||||||
@@ -53,5 +55,8 @@ getprotobynumber(proto)
|
|||||||
break;
|
break;
|
||||||
if (!_proto_stayopen)
|
if (!_proto_stayopen)
|
||||||
endprotoent();
|
endprotoent();
|
||||||
|
|
||||||
|
if ( !p )
|
||||||
|
p = getprotobynumber_static(proto);
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ static char sccsid[] = "@(#)getprotoname.c 8.1 (Berkeley) 6/4/93";
|
|||||||
|
|
||||||
extern int _proto_stayopen;
|
extern int _proto_stayopen;
|
||||||
|
|
||||||
|
extern struct protoent *getprotobyname_static(const char *);
|
||||||
|
|
||||||
struct protoent *
|
struct protoent *
|
||||||
getprotobyname(name)
|
getprotobyname(name)
|
||||||
register const char *name;
|
register const char *name;
|
||||||
@@ -60,5 +62,8 @@ getprotobyname(name)
|
|||||||
found:
|
found:
|
||||||
if (!_proto_stayopen)
|
if (!_proto_stayopen)
|
||||||
endprotoent();
|
endprotoent();
|
||||||
|
|
||||||
|
if ( !p )
|
||||||
|
p = getprotobyname_static(name);
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user