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

Better Linux support #7

Merged
merged 1 commit into from
Jul 15, 2015
Merged

Better Linux support #7

merged 1 commit into from
Jul 15, 2015

Conversation

letoh
Copy link
Contributor

@letoh letoh commented Jul 15, 2015

Since the macro _DEFAULT_SOURCE was introduced in glibc 2.19, build current pfroth will still be failed in the system with older glibc (as far as I know, some Linux systems such as Slackware and CentOS still use glibc 2.17).

According to the description in the manpage:

Since glibc 2.19, defining _GNU_SOURCE also has the effect of
implicitly defining _DEFAULT_SOURCE. In glibc versions before
2.20, defining _GNU_SOURCE also had the effect of implicitly
defining _BSD_SOURCE and _SVID_SOURCE.

and the recommendation from the manual:

We recommend you use _GNU_SOURCE in new programs. If you don’t specify the ‘-ansi’ option to GCC, or other conformance options such as -std=c99, and don’t define any of these macros explicitly, the effect is the same as defining _DEFAULT_SOURCE to 1.

I simply change the feature test macro to _GNU_SOURCE for better Linux support.

philburk added a commit that referenced this pull request Jul 15, 2015
@philburk philburk merged commit ff0d924 into philburk:master Jul 15, 2015
letoh added a commit to letoh/pforth that referenced this pull request Mar 12, 2018
This commit fixes the improper patch in the pull request philburk#7.

When building pforth on the Linux system with glibc version before
2.19, defining _GNU_SOURCE is needed for using ECHOCTL in the
source. However, the later version of glibc uses _DEFAULT_SOURCE
instead of _GNU_SOURCE for the same purpose, we will need both symbols
for both older glibc and newer glibc.
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

Successfully merging this pull request may close these issues.

None yet

2 participants