Browse Source

Wrap <inttypes.h> and finish wrapping of <wchar.h> so that calls go direct

and the symbols not in the C standard are weak
OPENBSD_5_9
guenther 9 years ago
parent
commit
82b9f1a0d5
24 changed files with 51 additions and 24 deletions
  1. +2
    -1
      src/lib/libc/stdlib/strtoimax.c
  2. +2
    -1
      src/lib/libc/stdlib/strtoumax.c
  3. +3
    -1
      src/lib/libc/string/wcscasecmp.c
  4. +2
    -1
      src/lib/libc/string/wcscat.c
  5. +2
    -1
      src/lib/libc/string/wcschr.c
  6. +2
    -1
      src/lib/libc/string/wcscmp.c
  7. +2
    -1
      src/lib/libc/string/wcscspn.c
  8. +2
    -1
      src/lib/libc/string/wcsdup.c
  9. +2
    -1
      src/lib/libc/string/wcslcat.c
  10. +2
    -1
      src/lib/libc/string/wcslcpy.c
  11. +2
    -1
      src/lib/libc/string/wcslen.c
  12. +2
    -1
      src/lib/libc/string/wcsncat.c
  13. +2
    -1
      src/lib/libc/string/wcsncmp.c
  14. +2
    -1
      src/lib/libc/string/wcsncpy.c
  15. +2
    -1
      src/lib/libc/string/wcspbrk.c
  16. +2
    -1
      src/lib/libc/string/wcsrchr.c
  17. +2
    -1
      src/lib/libc/string/wcsspn.c
  18. +4
    -1
      src/lib/libc/string/wcsstr.c
  19. +2
    -1
      src/lib/libc/string/wcswidth.c
  20. +2
    -1
      src/lib/libc/string/wmemchr.c
  21. +2
    -1
      src/lib/libc/string/wmemcmp.c
  22. +2
    -1
      src/lib/libc/string/wmemcpy.c
  23. +2
    -1
      src/lib/libc/string/wmemmove.c
  24. +2
    -1
      src/lib/libc/string/wmemset.c

+ 2
- 1
src/lib/libc/stdlib/strtoimax.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: strtoimax.c,v 1.2 2014/09/13 20:10:12 schwarze Exp $ */
/* $OpenBSD: strtoimax.c,v 1.3 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 1992 The Regents of the University of California.
* All rights reserved.
@ -148,3 +148,4 @@ strtoimax(const char *nptr, char **endptr, int base)
*endptr = (char *) (any ? s - 1 : nptr);
return (acc);
}
DEF_STRONG(strtoimax);

+ 2
- 1
src/lib/libc/stdlib/strtoumax.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: strtoumax.c,v 1.2 2014/09/13 20:10:12 schwarze Exp $ */
/* $OpenBSD: strtoumax.c,v 1.3 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 1992 The Regents of the University of California.
* All rights reserved.
@ -106,3 +106,4 @@ strtoumax(const char *nptr, char **endptr, int base)
*endptr = (char *) (any ? s - 1 : nptr);
return (acc);
}
DEF_STRONG(strtoumax);

+ 3
- 1
src/lib/libc/string/wcscasecmp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcscasecmp.c,v 1.2 2011/06/01 19:29:48 naddy Exp $ */
/* $OpenBSD: wcscasecmp.c,v 1.3 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 2011 Marc Espie
@ -41,6 +41,7 @@ wcscasecmp(const wchar_t *s1, const wchar_t *s2)
/* XXX assumes wchar_t = int */
return ((rune_t)l1 - (rune_t)l2);
}
DEF_WEAK(wcscasecmp);
int
wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
@ -59,3 +60,4 @@ wcsncasecmp(const wchar_t *s1, const wchar_t *s2, size_t n)
} while (--n != 0);
return (0);
}
DEF_WEAK(wcsncasecmp);

