Debian Codegraph @

contrib/dgux_notes

raw
1 Date: Sun, 15 Aug 1999 22:29:56 -0700 (PDT)
2 From: Takis Psarogiannakopoulos
3 Subject: DG/UX dmalloc
4
5 Dear Gray,
6
7 I am writing this relating to the DG/ux port (ix86) of dmalloc
8 library. I am responsible for the DG/ux X11R6.3 and I am designing a
9 new Xserver with multiple threads, so I want to use your dmalloc, as a
10 replacemnet for the crap system DG/ux library. I am curious who wrote
11 to you that dmalloc (as is) will work in DG/ux. Firstly the threads
12 library for DG/ux "-lthread ", (configure , configure.in) should be
13 something like
14
15 AC_CHECK_LIB(thread, __d10_pthread_mutex_init, LIBTHREAD="-lthread"
16 DG_THREAD_FLAG="-D_POSIX4A_DRAFT10_SOURCE")
17
18 (there is no pthread_create , pthread_mutex_init or ... inside
19 -lthread)
20
21 and the functions sould be detected by , say,
22
23 AC_CHECK_FUNCS(__d10_pthread_mutex_init) ...etc
24
25 As the DG/ux header pthread.h is _not_ a desent one , we need probably
26 to define somewhere (in conf.h.in ?) something like
27
28 #if defined(DGUX)
29 #include <pthread.h>
30 #define _USING_POSIX4A_DRAFT10 1
31 #endif
32
33 and then
34
35 #define __d10_pthread_mutex_init mutex_init
36
37 etc ... (for the others).
38
39 Also in the above AC_CHECK_LIB(thread ...) to add (for the _d10__xxx
40 of DG/ux) a special flag like
41
42 DG_THREAD_FLAG="-D_POSIX4A_DRAFT10_SOURCE"
43
44 (as I did already)
45
46 which we want to append in the Makefile as
47
48 AC_SUBST(DG_THREAD_FLAG)
49
50 and add it to the standard CFLAGS as
51
52 DG_THREAD_FLAG = @DG_THREAD_FLAG@
53
54 CFLAGS = ... $(DG_THREAD_FLAG)
55
56 so it will be empty for other OS ...
57
58 I confess these are not great changes, but as dmalloc is it will not
59 detect lthread, and also neither of the pthread functions!
60
61 Finnaly the correct CFLAGS for DG/ux are
62
63 -DDGUX -D_DGUX_SOURCE -D_POSIX4A_DRAFT10_SOURCE
64
65 but I guess one can pass these to configure when it executes
66 it. However looking for the header dg_sys_info.h (which obviously is a
67 DG/ux particular header , not in any other OS) like
68
69 AC_CHECK_HEADER(dg_sys... )
70
71 we can have in the configure.in something like $ac_is_dgux=yes,no and
72 accordingly set the DG/ux CFLAGS, so the user doesnt need to know the
73 correct configuration command. If you want me to submit a patch drop
74 me an e-mail.
75
76 Regards,
77 Takis