Ansel
0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
poison.h
Go to the documentation of this file.
1
#pragma once
2
3
#if !defined(_RELEASE) && !defined(__cplusplus) && !defined(_WIN32)
4
5
//
6
// We needed to poison certain functions in order to disallow their usage
7
// but not in bundled libs
8
//
9
10
// this is ugly, but needed, because else compilation will fail with:
11
// ansel/src/common/poison.h:16:20: error: poisoning existing macro "strncat" [-Werror]
12
// #pragma GCC poison strncat // use g_strncat
13
#pragma GCC system_header
14
15
//#pragma GCC poison sprintf // use snprintf
16
#pragma GCC poison vsprintf
// use vsnprintf
17
#pragma GCC poison strcpy
// use g_strlcpy
18
//#pragma GCC poison strncpy // use g_strlcpy
19
#pragma GCC poison strcat
// use g_strncat
20
#pragma GCC poison strncat
// use g_strncat
21
#pragma GCC poison pthread_create
// use dt_pthread_create, musl issues
22
#pragma GCC poison fopen
// use g_fopen
23
// #pragma GCC poison open // use g_open -- this one doesn't work
24
#pragma GCC poison unlink
// use g_unlink
25
26
#endif
27
28
// clang-format off
29
// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
30
// vim: shiftwidth=2 expandtab tabstop=2 cindent
31
// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
32
// clang-format on
src
common
poison.h
Generated by
1.9.8