Thread: postmaster.c doesn't compile on win32

postmaster.c doesn't compile on win32

From
"Thomas Hallgren"
Date:
The CVS HEAD of postmaster.c doesn't compile on win32 . Here's a patch that
removes some warnings and typos.

Regards,

Thomas Hallgren

Index: src/backend/postmaster/postmaster.c
===================================================================
RCS file:
/projects/cvsroot/pgsql-server/src/backend/postmaster/postmaster.c,v
retrieving revision 1.398
diff -u -r1.398 postmaster.c
--- src/backend/postmaster/postmaster.c 28 May 2004 05:12:58 -0000 1.398
+++ src/backend/postmaster/postmaster.c 28 May 2004 07:55:57 -0000
@@ -3520,7 +3520,7 @@

  ereport(WARNING,
    (errmsg_internal("unable to find backend entry with pid %d",
-        pid)));
+        (int)pid)));
 }

 #endif /* EXEC_BACKEND */
@@ -3533,7 +3533,6 @@
 {
  STARTUPINFO si;
  PROCESS_INFORMATION pi;
- char    *p;
  int   i;
  int   j;
  char  cmdLine[MAXPGPATH * 2];
@@ -3541,8 +3540,8 @@
  HANDLE  waiterThread;

  /* Format the cmd line */
- cmdline[sizeof(cmdLine)-1] = '\0';
- cmdline[sizeof(cmdLine)-2] = '\0';
+ cmdLine[sizeof(cmdLine)-1] = '\0';
+ cmdLine[sizeof(cmdLine)-2] = '\0';
  snprintf(cmdLine, sizeof(cmdLine)-1, "\"%s\"", path);
  i = 0;
  while (argv[++i] != NULL)
@@ -3550,7 +3549,7 @@
   j = strlen(cmdLine);
   snprintf(cmdLine+j, sizeof(cmdLine)-1-j, " \"%s\"", argv[i]);
  }
- if (cmdline[sizeof(cmdLine)-2] != '\0')
+ if (cmdLine[sizeof(cmdLine)-2] != '\0')
  {
   elog(LOG, "subprocess command line too long");
   return -1;


Re: postmaster.c doesn't compile on win32

From
Tom Lane
Date:
"Thomas Hallgren" <thhal@mailblocks.com> writes:
> The CVS HEAD of postmaster.c doesn't compile on win32 . Here's a patch that
> removes some warnings and typos.

Fixed ... sorry 'bout that.

(For future reference: I couldn't use your patch as-is because your
mailer converted all the tabs to spaces.  I'd suggest sending it as
an attachment next time.)

            regards, tom lane