Skip to content

Commit 723c28a

Browse files
committed
Is #663 - Add 'Haiku' port, '__HAIKU__'
1 parent 7af9e18 commit 723c28a

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

include/tidyplatform.h

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,15 @@ extern "C" {
315315
# endif
316316
#endif
317317

318+
/* === Convenience defines for Haiku platforms === */
319+
320+
#if defined(__HAIKU__)
321+
# define HAIKU
322+
# ifndef PLATFORM_NAME
323+
# define PLATFORM_NAME "Haiku"
324+
# endif
325+
#endif
326+
318327
/* === Convenience defines for Cygwin platforms === */
319328

320329
#if defined(__CYGWIN__)
@@ -428,7 +437,7 @@ extern "C" {
428437
#if PRESERVE_FILE_TIMES
429438

430439
# ifndef HAS_FUTIME
431-
# if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__) || defined(__GLIBC__)
440+
# if defined(CYGWIN_OS) || defined(BE_OS) || defined(OS2_OS) || defined(HPUX_OS) || defined(SOLARIS_OS) || defined(LINUX_OS) || defined(BSD_BASED_OS) || defined(MAC_OS) || defined(__MSL__) || defined(IRIX_OS) || defined(AIX_OS) || defined(__BORLANDC__) || defined(__GLIBC__) || defined(__HAIKU__)
432441
# define HAS_FUTIME 0
433442
# else
434443
# define HAS_FUTIME 1
@@ -456,6 +465,12 @@ extern "C" {
456465
# include <utime.h>
457466
# endif
458467

468+
#if defined(__HAIKU__)
469+
#ifndef va_copy
470+
#define va_copy(dest, src) (dest = src)
471+
#endif
472+
#endif
473+
459474
/* MS Windows needs _ prefix for Unix file functions.
460475
Not required by Metrowerks Standard Library (MSL).
461476
@@ -549,7 +564,7 @@ extern "C" {
549564
# include <sys/types.h>
550565
#endif
551566

552-
#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS)
567+
#if !defined(HPUX_OS) && !defined(CYGWIN_OS) && !defined(MAC_OS_X) && !defined(BE_OS) && !defined(SOLARIS_OS) && !defined(BSD_BASED_OS) && !defined(OSF_OS) && !defined(IRIX_OS) && !defined(AIX_OS) && !defined(LINUX_OS) && !defined(__HAIKU__)
553568
# undef uint
554569
typedef unsigned int uint;
555570
#endif

0 commit comments

Comments
 (0)