-
Notifications
You must be signed in to change notification settings - Fork 400
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 function declarations in atoe.c for Open XL #7690
base: master
Are you sure you want to change the base?
Conversation
@keithc-ca @babsingh Found a few new undeclared function errors with Open XL, when rebasing the latest changes from master, just needed some reordering of functions in |
util/a2e/atoe.c
Outdated
@@ -1327,6 +1327,53 @@ atoe_putchar(int ch) | |||
return putchar((int)a2e_tab[ch]); | |||
} | |||
|
|||
/************************************************************************** |
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.
Rather than reordering, suggest just adding declarations for those functions which are referenced before they are defined (we already have some such declarations near line 161).
Open XL on z/OS throws undeclared function errors when a function is used before it has been declared or defined. This adds function declarations for those situations: - atoe_vfprintf() - atoe_vsfprintf() Signed-off-by: Gaurav Chaudhari <[email protected]>
Thanks, reverted the reordering, added the declarations and corrected the commit description/title accordingly. |
int atoe_fprintf(FILE *, const char *, ...); | ||
int atoe_vfprintf(FILE *, const char *, va_list); | ||
int atoe_vsnprintf(char *str, size_t count, const char *fmt, va_list args); | ||
int atoe_vsprintf(char *, const char *, va_list); |
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.
Suggest the parameters should have names or be improved:
int atoe_fprintf(FILE *file, const char *fmt, ...);
int atoe_vfprintf(FILE *file, const char *fmt, va_list args);
int atoe_vsnprintf(char *buf, size_t buflen, const char *fmt, va_list args);
int atoe_vsprintf(char *buf, const char *fmt, va_list args);
Open XL on z/OS throws undeclared function errors when a function is used before it has been declared or defined. The changes here reorder the function definitions so that these errors are addressed.
i.e. The function definitions are moved above, so that their definitions are available before their respective usages.