cvs: /php3 ChangeLog /php3/functions sysvsem.c
| From: | Sascha Schumann | Date: | Wed, 25 Aug 1999 16:56:52 +0000 |
| Subject: | cvs: /php3 ChangeLog /php3/functions sysvsem.c | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-10192@lists.php.net to get a copy of this message | ||
sas Wed Aug 25 12:56:52 1999 EDT
Modified files:
/php3 ChangeLog
/php3/functions sysvsem.c
Log:
sync with PHP4
Index: php3/ChangeLog
diff -u php3/ChangeLog:1.745 php3/ChangeLog:1.746
--- php3/ChangeLog:1.745 Wed Aug 25 12:11:41 1999
+++ php3/ChangeLog Wed Aug 25 12:56:51 1999
@@ -2,6 +2,7 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
???? ??, 1999, Version 3.0.13
+- Fixed sem_get() on AIX (Sascha)
- Removed --with-shared-apache to avoid problems with Apache 1.3.9 (Sascha)
- Improved speed of uniqid() by using the combined LCG and removing
the extra usleep() (Sascha)
Index: php3/functions/sysvsem.c
diff -u php3/functions/sysvsem.c:1.6 php3/functions/sysvsem.c:1.7
--- php3/functions/sysvsem.c:1.6 Wed May 19 08:55:45 1999
+++ php3/functions/sysvsem.c Wed Aug 25 12:56:52 1999
@@ -27,7 +27,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sysvsem.c,v 1.6 1999/05/19 12:55:45 sas Exp $ */
+/* $Id: sysvsem.c,v 1.7 1999/08/25 16:56:52 sas Exp $ */
/* This has been built and tested on Solaris 2.6 and Linux 2.1.122.
* It may not compile or execute correctly on other systems.
@@ -137,7 +137,12 @@
return SUCCESS;
}
+#define SETVAL_WANTS_PTR
+#if defined(_AIX)
+#undef SETVAL_WANTS_PTR
+#endif
+
/* {{{ proto int sem_get(int key [, int max_acquire [, int perm]])
Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes
to acquire it simultaneously. */
void php3_sysvsem_get(INTERNAL_FUNCTION_PARAMETERS)
@@ -253,9 +258,14 @@
if (semctl(semid, SYSVSEM_SEM, SETVAL, semarg) == -1) {
php3_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
}
-#else
+#elif defined(SETVAL_WANTS_PTR)
/* This is correct for Solaris 2.6 which does not have union semun. */
if (semctl(semid, SYSVSEM_SEM, SETVAL, &max_acquire) == -1) {
+ php3_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
+ }
+#else
+ /* This works for i.e. AIX */
+ if (semctl(semid, SYSVSEM_SEM, SETVAL, max_acquire) == -1) {
php3_error(E_WARNING, "semctl(SETVAL) failed for key 0x%x: %s", key, strerror(errno));
}
#endif