diff options
| author | Daniel Kolesa | 2022-10-26 00:30:00 +0200 |
|---|---|---|
| committer | jvoisin | 2023-06-25 18:26:45 +0200 |
| commit | fe149628eaae9748be08815d726cc56e8e492c73 (patch) | |
| tree | 252ed41ea13504b67b3c03e648113015b8f85dda /include/strings.h | |
| parent | adae76af26e498af6c3004a52a4b1de2c6fd91c3 (diff) | |
add initial clang support
Diffstat (limited to 'include/strings.h')
| -rw-r--r-- | include/strings.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/strings.h b/include/strings.h index 7645848..862b7be 100644 --- a/include/strings.h +++ b/include/strings.h | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org> | 2 | * Copyright (C) 2015-2016 Dimitris Papastamos <sin@2f30.org> |
| 3 | * Copyright (C) 2022 q66 <q66@chimera-linux.org> | ||
| 3 | * | 4 | * |
| 4 | * Permission to use, copy, modify, and/or distribute this software for any | 5 | * Permission to use, copy, modify, and/or distribute this software for any |
| 5 | * purpose with or without fee is hereby granted. | 6 | * purpose with or without fee is hereby granted. |
| @@ -30,7 +31,8 @@ extern "C" { | |||
| 30 | || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) | 31 | || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE+0 < 700) |
| 31 | #undef bcopy | 32 | #undef bcopy |
| 32 | #undef bzero | 33 | #undef bzero |
| 33 | _FORTIFY_FN(bcopy) void bcopy(const void *__s, void *__d, size_t __n) | 34 | _FORTIFY_FN(bcopy) void bcopy(const void * _FORTIFY_POS0 __s, |
| 35 | void * _FORTIFY_POS0 __d, size_t __n) | ||
| 34 | { | 36 | { |
| 35 | size_t __bd = __bos(__d, 0); | 37 | size_t __bd = __bos(__d, 0); |
| 36 | size_t __bs = __bos(__s, 0); | 38 | size_t __bs = __bos(__s, 0); |
| @@ -40,7 +42,7 @@ _FORTIFY_FN(bcopy) void bcopy(const void *__s, void *__d, size_t __n) | |||
| 40 | return __orig_bcopy(__s, __d, __n); | 42 | return __orig_bcopy(__s, __d, __n); |
| 41 | } | 43 | } |
| 42 | 44 | ||
| 43 | _FORTIFY_FN(bzero) void bzero(void *__s, size_t __n) | 45 | _FORTIFY_FN(bzero) void bzero(void * _FORTIFY_POS0 __s, size_t __n) |
| 44 | { | 46 | { |
| 45 | size_t __b = __bos(__s, 0); | 47 | size_t __b = __bos(__s, 0); |
| 46 | 48 | ||
