]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
lib/uuid: remove unneeded Windows UUID workaround
authorEric Biggers <ebiggers@google.com>
Sat, 28 Jan 2023 22:46:51 +0000 (14:46 -0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 30 Jan 2023 05:03:16 +0000 (00:03 -0500)
Some .c files in lib/uuid/ contain the following:

#ifdef _WIN32
#define _WIN32_WINNT 0x0500
#include <windows.h>
#define UUID MYUUID
#endif

This seems to have been intended to allow the use of a local "UUID" type
without colliding with "UUID" in the Windows API.  However, this is
unnecessary because there's no local "UUID" type -- there's only uuid_t.

None of these .c files need the include of windows.h, either.

Finally, the unconditional definition of _WIN32_WINNT causes a compiler
warning when the user defines _WIN32_WINNT themself.

Since this code is unnecessary and is causing problems, just remove it.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/uuid/Android.bp
lib/uuid/gen_uuid.c
lib/uuid/tst_uuid.c
lib/uuid/uuid_time.c

index 67968dba3f3296416a4ae0500c50a2d4c6e11c94..daf30bb94b72731293fa0cf01dc5bf84a9309eb2 100644 (file)
@@ -45,8 +45,6 @@ cc_library {
     ],
     target: {
         windows: {
-            // Cannot suppress the _WIN32_WINNT redefined warning.
-            cflags: ["-Wno-error"],
             include_dirs: [ "external/e2fsprogs/include/mingw" ],
             enabled: true
         },
index a2225ccee2e4d87bf2dfaf3988bf2401f4b56f23..2f028867ab42aabea55bea4571510d1437277134 100644 (file)
 
 #include "config.h"
 
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
 #include <stdio.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
index 649bfbc0581528eb0476eaa05831a68cd037c021..c1c290158a6819af11cd9bd96a53521f7901204b 100644 (file)
 
 #include "config.h"
 
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 
index af837a2ca3739be62b03db8ab19b78046bfe2ba2..b519d3c4bd3e8953aa10a2a56ae15a5b6fb0e30d 100644 (file)
 
 #include "config.h"
 
-#ifdef _WIN32
-#define _WIN32_WINNT 0x0500
-#include <windows.h>
-#define UUID MYUUID
-#endif
-
 #include <stdio.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>