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

Implicit-declaration (missing #include) warnings #107

Closed
dmacks opened this issue Jan 29, 2020 · 3 comments
Closed

Implicit-declaration (missing #include) warnings #107

dmacks opened this issue Jan 29, 2020 · 3 comments

Comments

@dmacks
Copy link

dmacks commented Jan 29, 2020

Building dateutils-0.4.6 on OS X 10.13...

yuck.c:1175:6: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
        if (_NSGetExecutablePath(buf, &z) != 0) {
            ^
time-core.c:124:13: warning: implicitly declaring library function 'strcasecmp' with type 'int (const char *, const char *)' [-Wimplicit-function-declaration]
        } else if (strcasecmp(*fmt, "hms") == 0) {
                   ^
time-core.c:124:13: note: include the header <strings.h> or explicitly provide a declaration for 'strcasecmp'
clitosis.c:382:7: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
                if (_NSGetExecutablePath(buf, &bsz) < 0) {
                    ^
@hroptatyr
Copy link
Owner

Hey Daniel,
thanks for reporting this. I pushed a fix (00c8383) to master.

@thesamesam
Copy link

Looks like this can be closed now.

@dmacks
Copy link
Author

dmacks commented Mar 19, 2023

Building 0.4.10 , time-core.c looks clean in this regard. But clitosis.c is still:

clitosis.c:383:7: warning: implicit declaration of function '_NSGetExecutablePath' is invalid in C99 [-Wimplicit-function-declaration]
                if (_NSGetExecutablePath(buf, &bsz) < 0) {
                    ^

Needs the same fix that yuck.c got in a10d39c:

#if defined __APPLE__
# include <mach-o/dyld.h>
#endif  /* __APPLE__ */

hroptatyr added a commit that referenced this issue Mar 20, 2023
* bug/107:
  hygiene, include macho-o/dyld.h for _NSGetExecutablePath(), fixes #107
GerHobbelt added a commit to GerHobbelt/dateutils that referenced this issue May 10, 2024
Summary: v0.4.11 of dateutils
Keywords: v0.4.11

This is dateutils v0.4.11.

This is a bugfix release.

Bugfixes:
- be strict about inputs in datetest --isvalid (hroptatyr#146)
- build on Macs again (hroptatyr#107)
- make illegible zone names fatal errors (hroptatyr#151)
- be strict in datetest --isvalid when inputs have been specified (hroptatyr#146)
- fix issue with negative days remaining after adding months in datediff (hroptatyr#153)

See info page examples and/or README.

# -----BEGIN PGP SIGNATURE-----
# Version: GnuPG v2
#
# iEYEABECAAYFAmWyMssACgkQlMmhrILJOQ4F0wCfbiWQfuERz79Mq+BNlyOw0tL6
# RkoAoItx9dPdr/1inKBukpq2McZK2QrF
# =upNa
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu Jan 25 11:07:07 2024 WEST
# gpg:                using DSA key 94C9A1AC82C9390E
# gpg: Can't check signature: No public key
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

No branches or pull requests

3 participants