mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
* msg.cc (msgctl): Raise SIGSYS if call not available.
(msgget): Ditto. (msgrcv): Ditto. (msgsnd): Ditto. * sem.cc (semctl): Ditto. (semget): Ditto. (semop): Ditto. * shm.cc (shmat): Ditto. (shmctl): Ditto. (shmget): Ditto. (shmdt): Ditto.
This commit is contained in:
parent
72f11cac65
commit
bd0e35213d
@ -1,3 +1,17 @@
|
||||
2003-11-20 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* msg.cc (msgctl): Raise SIGSYS if call not available.
|
||||
(msgget): Ditto.
|
||||
(msgrcv): Ditto.
|
||||
(msgsnd): Ditto.
|
||||
* sem.cc (semctl): Ditto.
|
||||
(semget): Ditto.
|
||||
(semop): Ditto.
|
||||
* shm.cc (shmat): Ditto.
|
||||
(shmctl): Ditto.
|
||||
(shmget): Ditto.
|
||||
(shmdt): Ditto.
|
||||
|
||||
2003-11-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* cygserver.h (client_request::request_code_t): Add
|
||||
|
@ -136,11 +136,14 @@ msgctl (int msqid, int cmd, struct msqid_ds *buf)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = msgctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -156,11 +159,14 @@ msgget (key_t key, int msgflg)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = msgget ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -180,11 +186,14 @@ msgrcv (int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = msgrcv ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.rcvval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -203,11 +212,14 @@ msgsnd (int msqid, const void *msgp, size_t msgsz, int msgflg)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = msgsnd ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
@ -115,11 +115,14 @@ semctl (int semid, int semnum, int cmd, ...)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -136,11 +139,14 @@ semget (key_t key, int nsems, int semflg)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -159,11 +165,14 @@ semop (int semid, struct sembuf *sops, size_t nsops)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = semctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
@ -204,6 +204,8 @@ shmat (int shmid, const void *shmaddr, int shmflg)
|
||||
UnmapViewOfFile (ptr);
|
||||
delete sph_entry;
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return NULL;
|
||||
}
|
||||
sph_entry->ptr = ptr;
|
||||
@ -214,6 +216,7 @@ shmat (int shmid, const void *shmaddr, int shmflg)
|
||||
return ptr;
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return NULL;
|
||||
#endif
|
||||
}
|
||||
@ -252,6 +255,8 @@ shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
if (cmd == IPC_RMID)
|
||||
@ -273,6 +278,7 @@ shmctl (int shmid, int cmd, struct shmid_ds *buf)
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -288,6 +294,8 @@ shmdt (const void *shmaddr)
|
||||
{
|
||||
syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
shm_attached_list *sph_entry, *sph_next_entry;
|
||||
@ -306,6 +314,7 @@ shmdt (const void *shmaddr)
|
||||
return request.retval ();
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
@ -330,6 +339,8 @@ shmget (key_t key, size_t size, int shmflg)
|
||||
syscall_printf ("-1 [%d] = shmctl ()", request.error_code ());
|
||||
delete ssh_new_entry;
|
||||
set_errno (request.error_code ());
|
||||
if (request.error_code () == ENOSYS)
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
}
|
||||
int shmid = request.retval (); /* Shared mem ID */
|
||||
@ -357,6 +368,7 @@ shmget (key_t key, size_t size, int shmflg)
|
||||
return shmid;
|
||||
#else
|
||||
set_errno (ENOSYS);
|
||||
raise (SIGSYS);
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user