Skip site navigation (1) Skip section navigation (2)

postmaster.c doesn't compile on win32

From: "Thomas Hallgren" <thhal(at)mailblocks(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: postmaster.c doesn't compile on win32
Date: 2004-05-28 08:00:29
Message-ID: c96rge$1g0k$1@news.hub.org (view raw or flat)
Thread:
Lists: pgsql-patches
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;


Responses

pgsql-patches by date

Next:From: Thomas HallgrenDate: 2004-05-28 08:04:51
Subject: Link errors on win32
Previous:From: Serguei MokhovDate: 2004-05-28 06:35:05
Subject: Russian translation updates for 7.5

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group