mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Silence various sparse warnings
... related to __INT_MAX__ and friends not being defined, and various __builtin.. function declarations missing (they should probably be added to sparse, but I am lazy).
This commit is contained in:
parent
48c113b114
commit
bb588729ff
@ -3,6 +3,7 @@
|
||||
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
|
||||
#if 0
|
||||
#ifdef CONFIG_DEBUG
|
||||
#define CONFIG_OWN_LIBC
|
||||
@ -144,4 +145,18 @@ int elinks_raise(int signal);
|
||||
const char *elinks_inet_ntop(int af, const void *src, char *dst, size_t size);
|
||||
#endif
|
||||
|
||||
/* Silence various sparse warnings. */
|
||||
|
||||
#ifndef __builtin_stpcpy
|
||||
extern char *__builtin_stpcpy(char *dest, const char *src);
|
||||
#endif
|
||||
|
||||
#ifndef __builtin_mempcpy
|
||||
extern void *__builtin_mempcpy(void *dest, const void *src, size_t n);
|
||||
#endif
|
||||
|
||||
#ifndef __builtin_va_copy
|
||||
#define __builtin_va_copy(dest, src) do { dest = src; } while (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -107,4 +107,15 @@ typedef unsigned long long uint32_t;
|
||||
#define longlong long
|
||||
#endif
|
||||
|
||||
/* These are mostly for shutting up sparse warnings. */
|
||||
#ifndef __INT_MAX__
|
||||
#define __INT_MAX__ 0x7fffffff
|
||||
#endif
|
||||
#ifndef __LONG_MAX__
|
||||
#define __LONG_MAX__ 0x7fffffff
|
||||
#endif
|
||||
#ifndef __SHRT_MAX__
|
||||
#define __SHRT_MAX__ 0x7fff
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user