Subversion Repositories tendra.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 7u83 1
#   		 Crown Copyright (c) 1997
2
#   
3
#   This TenDRA(r) Computer Program is subject to Copyright
4
#   owned by the United Kingdom Secretary of State for Defence
5
#   acting through the Defence Evaluation and Research Agency
6
#   (DERA).  It is made available to Recipients with a
7
#   royalty-free licence for its use, reproduction, transfer
8
#   to other parties and amendment for any purpose not excluding
9
#   product development provided that any such use et cetera
10
#   shall be deemed to be acceptance of the following conditions:-
11
#   
12
#       (1) Its Recipients shall ensure that this Notice is
13
#       reproduced upon any copies or amended versions of it;
14
#   
15
#       (2) Any amended version of it shall be clearly marked to
16
#       show both the nature of and the organisation responsible
17
#       for the relevant amendment or amendments;
18
#   
19
#       (3) Its onward transfer from a recipient to another
20
#       party shall be deemed to be that party's acceptance of
21
#       these conditions;
22
#   
23
#       (4) DERA gives no warranty or assurance as to its
24
#       quality or suitability for any purpose and DERA accepts
25
#       no liability whatsoever in relation to any use to which
26
#       it may be put.
27
#
28
+USE "xpg3", "sys/types.h" ;
29
+USE "xpg3", "sys/ipc.h" ;
30
 
31
+SUBSET "shm_proto" := {
32
    +USE "xpg3", "sys/types.h" ;
33
    +USE "xpg3", "sys/ipc.h" ;
34
 
35
    +EXP int SHMLBA ;
36
    +CONST int SHM_RDONLY, SHM_RND ;
37
 
38
    /* This is unsigned short in xpg3, unsigned long in sysv */
39
    +IF %% __STRICT_SYSV %%
40
    +TYPEDEF unsigned long ~shm_nattch_t ;
41
    +ELSE
42
    +IF %% __STRICT_XPG3 %%
43
    +TYPEDEF unsigned short ~shm_nattch_t.1 ;
44
    +ELSE
45
    +TYPE ( int ) ~shm_nattch_t.2 ;
46
    +ENDIF
47
    +ENDIF
48
 
49
    /* This type has been abstracted */
50
    +IF %% __STRICT_XPG3 %%
51
    +TYPEDEF pid_t ~shm_pid_t ;
52
    +ELSE
53
    +TYPE ( int ) ~shm_pid_t.1 ;
54
    +ENDIF
55
 
56
    +TYPE struct shmid_ds ;
57
    +FIELD struct shmid_ds {
58
	struct ipc_perm shm_perm ;
59
	int shm_segsz ;
60
	~shm_pid_t shm_lpid ;
61
	~shm_pid_t shm_cpid ;
62
	~shm_nattch_t shm_nattch ;
63
	time_t shm_atime ;
64
	time_t shm_dtime ;
65
	time_t shm_ctime ;
66
    } ;
67
 
68
    +IFNDEF ~building_libs
69
    +FUNC int shmctl ( int, int, struct shmid_ds * ) ;
70
    +ELSE
71
    +FUNC int __old_shmctl | shmctl.1 ( int, int, struct shmid_ds * ) ;
72
%%%
73
#define __old_shmctl( A, B, C )		shmctl ( A, B, C )
74
%%%
75
    +ENDIF
76
} ;
77
 
78
+IFNDEF ~building_libs
79
+FUNC char *shmat ( int, char *, int ) ;
80
+FUNC int shmdt ( char * ) ;
81
+FUNC int shmget ( key_t, int, int ) ;
82
+ELSE
83
+FUNC char *__old_shmat | shmat.1 ( int, char *, int ) ;
84
+FUNC int __old_shmdt | shmdt.1 ( char * ) ;
85
+FUNC int __old_shmget | shmget.1 ( key_t, int, int ) ;
86
%%%
87
#define __old_shmat( A, B, C )		shmat ( A, B, C )
88
#define __old_shmdt( A )		shmdt ( A )
89
#define __old_shmget( A, B, C )		shmget ( A, B, C )
90
%%%
91
+ENDIF