Subject: Re: cygipc (and PostgreSQL) XP problem resolved!
From: Jason Tishler <[email-masked]>
To: Charles Wilson <[email-masked]>
Cc: [email-masked]
Date: Wed, 07 May 2003 09:33:26 -0400

Chuck,

On Tue, May 06, 2003 at 08:12:02PM -0400, Charles Wilson wrote:
> Jason Tishler wrote:
> >Are you willing to accept a cygipc patch to correct this problem?
> 
> Always.

See attached for the patch and associated ChangeLog entry.  IMO, I opted
for the least intrusive albeit somewhat ugly approach.  Is it
acceptable?  If not, can you suggest a better way to implement this
change?

Thanks,
Jason

-- 
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6
diff -rup cygipc-1.13-2.orig/include/IpcNtLit.h cygipc-1.13-2/include/IpcNtLit.h
--- cygipc-1.13-2.orig/include/IpcNtLit.h	2002-11-12 14:14:07.000000000 -0500
+++ cygipc-1.13-2/include/IpcNtLit.h	2003-05-07 07:23:41.000000000 -0400
@@ -48,24 +48,33 @@
 /************************************************************************/
 #if defined OLDCYGIPC
 # define CYGWIN_IPCNT_PKGNAME		"cygipc_"
-# define CYGWIN_IPCNT_SEMCTL		"MultiSemCtl_"
-# define CYGWIN_IPCNT_SEMSEM		"MultiSemSem_"
-# define CYGWIN_IPCNT_SEMSHM		"MultiSemShm_"
-# define CYGWIN_IPCNT_SEMMSG		"MultiSemMsg_"
+# define CYGWIN_IPCNT_SEMCTL_BASE	"MultiSemCtl_"
+# define CYGWIN_IPCNT_SEMSEM_BASE	"MultiSemSem_"
+# define CYGWIN_IPCNT_SEMSHM_BASE	"MultiSemShm_"
+# define CYGWIN_IPCNT_SEMMSG_BASE	"MultiSemMsg_"
 # define CYGWIN_IPCNT_FILESEM		"/tmp/MultiFileSem"
 # define CYGWIN_IPCNT_FILESHM		"/tmp/MultiFileShm"
 # define CYGWIN_IPCNT_FILEMSG		"/tmp/MultiFileMsg"
 #else
 # define CYGWIN_IPCNT_PKGNAME		"cygipc2_"
-# define CYGWIN_IPCNT_SEMCTL		"MultiSemCtl2_"
-# define CYGWIN_IPCNT_SEMSEM		"MultiSemSem2_"
-# define CYGWIN_IPCNT_SEMSHM		"MultiSemShm2_"
-# define CYGWIN_IPCNT_SEMMSG		"MultiSemMsg2_"
+# define CYGWIN_IPCNT_SEMCTL_BASE	"MultiSemCtl2_"
+# define CYGWIN_IPCNT_SEMSEM_BASE	"MultiSemSem2_"
+# define CYGWIN_IPCNT_SEMSHM_BASE	"MultiSemShm2_"
+# define CYGWIN_IPCNT_SEMMSG_BASE	"MultiSemMsg2_"
 # define CYGWIN_IPCNT_FILESEM		"/tmp/MultiFileSem2"
 # define CYGWIN_IPCNT_FILESHM		"/tmp/MultiFileShm2"
 # define CYGWIN_IPCNT_FILEMSG		"/tmp/MultiFileMsg2"
 #endif
 
+#define NAMESPACE_PREFIX "Global\\"
+#define FULL_NAMESPACE_PATH(name) \
+	((LOBYTE(LOWORD(GetVersion())) >= 5 && \
+	HIBYTE(LOWORD(GetVersion())) >= 1) ? NAMESPACE_PREFIX name : name) \
+
+#define CYGWIN_IPCNT_SEMCTL	FULL_NAMESPACE_PATH(CYGWIN_IPCNT_SEMCTL_BASE)
+#define CYGWIN_IPCNT_SEMSEM	FULL_NAMESPACE_PATH(CYGWIN_IPCNT_SEMSEM_BASE)
+#define CYGWIN_IPCNT_SEMSHM	FULL_NAMESPACE_PATH(CYGWIN_IPCNT_SEMSHM_BASE)
+#define CYGWIN_IPCNT_SEMMSG	FULL_NAMESPACE_PATH(CYGWIN_IPCNT_SEMMSG_BASE)
 /************************************************************************/
 /* SEMAPHORE								*/
 /************************************************************************/
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/