-
Notifications
You must be signed in to change notification settings - Fork 43
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
Add primal_internal.h #194
base: main
Are you sure you want to change the base?
Conversation
@zaikunzhang We have new errors on Windows with the Intel compilers. |
Thank you @amontoison . The errors complain that some function is deprecated and suggest a replacement. It seems easy to fix, right? Thanks. |
For the issue with deprecated routine, we can use the preprocessed macro For the alignment error, I don't know what we should do. |
@@ -65,8 +72,9 @@ | |||
// Set the random seed to year/week | |||
char buf[10] = {0}; | |||
time_t t = time(NULL); | |||
struct tm *tmp = localtime(&t); | |||
int rc = strftime(buf, 10, "%y%W", tmp); | |||
struct tm timeinfo; |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error test
struct tm *tmp = localtime(&t); | ||
int rc = strftime(buf, 10, "%y%W", tmp); | ||
struct tm timeinfo; | ||
localtime_safe(&timeinfo, &t); |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error test
int rc = strftime(buf, 10, "%y%W", tmp); | ||
struct tm timeinfo; | ||
localtime_safe(&timeinfo, &t); | ||
int rc = strftime(buf, 10, "%y%W", &timeinfo); |
Check failure
Code scanning / check-spelling
Unrecognized Spelling Error test
Hi @amontoison ,
// Thread-safe version of localtime
#ifdef _WIN32
#define localtime_safe(a, b) localtime_s(a, b)
#else
#define localtime_safe(a, b) localtime_r(b, a)
#endif Why do we need to differentiate In addition, why are Thanks. Zaikun |
https://github.com/amontoison/prima/blob/c_headers_internal/c/tests/stress.c#L10 // Make PRIMA available
#include "prima/prima_internal.h" Shouldn't we use |
You need the header of |
Hi @zaikunzhang, I checked online and it seems that |
Hi @amontoison , I wanted to try fixing other warnings but did not know how to do it cleanly on top of your PR, so I created a new one. I hope you do not mind. See #196 .
I checked and I agree.
I changed its definition to Could you review #196 ? Thank you. Zaikun |
@zaikunzhang |
Hi @amontoison , It turns out that |
primal_internal.h
contains all headers for the C interface.It includes
prima.h
such that we can only write the exported routines inprimal.h
and the unexported ones inprimal_internal.h
.