-
Notifications
You must be signed in to change notification settings - Fork 1k
fwrite zlib #3951
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
Merged
Merged
fwrite zlib #3951
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
53f91a4
removed z_const
mattdowle cc4fa28
added src/configure, and changed "zlib.h" to <zlib.h>
mattdowle d1896a6
only search c files
MichaelChirico 5c12ce6
const results in 'discards const' warning, so removed
mattdowle 3a3b3b8
Merge branch 'fwrite_zlib' of https://github.com/Rdatatable/data.tabl…
mattdowle 6e1a5be
exit not return for osx
mattdowle 554587c
remove a space
mattdowle c627c14
search .c and .h files
mattdowle 06f5953
news item
mattdowle File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/bin/sh | ||
| # Let's keep this simple. If pkg-config is available, use it. Otherwise print | ||
| # the helpful message to aid user if compilation does fail. Note 25 of R-exts: | ||
| # "[pkg-config] is available on the machines used to produce the CRAN binary packages" | ||
|
|
||
| if ! hash pkg-config 2>/dev/null; then | ||
| echo "*** pkg-config is not installed. It is used to check that zlib is installed. Compilation" | ||
| echo "*** will now be attempted and if it works you can ignore this message. If it fails and" | ||
| echo "*** and you cannot install pkg-config, try: locate zlib.h zconf.h. If they are not found" | ||
| echo "*** then try installing zlib1g-dev (Debian/Ubuntu), zlib-devel (Fedora) or zlib (OSX)" | ||
| exit 0 # now that the advice has been printed, exit with success and continue | ||
| fi | ||
|
|
||
| if ! `pkg-config --exists zlib`; then | ||
| echo "pkg-config did not detect zlib is installed. Try installing:" | ||
| echo "* deb: zlib1g-dev (Debian, Ubuntu, ...)" | ||
| echo "* rpm: zlib-devel (Fedora, EPEL, ...)" | ||
| echo "* brew: zlib (OSX)" | ||
| exit 1 # nothing more to do; zlib is required currently | ||
| fi | ||
|
|
||
| version=`pkg-config --modversion zlib` | ||
| echo "zlib ${version} is available ok" | ||
|
|
||
| lib=`pkg-config --libs zlib` | ||
| if test $lib != "-lz"; then | ||
| echo "zlib is linked using ${lib} not the expected standard -lz. Please report to data.table issue tracker on GitHub." | ||
| exit 1 | ||
| fi | ||
|
|
||
| exit 0 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
What was wrong with
constexactly?I see this in my
zlib.h:would it make sense to simply imitate this logic like
?
Uh oh!
There was an error while loading. Please reload this page.
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 put the error message I got in the comment at the top of this issue.
I don't understand what z_const is for. If we put those 3 lines back in, could you think of a comment to put alongside to explain why if z_const is defined, it should be used? And why const can't be used? master as of now is simple: don't use z_const.
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.
Sorry I missed the comment, I had only seen the commit message.
I don't really know any details, mine was more a question of curiosity... perhaps @philippechataignon could comment based on motivation for using
z_constin the first place?