-
Notifications
You must be signed in to change notification settings - Fork 262
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
fixed optxxx var undefined in src/webpng.c under MSVC #512
base: master
Are you sure you want to change the base?
fixed optxxx var undefined in src/webpng.c under MSVC #512
Conversation
@vapier hi, could you please spare some time to offer some suggestion? I want improve the build under windows platform. |
Hi @vapier @cmb69, could you please spare some time to review this PR. I have test this PR on win10 with cmake and it works. But What do you think? :) |
This looks okay to me. I wonder. though, if it makes sense to maintain these tools; they actually look more like examples to me, and their names are somewhat arbitrary. |
Take I strongly recommand to move them to a new folder, make |
#ifndef GETOPT_H | ||
#define GETOPT_H 1 | ||
|
||
#ifdef __cplusplus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious if there is necessity in having cpp guard for c library header
@@ -2,6 +2,10 @@ | |||
#include "config.h" | |||
#endif | |||
|
|||
#ifdef WIN32 | |||
#include "getopt.h" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Header is good way to declare functions, but I haven't seen headers in this library and this functionality is used only in one place.
unistd.h
can not included by src/webpng.c under MSVC. So optind opterr and related var are unavaible.