+ 2
- 1
src/lib/libc/string/wcscat.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcscat.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcscat.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcscat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*-
@ -53,3 +53,4 @@ wcscat(wchar_t *s1, const wchar_t *s2)
*q = '\0';
return s1;
}
DEF_STRONG(wcscat);

+ 2
- 1
src/lib/libc/string/wcschr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcschr.c,v 1.4 2008/08/23 05:34:36 djm Exp $ */
/* $OpenBSD: wcschr.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcschr.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*-
@ -48,3 +48,4 @@ wcschr(const wchar_t *s, wchar_t c)
}
/* NOTREACHED */
}
DEF_STRONG(wcschr);

+ 2
- 1
src/lib/libc/string/wcscmp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcscmp.c,v 1.4 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcscmp.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcscmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */
/*-
@ -49,3 +49,4 @@ wcscmp(const wchar_t *s1, const wchar_t *s2)
/* XXX assumes wchar_t = int */
return (*(const rune_t *)s1 - *(const rune_t *)--s2);
}
DEF_STRONG(wcscmp);

+ 2
- 1
src/lib/libc/string/wcscspn.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcscspn.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcscspn.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcscspn.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*-
@ -51,3 +51,4 @@ wcscspn(const wchar_t *s, const wchar_t *set)
done:
return (p - s);
}
DEF_STRONG(wcscspn);

+ 2
- 1
src/lib/libc/string/wcsdup.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsdup.c,v 1.2 2014/10/08 05:27:17 deraadt Exp $ */
/* $OpenBSD: wcsdup.c,v 1.3 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsdup.c,v 1.3 2008/05/26 13:17:48 haad Exp $ */
/*
@ -29,3 +29,4 @@ wcsdup(const wchar_t *str)
return (wmemcpy(copy, str, len));
}
DEF_WEAK(wcsdup);

+ 2
- 1
src/lib/libc/string/wcslcat.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcslcat.c,v 1.5 2015/01/15 03:54:12 millert Exp $ */
/* $OpenBSD: wcslcat.c,v 1.6 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
@ -53,3 +53,4 @@ wcslcat(wchar_t *dst, const wchar_t *src, size_t dsize)
return(dlen + (src - osrc)); /* count does not include NUL */
}
DEF_WEAK(wcslcat);

+ 2
- 1
src/lib/libc/string/wcslcpy.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcslcpy.c,v 1.6 2015/01/15 03:54:12 millert Exp $ */
/* $OpenBSD: wcslcpy.c,v 1.7 2015/09/12 16:23:14 guenther Exp $ */
/*
* Copyright (c) 1998, 2015 Todd C. Miller <Todd.Miller@courtesan.com>
@ -48,3 +48,4 @@ wcslcpy(wchar_t *dst, const wchar_t *src, size_t dsize)
return(src - osrc - 1); /* count does not include NUL */
}
DEF_WEAK(wcslcpy);

+ 2
- 1
src/lib/libc/string/wcslen.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcslen.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcslen.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcslen.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*-
@ -42,3 +42,4 @@ wcslen(const wchar_t *s)
return p - s;
}
DEF_STRONG(wcslen);

