-
Notifications
You must be signed in to change notification settings - Fork 185
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
Fix compiler error on Illumos #317
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
endif | ||
|
||
PG_CPPFLAGS += -D__EXTENSIONS__ |
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.
what does this do?
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.
When compiling pg_cron
with -std=c99, I need to add -D__EXTENSIONS__. Maybe I can do this during the compilation of the Postgres.
else | ||
PG_CPPFLAGS = -std=c99 -Wall -Wextra -Werror -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude -I$(libpq_srcdir) | ||
PG_CPPFLAGS = -std=c99 -Wall -Wextra -Wno-unused-parameter -Wno-implicit-fallthrough -Iinclude -I$(libpq_srcdir) |
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.
not a good change, can the includes be fixed somehow?
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.
On Illumos, UINT8_MAX is defined as '255U', however, Linux glibc uses '255' for UINT8_MAX, which is signed.
When using the -Werror flag, any warning generated during compilation will be treated as an error and the compilation process will fail.
/home/japin/postgres/build/pg/include/server/access/rmgr.h:50:42: error: comparison of integer expressions of different signedness: 'int' and 'unsigned int' [-Werror=sign-compare]
50 | return rmid >= RM_MIN_CUSTOM_ID && rmid <= RM_MAX_CUSTOM_ID;
| ^~
cc1: all warnings being treated as errors
Although this is a Postgres issue, forcing -Werror will cause pg_cron to fail to compile successfully on Illumos
Hi,
When I try to use pg_cron on Illumos, there are some errors, such as following: