1/*
2**  GNU Pth - The GNU Portable Threads
3**  Copyright (c) 1999-2006 Ralf S. Engelschall <rse@engelschall.com>
4**
5**  This file is part of GNU Pth, a non-preemptive thread scheduling
6**  library which can be found at http://www.gnu.org/software/pth/.
7**
8**  This library is free software; you can redistribute it and/or
9**  modify it under the terms of the GNU Lesser General Public
10**  License as published by the Free Software Foundation; either
11**  version 2.1 of the License, or (at your option) any later version.
12**
13**  This library is distributed in the hope that it will be useful,
14**  but WITHOUT ANY WARRANTY; without even the implied warranty of
15**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16**  Lesser General Public License for more details.
17**
18**  You should have received a copy of the GNU Lesser General Public
19**  License along with this library; if not, write to the Free Software
20**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
21**  USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
22**
23**  pth_p.h: Pth private API definitions
24*/
25
26#ifndef _PTH_P_H_
27#define _PTH_P_H_
28
29/* mandatory system headers */
30#include <stdio.h>
31#include <stdlib.h>
32#include <stdarg.h>
33#include <string.h>
34#include <setjmp.h>
35#include <signal.h>
36#include <unistd.h>
37#include <fcntl.h>
38#include <errno.h>
39#include <ctype.h>
40#include <sys/types.h>
41#include <sys/time.h>
42#include <sys/wait.h>
43#include <sys/stat.h>
44#include <sys/socket.h>
45#include <time.h>
46
47/* library version */
48#define PTH_INTERNAL_VERSION @PTH_VERSION_HEX@
49
50/* public API headers */
51#define _PTH_PRIVATE
52#include "pth.h"
53#undef _PTH_PRIVATE
54
55/* autoconf defines and macros */
56#include "pth_acdef.h"
57#include "pth_acmac.h"
58
59/* optional system headers */
60#ifdef HAVE_SYS_RESOURCE_H
61#include <sys/resource.h>
62#endif
63#ifdef HAVE_NET_ERRNO_H
64#include <net/errno.h>
65#endif
66#ifdef HAVE_DLFCN_H
67#include <dlfcn.h>
68#endif
69
70/* dmalloc support */
71#ifdef PTH_DMALLOC
72#include <dmalloc.h>
73#endif
74
75/* OSSP ex support */
76#ifdef PTH_EX
77#define __EX_NS_USE_CUSTOM__
78#include "ex.h"
79#endif
80
81/* paths */
82#ifdef HAVE_PATHS_H
83#include <paths.h>
84#endif
85#ifdef _PATH_BSHELL
86#define PTH_PATH_BINSH _PATH_BSHELL
87#else
88#define PTH_PATH_BINSH "/bin/sh"
89#endif
90
91/* non-blocking flags */
92#ifdef  O_NONBLOCK
93#define O_NONBLOCKING O_NONBLOCK
94#else
95#ifdef  O_NDELAY
96#define O_NONBLOCKING O_NDELAY
97#else
98#ifdef  FNDELAY
99#define O_NONBLOCKING FNDELAY
100#else
101#error "No O_NONBLOCK, O_NDELAY or FNDELAY flag available!"
102#endif
103#endif
104#endif
105
106/* fallback definition for fdset_t size */
107#if !defined(FD_SETSIZE)
108#define FD_SETSIZE 1024
109#endif
110
111/* fallback definition for struct timespec */
112#ifndef HAVE_STRUCT_TIMESPEC
113struct timespec {
114    time_t  tv_sec;     /* seconds */
115    long    tv_nsec;    /* and nanoseconds */
116};
117#endif
118
119/* compiler happyness: avoid ``empty compilation unit'' problem */
120#define COMPILER_HAPPYNESS(name) \
121    int __##name##_unit = 0;
122
123/* generated contents */
124BEGIN_DECLARATION
125==#==
126END_DECLARATION
127
128#endif /* _PTH_P_H_ */
129
130