projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make test-fseeko.c failures meaningful.
[gnulib.git]
/
lib
/
getndelim2.c
diff --git
a/lib/getndelim2.c
b/lib/getndelim2.c
index
1d5a1ef
..
e1cd40a
100644
(file)
--- a/
lib/getndelim2.c
+++ b/
lib/getndelim2.c
@@
-4,10
+4,10
@@
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free
Software Foundation, Inc.
Copyright (C) 1993, 1996, 1997, 1998, 2000, 2003, 2004, 2006 Free
Software Foundation, Inc.
- This program is free software
;
you can redistribute it and/or modify
+ This program is free software
:
you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version
2, or (at your option)
- any later version.
+ the Free Software Foundation; either version
3 of the License, or
+
(at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-15,14
+15,11
@@
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software Foundation,
- Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* Originally written by Jan Brittenson, bson@gnu.ai.mit.edu. */
/* 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 "getndelim2.h"
@@
-36,6
+33,10
@@
#include <limits.h>
#include <stdint.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). */
/* 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). */