~ubuntu-branches/ubuntu/feisty/clamav/feisty

« back to all changes in this revision

Viewing changes to win32/3rdparty/pthreads/README.Borland

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2007-02-20 10:33:44 UTC
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20070220103344-zgcu2psnx9d98fpa
Tags: upstream-0.90
ImportĀ upstreamĀ versionĀ 0.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
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.
4
 
 
5
 
[RPJ: need to define HAVE_TASM32 in config.h to use the above.]
6
 
 
7
 
 
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.)
17
 
 
18
 
[RPJ: Added tests\Bmakefile as well.]
19
 
 
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
26
 
this stuff.
27
 
 
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.
32
 
 
33
 
[RPJ: Moved errno values and _timeb etc to pthread.h, so apps will also
34
 
use them.]
35
 
 
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
44
 
mismatch too.)
45
 
 
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.]
49
 
 
50
 
Best regards,
51
 
Will
52
 
 
53
 
Will Bryant
54
 
Systems Architect, eCOSM Limited
55
 
Cell +64 21 655 443, office +64 3 365 4176
56
 
http://www.ecosm.com/