Skip to content

Conversation

Gikoskos
Copy link
Contributor

struct stat st and int err in function cfg_searchpath() aren't usable
if HAVE_SYS_STAT_H isn't defined and they break the build with MSVC.
And conditionals with omitted operands are a GNU extension and not
supported by MSVC.

struct stat st and int err in function cfg_searchpath() aren't usable
if HAVE_SYS_STAT_H isn't defined and they break the build with MSVC.
Also conditionals with omitted operands are a GNU extension and not
supported with MSVC.
@troglobit
Copy link
Collaborator

@Gikoskos NACK. The first hunk of the patch you'll have to redo, something along the lines of:

if (!value)
        value = "NULL";
cfg_error(cfg, "internal error in cfg_setopt(%s, %s)", opt->name, value);

Fix that and I'll merge right away. Cheers!

@Gikoskos
Copy link
Contributor Author

Will this one work?

cfg_error(cfg, "internal error in cfg_setopt(%s, %s)", opt->name, (value) ? (value) : "NULL");

@troglobit
Copy link
Collaborator

@Gikoskos absolutely! 👍

troglobit added a commit that referenced this pull request Mar 16, 2016
Fixed MSVC build errors

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
@troglobit troglobit merged commit 40efadf into libconfuse:master Mar 16, 2016
@troglobit
Copy link
Collaborator

Thank you so much for contributing to libConfuse and Open Source! 😃 ❤️

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