emersion / emersion/mrsh

Collisions with private symbols

Open
#138 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
531
Forks
40
PR merge metrics
No merged PRs in 30d

Description

This causes issues with static libraries. If the library user defines a symbol with the same name as one of our internal symbols, they'll clash.

Solutions include:

* Use an external program to strip symbols from the lib
* Prefix internal symbols with `_mrsh_`: technically symbols beginning with `_` are reserved, but it's very unlikely to cause any issue in practice
* Prefix internal symbols with `mrsh__`: this requires un-marking some exported symbols, which Darwin doesn't support
* Suffix internal symbols with `_mrsh`: doesn't sound very idiomatic in C
* Prefix internal symbols with `mrshp_` or `mrshpriv_`

Related: make `mrsh_getopt` private

Also see https://github.com/swaywm/wlroots/issues/1892

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.