Skip to content

Commit fa2d691

Browse files
Merge branch 'iss-22' into develop
2 parents 8832728 + 83e98a0 commit fa2d691

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

cpp-pthread.xcodeproj/project.pbxproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
E54543411CAD23690051A313 /* mutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5EC5B7B1C9C2C6B00E21131 /* mutex.cpp */; };
1515
E54543421CAD23690051A313 /* lock_guard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E519A0E41C9C4B4F00ED113D /* lock_guard.cpp */; };
1616
E54543431CAD23690051A313 /* thread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E519A0FF1C9C7CAB00ED113D /* thread.cpp */; };
17+
E580F99C1CB3174F00A7CE3A /* pthread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E580F99B1CB3174F00A7CE3A /* pthread.cpp */; };
1718
E5BF2B651CB13C8100B158E3 /* without-cpp11-pthread-tests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E5BF2B631CB13C7700B158E3 /* without-cpp11-pthread-tests.cpp */; };
1819
E5BF2B661CB13C8900B158E3 /* libcpp-pthread.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E5EC5B711C9C2C3000E21131 /* libcpp-pthread.a */; };
1920
E5C4D71D1C9DC8C700D0E18C /* pthread in Headers */ = {isa = PBXBuildFile; fileRef = E5EC5B811C9C2C8B00E21131 /* pthread */; settings = {ATTRIBUTES = (Public, ); }; };
@@ -63,6 +64,7 @@
6364
E519A0E41C9C4B4F00ED113D /* lock_guard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lock_guard.cpp; path = src/lock_guard.cpp; sourceTree = "<group>"; };
6465
E519A0FF1C9C7CAB00ED113D /* thread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = thread.cpp; path = src/thread.cpp; sourceTree = "<group>"; };
6566
E54543351CAD21A30051A313 /* cpp11-pthread-tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "cpp11-pthread-tests"; sourceTree = BUILT_PRODUCTS_DIR; };
67+
E580F99B1CB3174F00A7CE3A /* pthread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pthread.cpp; path = src/pthread.cpp; sourceTree = "<group>"; };
6668
E5BF2B5A1CB13C3D00B158E3 /* without-cpp11-pthread-tests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "without-cpp11-pthread-tests"; sourceTree = BUILT_PRODUCTS_DIR; };
6769
E5BF2B631CB13C7700B158E3 /* without-cpp11-pthread-tests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "without-cpp11-pthread-tests.cpp"; sourceTree = "<group>"; };
6870
E5EC5B711C9C2C3000E21131 /* libcpp-pthread.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libcpp-pthread.a"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -130,6 +132,7 @@
130132
E5EC5B801C9C2C7100E21131 /* src */ = {
131133
isa = PBXGroup;
132134
children = (
135+
E580F99B1CB3174F00A7CE3A /* pthread.cpp */,
133136
E5EC5B791C9C2C6B00E21131 /* condition_variable.cpp */,
134137
E5EC5B7B1C9C2C6B00E21131 /* mutex.cpp */,
135138
E519A0E41C9C4B4F00ED113D /* lock_guard.cpp */,
@@ -278,6 +281,7 @@
278281
buildActionMask = 2147483647;
279282
files = (
280283
E519A0E51C9C4B4F00ED113D /* lock_guard.cpp in Sources */,
284+
E580F99C1CB3174F00A7CE3A /* pthread.cpp in Sources */,
281285
E5EC5B7D1C9C2C6B00E21131 /* condition_variable.cpp in Sources */,
282286
E5EC5B7F1C9C2C6B00E21131 /* mutex.cpp in Sources */,
283287
E519A1011C9C7CAB00ED113D /* thread.cpp in Sources */,
@@ -464,6 +468,7 @@
464468
E5BF2B601CB13C3D00B158E3 /* Release */,
465469
);
466470
defaultConfigurationIsVisible = 0;
471+
defaultConfigurationName = Release;
467472
};
468473
E5EC5B6C1C9C2C3000E21131 /* Build configuration list for PBXProject "cpp-pthread" */ = {
469474
isa = XCConfigurationList;

include/pthread/pthread.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,7 @@
3131
*/
3232
namespace pthread {
3333

34+
extern "C" const char *cpp_pthread_version();
35+
3436
}
3537
#endif /* pthread_pthread_hpp */

src/pthread.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,16 @@
1212
#include "pthread/pthread.hpp"
1313
#include "pthread/config.h"
1414

15+
1516
namespace pthread {
1617

17-
extern "C" const char *cpp_pthread_version(){
18+
extern "C" const char *cpp_pthread_version(){
1819
#ifndef CPP_PTHREAD_VERSION
19-
return "missing CPP_PTHREAD_VERSION define. Re-run configure" ;
20+
return "missing CPP_PTHREAD_VERSION define. Re-run configure" ;
2021
#else
21-
return CPP_PTHREAD_VERSION ;
22+
return CPP_PTHREAD_VERSION ;
2223
#endif
23-
}
24+
}
25+
2426
}
2527
#endif /* pthread_pthread_hpp */

tests/without-cpp11-pthread-tests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ class worker: public pthread::abstract_thread {
6666

6767
int main(int argc, const char * argv[]) {
6868

69+
std::cout << "version: " << pthread::cpp_pthread_version() << std::endl;
70+
6971
pthread::string dummy;
7072

7173
{

0 commit comments

Comments
 (0)