Files
m241Neelima/vxworks-6.9/target/h/security/banned.h
T
2026-07-30 18:09:00 +05:30

43 lines
1.1 KiB
C

/* banned.h - header file listing banned APIs in VxWorks */
/*
* Copyright (c) 2019-2021 Wind River Systems, Inc.
*
* The right to copy, distribute, modify, or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
#ifndef __INCbannedh
#define __INCbannedh
/* includes */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define _WRS_BANNED_TEXT(bannedFunc, recommendedFunc) \
(bannedFunc " is now banned, consider using " recommendedFunc " instead")
#ifdef __clang__
#define _WRS_BANNED_MSG(msg) __attribute__((diagnose_if(1, msg, "error")));
#else
#define _WRS_BANNED_MSG(msg) __attribute__((error(msg)))
#endif
#define _WRS_BANNED(bannedFunc, recommendedFunc) \
_WRS_BANNED_MSG(_WRS_BANNED_TEXT(bannedFunc, recommendedFunc))
char * strcpy (char * a, const char * b) _WRS_BANNED("strcpy", "strncpy_s");
char * strcat (char * a, const char * b) _WRS_BANNED("strcat", "strncat_s");
char * mktemp (char *tmplate) _WRS_BANNED("mktemp", "mkstemp or mkdtemp");
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __INCbannedh */