Several libc370 runtime routines are linkable on MVS but have no usable public prototype, so consumers get implicit-declaration warnings and must declare them locally. Surfaced while building httplua (mvslovers/httplua, worked around in commit a804a8f).
Functions with no public header
| Function |
Suggested header |
Notes |
int loadenv(const char *ddname) |
clibenv.h |
Loads env vars from a DD (e.g. dd:SYSENV); used by CGI programs. |
void tzset(void) |
time.h |
POSIX; time.h currently declares time/localtime/mktime/etc. but not tzset. |
void __exit(int rc) |
clibcrt.h (or stdlib.h) |
Runtime exit. |
__svc99 is guarded under #ifdef MUSIC
mvssupa.h declares int __svc99(void *rb); only inside #ifdef MUSIC:
#ifdef MUSIC
int __system(...);
int __textlc(void);
int __svc99(void *rb);
#else
int __system(int req_type, size_t pgm_len, char *pgm, size_t parm_len, char *parm);
...
#endif
SVC 99 (dynamic allocation) is an MVS service, so on MVS (the #else branch)
the prototype is missing. It should be available outside the MUSIC guard.
Impact
The functions link fine (libc370 defines them); only the prototypes are absent,
which trips -Wimplicit-declaration in consumers. Adding the prototypes lets
httplua (and any future consumer) drop its local extern declarations.
Several libc370 runtime routines are linkable on MVS but have no usable public prototype, so consumers get implicit-declaration warnings and must declare them locally. Surfaced while building httplua (mvslovers/httplua, worked around in commit a804a8f).
Functions with no public header
int loadenv(const char *ddname)clibenv.hdd:SYSENV); used by CGI programs.void tzset(void)time.htime.hcurrently declares time/localtime/mktime/etc. but not tzset.void __exit(int rc)clibcrt.h(orstdlib.h)__svc99is guarded under#ifdef MUSICmvssupa.hdeclaresint __svc99(void *rb);only inside#ifdef MUSIC:SVC 99 (dynamic allocation) is an MVS service, so on MVS (the
#elsebranch)the prototype is missing. It should be available outside the MUSIC guard.
Impact
The functions link fine (libc370 defines them); only the prototypes are absent,
which trips
-Wimplicit-declarationin consumers. Adding the prototypes letshttplua (and any future consumer) drop its local
externdeclarations.