projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New module 'sublist'.
[gnulib.git]
/
lib
/
stpncpy.h
diff --git
a/lib/stpncpy.h
b/lib/stpncpy.h
index
a457ee9
..
1ecb3e8
100644
(file)
--- a/
lib/stpncpy.h
+++ b/
lib/stpncpy.h
@@
-1,5
+1,5
@@
/* String copying.
/* String copying.
- Copyright (C) 1995, 2001-200
3
Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-200
5
Free Software Foundation, Inc.
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
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
@@
-13,24
+13,35
@@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
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., 5
9 Temple Place - Suite 330, Boston, MA 02111-1307
, USA. */
+ Inc., 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301
, USA. */
#ifndef _STPNCPY_H
#define _STPNCPY_H
#ifndef _STPNCPY_H
#define _STPNCPY_H
-#if HAVE_STPNCPY
-
-/* Get stpncpy() declaration. */
#include <string.h>
#include <string.h>
-#else
-#include <stddef.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if !HAVE_STPNCPY
+
+/* When not using the GNU libc we use the stpncpy implementation we
+ provide here. */
+#define stpncpy gnu_stpncpy
-/* Copy no more than N
characters of SRC to DST, returning the address of
-
the last character
written into DST. */
+/* Copy no more than N
bytes of SRC to DST, returning a pointer past the
+
last non-NUL byte
written into DST. */
extern char *stpncpy (char *dst, const char *src, size_t n);
#endif
extern char *stpncpy (char *dst, const char *src, size_t n);
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _STPNCPY_H */
#endif /* _STPNCPY_H */