Patches from Frith-MacDonald, Other misc.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2759 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fedor 1998-02-26 17:55:42 +00:00
parent 7dfa15674f
commit 967c4944e2
21 changed files with 568 additions and 348 deletions

View file

@ -1,2 +0,0 @@
The libobjects volunteer list has been moved to:
http://www.cs.rochester.edu/u/mccallum/libobjects/volunteers.html

View file

@ -1,3 +1,45 @@
Thu Feb 26 12:49:10 1998 Adam Fedor <fedor@doc.com>
* configure.in: Use AC_CHECK_HEADERS instead of AC_CHECK_HEADER.
* src/include/config.h.in: Regenerate.
* doc/GNUmakefile (HTML_FILES): Add fac_toc.html
* doc/Makefile.postamble: (fac_toc.html): New target.
* src/include/NSDictionary.h: Add NSMutableCopying protocol
(suggested by David Fritzsche <david@dementia.wupper.de>).
Thu Feb 26 8:12:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Tools/defaults.m: Removed autorelease debugging.
* Tools/dread.m: Removed autorelease debugging.
* Tools/dremove.m: Removed autorelease debugging.
* Tools/dwrite.m: Removed autorelease debugging.
* Tools/gdomap.m: Substantial rewrite with changes to the protocol
for name servers to identify themselves to each other.
Now handles subnet addressing within a class-c network.
Now handles machines with multiple IP addresses more efficiently.
Removes addresses from list of known servers after a period in
which it fails to contect them.
* Tools/gdomap.h: Changed comments to reflect protocol changes.
* src/Coder.m: ([-initForReadingWithData:]) removed an inefficient
hack for dealing with a problem that should never happen
(init methid called on autoreleased object).
* src/NSConnection.m: ([+newForInPort:outPort:cancestorConnection:),
(-_handleRmc:) removed 'delay_dialog_interruptions' which could
result in deadlock in three-way DO conversations.
* src/NSPortCoder.m: ([-_doEncodeObject:]) changed so that a copy
over-the-wire is a deep copy rather than a shallow one. I think
this gives a more expected behaviour, though I don't know what
OPENSTEP does.
* src/include/NSConnection.h: Removed delay_dialog_interruptions.
Sat Feb 14 16:03:07 1998 Scott Christley <scottc@stetson.net-community.com>
* configure.in: Check for sys/statvfs.h header file.

View file

@ -67,7 +67,7 @@ TODO INSTALL NEWS CODING-STANDARDS README ANNOUNCE FAQ STATUS GNUstep-HOWTO
INFO_FILES = gnustep-base.info
PS_FILES = gnustep-base.dvi
HTML_FILES = gnustep-base_toc.html
HTML_FILES = gnustep-base_toc.html faq_toc.html
DVI_FILES = gnustep-base.dvi
TOP_DOC_FILES = TODO README INSTALL NEWS ANNOUNCE STATUS GNUstep-HOWTO

View file

@ -145,6 +145,17 @@ gnustep-base_toc.html: $(ORIG_FILES)
done
$(TEXI2HTML) $(HTML_FLAGS) gnustep-base.texi
faq_toc.html: $(ORIG_FILES)
rm -f $(TEXI_FILES)
for i in $(ORIG_FILES); do \
sed -e 's,@email{\([^}]*\)},<A HREF="mailto:\1">\1</A>,g' \
$(srcdir)/$$i \
| sed -e 's,@url{\([^}]*\)},<A HREF="\1">\1</A>,g' \
| sed -e 's,^ *$$,@br{},g' \
> `basename $$i .tmpl.texi`.texi ; \
done
$(TEXI2HTML) $(HTML_FLAGS) faq.texi
# Rules for producing the text files
README: version.tmpl.texi readme.tmpl.texi
sed -e 's,@email{\([^}]*\)},<\1>,g' \

View file

@ -90,13 +90,9 @@ GNUstep public releases
@item ftp://ftp.sgi.com/graphics/tiff
TIFF library
@item ftp://alpha.gnu.org/gnu/gnustep
GNUstep developer releases
@ignore
GNUstep developer releases and snapshots
@item ftp://ftp.gnustep.org/pub/gnustep
All GNUstep releases
@end ignore
@item ftp://zarquon.mathi.uni-heidelberg.de/pub/GNUstep
All GNUstep releases
@end table
You need the following packages of either the version given or any later
@ -118,7 +114,6 @@ tiff-v3.4beta036-tar.gz (The TIFF library), or
tiff-970711.tar.gz
ftp://ftp.sgi.com/graphics/tiff/
ftp://alpha.gnu.org/gnu/gnustep
ftp://zarquon.mathi.uni-heidelberg.de/pub/GNUstep/related
pcthreads-1.1.0.tar.gz (PCThreads for Linux/GNU Inel x86 systems)
ftp://alpha.gnu.org/gnu/gnustep
@ -130,16 +125,14 @@ gstep-gui-0.4.0.tar.gz (AppKit)
gstep-xdps-0.4.0.tar.gz (X11/PostScript backend)
ftp://ftp.gnu.org/pub/gnu
ftp://alpha.gnu.org/gnu/gnustep
ftp://zarquon.mathi.uni-heidelberg.de/pub/GNUstep
libFoundation-0.8.0.tar.gz (Foundation)
ftp://alpha.gnu.org/gnu/gnustep
ftp://zarquon.mathi.uni-heidelberg.de/pub/GNUstep
ftp://ftp.gnu.org/pub/gnu
FoundationExt-0.8.1.tar.gz (Foundation extentions (optional))
ftp://ftp.gnu.org/pub/gnu
ftp://alpha.gnu.org/gnu/gnustep
ftp://zarquon.mathi.uni-heidelberg.de/pub/GNUstep
@end example
You may get either one of the Foundations libraries (you only need to

View file

@ -61,7 +61,6 @@ extern NSString *NSConnectionProxyCount; /* Objects received */
{
@private
BOOL is_valid;
BOOL delay_dialog_interruptions;
BOOL independant_queueing;
unsigned reply_depth;
NSPort *receive_port;

View file

@ -38,7 +38,7 @@
- (NSEnumerator*) objectEnumerator;
@end
@interface NSDictionary (NonCore) <NSCopying>
@interface NSDictionary (NonCore) <NSCopying, NSMutableCopying>
+ allocWithZone: (NSZone*)zone;
+ dictionary;

View file

@ -63,6 +63,9 @@
/* Define if you have the <ndir.h> header file. */
#undef HAVE_NDIR_H
/* Define if you have the <netinet/in.h> header file. */
#undef HAVE_NETINET_IN_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
@ -72,9 +75,15 @@
/* Define if you have the <sys/ndir.h> header file. */
#undef HAVE_SYS_NDIR_H
/* Define if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
/* Define if you have the <sys/rusage.h> header file. */
#undef HAVE_SYS_RUSAGE_H
/* Define if you have the <sys/socket.h> header file. */
#undef HAVE_SYS_SOCKET_H
/* Define if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
@ -84,6 +93,9 @@
/* Define if you have the <sys/statvfs.h> header file. */
#undef HAVE_SYS_STATVFS_H
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
/* Define if you have the <sys/vfs.h> header file. */
#undef HAVE_SYS_VFS_H

View file

@ -265,11 +265,7 @@ static BOOL debug_coder = NO;
{
id ret = [[self class] newReadingFromStream:
[MemoryStream streamWithData:data]];
if ([self retainCount]
- [[[self class] autoreleaseClass] autoreleaseCountForObject:self] == 0)
[ret autorelease];
else
[self release];
[self release];
return ret;
}

View file

@ -839,7 +839,6 @@ static int messages_received_count;
newConn->receive_port_class = default_receive_port_class;
newConn->send_port_class = default_send_port_class;
}
newConn->delay_dialog_interruptions = YES;
newConn->independant_queueing = NO;
newConn->reply_depth = 0;
newConn->delegate = nil;
@ -1445,16 +1444,8 @@ static int messages_received_count;
If the REPLY_DEPTH is 0, then we aren't in the middle of waiting
for a reply, we are waiting for requests---so service it now.
If REPLY_DEPTH is non-zero, we may still want to service it now
if it is a request made as a callback from our peer---the request
is part of the remote code necessary to finish calculating our
reply; we know it's a callback from our peer if the [RMC CONNECTION]
is self. If independant_queuing is YES, then we mustn't service anyway.
If REPLY_DEPTH is non-zero, and the [RMC CONNECTION] is not self,
then we may still want to service it now if DELAY_DIALOG_INTERRUPTIONS
is false. */
if (reply_depth == 0
|| (conn == self && independant_queueing == NO)
|| !delay_dialog_interruptions)
unless we have independant_queueing set. */
if (reply_depth == 0 || independant_queueing == NO)
{
[self retain];
[conn _service_forwardForProxy: rmc];

View file

@ -171,16 +171,13 @@ static BOOL debug_connected_coder = NO;
*/
- (void) _doEncodeObject: anObj
{
BOOL old = _is_by_copy;
id obj;
Class cls;
_is_by_copy = NO;
obj = [anObj replacementObjectForPortCoder: (NSPortCoder*)self];
cls = [obj classForPortCoder];
[self encodeClass: cls];
[obj encodeWithCoder: (NSCoder*)self];
_is_by_copy = old;
}
- (void) _doEncodeBycopyObject: anObj

View file

@ -87,6 +87,7 @@
static int debug_tcp_port = 0;
@interface TcpPrefPacket : TcpInPacket

View file

@ -44,8 +44,6 @@ main(int argc, char** argv)
BOOL found = NO;
int i;
[NSObject enableDoubleReleaseCheck: YES];
proc = [NSProcessInfo processInfo];
if (proc == nil) {
NSLog(@"defaults: unable to get process information!\n");

View file

@ -41,8 +41,6 @@ main(int argc, char** argv)
BOOL found = NO;
int i;
[NSObject enableDoubleReleaseCheck: YES];
proc = [NSProcessInfo processInfo];
if (proc == nil) {
NSLog(@"unable to get process information!\n");

View file

@ -41,8 +41,6 @@ main(int argc, char** argv)
NSString *user = nil;
int i;
[NSObject enableDoubleReleaseCheck: YES];
proc = [NSProcessInfo processInfo];
if (proc == nil) {
NSLog(@"unable to get process information!\n");

View file

@ -44,8 +44,6 @@ main(int argc, char** argv)
id obj = nil;
int i;
[NSObject enableDoubleReleaseCheck: YES];
proc = [NSProcessInfo processInfo];
if (proc == nil) {
NSLog(@"unable to get process information!\n");

View file

@ -87,18 +87,30 @@
#define MAX_IFACE (256) /* How many network interfaces. */
#define IASIZE (sizeof(struct in_addr))
#define MAX_EXTRA ((GDO_NAME_MAX_LEN - 2 * IASIZE)/IASIZE)
int debug = 0; /* Extra debug logging. */
int nofork = 0; /* turn off fork() for debugging. */
int noprobe = 0; /* turn off probe for unknown servers. */
int interval = 300; /* Minimum time (sec) between probes. */
int udp_sent = 0;
int tcp_sent = 0;
int udp_read = 0;
int tcp_read = 0;
struct in_addr my_addr; /* Set in init_iface() */
long last_probe;
struct in_addr loopback;
unsigned short my_port; /* Set in init_iface() */
unsigned long class_a_net;
struct in_addr class_a_mask;
unsigned long class_b_net;
struct in_addr class_b_mask;
unsigned long class_c_net;
struct in_addr class_c_mask;
/*
* Predeclare some of the functions used.
*/
@ -115,7 +127,7 @@ static void init_ports();
static void init_probe();
static void queue_msg(struct sockaddr_in* a, unsigned char* d, int l);
static void queue_pop();
static void queue_probe(struct in_addr* to, struct in_addr *from);
static void queue_probe(struct in_addr* to, struct in_addr *from, int num_extras, struct in_addr* extra, int is_reply);
/*
* I have simple mcopy() and mzero() implementations here for the
@ -149,8 +161,9 @@ mzero(void* p, int l)
* Variables used for determining if a connection is from a process
* on the local host.
*/
int interfaces = 0; /* Number of interfaces. */
struct in_addr addr[MAX_IFACE]; /* Address of each interface. */
int interfaces = 0; /* Number of interfaces. */
struct in_addr *addr; /* Address of each interface. */
struct in_addr *mask; /* Netmask of each interface. */
static int
is_local_host(struct in_addr a)
@ -158,7 +171,7 @@ is_local_host(struct in_addr a)
int i;
for (i = 0; i < interfaces; i++) {
if (memcmp((char*)&a, (char*)&addr[i], sizeof(a)) == 0) {
if (a.s_addr == addr[i].s_addr) {
return(1);
}
}
@ -169,10 +182,9 @@ static int
is_local_net(struct in_addr a)
{
int i;
int net = inet_netof(a);
for (i = 0; i < interfaces; i++) {
if (net == inet_netof(addr[i])) {
if ((mask[i].s_addr&&addr[i].s_addr) == (mask[i].s_addr&&a.s_addr)) {
return(1);
}
}
@ -305,7 +317,7 @@ map_add(unsigned char* n, unsigned char l, unsigned int p, unsigned char t)
map_size += 16;
}
else {
map = (map_ent**)malloc(16*sizeof(map_ent*));
map = (map_ent**)calloc(16,sizeof(map_ent*));
map_size = 16;
}
}
@ -400,35 +412,55 @@ map_del(map_ent* e)
*/
unsigned long prb_used = 0;
unsigned long prb_size = 0;
struct in_addr **prb = 0;
typedef struct {
struct in_addr sin;
long when;
} prb_type;
prb_type **prb = 0;
static prb_type *prb_get(struct in_addr *old);
/*
* Name - prb_add()
* Purpose - Create a new probe entry in the list in the
* appropriate position.
*/
static struct in_addr*
static void
prb_add(struct in_addr *p)
{
struct in_addr* n = (struct in_addr*)malloc(IASIZE);
prb_type *n;
int i;
mcopy(n, p, IASIZE);
if (is_local_host(*p) != 0) {
return;
}
if (is_local_net(*p) == 0) {
return;
}
n = prb_get(p);
if (n) {
n->when = time(0);
return;
}
n = (prb_type*)malloc(sizeof(prb_type));
n->sin = *p;
n->when = time(0);
if (prb_used >= prb_size) {
int size = (prb_size + 16) * sizeof(struct in_addr*);
int size = (prb_size + 16) * sizeof(prb_type*);
if (prb_size) {
prb = (struct in_addr**)realloc(prb, size);
prb = (prb_type**)realloc(prb, size);
prb_size += 16;
}
else {
prb = (struct in_addr**)malloc(size);
prb = (prb_type**)malloc(size);
prb_size = 16;
}
}
for (i = 0; i < prb_used; i++) {
if (memcmp((char*)prb[i], (char*)n, IASIZE) > 0) {
if (memcmp((char*)&prb[i]->sin, (char*)&n->sin, IASIZE) > 0) {
int j;
for (j = prb_used+1; j > i; j--) {
@ -439,14 +471,13 @@ prb_add(struct in_addr *p)
}
prb[i] = n;
prb_used++;
return(prb[i]);
}
/*
* Name - prb_get()
* Purpose - Search the list for an entry for a particular addr
*/
static struct in_addr*
static prb_type*
prb_get(struct in_addr *p)
{
int lower = 0;
@ -454,7 +485,7 @@ prb_get(struct in_addr *p)
int index;
for (index = upper/2; upper != lower; index = lower + (upper - lower)/2) {
int i = memcmp(prb[index], p, IASIZE);
int i = memcmp(&prb[index]->sin, p, IASIZE);
if (i < 0) {
lower = index + 1;
@ -464,7 +495,7 @@ prb_get(struct in_addr *p)
break;
}
}
if (index<prb_used && memcmp(prb[index],p,IASIZE)==0) {
if (index<prb_used && memcmp(&prb[index]->sin,p,IASIZE)==0) {
return(prb[index]);
}
return(0);
@ -480,7 +511,7 @@ prb_del(struct in_addr *p)
int i;
for (i = 0; i < prb_used; i++) {
if (memcmp(prb[i], p, IASIZE) == 0) {
if (memcmp(&prb[i]->sin, p, IASIZE) == 0) {
int j;
free(prb[i]);
@ -493,6 +524,21 @@ prb_del(struct in_addr *p)
}
}
/*
* Remove any server from which we have had no messages in the last
* thirty minutes.
*/
static void
prb_tim(long when)
{
int i;
for (i = prb_used - 1; i >= 0; i--) {
if (when - prb[i]->when > 1800) {
prb_del(&prb[i]->sin);
}
}
}
/*
* Name - clear_chan()
@ -561,6 +607,7 @@ init_iface()
char buf[MAX_IFACE * sizeof(struct ifreq)];
int set_my_addr = 0;
int desc;
int num_iface;
/*
* First we determine the port for the 'gdomap' service - ideally
@ -602,37 +649,46 @@ init_iface()
/*
* Find the IP address of each active network interface.
*/
num_iface = ifc.ifc_len / sizeof(struct ifreq);
addr = (struct in_addr*)malloc(num_iface*IASIZE);
mask = (struct in_addr*)malloc(num_iface*IASIZE);
final = (struct ifreq*)&ifc.ifc_buf[ifc.ifc_len];
for (ifr = ifc.ifc_req; ifr < final; ifr++) {
if (ifr->ifr_addr.sa_family == AF_INET) { /* IP interface */
ifreq = *ifr;
if (ioctl(desc, SIOCGIFFLAGS, (char *) &ifreq) < 0) {
if (ioctl(desc, SIOCGIFFLAGS, (char *)&ifreq) < 0) {
perror("SIOCGIFFLAGS");
} else if (ifreq.ifr_flags & IFF_UP) { /* active interface */
if (ioctl(desc, SIOCGIFADDR, (char *) &ifreq) < 0) {
if (ioctl(desc, SIOCGIFADDR, (char *)&ifreq) < 0) {
perror("SIOCGIFADDR");
} else {
addr[interfaces] = ((struct sockaddr_in *)
& ifreq.ifr_addr)->sin_addr;
/*
* First configured interface (excluding loopback) is
* considered to be that of this servers primary address.
*/
if (set_my_addr==0 && inet_netof(addr[interfaces])!=127) {
my_addr = addr[interfaces];
addr[interfaces] =
((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr;
if (ioctl(desc, SIOCGIFNETMASK, (char *)&ifreq) < 0) {
perror("SIOCGIFNETMASK");
/*
* If we can't get a netmask - assume a class-c
* network.
*/
mask[interfaces] = class_c_mask;
}
else {
/*
* Some systems don't have ifr_netmask
*/
#ifdef ifr_netmask
mask[interfaces] =
((struct sockaddr_in *)&ifreq.ifr_netmask)->sin_addr;
#else
mask[interfaces] =
((struct sockaddr_in *)&ifreq.ifr_addr)->sin_addr;
#endif
}
interfaces++;
}
}
}
if (interfaces >= MAX_IFACE) {
break;
}
/* Support for variable-length addresses. */
#ifdef HAS_SA_LEN
ifr = (struct ifreq *) ((caddr_t) ifr
+ ifr->ifr_addr.sa_len - sizeof(struct sockaddr));
#endif
}
close(desc);
}
@ -735,6 +791,46 @@ init_ports()
signal(SIGPIPE, SIG_IGN);
}
static int
other_addresses_on_net(struct in_addr old, struct in_addr **extra)
{
int numExtra = 0;
int iface;
for (iface = 0; iface < interfaces; iface++) {
if (addr[iface].s_addr == old.s_addr) {
continue;
}
if ((addr[iface].s_addr & mask[iface].s_addr) ==
(old.s_addr & mask[iface].s_addr)) {
numExtra++;
}
}
if (numExtra > 0) {
struct in_addr *addrs;
addrs = (struct in_addr*)malloc(sizeof(struct in_addr)*numExtra);
*extra = addrs;
numExtra = 0;
for (iface = 0; iface < interfaces; iface++) {
if (addr[iface].s_addr == old.s_addr) {
continue;
}
if ((addr[iface].s_addr & mask[iface].s_addr) ==
(old.s_addr & mask[iface].s_addr)) {
addrs[numExtra].s_addr = addr[iface].s_addr;
numExtra++;
}
}
}
return numExtra;
}
/*
* Name - init_probe()
* Purpose - Send a request to all hosts on the local network
@ -743,85 +839,106 @@ init_ports()
static void
init_probe()
{
unsigned long nlist[interfaces];
int nlist_size = 0;
int iface;
int i;
if (debug > 2) {
fprintf(stderr, "Initiating probe requests.\n");
}
/*
* Make a list of the different networks to which we must send.
*/
for (iface = 0; iface < interfaces; iface++) {
int net = inet_netof(addr[iface]);
int me = inet_lnaof(addr[iface]);
int lo = 1;
int hi;
int i;
unsigned long net = (addr[iface].s_addr & mask[iface].s_addr);
if (net == 127) {
continue; /* Don't probe loopback interface. */
if (addr[iface].s_addr == loopback.s_addr) {
continue; /* Skip loopback */
}
prb_add(&addr[iface]); /* Add self to server list. */
for (i = 0; i < nlist_size; i++) {
if (net == nlist[i]) {
break;
}
}
if (i == nlist_size) {
nlist[i] = net;
nlist_size++;
}
}
for (i = 0; i < nlist_size; i++) {
struct in_addr *other;
int elen;
struct in_addr sin;
int high;
int low;
unsigned long net;
int j;
/*
* Determine the highest possible host number depending on
* the class of network address in use.
* Build up a list of addresses that we serve on this network.
*/
if ((net & 0xffffff00) == 0) {
hi = 0xffffff; /* Class A */
}
else if ((net & 0xffff0000) == 0) {
hi = 0xffff; /* Class B */
}
else {
hi = 0xff; /* Class C */
}
for (iface = 0; iface < interfaces; iface++) {
if ((addr[iface].s_addr & mask[iface].s_addr) == nlist[i]) {
unsigned long ha; /* full host address. */
unsigned long hm; /* full netmask. */
/*
* First kick off probes for known hosts unless we are
* probing ALL hosts.
*/
if (noprobe || hi > 0xff) {
for (i = lo; i < hi; i++) {
struct in_addr a = inet_makeaddr(net, i);
struct hostent* hp;
if (i == me) {
continue; /* Don't probe self - that's silly. */
}
ha = ntohl(addr[iface].s_addr);
hm = ntohl(mask[iface].s_addr);
/*
* See if there is a host known with this address,
* if not we skip this one.
* Make sure that our netmasks are restricted
* to class-c networks and subnets of those
* networks - we don't want to be probing
* more than a couple of hundred hosts!
*/
hp = gethostbyaddr((const char*)&a, sizeof(a), AF_INET);
if (hp == 0) {
continue;
if ((mask[iface].s_addr | class_c_mask.s_addr)
!= mask[iface].s_addr) {
fprintf(stderr, "gdomap - warning - netmask %s will be
treated as 255.255.255.0 for %s\n",
inet_ntoa(mask[iface]), inet_ntoa(addr[iface]));
hm |= ~255;
}
queue_probe(&a, &addr[iface]); /* Kick off probe. */
sin = addr[iface];
net = ha & hm & ~255; /* class-c net number. */
low = ha & hm & 255; /* low end of subnet. */
high = low | (255 & ~hm); /* high end of subnet. */
elen = other_addresses_on_net(sin, &other);
break;
}
}
/*
* Now start probes for servers on machines which may be on
* the network, but are not known to this system.
* any network for which we have an interface.
*
* We only do this on class 'C' networks since the number of
* possible hosts on a class 'A' or 'B' network is far too
* high to probe without causing network congestion.
* Assume 'low' and 'high' are not valid host addresses as 'low'
* is the network address and 'high' is the broadcast address.
*/
if (noprobe == 0 && hi <= 0xff) {
for (i = lo; i < hi; i++) {
struct in_addr a = inet_makeaddr(net, i);
struct hostent* hp;
for (j = low + 1; j < high; j++) {
struct in_addr a;
if (i == me) {
continue; /* Don't probe self - that's silly. */
}
queue_probe(&a, &addr[iface]); /* Kick off probe. */
a.s_addr = htonl(net + j);
if (is_local_host(a)) {
continue; /* Don't probe self - that's silly. */
}
/* Kick off probe. */
while (elen > MAX_EXTRA) {
elen -= MAX_EXTRA;
queue_probe(&a, &sin, MAX_EXTRA, &other[elen], 0);
}
queue_probe(&a, &sin, elen, other, 0);
}
if (elen > 0) {
free(other);
}
}
if (debug > 2) {
fprintf(stderr, "Probe requests initiated.\n");
}
last_probe = time(0);
}
/*
@ -902,12 +1019,15 @@ handle_io()
FD_SET(udp_desc, &wfds);
}
timeout.tv_sec = 10;
timeout.tv_usec = 0;
to = &timeout;
rval = select(FD_SETSIZE, &rfds, &wfds, 0, to);
/*
* Let's handle any error return.
*/
if (rval < 0) {
/*
* Let's handle any error return.
*/
if (errno == EBADF) {
fd_set efds;
@ -942,28 +1062,49 @@ handle_io()
exit(1);
}
}
else if (rval == 0) {
long now = time(0);
int i;
for (i = 0; i < FD_SETSIZE; i++) {
if (FD_ISSET(i, &rfds)) {
if (i == tcp_desc) {
handle_accept();
}
else if (i == udp_desc) {
handle_recv();
}
else {
handle_read(i);
}
if (debug > 2) {
dump_stats();
}
/*
* Let's handle a timeout.
*/
prb_tim(now); /* Remove dead servers */
if (udp_pending == 0 && (now - last_probe) >= interval) {
/*
* If there is no output pending on the udp channel and
* it is at least five minutes since we sent out a probe
* we can re-probe the network for other name servers.
*/
init_probe();
}
if (FD_ISSET(i, &wfds)) {
if (i == udp_desc) {
handle_send();
}
else {
/*
* Got some descriptor activity - deal with it.
*/
for (i = 0; i < FD_SETSIZE; i++) {
if (FD_ISSET(i, &rfds)) {
if (i == tcp_desc) {
handle_accept();
}
else if (i == udp_desc) {
handle_recv();
}
else {
handle_read(i);
}
if (debug > 2) {
dump_stats();
}
}
else {
handle_write(i);
if (FD_ISSET(i, &wfds)) {
if (i == udp_desc) {
handle_send();
}
else {
handle_write(i);
}
}
}
}
@ -979,12 +1120,14 @@ static void
handle_read(int desc)
{
unsigned char* ptr = r_info[desc].buf.b;
int nothingRead = 1;
int done = 0;
int r;
while (r_info[desc].pos < GDO_REQ_SIZE && done == 0) {
r = read(desc, &ptr[r_info[desc].pos], GDO_REQ_SIZE - r_info[desc].pos);
if (r > 0) {
nothingRead = 0;
r_info[desc].pos += r;
}
else {
@ -995,7 +1138,11 @@ handle_read(int desc)
tcp_read++;
handle_request(desc);
}
else if (errno != EWOULDBLOCK) {
else if (errno != EWOULDBLOCK || nothingRead == 1) {
/*
* If there is an error or end-of-file on the descriptor then
* we must close it down.
*/
clear_chan(desc);
}
}
@ -1264,22 +1411,39 @@ handle_request(int desc)
int i;
free(w_info[desc].buf);
w_info[desc].buf = (char*)malloc(4 + prb_used*sizeof(*prb));
*(unsigned long*)w_info[desc].buf = htonl(prb_used);
w_info[desc].buf = (char*)malloc(sizeof(unsigned long) +
(prb_used+1)*IASIZE);
*(unsigned long*)w_info[desc].buf = htonl(prb_used+1);
mcopy(&w_info[desc].buf[4], &r_info[desc].addr.sin_addr, IASIZE);
for (i = 0; i < prb_used; i++) {
mcopy(&w_info[desc].buf[4+i*IASIZE], prb[i], IASIZE);
mcopy(&w_info[desc].buf[4+(i+1)*IASIZE], &prb[i]->sin, IASIZE);
}
w_info[desc].len = 4 + prb_used*IASIZE;
w_info[desc].len = 4 + (prb_used+1)*IASIZE;
}
else if (type == GDO_PROBE) {
/*
* If the client is a name server, we add it to the list.
*/
if (r_info[desc].addr.sin_port == my_port) {
if (is_local_net(r_info[desc].addr.sin_addr)) {
if (prb_get((struct in_addr*)&r_info[desc].buf.b[4]) == 0) {
prb_add((struct in_addr*)&r_info[desc].buf.b[4]);
struct in_addr *ptr;
struct in_addr sin;
unsigned long net;
int c;
memcpy(&sin, r_info[desc].buf.r.name, IASIZE);
if (debug > 2) {
fprintf(stderr, "Probe from '%s'\n", inet_ntoa(sin));
}
prb_add(&sin);
net = inet_netof(sin);
ptr = (struct in_addr*)&r_info[desc].buf.r.name[2*IASIZE];
c = (r_info[desc].buf.r.nsize - 2*IASIZE)/IASIZE;
while (c-- > 0) {
if (debug > 2) {
fprintf(stderr, "Delete server '%s'\n", inet_ntoa(*ptr));
}
prb_del(ptr);
ptr++;
}
}
/*
@ -1288,15 +1452,54 @@ handle_request(int desc)
* but just to be nice, we send back our port number anyway.
*/
if (desc == udp_desc && r_info[desc].addr.sin_port == my_port) {
struct in_addr laddr;
struct in_addr raddr;
struct in_addr *other;
int elen;
void *rbuf = r_info[desc].buf.r.name;
void *wbuf;
int i;
gdo_req *r;
free(w_info[desc].buf);
w_info[desc].buf = (char*)malloc(GDO_REQ_SIZE);
mzero(w_info[desc].buf, GDO_REQ_SIZE);
w_info[desc].buf[0] = GDO_PREPLY;
w_info[desc].buf[1] = sizeof(my_addr);
w_info[desc].buf[2] = 0;
w_info[desc].buf[3] = 0;
mcopy(&w_info[desc].buf[4], &my_addr, sizeof(my_addr));
w_info[desc].buf = (char*)calloc(GDO_REQ_SIZE,1);
r = (gdo_req*)w_info[desc].buf;
wbuf = r->name;
r->rtype = GDO_PREPLY;
r->nsize = IASIZE*2;
mcopy(&raddr, rbuf, IASIZE);
mcopy(&laddr, rbuf+IASIZE, IASIZE);
mcopy(wbuf+IASIZE, &raddr, IASIZE);
/*
* If the other end did not tell us which of our addresses it was
* probing, try to select one on the same network to send back.
* otherwise, respond with the address it was probing.
*/
if (is_local_host(laddr) == 0) {
for (i = 0; i < interfaces; i++) {
if ((mask[i].s_addr && addr[i].s_addr) ==
(mask[i].s_addr && r_info[desc].addr.sin_addr.s_addr)) {
laddr = addr[i];
mcopy(wbuf, &laddr, IASIZE);
break;
}
}
}
else {
mcopy(wbuf, &laddr, IASIZE);
}
w_info[desc].len = GDO_REQ_SIZE;
elen = other_addresses_on_net(laddr, &other);
if (elen > 0) {
while (elen > MAX_EXTRA) {
elen -= MAX_EXTRA;
queue_probe(&raddr, &laddr, MAX_EXTRA, &other[elen], 1);
}
queue_probe(&raddr, &laddr, elen, other, 1);
}
}
else {
port = my_port;
@ -1309,10 +1512,25 @@ handle_request(int desc)
* out earlier. We should add the name server to our list.
*/
if (r_info[desc].addr.sin_port == my_port) {
if (is_local_net(r_info[desc].addr.sin_addr)) {
if (prb_get((struct in_addr*)&r_info[desc].buf.b[4]) == 0) {
prb_add((struct in_addr*)&r_info[desc].buf.b[4]);
struct in_addr sin;
unsigned long net;
struct in_addr *ptr;
int c;
memcpy(&sin, &r_info[desc].buf.r.name, IASIZE);
if (debug > 2) {
fprintf(stderr, "Probe reply from '%s'\n", inet_ntoa(sin));
}
prb_add(&sin);
net = inet_netof(sin);
ptr = (struct in_addr*)&r_info[desc].buf.r.name[2*IASIZE];
c = (r_info[desc].buf.r.nsize - 2*IASIZE)/IASIZE;
while (c-- > 0) {
if (debug > 2) {
fprintf(stderr, "Delete server '%s'\n", inet_ntoa(*ptr));
}
prb_del(ptr);
ptr++;
}
}
/*
@ -1445,9 +1663,21 @@ handle_write(int desc)
int
main(int argc, char** argv)
{
char* options = "Hdfp";
extern char *optarg;
char *options = "Hdfi:p";
int c;
/*
* Would use inet_aton(), but older systems don't have it.
*/
loopback.s_addr = inet_addr("127.0.0.1");
class_a_net = inet_network("255.0.0.0");
class_a_mask = inet_makeaddr(class_a_net, 0);
class_b_net = inet_network("255.255.0.0");
class_b_mask = inet_makeaddr(class_b_net, 0);
class_c_net = inet_network("255.255.255.0");
class_c_mask = inet_makeaddr(class_c_net, 0);
while ((c = getopt(argc, argv, options)) != -1) {
switch(c) {
case 'H':
@ -1456,8 +1686,8 @@ main(int argc, char** argv)
printf("-H for help\n");
printf("-d Extra debug logging.\n");
printf("-f avoid fork() to make debugging easy\n");
printf("-p skip probe for unknown servers\n");
printf(" NB. This may actually SLOW startup.\n");
printf("-i seconds re-probe at this interval (roughly)\n");
printf("-p obsolete no-op\n");
exit(0);
case 'd':
@ -1468,6 +1698,13 @@ main(int argc, char** argv)
nofork++;
break;
case 'i':
interval = atoi(optarg);
if (interval < 60) {
interval = 60;
}
break;
case 'p':
noprobe++;
break;
@ -1539,13 +1776,14 @@ main(int argc, char** argv)
* We don't bother to check to see if it worked.
*/
static void
queue_probe(struct in_addr* to, struct in_addr* from)
queue_probe(struct in_addr* to, struct in_addr* from, int l, struct in_addr* e, int f)
{
struct sockaddr_in sin;
gdo_req msg;
if (debug > 2) {
fprintf(stderr, "Probing for server on '%s'\n", inet_ntoa(*to));
fprintf(stderr, "Probing for server on '%s'", inet_ntoa(*to));
fprintf(stderr, " from '%s'\n", inet_ntoa(*from));
}
mzero(&sin, sizeof(sin));
sin.sin_family = AF_INET;
@ -1553,12 +1791,22 @@ queue_probe(struct in_addr* to, struct in_addr* from)
sin.sin_port = my_port;
mzero((char*)&msg, GDO_REQ_SIZE);
msg.rtype = GDO_PROBE;
msg.nsize = sizeof(*from);
if (f) {
msg.rtype = GDO_PREPLY;
}
else {
msg.rtype = GDO_PROBE;
}
msg.nsize = 2*IASIZE;
msg.ptype = 0;
msg.dummy = 0;
msg.port = 0;
mcopy(msg.name, &from, sizeof(*from));
mcopy(msg.name, from, IASIZE);
mcopy(&msg.name[IASIZE], to, IASIZE);
if (l > 0) {
memcpy(&msg.name[msg.nsize], e, l*IASIZE);
msg.nsize += l*IASIZE;
}
queue_msg(&sin, (unsigned char*)&msg, GDO_REQ_SIZE);
}

View file

@ -40,8 +40,9 @@
* a single nul byte.
* a four byte port number in network byte order must be
* present for register operations, otherwise this is zero.
* a service name of 0 to GDO_NAME_MAX_LEN bytes (or an IP
* address in network byte order for probe operations)
* a service name of 0 to GDO_NAME_MAX_LEN bytes (or two IP
* addresses in network byte order and an optional list of
* additional addresseso for probe operations)
* 0 to GDO_NAME_MAX_LEN nul bytes padding the service name to its
* full size.
* a terminating nul byte.
@ -80,6 +81,12 @@
* The following are used for communications between name servers -
*
* GDO_PROBE Requests a response
* Passes two IP addresses in the name field - first the
* address of the sender, next that of the recipient.
* The packet may (optionally) include a variable number
* of addresses (as specified by the name length minus the
* size of the two addresses), each of which is an internet
* address on which the sender is also listening.
* For a request from a name server via UDP there is no
* response, but a GDO_REPLY request is sent.
* For a request from a non-name-server, or a TCP
@ -87,6 +94,7 @@
* server in network byte order.
*
* GDO_PREPLY Replies to a GDO_PROBE via UDP from a name server.
* The format of the message is as for GDO_PROBE.
* No response is sent.
*
*

166
configure vendored
View file

@ -2161,19 +2161,21 @@ done
#--------------------------------------------------------------------
# These two headers (functions) needed by Time.m
#--------------------------------------------------------------------
ac_safe=`echo "sys/time.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/time.h""... $ac_c" 1>&6
echo "configure:2167: checking for sys/time.h" >&5
for ac_hdr in sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2169: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2172 "configure"
#line 2174 "configure"
#include "confdefs.h"
#include <sys/time.h>
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2177: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2179: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2189,24 +2191,31 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
ac_safe=`echo "sys/resource.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/resource.h""... $ac_c" 1>&6
echo "configure:2200: checking for sys/resource.h" >&5
for ac_hdr in sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2209: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2205 "configure"
#line 2214 "configure"
#include "confdefs.h"
#include <sys/resource.h>
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2210: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2222,10 +2231,15 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test $ac_cv_header_sys_time_h = no -o $ac_cv_header_sys_resource_h = no ; then
@ -2236,17 +2250,17 @@ for ac_hdr in sys/rusage.h ucbinclude/sys/resource.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2240: checking for $ac_hdr" >&5
echo "configure:2254: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2245 "configure"
#line 2259 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2276,19 +2290,21 @@ done
#--------------------------------------------------------------------
# These headers/functions needed by SocketPort.m
#--------------------------------------------------------------------
ac_safe=`echo "sys/socket.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/socket.h""... $ac_c" 1>&6
echo "configure:2282: checking for sys/socket.h" >&5
for ac_hdr in sys/socket.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2298: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2287 "configure"
#line 2303 "configure"
#include "confdefs.h"
#include <sys/socket.h>
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2308: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2304,24 +2320,31 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
echo "configure:2315: checking for netinet/in.h" >&5
for ac_hdr in netinet/in.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2338: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2320 "configure"
#line 2343 "configure"
#include "confdefs.h"
#include <netinet/in.h>
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2325: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@ -2337,10 +2360,15 @@ rm -f conftest*
fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
:
ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
cat >> confdefs.h <<EOF
#define $ac_tr_hdr 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
if test $ac_cv_header_sys_socket_h = no -o $ac_cv_header_netinet_in_h = no ; then
@ -2353,12 +2381,12 @@ fi
for ac_func in vsprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2357: checking for $ac_func" >&5
echo "configure:2385: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2362 "configure"
#line 2390 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2381,7 +2409,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2410,11 +2438,11 @@ if test $ac_cv_func_vsprintf = yes ; then
VSPRINTF_RETURNS_LENGTH=1
else
cat > conftest.$ac_ext <<EOF
#line 2414 "configure"
#line 2442 "configure"
#include "confdefs.h"
#include "$srcdir/config/config.vsprintf.c"
EOF
if { (eval echo configure:2418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
if { (eval echo configure:2446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
VSPRINTF_RETURNS_LENGTH=1
else
@ -2438,12 +2466,12 @@ fi
for ac_func in getcwd
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2442: checking for $ac_func" >&5
echo "configure:2470: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2447 "configure"
#line 2475 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2466,7 +2494,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2499,12 +2527,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
echo "configure:2503: checking for $ac_hdr that defines DIR" >&5
echo "configure:2531: checking for $ac_hdr that defines DIR" >&5
if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2508 "configure"
#line 2536 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@ -2512,7 +2540,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
if { (eval echo configure:2516: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:2544: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@ -2537,7 +2565,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
echo "configure:2541: checking for opendir in -ldir" >&5
echo "configure:2569: checking for opendir in -ldir" >&5
ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2545,7 +2573,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2549 "configure"
#line 2577 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2556,7 +2584,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2578,7 +2606,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
echo "configure:2582: checking for opendir in -lx" >&5
echo "configure:2610: checking for opendir in -lx" >&5
ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -2586,7 +2614,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
#line 2590 "configure"
#line 2618 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -2597,7 +2625,7 @@ int main() {
opendir()
; return 0; }
EOF
if { (eval echo configure:2601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -2626,12 +2654,12 @@ fi
for ac_func in valloc
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2630: checking for $ac_func" >&5
echo "configure:2658: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2635 "configure"
#line 2663 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2654,7 +2682,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2685,12 +2713,12 @@ done
for ac_func in times
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2689: checking for $ac_func" >&5
echo "configure:2717: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2694 "configure"
#line 2722 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2713,7 +2741,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2744,12 +2772,12 @@ done
for ac_func in shmctl
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2748: checking for $ac_func" >&5
echo "configure:2776: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2753 "configure"
#line 2781 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2772,7 +2800,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2799,12 +2827,12 @@ done
for ac_func in mmap
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2803: checking for $ac_func" >&5
echo "configure:2831: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2808 "configure"
#line 2836 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2827,7 +2855,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2858,12 +2886,12 @@ done
for ac_func in inet_aton
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2862: checking for $ac_func" >&5
echo "configure:2890: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2867 "configure"
#line 2895 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2886,7 +2914,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2917,12 +2945,12 @@ done
for ac_func in strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2921: checking for $ac_func" >&5
echo "configure:2949: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2926 "configure"
#line 2954 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -2945,7 +2973,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:2949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:2977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@ -2976,12 +3004,12 @@ done
for ac_func in register_printf_function
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:2980: checking for $ac_func" >&5
echo "configure:3008: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2985 "configure"
#line 3013 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@ -3004,7 +3032,7 @@ $ac_func();
; return 0; }
EOF
if { (eval echo configure:3008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
if { (eval echo configure:3036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else

View file

@ -218,8 +218,8 @@ AC_CHECK_FUNCS(statvfs)
# These two headers (functions) needed by Time.m
#--------------------------------------------------------------------
dnl AC_REPLACE_FUNCS(getrusage gettimeofday)
AC_CHECK_HEADER(sys/time.h)
AC_CHECK_HEADER(sys/resource.h)
AC_CHECK_HEADERS(sys/time.h)
AC_CHECK_HEADERS(sys/resource.h)
if test $ac_cv_header_sys_time_h = no -o $ac_cv_header_sys_resource_h = no ; then
AC_MSG_ERROR(Could not find headers needed by class Time)
@ -230,8 +230,8 @@ AC_CHECK_HEADERS(sys/rusage.h ucbinclude/sys/resource.h)
#--------------------------------------------------------------------
# These headers/functions needed by SocketPort.m
#--------------------------------------------------------------------
AC_CHECK_HEADER(sys/socket.h)
AC_CHECK_HEADER(netinet/in.h)
AC_CHECK_HEADERS(sys/socket.h)
AC_CHECK_HEADERS(netinet/in.h)
dnl AC_REPLACE_FUNCS(recvfrom)
if test $ac_cv_header_sys_socket_h = no -o $ac_cv_header_netinet_in_h = no ; then

View file

@ -1,96 +0,0 @@
GCC University of Rochester Dept. of Computer Science 5/27/93
Disclaims GNU Objective-C Collection Library.
GCC Robert Andrew McCallum (US, 1967) 5/26/93
Assigns GNU Objective-c Collection.
GCC Adam Fedor 7/11/94
Disclaims changes to GNU Objective-C Class Library.
GCC NeXT Computer, Inc. 7/22/94
Disclaims changes made by Kresten Krab Thorup to the GNU Objective-C Class
Library.
GCC Kresten Krab Thorup 7/22/94
Disclaims changes to GNU Objective-C Class Library.
GCC Robert Andrew McCallum (US,1967) 8/16/94
Assigns GNU Objective-C Class Library.
GCC Univ. of Rochester Dept of Computer Science 7/8/94
Disclaims GNU Objective-C Class Library by Robert Andrew McCallum.
GCC Mark Lakata 1/12/95
Disclaims changes to the Objective C Class Library.
GCC Jeremy R Bettis US no date 4/1/95
Assigns past and future changes to the Objective C Class Library.
OBJC Martin Michlmayr Austria 1979 4/19/95
Assigns past and future changes the GNU Objective C Class
Library(libobjects).
GCC European Molecular Biology Lab 8/5/95
Disclaims changes by Georg G Tuparev to the GNU Objective
C Class Library (libobjects).
OBJC Georg G Tuparev Bulgarian 1963 8/5/95
Assigns past and future changes to Kit Classes.
tuparev@EMBL-Heidelberg.de
OBJC University of Prince Edward Island 8/23/95
Disclaims changes to libobjects by Perter Burka.
OBJC Perter Burka Canada 1975 8/23/95
Assigns past and future changes.
peter@bert.psyc.upei.ca
GCC W Allan Clearwaters US, no date 10/18/95
Assigns past and future changes to Objective C Class Library.
GCC Helitune Ltd 10/20/95
Disclaims changes to Objective C Class Library made by Allan Clearwaters.
GCC Scott Christley ? 12/21/95
Assigns changes to Objective-C runtime.
GCC Ohio Carbon Blank Inc. 12/21/95
Disclaims changes to Objective-C runtime by employees.
GNUSTEP Niels Moller Sweden 1971 2/5/96
Assigns past and future changes.
nisse@lysator.liu.se
GNUSTEP Pascal Forget Canada 1970 2/14/96
Assigns AppKit.
pascal@wsc.com
GNUSTEP Hutchinson Avenue Software Corp. 2/14/96
Disclaims AppKit.
GNUSTEP Pascal Forget Canada 1970 2/14/96
Assigns past and future changes.
pascal@wsc.com
GNUSTEP Nathan Urban US 1975 4/12/96
Assigns past and future changes
(NSArray.m, NSData.m, NSDictionary.m, NSString.m,
propertyList.l, propertyList.y).
nurban@vt.edu
GNUSTEP Luke Howard Australia ? 1996-11-26
Assigns past and future changes (NSHost.m, NSHost.h).
lukeh@xedoc.com.au
GNUSTEP Stevo Crvenkovski Macedonia ? 1997-03-10
Assigns past and future changes (NSGString.m).
stevoc@lotus.mpt.com.mk
GNUSTEP Ovidiu Cristian Predescu and Mircea Ion Oancea Romania 1969, 1970
1996-08-01
Assigns Database Library and future changes.
ovidiu@xpro.pcnet.ro, mircea@jupiter.elcom.pub.ro
GNUSTEP Alfredo Kengi Kojima Brazil 1976 1997-05-21
Assigns past and future changes.
kojima@inf.ufrgs.br