Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
a3eca064
Commit
a3eca064
authored
Oct 18, 1999
by
Niels Möller
Browse files
* src/argp/argp-help.c (strndup): Defined, if needed.
(mempcpy): -"- Rev: src/argp/argp-help.c:1.4
parent
8ea2482d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/argp/argp-help.c
View file @
a3eca064
...
...
@@ -71,6 +71,37 @@ char *alloca ();
#include "argp-fmtstream.h"
#include "argp-namefrob.h"
#if !_LIBC
# if !HAVE_STRNDUP
static
char
*
strndup
(
const
char
*
s
,
size_t
size
)
{
char
*
r
;
char
*
end
=
memchr
(
s
,
0
,
size
);
if
(
end
)
/* Length + 1 */
size
=
end
-
s
+
1
;
char
*
r
=
malloc
(
size
);
if
(
size
)
{
memcpy
(
r
,
s
,
size
-
1
);
r
[
size
-
1
]
=
'\0'
;
}
return
r
;
}
# endif
/* !HAVE_STRNDUP */
# if !HAVE_MEMPCPY
static
void
*
mempcpy
(
void
*
to
,
const
void
*
from
,
size_t
size
)
{
memcpy
(
to
,
from
,
size
);
return
(
char
*
)
to
+
size
;
}
# define __mempcpy mempcpy
# endif
/* !HAVE_MEMPCPY */
#endif
/* !_LIBC - 0 */
/* User-selectable (using an environment variable) formatting parameters.
These may be specified in an environment variable called `ARGP_HELP_FMT',
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment