1
In ptw32_InterlockedCompareExchange.c, I've added a section for
2
Borland's compiler; it's identical to that for the MS compiler except
3
that it uses /* ... */ comments instead of ; comments.
5
[RPJ: need to define HAVE_TASM32 in config.h to use the above.]
8
The other file is a makefile suitable for use with Borland's compiler
9
(run "make -fBmakefile" in the directory). It builds a single version
10
of the library, pthreadBC.dll and the corresponding pthreadBC.lib
11
import library, which is comparable to the pthreadVC version; I can't
12
personally see any demand for the versions that include structured or
13
C++ exception cancellation handling so I haven't attempted to build
14
those versions of the library. (I imagine a static version might be
15
of use to some, but we can't legally use that on my commercial
16
projects so I can't try that out, unfortunately.)
18
[RPJ: Added tests\Bmakefile as well.]
20
Borland C++ doesn't define the ENOSYS constant used by pthreads-win32;
21
rather than make more extensive patches to the pthreads-win32 source I
22
have a mostly-arbitrary constant for it in the makefile. However this
23
doesn't make it visible to the application using the library, so if
24
anyone actually wants to use this constant in their apps (why?)
25
someone might like to make a seperate NEED_BCC_something define to add
28
The makefile also #defines EDEADLK as EDEADLOCK, _timeb as timeb, and
29
_ftime as ftime, to deal with the minor differences between the two
30
RTLs' naming conventions, and sets the compiler flags as required to
31
get a normal compile of the library.
33
[RPJ: Moved errno values and _timeb etc to pthread.h, so apps will also
36
(While I'm on the subject, the reason Borland users should recompile
37
the library, rather than using the impdef/implib technique suggested
38
previously on the mailing list, is that a) the errno constants are
39
different, so the results returned by the pthread_* functions can be
40
meaningless, and b) the errno variable/pseudo-variable itself is
41
different in the MS & BCC runtimes, so you can't access the
42
pthreadVC's errno from a Borland C++-compiled host application
43
correctly - I imagine there are other potential problems from the RTL
46
[RPJ: Make sure you use the same RTL in both dll and application builds.
47
The dll and tests Bmakefiles use cw32mti.lib. Having some trouble with
48
memory read exceptions running the test suite using BCC55.]
54
Systems Architect, eCOSM Limited
55
Cell +64 21 655 443, office +64 3 365 4176