FreeWRL / FreeX3D 4.3.0
system.h
1/*********************************************************************
2 *
3 * FreeWRL SoundServer engine
4 *
5 *********************************************************************/
6
7/****************************************************************************
8 This file is part of the FreeWRL/FreeX3D Distribution.
9
10 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
11
12 FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
13 it under the terms of the GNU Lesser Public License as published by
14 the Free Software Foundation, either version 3 of the License, or
15 (at your option) any later version.
16
17 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
21
22 You should have received a copy of the GNU General Public License
23 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
24****************************************************************************/
25
26
27
28#ifndef __FREEWRL_SND_SYSTEM_H__
29#define __FREEWRL_SND_SYSTEM_H__
30
31
32#if STDC_HEADERS
33# include <stdio.h>
34# include <stdlib.h>
35# include <string.h>
36#else
37# if !HAVE_STRCHR
38# define strchr index
39# define strrchr rindex
40# endif
41char *strchr (), *strrchr ();
42# if !HAVE_MEMCPY
43# define memcpy(d, s, n) bcopy ((s), (d), (n))
44# define memmove(d, s, n) bcopy ((s), (d), (n))
45# endif
46#endif
47
48#if HAVE_STDBOOL_H
49# include <stdbool.h>
50#else
51# if ! HAVE__BOOL
52# ifdef __cplusplus
53typedef bool _Bool;
54# else
55typedef unsigned char _Bool;
56# endif
57# endif
58# define bool _Bool
59# define false 0
60# define true 1
61# define __bool_true_false_are_defined 1
62#endif
63
64#define BOOL _Bool
65#define TRUE 1
66#define FALSE 0
67
68#if HAVE_UNISTD_H
69# if HAVE_SYS_TYPES_H
70# include <sys/types.h>
71# endif
72# include <unistd.h>
73#endif
74
75#if HAVE_SYS_WAIT_H
76# include <sys/wait.h>
77#endif
78#ifndef WEXITSTATUS
79# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
80#endif
81#ifndef WIFEXITED
82# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
83#endif
84
85#if HAVE_FCNTL_H
86# include <fcntl.h>
87#endif
88
89#if HAVE_SYS_IPC_H
90# include <sys/ipc.h>
91#endif
92
93#if HAVE_SYS_MSG_H
94# include <sys/msg.h>
95#endif
96
97#if HAVE_SYS_IOCTL_H
98# include <sys/ioctl.h>
99#endif
100
101#include <linux/soundcard.h>
102
103
104#endif /* __FREEWRL_SND_SYSTEM_H__ */