Skip to content

Commit e4564d4

Browse files
committed
Minor edits
1 parent 1d80e74 commit e4564d4

File tree

2 files changed

+52
-56
lines changed

2 files changed

+52
-56
lines changed

README

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,9 @@ not been the case with recent releases. Binary compatibility and
145145
consequently library file naming has not changed over this time either
146146
so it should not cause any problems.
147147

148+
NOTE: Changes to the platform ABI can cause the library ABI to change
149+
and the current version numbering system does not account for this.
150+
148151
The fourth is commonly used for the build number, but will be reserved
149152
for future use.
150153

@@ -332,16 +335,23 @@ MinGW64 multilib disabled
332335
Building with MS Visual Studio (C, VC++ using C++ EH, or Structured EH)
333336
-----------------------------------------------------------------------
334337

338+
NOTE: A VS project/solution/whatever file is included as a contributed
339+
work and is not used of maintained in development. All building and
340+
testing is done using makefiles. We use the native make system for each
341+
toolchain, which is 'nmake' in this case.
342+
335343
From the source directory run nmake without any arguments to list
336344
help information. E.g.
337345

338346
$ nmake
339347

340348
As examples, as at Release 2.10 the pre-built DLLs and static libraries
341-
are built from the following command-lines:
349+
can be built using one of the following command-lines:
342350

343-
[Note: "setenv" comes with the SDK. "/2003" is used to override my build
344-
system which is Win7 (at the time of writing) for backwards compatibility.]
351+
[Note: "setenv" comes with the SDK which is not required to build the library.
352+
I use it to build and test both 64 and 32 bit versions of the library.
353+
"/2003" is used to override my build system which is Win7 (at the time of
354+
writing) for backwards compatibility.]
345355

346356
$ setenv /x64 /2003 /Release
347357
$ nmake realclean VC
@@ -358,7 +368,7 @@ $ nmake realclean VC-static
358368
$ nmake realclean VCE-static
359369
$ nmake realclean VSE-static
360370

361-
If you want to differentiate between libraries by their names you can use,
371+
If you want to differentiate or customise library naming you can use,
362372
e.g.:
363373

364374
$ nmake realclean VC EXTRAVERSION="-w64"
@@ -372,11 +382,6 @@ pthreadVC2-w64.lib
372382
To build and test all DLLs and static lib compatibility versions
373383
(VC, VCE, VSE):
374384

375-
[Note that the EXTRAVERSION="..." option is passed to the tests Makefile
376-
when you target "all-tests". If you change to the tests directory and
377-
run the tests you will need to repeat the option explicitly to the test
378-
"nmake" command-line.]
379-
380385
$ setenv /x64 /2003 /release
381386
$ nmake all-tests
382387

@@ -386,6 +391,11 @@ running nmake. E.g.:
386391
$ cd tests
387392
$ nmake VC
388393

394+
Note: the EXTRAVERSION="..." option is passed to the tests Makefile
395+
when you target "all-tests". If you build the library then change to the
396+
tests directory to run the tests you will need to repeat the option
397+
explicitly to the test "nmake" command-line.
398+
389399
For failure analysis etc. individual tests can be built
390400
and run, e.g:
391401

@@ -395,8 +405,7 @@ $ nmake VC TESTS="foo bar"
395405
This builds and runs all prerequisite tests as well as the individual
396406
tests listed. Prerequisite tests are defined in tests\runorder.mk.
397407

398-
To build and run only those tests listed use, i.e. without the
399-
additional prerequistite dependency tests:
408+
To build and run only the tests listed use:
400409

401410
$ cd tests
402411
$ nmake VC NO_DEPS=1 TESTS="foo bar"
@@ -405,6 +414,9 @@ $ nmake VC NO_DEPS=1 TESTS="foo bar"
405414
Building with MinGW
406415
-------------------
407416

417+
NOTE: All building and testing is done using makefiles. We use the native
418+
make system for each toolchain, which is 'make' in this case.
419+
408420
We have found that Mingw32 builds of the GCE library variants fail when run
409421
on 64 bit systems. The GC variants are fine.
410422

@@ -454,17 +466,17 @@ or, with MinGW64 (multilib enabled):
454466
$ make all-tests ARCH=-m64
455467
$ make all-tests ARCH=-m32
456468

