Index: src/backend/postmaster/postmaster.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v retrieving revision 1.309 diff -c -r1.309 postmaster.c *** src/backend/postmaster/postmaster.c 2003/03/24 22:40:14 1.309 --- src/backend/postmaster/postmaster.c 2003/03/27 00:47:38 *************** *** 85,90 **** --- 85,94 ---- #include #endif + #ifdef HAVE_RENDEZVOUS + #include + #endif + #include "catalog/pg_database.h" #include "commands/async.h" #include "lib/dllist.h" *************** *** 162,167 **** --- 166,175 ---- */ int ReservedBackends = 2; + #ifdef HAVE_RENDEZVOUS + /* service name */ + char *service_name = NULL; + #endif static char *progname = (char *) NULL; *************** *** 358,363 **** --- 366,382 ---- } + #ifdef HAVE_RENDEZVOUS + + /* reg_reply -- empty callback function for DNSServiceRegistrationCreate() */ + static void + reg_reply(DNSServiceRegistrationReplyErrorType errorCode, void *context) + { + + } + + #endif + int PostmasterMain(int argc, char *argv[]) { *************** *** 710,715 **** --- 729,746 ---- else elog(LOG, "IPv4 socket created"); } + #endif + #ifdef HAVE_RENDEZVOUS + if (service_name != NULL) + { + DNSServiceRegistrationCreate(service_name, + "_pgsql._tcp.", + "", + htonl(PostPortNumber), + "", + (DNSServiceRegistrationReply)reg_reply, + NULL); + } #endif } Index: src/backend/utils/misc/guc.c =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/misc/guc.c,v retrieving revision 1.117 diff -c -r1.117 guc.c *** src/backend/utils/misc/guc.c 2003/03/20 04:51:44 1.117 --- src/backend/utils/misc/guc.c 2003/03/27 00:47:40 *************** *** 832,837 **** --- 832,844 ---- "$user,public", assign_search_path, NULL }, + #ifdef HAVE_RENDEZVOUS + { + {"service_name", PGC_POSTMASTER}, &service_name, + NULL, NULL, NULL + }, + #endif + { {"server_encoding", PGC_USERSET}, &server_encoding_string, "SQL_ASCII", assign_server_encoding, show_server_encoding Index: src/include/miscadmin.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/miscadmin.h,v retrieving revision 1.117 diff -c -r1.117 miscadmin.h *** src/include/miscadmin.h 2003/03/20 04:51:44 1.117 --- src/include/miscadmin.h 2003/03/27 00:47:41 *************** *** 178,183 **** --- 178,184 ---- extern char *Unix_socket_group; extern char *UnixSocketDir; extern char *VirtualHost; + extern char *service_name; /***************************************************************************** Index: src/include/port/darwin.h =================================================================== RCS file: /projects/cvsroot/pgsql-server/src/include/port/darwin.h,v retrieving revision 1.5 diff -c -r1.5 darwin.h *** src/include/port/darwin.h 2001/10/28 06:26:08 1.5 --- src/include/port/darwin.h 2003/03/27 00:47:41 *************** *** 1,5 **** --- 1,7 ---- #define __darwin__ 1 + #define HAVE_RENDEZVOUS + #if defined(__ppc__) #define HAS_TEST_AND_SET #endif