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

Improve Portability #1

Merged
merged 0 commits into from
Nov 24, 2011
Merged

Improve Portability #1

merged 0 commits into from
Nov 24, 2011

Conversation

droe
Copy link

@droe droe commented Apr 24, 2011

Some more improvements to BSD support and general portability:

  • Autodetect dependencies in more portable ways
  • Autodetect Linux netfilter and BSD pf
  • Extend BSD specific documentation
  • Reorder includes to fix build

Tested on FreeBSD 8.2, OpenBSD 4.8, Linux.
Fixes issue #2.


/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = strdup("$min_log4cpp_version");
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fail for log4cpp version 1.0 which returns this:
# /usr/bin/log4cpp-config --version
1.0

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you actually tested it or are you guessing? The output of log4cpp-config is fed through sed to add a ".0" to the end if the version is only two digits (line 41). Does that fail for you? (Works for me both with BSD sed and GNU sed.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry yes it works fine
I did test but made a mistake.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No problem. Thanks!

@droe droe merged commit 01a03d2 into moxie0:master Nov 24, 2011
@droe
Copy link
Author

droe commented Nov 24, 2011

I've split the master branch into several orthogonal topic branches to facilitate merging of the non-problematic parts.
This merge request was autoclosed by github when I force-pushed my new droe:master branch.

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

Successfully merging this pull request may close these issues.

2 participants