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

implementation of mkstemp in src/webpng.c under win #514

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

willson-chen
Copy link
Member

use _mktemp_s and _open to implement mkstemp in src/webpng.c under win.

use _mktemp_s and _open to implement mkstemp in src/webpng.c under win
Copy link
Member

@vapier vapier left a comment

Choose a reason for hiding this comment

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

we specifically don't want to copy & splat these implementations over the codebase

you can look at GD_PROGRAMS_LIB_SRC_FILES and getopt.c for handling it differently.

@willson-chen
Copy link
Member Author

@vapier Hi, I had made some modification according to your suggestion. And #512 which is also created by me is similar to this PR. Any advice on both PRs would be appriciated. Thanks

@willson-chen
Copy link
Member Author

willson-chen commented Sep 30, 2019

There will be serveral functions only defined in Unix-like, like getline.

  • Put the windows implementation of these funtions into different source files,
  • or create a single file to gather them all,

which one is prefered?

- src/mkstemp.c: add `#include <string.h>` for strlen.
- src/webpng.c: add mkstemp declaration under win.
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.

None yet

2 participants