c99 work: JsStrOS.c now compiles with c99
When gcc is invoked as "c99", SSIZE_MAX is not defined. As per the POSIX standards, the minimum acceptable value for SSIZE_MAX is 32767, see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html That in mind, if SSIZE_MAX is not defined, we give it the value 32767.
This commit is contained in:
parent
5df5669302
commit
f9cde6bfc8
1 changed files with 7 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2002-2019 Sam Trenholme
|
||||
/* Copyright (c) 2002-2022 Sam Trenholme
|
||||
*
|
||||
* TERMS
|
||||
*
|
||||
|
@ -32,6 +32,12 @@
|
|||
/* Headers for the string routines */
|
||||
#include "JsStr.h"
|
||||
|
||||
/* When gcc is invoked as 'c99', SSIZE_MAX is not defined.
|
||||
* The POSIX standard for limits.h says the minimum acceptable value
|
||||
* for SSIZE_MAX is 32767 */
|
||||
#ifndef SSIZE_MAX
|
||||
#define SSIZE_MAX 32767
|
||||
#endif /* SSIZE_MAX */
|
||||
/* Structures that keep track of allocated memory */
|
||||
#ifdef DEBUG
|
||||
#define HASH_SIZE 100000
|
||||
|
|
Loadingâ¦
Reference in a new issue