+ 2
- 1
src/lib/libc/string/wcsncat.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsncat.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcsncat.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsncat.c,v 1.2 2001/01/03 14:29:36 lukem Exp $ */
/*-
@ -50,3 +50,4 @@ wcsncat(wchar_t *s1, const wchar_t *s2, size_t n)
*q = '\0';
return s1;
}
DEF_STRONG(wcsncat);

+ 2
- 1
src/lib/libc/string/wcsncmp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsncmp.c,v 1.4 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcsncmp.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsncmp.c,v 1.5 2003/08/07 16:43:54 agc Exp $ */
/*
@ -50,3 +50,4 @@ wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n)
} while (--n != 0);
return (0);
}
DEF_STRONG(wcsncmp);

+ 2
- 1
src/lib/libc/string/wcsncpy.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsncpy.c,v 1.4 2006/04/17 18:05:35 espie Exp $ */
/* $OpenBSD: wcsncpy.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsncpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -48,3 +48,4 @@ wcsncpy(wchar_t *s1, const wchar_t *s2, size_t n)
return s1;
}
DEF_STRONG(wcsncpy);

+ 2
- 1
src/lib/libc/string/wcspbrk.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcspbrk.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcspbrk.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcspbrk.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -51,3 +51,4 @@ wcspbrk(const wchar_t *s, const wchar_t *set)
}
return NULL;
}
DEF_STRONG(wcspbrk);

+ 2
- 1
src/lib/libc/string/wcsrchr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsrchr.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcsrchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsrchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -48,3 +48,4 @@ wcsrchr(const wchar_t *s, wchar_t c)
}
return NULL;
}
DEF_STRONG(wcsrchr);

+ 2
- 1
src/lib/libc/string/wcsspn.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsspn.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcsspn.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsspn.c,v 1.3 2001/09/21 16:09:15 yamt Exp $ */
/*-
@ -53,3 +53,4 @@ wcsspn(const wchar_t *s, const wchar_t *set)
done:
return (p - s);
}
DEF_STRONG(wcsspn);

+ 4
- 1
src/lib/libc/string/wcsstr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcsstr.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wcsstr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcsstr.c,v 1.3 2003/03/05 20:18:17 tshiozak Exp $ */
/*-
@ -68,3 +68,6 @@ wcsstr(const wchar_t *big, const wchar_t *little)
}
return NULL;
}
#ifndef WCSWCS
DEF_STRONG(wcsstr);
#endif

+ 2
- 1
src/lib/libc/string/wcswidth.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wcswidth.c,v 1.4 2011/04/04 18:16:24 stsp Exp $ */
/* $OpenBSD: wcswidth.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wcswidth.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -48,3 +48,4 @@ wcswidth(const wchar_t *s, size_t n)
return w;
}
DEF_WEAK(wcswidth);

+ 2
- 1
src/lib/libc/string/wmemchr.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemchr.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wmemchr.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wmemchr.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -45,3 +45,4 @@ wmemchr(const wchar_t *s, wchar_t c, size_t n)
}
return NULL;
}
DEF_STRONG(wmemchr);

+ 2
- 1
src/lib/libc/string/wmemcmp.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemcmp.c,v 1.4 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wmemcmp.c,v 1.5 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wmemcmp.c,v 1.3 2003/04/06 18:33:23 tshiozak Exp $ */
/*-
@ -48,3 +48,4 @@ wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
}
return 0;
}
DEF_STRONG(wmemcmp);

+ 2
- 1
src/lib/libc/string/wmemcpy.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemcpy.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wmemcpy.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wmemcpy.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -38,3 +38,4 @@ wmemcpy(wchar_t *d, const wchar_t *s, size_t n)
return (wchar_t *)memcpy(d, s, n * sizeof(wchar_t));
}
DEF_STRONG(wmemcpy);

+ 2
- 1
src/lib/libc/string/wmemmove.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemmove.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wmemmove.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wmemmove.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -38,3 +38,4 @@ wmemmove(wchar_t *d, const wchar_t *s, size_t n)
return (wchar_t *)memmove(d, s, n * sizeof(wchar_t));
}
DEF_STRONG(wmemmove);

+ 2
- 1
src/lib/libc/string/wmemset.c View File

@ -1,4 +1,4 @@
/* $OpenBSD: wmemset.c,v 1.3 2005/08/08 08:05:37 espie Exp $ */
/* $OpenBSD: wmemset.c,v 1.4 2015/09/12 16:23:14 guenther Exp $ */
/* $NetBSD: wmemset.c,v 1.2 2001/01/03 14:29:37 lukem Exp $ */
/*-
@ -44,3 +44,4 @@ wmemset(wchar_t *s, wchar_t c, size_t n)
}
return s;
}
DEF_STRONG(wmemset);

Loading…
Cancel
Save