Index: pg_autovacuum.c =================================================================== RCS file: /projects/cvsroot/pgsql/contrib/pg_autovacuum/pg_autovacuum.c,v retrieving revision 1.27 diff -u -r1.27 pg_autovacuum.c --- pg_autovacuum.c 2 Dec 2004 22:48:10 -0000 1.27 +++ pg_autovacuum.c 20 Jan 2005 15:20:56 -0000 @@ -27,6 +27,7 @@ SERVICE_STATUS ServiceStatus; SERVICE_STATUS_HANDLE hStatus; int appMode = 0; +char deps[255]; #endif /* define atooid */ @@ -1073,6 +1074,7 @@ #ifndef WIN32 args->daemonize = 0; #else + args->service_dependencies = 0; args->install_as_service = 0; args->remove_as_service = 0; args->service_user = 0; @@ -1166,7 +1168,9 @@ exit(0); #ifdef WIN32 case 'E': - args->service_dependencies = optarg; + ZeroMemory(deps, sizeof(deps)); + snprintf(deps, sizeof(deps) - 2, "%s", optarg); + args->service_dependencies = (char *)deps; break; case 'I': args->install_as_service++; @@ -1359,7 +1363,7 @@ /* Register with the Service Control Manager */ static int -InstallService() +InstallService(void) { SC_HANDLE schService = NULL; SC_HANDLE schSCManager = NULL; @@ -1471,7 +1475,7 @@ /* Unregister from the Service Control Manager */ static int -RemoveService() +RemoveService(void) { SC_HANDLE schService = NULL; SC_HANDLE schSCManager = NULL;