add __DECONST()
This commit is contained in:
parent
3e36df0496
commit
c7f7436fef
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cdefs.h,v 1.53 2004/06/11 07:11:00 he Exp $ */
|
||||
/* $NetBSD: cdefs.h,v 1.54 2004/06/30 13:57:32 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -135,6 +135,17 @@
|
||||
#define __aconst
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The following macro is used to remove const cast-away warnings
|
||||
* from gcc -Wcast-qual; it should be used with caution because it
|
||||
* can hide valid errors; in particular most valid uses are in
|
||||
* situations where the API requires it, not to cast away string
|
||||
* constants. We don't use intptr_t on purpose here and we are
|
||||
* explicit about unsigned long so that we don't have additional
|
||||
* dependencies.
|
||||
*/
|
||||
#define __DECONST(a) ((void *)(unsigned long)(const void *)(a))
|
||||
|
||||
/*
|
||||
* GCC2 provides __extension__ to suppress warnings for various GNU C
|
||||
* language extensions under "-ansi -pedantic".
|
||||
|
Loading…
Reference in New Issue
Block a user