Henry's Notebook
Many strange things
搜索
菜单
导航
首页
最近更改
随机页面
帮助
Henry's Home
个人资料
个人资料
创建账户
登录
消息
目前您没有通知。请访问您的
讨论页
以查看过去消息。
页面工具
内容页面
讨论
查看源代码
历史
首页
»
页面s
查看“Portability”的源代码
←
Portability
页面上次由
HenryHu
编辑于11年前
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:emailconfirmed
您可以查看与复制此页面的源代码。
Various portability issues, mainly between linux/freebsd == prctl() / prctl.h == No prctl() in freebsd. * To set process title, use setproctitle() * For PR_SET_PTRACER, I'm not sure now. == malloc.h == Including malloc.h in freebsd leads to compile error. Use stdlib.h instead. Anyway, in linux's malloc(3) manpage, it is said that you should include stdlib.h. == libdl == In linux, dlopen()/dlclose()/dlsym() are in libdl. In freebsd, they are in libc. So there is no point to link with libdl, and there is no libdl, anyway. == program_invocation_short_name == No such thing in bsd. Maybe you should use argv[0]. == Include path / Lib path == freebsd installs all non-base softwares into '''/usr/local'''. So, the third party include files are in '''/usr/local/include''', and third party lib files are in '''/usr/local/lib''', and they are not in the default include/lib path, so you should include them with -I & -L. The modern way is to use pkg-config. You may also use cmake's FindXXX.
返回至
Portability
。