Skip to content

Commit 94ef379

Browse files
committed
Clean up oscap_platforms.h
1 parent 701a32a commit 94ef379

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compat/compat.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#define OSCAP_COMPAT_H_
2525

2626
#include "oscap_export.h"
27+
#include "oscap_platforms.h"
2728

2829
/* Fallback functions fixing portability issues */
2930

@@ -40,7 +41,7 @@ char *strptime(const char *buf, const char *format, struct tm *tm);
4041
#define OSCAP_UNIX
4142
#endif
4243

43-
#ifdef _WIN32
44+
#ifdef OS_WINDOWS
4445
#define PATH_MAX _MAX_PATH
4546
#endif
4647

compat/oscap_platforms.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@
3232

3333
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
3434
# define OS_FREEBSD
35-
#elif defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)
35+
#elif defined(__linux__) && defined(__GLIBC__)
36+
# define OS_LINUX_WITH_GLIBC
37+
#elif defined(__linux__) || defined(OS_LINUX_WITH_GLIBC)
3638
# define OS_LINUX
3739
#elif defined(sun) || defined(__sun)
3840
# define OS_SUN
@@ -47,7 +49,7 @@
4749
# define OS_AIX
4850
#elif defined(__APPLE__)
4951
# define OS_APPLE
50-
# if defined(Macintosh) || defined(macintosh) || defined(__APPLE__) && defined(__MACH__)
52+
# if defined(Macintosh) || defined(macintosh) || defined(__MACH__) || defined(__APPLE__)
5153
# define OS_OSX
5254
# endif
5355
#elif defined(_hpux) || defined(hpux) || defined(__hpux)

0 commit comments

Comments
 (0)