Fix to include config.h in all cases

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@13490 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2002-04-18 06:02:22 +00:00
parent 45ebb23d43
commit df34be2951
3 changed files with 49 additions and 8 deletions

View file

@ -1,3 +1,7 @@
2002-04-17 Richard Frith-Macdonald <rfm@gnu.org>
* Tools/gdomap.c: re-order headers so config.h is used on windoze
2002-04-16 Richard Frith-Macdonald <rfm@gnu.org>
* config/config.reuseaddr.c: New test for broken SO_REUSEADDR

View file

@ -28,11 +28,17 @@ id foo = @"NotificationTestFoo";
int main ()
{
id o1 = [NSObject new];
id observer1 = [Observer new];
id o1;
id observer1;
id arp;
arp = [NSAutoreleasePool new];
NSLog(@"Make string object");
o1 = [NSString new];
NSLog(@"Make Observer object");
observer1 = [Observer new];
NSLog(@"Add observer to process centre");
[[NSNotificationCenter defaultCenter]
addObserver: observer1
@ -40,24 +46,54 @@ int main ()
name: foo
object: o1];
NSLog(@"Add observer to distributed centre");
[[NSDistributedNotificationCenter defaultCenter]
addObserver: observer1
selector: @selector(gotNotificationFoo:)
name: foo
object: o1];
NSLog(@"Add observer to process centre");
[[NSNotificationCenter defaultCenter]
addObserver: observer1
selector: @selector(gotNotificationFooNoObject:)
name: foo
object: nil];
NSLog(@"Add observer to distributed centre");
[[NSDistributedNotificationCenter defaultCenter]
addObserver: observer1
selector: @selector(gotNotificationFooNoObject:)
name: foo
object: nil];
NSLog(@"Post to process centre");
/* This will cause two messages to be printed, one for each request above. */
[[NSNotificationCenter defaultCenter]
postNotificationName: foo
object: o1];
NSLog(@"Post to distributed centre");
/* This will cause two messages to be printed, one for each request above. */
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName: foo
object: o1];
NSLog(@"Post to process centre");
/* This will cause one message to be printed. */
[[NSNotificationCenter defaultCenter]
postNotificationName: foo
object: nil];
NSLog(@"Post to distributed centre");
/* This will cause one message to be printed. */
[[NSDistributedNotificationCenter defaultCenter]
postNotificationName: foo
object: nil];
NSLog(@"Remove observer from process centre");
[[NSNotificationCenter defaultCenter]
removeObserver: observer1
name: nil

View file

@ -43,6 +43,7 @@
#include <string.h> /* for strchr() */
#include <ctype.h> /* for strchr() */
#include <fcntl.h>
#include "config.h"
#ifdef __MINGW__
#include <winsock2.h>
#include <ws2tcpip.h>
@ -56,7 +57,6 @@
#include <signal.h>
#include <sys/socket.h>
#include <sys/file.h>
#include "config.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
@ -64,6 +64,9 @@
#include <pwd.h>
#endif
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
/*
* Stuff for setting the sockets into non-blocking mode.
@ -93,10 +96,6 @@
#include <syslog.h>
#endif
#if HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "gdomap.h"
/*
* ABOUT THIS PROGRAM
@ -174,8 +173,10 @@ static void queue_probe(struct in_addr* to, struct in_addr *from,
int num_extras, struct in_addr* extra, int is_reply);
#if (defined __MINGW__)
#ifdef __MINGW__
/* A simple implementation of getopt() */
static int
indexof(char c, char *string)
{