Skip to content

Commit 3a652ee

Browse files
committed
make sure SSIZE_MAX and SSIZE_MIN are defined
1 parent 2da4a4e commit 3a652ee

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

fio-stl.h

+6
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,12 @@ typedef SSIZE_T ssize_t;
381381
__attribute__((format(printf, string_index, check_index)))
382382
#endif
383383

384+
#ifndef SSIZE_MAX
385+
#define SSIZE_MAX ((ssize_t)((~(size_t)0) >> 1))
386+
#endif
387+
#ifndef SSIZE_MIN
388+
#define SSIZE_MIN ((ssize_t)(~((~(size_t)0) >> 1)))
389+
#endif
384390
/* *****************************************************************************
385391
Function Attributes
386392
***************************************************************************** */

fio-stl/000 core.h

+6
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,12 @@ typedef SSIZE_T ssize_t;
344344
__attribute__((format(printf, string_index, check_index)))
345345
#endif
346346

347+
#ifndef SSIZE_MAX
348+
#define SSIZE_MAX ((ssize_t)((~(size_t)0) >> 1))
349+
#endif
350+
#ifndef SSIZE_MIN
351+
#define SSIZE_MIN ((ssize_t)(~((~(size_t)0) >> 1)))
352+
#endif
347353
/* *****************************************************************************
348354
Function Attributes
349355
***************************************************************************** */

0 commit comments

Comments
 (0)