Staging
v0.5.2
https://github.com/git/git
Revision d0149200792f579151166a4a5bfae7e66c5d998b authored by Jiang Xin on 07 June 2019, 08:50:23 UTC, committed by Jiang Xin on 07 June 2019, 08:50:23 UTC
* 'master' of git://github.com/alshopov/git-po:
  l10n: bg.po: Updated Bulgarian translation (4581t)
2 parent s 219829a + de2b054
Raw File
Tip revision: d0149200792f579151166a4a5bfae7e66c5d998b authored by Jiang Xin on 07 June 2019, 08:50:23 UTC
Merge branch 'master' of git://github.com/alshopov/git-po
Tip revision: d014920
banned.h
#ifndef BANNED_H
#define BANNED_H

/*
 * This header lists functions that have been banned from our code base,
 * because they're too easy to misuse (and even if used correctly,
 * complicate audits). Including this header turns them into compile-time
 * errors.
 */

#define BANNED(func) sorry_##func##_is_a_banned_function

#undef strcpy
#define strcpy(x,y) BANNED(strcpy)
#undef strcat
#define strcat(x,y) BANNED(strcat)
#undef strncpy
#define strncpy(x,y,n) BANNED(strncpy)
#undef strncat
#define strncat(x,y,n) BANNED(strncat)

#undef sprintf
#undef vsprintf
#ifdef HAVE_VARIADIC_MACROS
#define sprintf(...) BANNED(sprintf)
#define vsprintf(...) BANNED(vsprintf)
#else
#define sprintf(buf,fmt,arg) BANNED(sprintf)
#define vsprintf(buf,fmt,arg) BANNED(sprintf)
#endif

#endif /* BANNED_H */
back to top