linux.cf: with fds_bits fixes, stop using _POSIX_C_SOURCE=199309L and _XOPEN_SOURCE...
[oweals/cde.git] / cde / config / cf / Threads.tmpl
1 XCOMM $XConsortium: Threads.tmpl /main/11 1996/09/28 16:07:06 rws $
2
3 /*
4  * For a multi-threaded application or library,
5  * Define LocalThreadsDefines in your Imakefile (unless you like the
6  * project default), then include this file.
7  * Everything else should be automatic. 
8  */
9
10 #ifndef LocalThreadsDefines
11 #ifdef ProjectThreadsDefines
12 #define LocalThreadsDefines ProjectThreadsDefines
13 #else
14 #define LocalThreadsDefines /**/
15 #endif
16 #endif
17
18 #ifndef LocalThreads
19 #ifdef ThreadedProject
20 #define LocalThreads ThreadedProject
21 #else
22 #define LocalThreads YES
23 #endif
24 #endif
25
26 #ifndef ThreadTypeDefines
27 #if HasCThreads
28 #define ThreadTypeDefines -DCTHREADS
29 #else
30 #define ThreadTypeDefines /**/
31 #endif
32 #endif
33 #ifndef SystemMTDefines
34 #define SystemMTDefines /**/
35 #endif
36 #ifndef LibraryMTDefines
37 #define LibraryMTDefines /**/
38 #endif
39 #ifndef HasThreadSafeAPI                /* does it have getpwnam_r, etc. */
40 #define HasThreadSafeAPI YES
41 #endif
42 #ifndef MTSafeAPIDefines
43 #if HasThreadSafeAPI
44 #define MTSafeAPIDefines -DXUSE_MTSAFE_API
45 #else
46 #define MTSafeAPIDefines /**/
47 #endif
48 #endif
49 #ifndef ThreadPreStdAPIDefines
50 #define ThreadPreStdAPIDefines /* nominally for POSIX P1003.4a (Draft 4) API */
51 #endif
52 #ifndef CplusplusSystemMTDefines
53 #define CplusplusSystemMTDefines /**/
54 #endif
55 #ifndef ThreadsCompileFlags
56 #define ThreadsCompileFlags /**/
57 #endif
58 #ifndef ThreadsCplusplusCompileFlags
59 #define ThreadsCplusplusCompileFlags /**/
60 #endif
61
62 #ifndef ThreadsLibraries
63 #define ThreadsLibraries /**/
64 #endif
65 #ifndef ThreadsCplusplusLibraries
66 #define ThreadsCplusplusLibraries /**/
67 #endif
68 #ifndef ThreadsLoadFlags
69 #define ThreadsLoadFlags ThreadsCompileFlags
70 #endif
71 #ifndef ThreadsCplusplusLoadFlags
72 #define ThreadsCplusplusLoadFlags ThreadsCplusplusCompileFlags
73 #endif
74
75 #if LocalThreads
76     THREADS_CFLAGS = ThreadsCompileFlags
77    THREADS_DEFINES = LocalThreadsDefines ThreadTypeDefines SystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
78    THREADS_LDFLAGS = ThreadsLoadFlags
79       THREADS_LIBS = ThreadsLibraries
80
81   THREADS_CXXFLAGS = ThreadsCplusplusCompileFlags
82 THREADS_CXXDEFINES = LocalThreadsDefines ThreadTypeDefines CplusplusSystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
83 THREADS_CXXLDFLAGS = ThreadsCplusplusLoadFlags
84    THREADS_CXXLIBS = ThreadsCplusplusLibraries
85 #endif