457-
Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the
458-
tests GNUmakefile when you target "all-tests". If you change to the tests
459-
directory and run the tests you will need to repeat those options explicitly
460-
to the test "make" command-line.
461-
462469
You can run the testsuite by changing to the "tests" directory and
463470
running make. E.g.:
464471

465472
$ cd tests
466473
$ make GC
467474

475+
Note that the ARCH="..." and/or EXTRAVERSION="..." options are passed to the
476+
tests GNUmakefile when you target "all-tests". If you change to the tests
477+
directory and run the tests you will need to repeat those options explicitly
478+
to the test "make" command-line.
479+
468480
For failure analysis etc. individual tests can be built and run, e.g:
469481

470482
$ cd tests
@@ -473,8 +485,7 @@ $ make GC TESTS="foo bar"
473485
This builds and runs all prerequisite tests as well as the individual
474486
tests listed. Prerequisite tests are defined in tests\runorder.mk.
475487

476-
To build and run only those tests listed use, i.e. without the additional
477-
prerequistite dependency tests:
488+
To build and run only those tests listed use:
478489

479490
$ cd tests
480491
$ make GC NO_DEPS=1 TESTS="foo bar"
@@ -518,45 +529,27 @@ Building the library under Cygwin
518529
Cygwin implements it's own POSIX threads routines and these
519530
will be the ones to use if you develop using Cygwin.
520531

532+
Building applications
533+
---------------------
521534

522-
Building applications with GNU compilers
523-
----------------------------------------
524-
525-
If you're using pthreadGC2.dll:
526-
527-
With the four header files, _ptw32.h, pthreadGC2.dll and libpthreadGC2.a
528-
in the same directory as your application myapp.c, you could compile, link
529-
and run myapp.c under MinGW as follows:
530-
531-
gcc -o myapp.exe myapp.c -I. -L. -lpthreadGC2
532-
myapp
533-
534-
Or put pthreadGC2.dll in an appropriate directory in your PATH,
535-
put libpthreadGC2.a in your system lib directory, and
536-
put the four header files in your system include directory,
537-
then use:
538-
539-
gcc -o myapp.exe myapp.c -lpthreadGC
540-
myapp
541-
542-
543-
If you're using pthreadGCE2.dll:
544-
545-
With the four header files, pthreadGCE2.dll and libpthreadGCE2.a
546-
in the same directory as your application myapp.c, you could compile,
547-
link and run myapp.c under Mingw32 as follows:
535+
The files you will need for your application build are:
548536

549-
gcc -x c++ -o myapp.exe myapp.c -I. -L. -lpthreadGCE2
550-
myapp
537+
The four header files:
538+
_ptw32.h
539+
pthread.h
540+
semaphore.h
541+
sched.h
551542

552-
Or put pthreadGCE.dll and gcc.dll in an appropriate directory in
553-
your PATH, put libpthreadGCE.a in your system lib directory, and
554-
put the four header files in your system include directory,
555-
then use:
543+
The DLL library files that you built:
544+
pthread*.dll
545+
plus the matching *.lib (MSVS) or *.a file (GNU)
556546

557-
gcc -x c++ -o myapp.exe myapp.c -lpthreadGCE
558-
myapp
547+
or, the static link library that you built:
548+
pthread*.lib (MSVS) or libpthread*.a (GNU)
559549

550+
Place them in the appropriate directories for your build, which may be the
551+
standard compiler locations or, locations specific to your project (you
552+
might have a separate third-party dependency tree for example).
560553

561554
Acknowledgements
562555
----------------

tests/README

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,15 @@ Tests written in this test suite should behave in the following manner:
3333

3434
* If a test succeeds, leave main() with a result of 0.
3535

36-
* No diagnostic output should appear when the test is succeeding.
37-
Diagnostic output may be emitted if something in the test
38-
fails, to help determine the cause of the test failure.
36+
* No diagnostic output should appear when the test is succeeding
37+
unless it is particularly useful to visualise test behaviour.
38+
Diagnostic output should be emitted if something in the test
39+
fails, to help determine the cause of the test failure. Use assert()
40+
for all API calls if possible.
3941

4042
Notes:
4143
------
4244

4345
Many test cases use knowledge of implementation internals which are supposed
44-
to be opaque to portable applications.
46+
to be opaque to portable applications. These should not be used as examples
47+
of methods that can be conformantly applied to application code.

0 commit comments

Comments
 (0)