Skip to content

Commit b3384af

Browse files
author
Peter Pettersson
committed
C90: add inline macro to xdiff and mbedtls
1 parent 61f1e31 commit b3384af

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

src/streams/mbedtls.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
#endif
2424

2525
/* Work around C90-conformance issues */
26-
#if defined(_MSC_VER)
27-
# define inline __inline
28-
#elif defined(__GNUC__)
29-
# define inline __inline__
30-
#else
31-
# define inline
26+
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
27+
# if defined(_MSC_VER)
28+
# define inline __inline
29+
# elif defined(__GNUC__)
30+
# define inline __inline__
31+
# else
32+
# define inline
33+
# endif
3234
#endif
3335

3436
#include <mbedtls/config.h>

src/xdiff/git-xdiff.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@
1616

1717
#include "regexp.h"
1818

19+
/* Work around C90-conformance issues */
20+
#if !defined(__STDC_VERSION__) || (__STDC_VERSION__ < 199901L)
21+
# if defined(_MSC_VER)
22+
# define inline __inline
23+
# elif defined(__GNUC__)
24+
# define inline __inline__
25+
# else
26+
# define inline
27+
# endif
28+
#endif
29+
1930
#define xdl_malloc(x) git__malloc(x)
2031
#define xdl_free(ptr) git__free(ptr)
2132
#define xdl_realloc(ptr, x) git__realloc(ptr, x)

0 commit comments

Comments
 (0)