Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBuild fixes for Solaris #84
Merged
Conversation
Solaris 10 & 11 system headers require that if a C99 compiler is used and _XOPEN_SOURCE is specified, that _XOPEN_SOURCE must be 600, since prior versions of the X/Open standards only supported C89. Fixes many errors in configure and build steps of: /usr/include/sys/feature_tests.h:397:2: error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications" Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Fixes build errors on Solaris of:
./beep_solaris.c:31:7: warning: implicit declaration of function ‘logMessage’ [-Wimplicit-function-declaration]
logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
^
./beep_solaris.c:31:18: error: ‘LOG_DEBUG’ undeclared (first use in this function)
logMessage(LOG_DEBUG, "keyboard opened: fd=%d", keyboard);
^
./beep_solaris.c:33:7: warning: implicit declaration of function ‘logSystemError’ [-Wimplicit-function-declaration]
logSystemError("keyboard open");
^
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Fixes build errors on Solaris of:
./beep_solaris.c: In function 'getKeyboard':
./beep_solaris.c:30:21: warning: implicit declaration of
function 'open' [-Wimplicit-function-declaration]
if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
^
./beep_solaris.c:30:38: error: 'O_WRONLY' undeclared
(first use in this function)
if ((keyboard = open("/dev/kbd", O_WRONLY)) != -1) {
^
./pcm_audio.c: In function 'openPcmDevice':
./pcm_audio.c:40:32: warning: implicit declaration of
function 'open' [-Wimplicit-function-declaration]
if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
^
./pcm_audio.c:40:45: error: 'O_WRONLY' undeclared
(first use in this function)
if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
./pcm_audio.c:40:54: error: 'O_NONBLOCK' undeclared
(first use in this function)
if ((pcm->fileDescriptor = open(device, O_WRONLY|O_NONBLOCK)) != -1) {
^
./pcm_audio.c:56:61: warning: implicit declaration of
function 'strerror' [-Wimplicit-function-declaration]
logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
^
./pcm_audio.c:56:70: error: 'errno' undeclared
(first use in this function)
logMessage(errorLevel, "Cannot set audio info: %s", strerror(errno));
^
|
Thanks. In configure.ac, I changed solaris2.1? to solaris2.1?* - I hope that's
okay.
|
|
That's fine - I'd used ? just to skip over Solaris 2.1, but since that far predates the required XPG5 support it's not going to matter anyway. I pulled your changes and it still builds okay for me here. |
|
Does Solaris have the ability to directly inspect the screen content so that we
can look into writing a native screen driver for it? I recall that there was
talk of doing that several years ago. Also, virtual consoles.
|
|
By "screen content" I assume you mean in tty mode? (Since graphics mode is just the X Window System like most other Unixes.) I don't know and would have to investigate it. Virtual consoles are supported in Solaris 11 and later - the ioctls for them are documented on http://docs.oracle.com/cd/E53394_01/html/E54777/vt-7i.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
alanc commentedJan 3, 2017
These are patches we've been using to build the brltty-5.4 packages for Solaris.