* MODULES.html.sh (File system functions): New module
[gnulib.git] / lib / getndelim2.c
index 1d5a1ef..9a9e6e7 100644 (file)
@@ -20,9 +20,7 @@
 
 /* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu.  */
 
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
 
 #include "getndelim2.h"
 
 #include <limits.h>
 #include <stdint.h>
 
+#ifndef SSIZE_MAX
+# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2))
+#endif
+
 /* The maximum value that getndelim2 can return without suffering from
    overflow problems, either internally (because of pointer
    subtraction overflow) or due to the API (because of ssize_t).  */