semctl.c (288008) | semctl.c (297619) |
---|---|
1/*- 2 * Copyright (c) 2002 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28 29#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2002 Doug Rabson 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/lib/libc/gen/semctl.c 288008 2015-09-20 03:58:27Z rodrigc $"); | 30__FBSDID("$FreeBSD: head/lib/libc/gen/semctl.c 297619 2016-04-06 16:09:10Z andrew $"); |
31 | 31 |
32#ifndef NO_COMPAT7 |
|
32#define _WANT_SEMUN_OLD | 33#define _WANT_SEMUN_OLD |
34#endif |
|
33 34#include <sys/types.h> 35#include <sys/ipc.h> 36#include <sys/sem.h> 37#include <stdarg.h> 38#include <stdlib.h> 39 40int __semctl(int semid, int semnum, int cmd, union semun *arg); | 35 36#include <sys/types.h> 37#include <sys/ipc.h> 38#include <sys/sem.h> 39#include <stdarg.h> 40#include <stdlib.h> 41 42int __semctl(int semid, int semnum, int cmd, union semun *arg); |
43#ifndef NO_COMPAT7 |
|
41int freebsd7___semctl(int semid, int semnum, int cmd, union semun_old *arg); 42int freebsd7_semctl(int semid, int semnum, int cmd, ...); | 44int freebsd7___semctl(int semid, int semnum, int cmd, union semun_old *arg); 45int freebsd7_semctl(int semid, int semnum, int cmd, ...); |
46#endif |
|
43 44int 45semctl(int semid, int semnum, int cmd, ...) 46{ 47 va_list ap; 48 union semun semun; 49 union semun *semun_ptr; 50 --- 5 unchanged lines hidden (view full) --- 56 } else { 57 semun_ptr = NULL; 58 } 59 va_end(ap); 60 61 return (__semctl(semid, semnum, cmd, semun_ptr)); 62} 63 | 47 48int 49semctl(int semid, int semnum, int cmd, ...) 50{ 51 va_list ap; 52 union semun semun; 53 union semun *semun_ptr; 54 --- 5 unchanged lines hidden (view full) --- 60 } else { 61 semun_ptr = NULL; 62 } 63 va_end(ap); 64 65 return (__semctl(semid, semnum, cmd, semun_ptr)); 66} 67 |
68#ifndef NO_COMPAT7 |
|
64int 65freebsd7_semctl(int semid, int semnum, int cmd, ...) 66{ 67 va_list ap; 68 union semun_old semun; 69 union semun_old *semun_ptr; 70 71 va_start(ap, cmd); --- 5 unchanged lines hidden (view full) --- 77 semun_ptr = NULL; 78 } 79 va_end(ap); 80 81 return (freebsd7___semctl(semid, semnum, cmd, semun_ptr)); 82} 83 84__sym_compat(semctl, freebsd7_semctl, FBSD_1.0); | 69int 70freebsd7_semctl(int semid, int semnum, int cmd, ...) 71{ 72 va_list ap; 73 union semun_old semun; 74 union semun_old *semun_ptr; 75 76 va_start(ap, cmd); --- 5 unchanged lines hidden (view full) --- 82 semun_ptr = NULL; 83 } 84 va_end(ap); 85 86 return (freebsd7___semctl(semid, semnum, cmd, semun_ptr)); 87} 88 89__sym_compat(semctl, freebsd7_semctl, FBSD_1.0); |
90#endif |
|