diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-24 04:00:46 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-07-24 04:00:46 +0000 |
commit | 2647b624657fb649232b187356361551c6b5af11 (patch) | |
tree | 4ac3478ae5816a0003d0b1e868781e0cb2a3abd9 /libexec/ld.so/util.h | |
parent | 2a25cb38bf019f1d86f7cc901e99777e4ba8f234 (diff) |
back out broken stuff until it is fixed
Diffstat (limited to 'libexec/ld.so/util.h')
-rw-r--r-- | libexec/ld.so/util.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libexec/ld.so/util.h b/libexec/ld.so/util.h index 4a204b3e9df..53118a25238 100644 --- a/libexec/ld.so/util.h +++ b/libexec/ld.so/util.h @@ -1,4 +1,4 @@ -/* $OpenBSD: util.h,v 1.8 2002/07/24 00:13:55 deraadt Exp $ */ +/* $OpenBSD: util.h,v 1.9 2002/07/24 04:00:44 deraadt Exp $ */ /* * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com> @@ -36,7 +36,8 @@ #ifndef __DL_UTIL_H__ #define __DL_UTIL_H__ -void *_dl_malloc(const size_t size); +int _dl_write(int, const char *, int); +void *_dl_malloc(const int size); void _dl_free(void *); char *_dl_strdup(const char *); void _dl_printf(const char *fmt, ...); @@ -56,12 +57,12 @@ _dl_wrstderr(const char *s) } static inline void * -_dl_memset(void *p, const int v, size_t c) +_dl_memset(void *p, const char v, size_t c) { char *ip = p; while (c--) - *ip++ = (char)v; + *ip++ = v; return(p); } @@ -76,7 +77,7 @@ _dl_strlen(const char *p) } static inline size_t -_dl_strlcpy(char *dst, const char *src, size_t siz) +_dl_strlcpy(char *dst, const char *src, int siz) { char *d = dst; const char *s = src; @@ -102,13 +103,13 @@ _dl_strlcpy(char *dst, const char *src, size_t siz) } static inline int -_dl_strncmp(const char *d, const char *s, size_t len) +_dl_strncmp(const char *d, const char *s, int c) { - while (len-- && *d && *d == *s) { + while (c-- && *d && *d == *s) { d++; s++; } - if (len < 0) + if (c < 0) return(0); return(*d - *s); } |