summaryrefslogtreecommitdiffstats
path: root/newlib/libc/argz/envz_entry.c
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2002-07-19 20:36:09 +0000
committerThomas Fitzsimmons <fitzsim@redhat.com>2002-07-19 20:36:09 +0000
commit9b022d6db80564cfc10c7f18e5d05cedb32f6375 (patch)
tree5daa6fff0a936f4aef743f3a438670468931922f /newlib/libc/argz/envz_entry.c
parentd477c5225dbca4290e41a2b2de989a4845500c19 (diff)
downloadcygnal-9b022d6db80564cfc10c7f18e5d05cedb32f6375.tar.gz
cygnal-9b022d6db80564cfc10c7f18e5d05cedb32f6375.tar.bz2
cygnal-9b022d6db80564cfc10c7f18e5d05cedb32f6375.zip
* libc/argz/argz_replace.c: Include buf_findstr.h.
* libc/argz/buf_findstr.c: Likewise. * libc/argz/envz_entry.c: Include buf_findstr.h. Cast return value to (char *). * libc/argz/envz_get.c: Likewise. * libc/include/sys/unistd.h: Add getopt and getsubopt declarations. * libc/stdlib/Makefile.am (LIB_SOURCES): Add getsubopt.c. * libc/stdlib/getsubopt.3: New file. * libc/stdlib/getsubopt.c: New file. * libc/sys/linux/machine/i386/socketcall.h (__sockcall_base): Change esp to ebp.
Diffstat (limited to 'newlib/libc/argz/envz_entry.c')
-rw-r--r--newlib/libc/argz/envz_entry.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/newlib/libc/argz/envz_entry.c b/newlib/libc/argz/envz_entry.c
index 4c06f0f40..300aec9d5 100644
--- a/newlib/libc/argz/envz_entry.c
+++ b/newlib/libc/argz/envz_entry.c
@@ -10,17 +10,17 @@
#include <stdlib.h>
#include <envz.h>
-extern int buf_findstr(const char *str, char **buf, size_t *buf_len);
+#include "buf_findstr.h"
char *
envz_entry (const char *envz, size_t envz_len, const char *name)
{
- const char *buf_ptr = envz;
+ char *buf_ptr = (char *)envz;
size_t buf_len = envz_len;
while(buf_len)
{
- if (buf_findstr(name, &buf_ptr, &buf_len))
+ if (_buf_findstr(name, &buf_ptr, &buf_len))
{
if (buf_ptr)
{
@@ -34,7 +34,7 @@ envz_entry (const char *envz, size_t envz_len, const char *name)
if(*buf_ptr == '\0')
buf_ptr++;
- return buf_ptr;
+ return (char *)buf_ptr;
}
}
}