-
Notifications
You must be signed in to change notification settings - Fork 10
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
easy install functions.sh but not consoletype, for x86-winnt profiles #5
base: master
Are you sure you want to change the base?
Conversation
headers.h
Outdated
#if defined(__GLIBC__) | ||
#if defined(__GLIBC__) || defined(__CYGWIN__) | ||
# define HAVE_UNISTD_H | ||
# define HAVE_SYS_IOCTL_H |
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.
This breaks compilation with musl libc. According to the main code, the include should be conditional on __linux__
instead of __GLIBC__
.
headers.h
Outdated
# define HAVE_SYS_SYSMACROS_H | ||
# define HAVE_ERROR_H | ||
# define HAVE_TTYNAME |
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.
unistd.h
and ttyname
should be available on any POSIX system. So it seems that it would make more sense to test for systems without them.
#ifdef HAVE_SYS_SYSMACROS_H | ||
# include <sys/sysmacros.h> | ||
#endif | ||
|
||
#if defined(__GNUC_STDC_INLINE__) && (__GNUC_STDC_INLINE__ - 0) |
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.
Does this work with Clang?
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.
No Clang anywhere here: It should "work", but may not inline anything eventually.
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.
@grobian AFAIR, you're using Clang: Do you know whether it does accept the #if (__GNUC_STDC_INLINE__ - 0)
preprocessor construct?
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.
% echo "#if defined(__GNUC_STDC_INLINE__) && (__GNUC_STDC_INLINE__ - 0)\n#error yes\n#endif" | clang -E -
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 340 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
<stdin>:2:2: error: yes
#error yes
^
1 error generated.
So I guess yes?
headers.h
Outdated
#if defined(__GLIBC__) | ||
#if defined(__GLIBC__) || defined(__CYGWIN__) | ||
# define HAVE_UNISTD_H | ||
# define HAVE_SYS_IOCTL_H | ||
# define HAVE_SYS_SYSMACROS_H | ||
# define HAVE_ERROR_H |
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.
In a tangential direction: It seems that the <error.h>
header isn't used at all.
Although consoletype can be built with MSVC, it is of less use there.
I just wanted to report that now everything works fine with musl. Thanks! |
No description provided.