0 Star 0 Fork 18

wangjie/IvorySQL

forked from IvorySQL/IvorySQL 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
link-canary.c 1.22 KB
一键复制 编辑 原始数据 按行查看 历史
Bruce Momjian 提交于 2024-01-04 09:49 +08:00 . Update copyright for 2024
/*-------------------------------------------------------------------------
* link-canary.c
* Detect whether src/common functions came from frontend or backend.
*
* Copyright (c) 2018-2024, PostgreSQL Global Development Group
*
* IDENTIFICATION
* src/common/link-canary.c
*
*-------------------------------------------------------------------------
*/
#include "c.h"
#include "common/link-canary.h"
/*
* This function just reports whether this file was compiled for frontend
* or backend environment. We need this because in some systems, mainly
* ELF-based platforms, it is possible for a shlib (such as libpq) loaded
* into the backend to call a backend function named XYZ in preference to
* the shlib's own function XYZ. That's bad if the two functions don't
* act identically. This exact situation comes up for many functions in
* src/common and src/port, where the same function names exist in both
* libpq and the backend but they don't act quite identically. To verify
* that appropriate measures have been taken to prevent incorrect symbol
* resolution, libpq should test that this function returns true.
*/
bool
pg_link_canary_is_frontend(void)
{
#ifdef FRONTEND
return true;
#else
return false;
#endif
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/Jugier/IvorySQL.git
git@gitee.com:Jugier/IvorySQL.git
Jugier
IvorySQL
IvorySQL
master

搜索帮助