Skip to content

Commit 930b265

Browse files
Merge branch 'master' into dev
Signed-off-by: Thiago Macieira <[email protected]>
2 parents fb10a78 + 86c8186 commit 930b265

File tree

7 files changed

+28
-3
lines changed

7 files changed

+28
-3
lines changed

src/cborencoder.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
#define _BSD_SOURCE 1
2626
#define _DEFAULT_SOURCE 1
27+
#ifndef __STDC_LIMIT_MACROS
28+
# define __STDC_LIMIT_MACROS 1
29+
#endif
30+
2731
#include "cbor.h"
2832
#include "cborconstants_p.h"
2933
#include "compilersupport_p.h"

src/cborencoder_close_container_checked.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
#define _BSD_SOURCE 1
2626
#define _DEFAULT_SOURCE 1
27+
#ifndef __STDC_LIMIT_MACROS
28+
# define __STDC_LIMIT_MACROS 1
29+
#endif
30+
2731
#include "cbor.h"
2832
#include "cborconstants_p.h"
2933
#include "compilersupport_p.h"

src/cborparser.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
#define _BSD_SOURCE 1
2626
#define _DEFAULT_SOURCE 1
27+
#ifndef __STDC_LIMIT_MACROS
28+
# define __STDC_LIMIT_MACROS 1
29+
#endif
30+
2731
#include "cbor.h"
2832
#include "cborconstants_p.h"
2933
#include "compilersupport_p.h"

src/cborparser_dup_string.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
#define _BSD_SOURCE 1
2626
#define _DEFAULT_SOURCE 1
27+
#ifndef __STDC_LIMIT_MACROS
28+
# define __STDC_LIMIT_MACROS 1
29+
#endif
30+
2731
#include "cbor.h"
2832
#include <stdlib.h>
2933

src/cborpretty.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
#define _BSD_SOURCE 1
2626
#define _DEFAULT_SOURCE 1
27+
#ifndef __STDC_LIMIT_MACROS
28+
# define __STDC_LIMIT_MACROS 1
29+
#endif
30+
2731
#include "cbor.h"
2832
#include "compilersupport_p.h"
2933
#include "math_support_p.h"

src/cbortojson.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
#define _DEFAULT_SOURCE 1
2727
#define _GNU_SOURCE 1
2828
#define _POSIX_C_SOURCE 200809L
29+
#ifndef __STDC_LIMIT_MACROS
30+
# define __STDC_LIMIT_MACROS 1
31+
#endif
32+
2933
#include "cbor.h"
3034
#include "cborjson.h"
3135
#include "compilersupport_p.h"

src/compilersupport_p.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,11 @@
6464
#define STRINGIFY(x) STRINGIFY2(x)
6565
#define STRINGIFY2(x) #x
6666

67-
#ifndef UINT32_MAX
68-
/* C99 requires it in stdint.h, but some systems lack it */
69-
# define UINT32_MAX (0xffffffffU)
67+
#if !defined(UINT32_MAX) || !defined(INT64_MAX)
68+
/* C89? We can define UINT32_MAX portably, but not INT64_MAX */
69+
# error "Your system has stdint.h but that doesn't define UINT32_MAX or INT64_MAX"
7070
#endif
71+
7172
#ifndef DBL_DECIMAL_DIG
7273
/* DBL_DECIMAL_DIG is C11 */
7374
# define DBL_DECIMAL_DIG 17

0 commit comments

Comments
 (0)