File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 11
11
* Portions Copyright (c) 1994, Regents of the University of California
12
12
*
13
13
* IDENTIFICATION
14
- * $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.2 2002/05/05 01:03:26 tgl Exp $
14
+ * $Header: /cvsroot/pgsql/src/backend/port/posix_sema.c,v 1.3 2002/05/05 16: 01:50 tgl Exp $
15
15
*
16
16
*-------------------------------------------------------------------------
17
17
*/
@@ -72,8 +72,14 @@ PosixSemaphoreCreate(void)
72
72
73
73
mySem = sem_open (semname , O_CREAT | O_EXCL ,
74
74
(mode_t ) IPCProtection , (unsigned ) 1 );
75
+
76
+ #ifdef SEM_FAILED
75
77
if (mySem != (sem_t * ) SEM_FAILED )
76
78
break ;
79
+ #else
80
+ if (mySem != (sem_t * ) (-1 ))
81
+ break ;
82
+ #endif
77
83
78
84
/* Loop if error indicates a collision */
79
85
if (errno == EEXIST || errno == EACCES || errno == EINTR )
@@ -82,7 +88,7 @@ PosixSemaphoreCreate(void)
82
88
/*
83
89
* Else complain and abort
84
90
*/
85
- fprintf (stderr , "PosixSemaphoreCreate: sem_open(%s ) failed: %s\n" ,
91
+ fprintf (stderr , "PosixSemaphoreCreate: sem_open(\"%s\" ) failed: %s\n" ,
86
92
semname , strerror (errno ));
87
93
proc_exit (1 );
88
94
}
You can’t perform that action at this time.
0 commit comments