diff --git a/src/get_line.c b/src/get_line.c index 289e5a2..4207a88 100644 --- a/src/get_line.c +++ b/src/get_line.c @@ -1,5 +1,5 @@ -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) # include #endif @@ -9,7 +9,7 @@ #include #include -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) # include # include # include @@ -33,7 +33,7 @@ disable_echo(void) fflush(stdout); fflush(stderr); -# if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +# if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) { struct termios p; @@ -60,7 +60,7 @@ enable_echo(void) fflush(stdout); fflush(stderr); -# if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +# if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) { struct termios p; diff --git a/src/helpers.c b/src/helpers.c index 5e9102a..17a13e7 100644 --- a/src/helpers.c +++ b/src/helpers.c @@ -1,5 +1,5 @@ -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) # include # include # include @@ -184,7 +184,7 @@ file_basename(const char *file) FILE * fopen_create_useronly(const char *file) { -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) int fd; if ((fd = open(file, O_CREAT | O_TRUNC | O_WRONLY, @@ -212,7 +212,7 @@ basedir_create_useronly(const char *file) } dir[basename - dir - 1] = 0; -#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__HAIKU__) if (*dir == 0 || mkdir(dir, 0700) == 0 || errno == EEXIST) { ret = 0; }