Skip to content

Commit 8ab067d

Browse files
committed
FLOAT_SUPPORT changed to NO_FLOAT_SUPPORT
- This is because we want the float support to be compiled in by default
1 parent 9d25a44 commit 8ab067d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ libdir = $(exec_prefix)/lib
66
includedir = $(prefix)/include
77
pkgconfigdir = $(libdir)/pkgconfig
88

9-
CFLAGS = -Wall -Wextra -DFLOAT_SUPPORT
9+
CFLAGS = -Wall -Wextra
1010
LDFLAGS_GCSECTIONS = -Wl,--gc-sections
1111
LDFLAGS = $(if $(gc_sections-pass),$(LDFLAGS_GCSECTIONS))
1212

src/cborencoder.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void cbor_encoder_cust_writer_init(CborEncoder *encoder, struct cbor_encoder_wri
220220
}
221221

222222

223-
#if FLOAT_SUPPORT
223+
#ifndef NO_FLOAT_SUPPORT
224224
static inline void put16(void *where, uint16_t v)
225225
{
226226
v = cbor_htons(v);
@@ -239,7 +239,7 @@ static inline bool isOomError(CborError err)
239239
return true;
240240
}
241241

242-
#if FLOAT_SUPPORT
242+
#ifndef NO_FLOAT_SUPPORT
243243
static inline void put32(void *where, uint32_t v)
244244
{
245245
v = cbor_htonl(v);
@@ -352,7 +352,7 @@ CborError cbor_encode_simple_value(CborEncoder *encoder, uint8_t value)
352352
return encode_number(encoder, value, SimpleTypesType << MajorTypeShift);
353353
}
354354

355-
#if FLOAT_SUPPORT
355+
#ifndef NO_FLOAT_SUPPORT
356356
/**
357357
* Appends the floating-point value of type \a fpType and pointed to by \a
358358
* value to the CBOR stream provided by \a encoder. The value of \a fpType must

src/cborpretty.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ static CborError value_to_pretty(FILE *out, CborValue *it, int flags)
464464
return CborErrorIO;
465465
break;
466466
}
467-
#if FLOAT_SUPPORT
467+
#ifndef NO_FLOAT_SUPPORT
468468
case CborDoubleType: {
469469
const char *suffix;
470470
double val;

src/cbortojson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ static CborError value_to_json(FILE *out, CborValue *it, int flags, CborType typ
593593
return CborErrorIO;
594594
break;
595595
}
596-
#if FLOAT_SUPPORT
596+
#ifndef NO_FLOAT_SUPPORT
597597
case CborDoubleType: {
598598
double val;
599599
if (false) {

0 commit comments

Comments
 (0)