diff --git a/Source/NSPortNameServer.m b/Source/NSPortNameServer.m index f85e5ba20..7f500eed7 100644 --- a/Source/NSPortNameServer.m +++ b/Source/NSPortNameServer.m @@ -49,6 +49,7 @@ #define stringify_it(X) #X #define make_gdomap_cmd(X) stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap &" #define make_gdomap_err(X) "check that " stringify_it(X) "/Tools/"GNUSTEP_TARGET_DIR"/gdomap is running and owned by root." +#define make_gdomap_port(X) stringify_it(X) /* * Private methods for internal use only. @@ -89,6 +90,10 @@ static NSPortNameServer *defaultServer = nil; { serverLock = [NSRecursiveLock new]; modes = [[NSArray alloc] initWithObjects: &mode count: 1]; +#ifdef GDOMAP_PORT_OVERRIDE + serverPort = [[NSString stringWithCString: + make_gdomap_port(GDOMAP_PORT_OVERRIDE)] retain]; +#endif } [gnustep_global_lock unlock]; } diff --git a/Tools/gdomap.h b/Tools/gdomap.h index 619533836..cdcdae586 100644 --- a/Tools/gdomap.h +++ b/Tools/gdomap.h @@ -214,8 +214,9 @@ typedef struct { * gdomap to another port, you can uncomment the next #define to * run gdomap on port 6006 (or modify this to a port of your choice). * - * When you have done this you must recompile gdomap.c and TcpPort.m - * and re-install the base library with the new TcpPort.o + * When you have done this you must recompile gdomap.c and + * NSPortNameServer.m and re-install the base library with + * the new NSPortNameServer.o */ /* #define GDOMAP_PORT_OVERRIDE 6006 */