home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / db02_src.zip / ipcproto.h < prev    next >
C/C++ Source or Header  |  1993-11-05  |  1KB  |  45 lines

  1. //
  2. // Prototypes for IPC operations.
  3. // Included for use in dumb systems without proper prototypes
  4. // - these are the linux versions.
  5. //
  6.  
  7. #ifndef ipc_protos_incl
  8. #define ipc_protos_incl
  9.  
  10. #ifdef ultrix
  11. extern "C" {
  12. key_t ftok(char*, char);
  13. }
  14. #endif
  15.  
  16. #if !defined(linux) && !defined(ultrix) && !defined(__CC)
  17.  
  18. struct shmid_ds;
  19. struct msgbuf;
  20. struct msqid_ds;
  21. struct sembuf;
  22.  
  23. #include <sys/types.h>
  24.  
  25. extern "C" {
  26.  
  27. extern key_t ftok (char *__pathname, char __proc_id);
  28. extern int shmctl (int __shmid, int __cmd, struct shmid_ds *__buf);
  29. extern int shmget (key_t __key, int __size, int __flag);
  30. extern char *shmat (int __shmid, char *__shmaddr, int __shmflg);
  31. extern int shmdt (char *__shmaddr);
  32. extern int msgget (key_t __key, int __msgflg);
  33. extern int msgsnd (int __msqid, struct msgbuf *__msgp, int __msgsz, 
  34.                int __msgflg);
  35. extern int msgrcv (int __msqid, struct msgbuf *__msgp, int __msgsz,
  36.                long __msgtyp, int __msgflg);
  37. extern int msgctl (int __msqid, int __cmd, struct msqid_ds *__buf);
  38. extern int semget (key_t __key, int __nsems, int __semflg);
  39. extern int semop (int __semid, struct sembuf *__sops, unsigned __nsops);
  40. extern int semctl (int __semid, int __semnum, int __cmd, 
  41.                union semun __arg);
  42. }
  43. #endif
  44. #endif
  45.