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

add SVR4 support #153

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Nathan French <nate@cl0d.com>
Redjack, LLC
Roger Shimizu <rogershimizu@gmail.com>
Toby DiPasquale <toby@cbcg.net>
Rivoreo Group
4 changes: 4 additions & 0 deletions include/libcork/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@
/* Do some BSD (4.3 code base or newer)specific autodetection. */
#include <libcork/config/bsd.h>

#elif defined(__sun) && defined(__SVR4)
/* Solaris and its derivatives */
#include <libcork/config/solaris.h>

#endif /* platforms */


Expand Down
30 changes: 30 additions & 0 deletions include/libcork/config/solaris.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* -*- coding: utf-8 -*-
* ----------------------------------------------------------------------
* Copyright © 2019, libcork authors
* All rights reserved.
*
* Please see the COPYING file in this distribution for license details.
* ----------------------------------------------------------------------
*/

#ifndef LIBCORK_CONFIG_SOLARIS_H
#define LIBCORK_CONFIG_SOLARIS_H

/*-----------------------------------------------------------------------
* Endianness
*/

#include <sys/byteorder.h>

#ifdef _BIG_ENDIAN
#define CORK_CONFIG_IS_BIG_ENDIAN 1
#define CORK_CONFIG_IS_LITTLE_ENDIAN 0
#else
#define CORK_CONFIG_IS_BIG_ENDIAN 0
#define CORK_CONFIG_IS_LITTLE_ENDIAN 1
#endif

#define CORK_HAVE_REALLOCF 0
#define CORK_HAVE_PTHREADS 1

#endif /* LIBCORK_CONFIG_SOLARIS_H */
2 changes: 1 addition & 1 deletion src/libcork/posix/subprocess.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ cork_subprocess_is_finished(struct cork_subprocess *self)
#if defined(__APPLE__)
#include <pthread.h>
#define THREAD_YIELD pthread_yield_np
#elif defined(__linux__) || defined(BSD) || defined(__FreeBSD_kernel__) || defined(__GNU__)
#elif defined(__linux__) || defined(BSD) || defined(__FreeBSD_kernel__) || defined(__GNU__) || defined(__SVR4)
#include <sched.h>
#define THREAD_YIELD sched_yield
#else
Expand Down