Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace getopt_long_only with getopt_long and #include <execinfo.h> is somehow dragged in on BSD systems? #26

Closed
ShadowKyogre opened this issue Jun 5, 2012 · 2 comments

Comments

@ShadowKyogre
Copy link

A friend of mine was trying to package this for pkgsrc on their NetBSD machine and two issues cropped up:

  • Since getopt_long_only is used instead of getopt_long, they had to edit this out in order to proceed further into the build.
  • For some reason, execinfo.h is dragged into the buildpath even though the person's system isn't Windows. I don't know how to modify the file to recognize that what's compiling really is windows. Commenting out the call to print_trace() somehow fixes this, even though execinfo.h was pulled in due to this weirdness.

Their modified glyr / src / glyrc / glyrc.c: http://pastebin.ca/2158525
If it's possible to make BSD specific changes to compiling, that'd be grand. Otherwise I think this would have to be a patch for it to compile under *BSD systems.

@sahib
Copy link
Owner

sahib commented Jun 5, 2012

Hi there,

Thanks for the hint.
I was not aware that getopt_long_only was a GNU Extension. I'm totally fine with that change.

For execinfo.h: I replaced #ifndef G_OS_WIN32 with #ifdef __linux__ so it only is compiled in for compatible machines I did not found any HAVE_EXECINFO or better-fitting feature macros (sigh)

Give me some feedback if everything compiles fine now.

@ShadowKyogre
Copy link
Author

Friend compiled it with the applied with the applied changes and it works! I also compiled it to make sure the changes didn't do anything weird to building it on Linux boxes.

@sahib sahib closed this as completed Jun 6, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants