1 |
/* Find the length of STRING, but scan at most MAXLEN characters. |
/* Find the length of STRING, but scan at most MAXLEN characters. |
2 |
Copyright (C) 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. |
Copyright (C) 1996, 1997, 1998, 2000-2002 Free Software Foundation, Inc. |
3 |
This file is part of the GNU C Library. |
This file is part of the GNU C Library. |
4 |
|
|
5 |
The GNU C Library is free software; you can redistribute it and/or |
This program is free software; you can redistribute it and/or modify |
6 |
modify it under the terms of the GNU Library General Public License as |
it under the terms of the GNU General Public License as published by |
7 |
published by the Free Software Foundation; either version 2 of the |
the Free Software Foundation; either version 2, or (at your option) |
8 |
License, or (at your option) any later version. |
any later version. |
9 |
|
|
10 |
The GNU C Library is distributed in the hope that it will be useful, |
This program is distributed in the hope that it will be useful, |
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
Library General Public License for more details. |
GNU General Public License for more details. |
14 |
|
|
15 |
You should have received a copy of the GNU Library General Public |
You should have received a copy of the GNU General Public License |
16 |
License along with the GNU C Library; see the file COPYING.LIB. If not, |
along with this program; if not, write to the Free Software Foundation, |
17 |
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
|
Boston, MA 02111-1307, USA. */ |
|
18 |
|
|
19 |
#if HAVE_CONFIG_H |
#if HAVE_CONFIG_H |
20 |
# include <config.h> |
# include <config.h> |
24 |
# if !STDC_HEADERS && HAVE_MEMORY_H |
# if !STDC_HEADERS && HAVE_MEMORY_H |
25 |
# include <memory.h> |
# include <memory.h> |
26 |
# endif |
# endif |
27 |
|
/* Temporarily redefine strnlen so that an inconsistent prototype |
28 |
|
(on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't cause trouble. */ |
29 |
|
# define strnlen system_strnlen |
30 |
# include <string.h> |
# include <string.h> |
31 |
|
# undef strnlen |
32 |
#else |
#else |
33 |
# include <strings.h> |
# include <strings.h> |
34 |
#endif |
#endif |