-
Notifications
You must be signed in to change notification settings - Fork 292
Some changes I made while working on libnetcdf on the Anaconda Distribution recently. #971
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
Changes from all commits
a6e4744
1a38ac5
327f778
ec27a51
02fb431
4d8ea75
800e1ad
04c70d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,6 +20,7 @@ | |
| #include "nc4dispatch.h" | ||
| #include <H5DSpublic.h> | ||
| #include <math.h> | ||
| #include <inttypes.h> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This include is already below: Is that not working for your build? |
||
|
|
||
| #ifdef HAVE_INTTYPES_H | ||
| #define __STDC_FORMAT_MACROS | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,7 @@ | |
| * Author: Wei-keng Liao. | ||
| */ | ||
|
|
||
| #include "config.h" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I put this change in another current PR #1266 so that it gets into the code base. All test programs must start by including config.h. I also checked the other tests in nc_test and nc_test4 and found a bunch more places where the include was missing, so I fixed those too. Thanks for noticing this. |
||
| #include <stdio.h> | ||
| #include <stdlib.h> | ||
| #include <string.h> | ||
|
|
@@ -38,6 +39,7 @@ int main(int argc, char** argv) { | |
| size_t start[2], count[2]; | ||
| int formats[5]={NC_FORMAT_CLASSIC, NC_FORMAT_64BIT_OFFSET, NC_FORMAT_CDF5, | ||
| NC_FORMAT_NETCDF4, NC_FORMAT_NETCDF4_CLASSIC}; | ||
| char *cmd_str; | ||
|
|
||
| if (argc > 2) { | ||
| printf("Usage: %s [filename]\n",argv[0]); | ||
|
|
@@ -46,7 +48,7 @@ int main(int argc, char** argv) { | |
| if (argc == 2) snprintf(filename, 256, "%s", argv[1]); | ||
| else strcpy(filename, "tst_def_var_fill.nc"); | ||
|
|
||
| char *cmd_str = (char*)malloc(strlen(argv[0]) + 256); | ||
| cmd_str = (char*)malloc(strlen(argv[0]) + 256); | ||
| sprintf(cmd_str, "*** TESTING C %s for def_var_fill ", argv[0]); | ||
| printf("%-66s ------ ", cmd_str); fflush(stdout); | ||
| free(cmd_str); | ||
|
|
||
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 will add this change in one of my outstanding branches as well.