[SCM] Samba Shared Repository - branch master updated - tevent-0-9-8-392-gcce3e66
Matthias Dieter Wallnöfer
mdw at samba.org
Thu Sep 17 01:51:29 MDT 2009
The branch, master has been updated
via cce3e66665b30b3d0bf44e892aa88dfb73e6c167 (commit)
from aa7aa664dcf8753c7d17b39094f6eb981a154756 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit cce3e66665b30b3d0bf44e892aa88dfb73e6c167
Author: Matt Kraai <mkraai at beckman.com>
Date: Wed Sep 16 16:04:02 2009 -0700
Port the Samba 4 shm_setup to QNX.
-----------------------------------------------------------------------
Summary of changes:
source4/torture/util_smb.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
mode change 100644 => 100755 source4/torture/util_smb.c
Changeset truncated at 500 lines:
diff --git a/source4/torture/util_smb.c b/source4/torture/util_smb.c
old mode 100644
new mode 100755
index 1c50694..99b00d2
--- a/source4/torture/util_smb.c
+++ b/source4/torture/util_smb.c
@@ -257,6 +257,23 @@ void *shm_setup(int size)
int shmid;
void *ret;
+#ifdef __QNXNTO__
+ shmid = shm_open("private", O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+ if (shmid == -1) {
+ printf("can't get shared memory\n");
+ exit(1);
+ }
+ shm_unlink("private");
+ if (ftruncate(shmid, size) == -1) {
+ printf("can't set shared memory size\n");
+ exit(1);
+ }
+ ret = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, shmid, 0);
+ if (ret == MAP_FAILED) {
+ printf("can't map shared memory\n");
+ exit(1);
+ }
+#else
shmid = shmget(IPC_PRIVATE, size, SHM_R | SHM_W);
if (shmid == -1) {
printf("can't get shared memory\n");
@@ -275,6 +292,7 @@ void *shm_setup(int size)
See Stevens "advanced programming in unix env" for details
*/
shmctl(shmid, IPC_RMID, 0);
+#endif
return ret;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list