Index: src/bin/pg_ctl/pg_ctl.c
===================================================================
RCS file: /cvsroot/pgsql/src/bin/pg_ctl/pg_ctl.c,v
retrieving revision 1.39
diff -c -c -r1.39 pg_ctl.c
*** src/bin/pg_ctl/pg_ctl.c	16 Oct 2004 03:10:14 -0000	1.39
--- src/bin/pg_ctl/pg_ctl.c	16 Oct 2004 03:29:22 -0000
***************
*** 23,28 ****
--- 23,30 ----
  
  #if defined(__CYGWIN__)
  #include <windows.h>
+ /* Cygwin defines WIN32 in windows.h, but we don't want it. */
+ #undef WIN32
  #endif
  
  #ifndef HAVE_OPTRESET
***************
*** 333,339 ****
  	 * http://dev.remotenetworktechnology.com/cmd/cmdfaq.htm
  	 */
  	if (log_file != NULL)
! #if !defined(WIN32) && !defined(__CYGWIN__)
  		snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1 &%s",
  #else
  		snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" >> \"%s\" 2>&1%s",
--- 335,341 ----
  	 * http://dev.remotenetworktechnology.com/cmd/cmdfaq.htm
  	 */
  	if (log_file != NULL)
! #if !defined(WIN32)	/* Cygwin doesn't have START */
  		snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" >> \"%s\" 2>&1 &%s",
  #else
  		snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" >> \"%s\" 2>&1%s",
***************
*** 341,347 ****
  				 SYSTEMQUOTE, postgres_path, pgdata_opt, post_opts,
  				 DEVNULL, log_file, SYSTEMQUOTE);
  	else
! #if !defined(WIN32) && !defined(__CYGWIN__)
  		snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" 2>&1 &%s",
  #else
  		snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" 2>&1%s",
--- 343,349 ----
  				 SYSTEMQUOTE, postgres_path, pgdata_opt, post_opts,
  				 DEVNULL, log_file, SYSTEMQUOTE);
  	else
! #if !defined(WIN32)	/* Cygwin doesn't have START */
  		snprintf(cmd, MAXPGPATH, "%s\"%s\" %s%s < \"%s\" 2>&1 &%s",
  #else
  		snprintf(cmd, MAXPGPATH, "%sSTART /B \"\" \"%s\" %s%s < \"%s\" 2>&1%s",
