Skip to content

Commit

Permalink
Fix undefined ptw32_autostatic_anchor in (tests) make GCX-small-static
Browse files Browse the repository at this point in the history
  • Loading branch information
rocso committed Dec 18, 2016
1 parent 4b1abc9 commit 52540b0
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
15 changes: 15 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2016-12-18 Ross Johnson <ross dot johnson at homemail dot com dot au>

* implement.h (PTW32_TEST_SNEAK_PEEK): Defined in tests/test.h
to control what some tests see when sneaking a peek inside this
header.

2016-12-17 Ross Johnson <ross dot johnson at homemail dot com dot au>

* _ptw32.h: MINGW(all) include stdint.h to define all specific
size integers (int64_t etc).

2016-12-17 Kyle Schwarz <kyle dot r dot schwarz at gmail dot com>

* _ptw32.h: MINGW6464 define pid_t as __int64.

2016-04-01 Ross Johnson <ross dot johnson at homemail dot com dot au>

* _ptw32.h: Move more header stuff into here.
Expand Down
4 changes: 2 additions & 2 deletions implement.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ static void ptw32_set_errno(int err) { errno = err; SetLastError(err); }
#endif

/*
* Don't allow the linker to optimize away autostatic.obj in static builds.
* Don't allow the linker to optimize away dll.obj (dll.o) in static builds.
*/
#if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD)
#if defined(PTW32_STATIC_LIB) && defined(PTW32_BUILD) && !defined(PTW32_TEST_SNEAK_PEEK)
void ptw32_autostatic_anchor(void);
# if defined(__GNUC__)
__attribute__((unused, used))
Expand Down
6 changes: 6 additions & 0 deletions tests/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2016-124-18 Ross Johnson <ross dot johnson at homemail dot com dot au>

* test.c (PTW32_TEST_SNEAK_PEEK): #define this to prevent some
tests from failing (specifically "make GCX-small-static") with
undefined ptw32_autostatic_anchor. Checked in ../implament.h.

2016-04-30 Ross Johnson <ross dot johnson at homemail dot com dot au>

* semaphore4t.c: No longer need to include ptw32_timespec.c and the
Expand Down
7 changes: 7 additions & 0 deletions tests/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@
#ifndef _PTHREAD_TEST_H_
#define _PTHREAD_TEST_H_

/*
* Some tests sneak a peek at ../implement.h
* This is used inside ../implement.h to control
* what these test apps see and don't see.
*/
#define PTW32_TEST_SNEAK_PEEK

#include "pthread.h"
#include "sched.h"
#include "semaphore.h"
Expand Down

0 comments on commit 52540b0

Please sign in to comment.