Skip to content

Commit e399109

Browse files
committed
safestringlib: avoid redefining RSIZE_MAX
Do not redefine RSIZE_MAX when it is defined in system includes. Fixes: #78 Signed-off-by: Alexander Usyskin <[email protected]>
1 parent e72c3ae commit e399109

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/safe_lib.h

+2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,10 @@ typedef size_t rsize_t;
3939
*/
4040
/* #define RSIZE_MAX (~(rsize_t)0) - leave here for completeness */
4141

42+
#ifndef RSIZE_MAX
4243
/* Bring back the standard */
4344
#define RSIZE_MAX ( 256UL << 20 ) /* 256MB */
45+
#endif /* RSIZE_MAX */
4446

4547
typedef void (*constraint_handler_t) (const char * /* msg */,
4648
void * /* ptr */,

0 commit comments

Comments
 (0)