Skip to content

Commit 8896b87

Browse files
committed
compat/strings.h: IWYU export strings.h
The includer needs no longer use IWYU pragmas for strcasecmp in *NIX. In Windows, _stricmp is defined in string.h, which is not currently exported (it contains more symbols so it isn't specific enough, in contrary to POSIX strings.h which contains just strcasecmp and ffs family).
1 parent 23e014b commit 8896b87

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/compat/strings.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
#ifndef COMPAT_STRINGS_H_D54CAFC8_A1A0_4FF5_80A0_91F34FB11E12
4141
#define COMPAT_STRINGS_H_D54CAFC8_A1A0_4FF5_80A0_91F34FB11E12
4242

43-
#include <string.h>
43+
#include <string.h> // for strerror
4444

4545
#ifdef _WIN32
4646
#ifndef strcasecmp
@@ -50,7 +50,7 @@
5050
#define strncasecmp _strnicmp
5151
#endif // ! defined strncasecmp
5252
#else // ! defined _WIN32
53-
#include <strings.h>
53+
#include <strings.h> // IWYU pragma: export
5454
#endif // _WIN32
5555

5656
#ifdef __cplusplus

src/video_compress/gpujpeg.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@
5757
#include <utility> // for move
5858
#include <vector>
5959

60-
#include "compat/strings.h" // IWYU pragma: keep // for strcasecmp
61-
// IWYU pragma: no_include <strings.h> # via compact/strings.h
60+
#include "compat/strings.h" // for strcasecmp
6261
#include "debug.h"
6362
#include "host.h"
6463
#include "lib_common.h"

0 commit comments

Comments
 (0)