Skip to content

Commit 9e5162c

Browse files
Merge pull request #34 from EvanBalster/master
Remove Windows dependency (disable uuid_time_generator by default)
2 parents 500cd57 + 359b195 commit 9e5162c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/uuid.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <atomic>
1818
#include <span>
1919

20+
#if defined(UUID_TIME_GENERATOR) || defined(UUID_SYSTEM_GENERATOR)
2021
#ifdef _WIN32
2122
#ifndef WIN32_LEAN_AND_MEAN
2223
#define WIN32_LEAN_AND_MEAN
@@ -46,6 +47,7 @@
4647
#include <CoreFoundation/CFUUID.h>
4748
#endif
4849

50+
#endif
4951
#endif
5052

5153
namespace uuids
@@ -805,6 +807,7 @@ namespace uuids
805807
detail::sha1 hasher;
806808
};
807809

810+
#ifdef UUID_TIME_GENERATOR
808811
// !!! DO NOT USE THIS IN PRODUCTION
809812
// this implementation is unreliable for good uuids
810813
class uuid_time_generator
@@ -886,6 +889,7 @@ namespace uuids
886889
return {};
887890
}
888891
};
892+
#endif
889893
}
890894

891895
namespace std

0 commit comments

Comments
 (0)