1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-07-02 02:15:28 +00: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:
Jonas Fonseca 2005-11-25 19:02:16 +01:00 committed by Jonas Fonseca
parent 48c113b114
commit bb588729ff
2 changed files with 26 additions and 0 deletions

View File

@ -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

View File

@ -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