-
Notifications
You must be signed in to change notification settings - Fork 127
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
Strptime update #1133
Strptime update #1133
Conversation
third party code
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.
LGTM++
Thank you.
Was this really easier than flushing out our shim to QDateTime's toStrting/fromString?
|
||
#include <assert.h> | ||
#include <ctype.h> | ||
-#include <langinfo.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.
c++17 has
#if has_include <langinfo.h>
#include <langinfo.h.>
#endif
...but if we don't need it, we don't need it. {shrug}
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.
nice idea, but this is c.
strptime/strptime_l.c.patch
Outdated
+/* now now, don't need to be rude .... */ | ||
+static | ||
+int | ||
+case_ignore_strncmp(const char *s1, const char *s2, int n) |
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 don't think I wrote the above (it does sound like me...) but in case this is for MS (and it always is) SO says that the current wisdom to #define a passthrough to _strnicmp
It really is pretty embarrassing how crude the string functions are in C 50 years later. Just sayin'
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.
now using _strnicmp
This update strptime to glibc 2.37.
The license for strptime is now LGPL 2.1 instead of LGPL 2.0. If this is not acceptable we may be able to license it under GPL 2.0.
See strptime/README.GPSBabel.
The modifications required are in strptime/strptime_l.c.patch:
This solves warnings from clang 15 about -Wdeprecated-non-prototype related to upcoming changes in C23. With the MSVC compiler a number of other warnings crop up and are disabled in strptime.cmake.