Convert fs_host files from c back to cpp and style changes.
* fs_darwin.c => fs_darwin.cpp * fs_freebsd.c => fs_freebsd.cpp * use bool instead of int again in fs_darwin.cpp (C => C++) * declare loop varibles inline again in fs_freebsd.cpp (C => C++) * 2 newlines between top header gaurd and first #include * 2 newlines after last #include * freebsd/endian.h and freebsd/regex.h convert \r\n to just \n * remove some leading tabs in fs_freebsd.cpp * add newlines after single line if statement in fs_freebsd.cpp * 80-char limit fixes in fs_freebsd.cpp
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_DIRENT
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_DIRENT
|
||||
|
||||
|
||||
#include_next <dirent.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
DIR* fdopendir(int fd);
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_ENDIAN
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_ENDIAN
|
||||
|
||||
|
||||
#include <machine/endian.h>
|
||||
|
||||
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#define __PDP_ENDIAN PDP_ENDIAN
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_FCNTL
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_FCNTL
|
||||
|
||||
|
||||
#include_next <fcntl.h>
|
||||
#include <sys/time.h>
|
||||
|
||||
|
||||
/*
|
||||
* Magic value that specify the use of the current working directory
|
||||
* to determine the target of relative file paths in the openat() and
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_REGEX
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_REGEX
|
||||
|
||||
// Include the darwin port of gnuregex
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
// Include the darwin port of gnuregex
|
||||
|
||||
#include </opt/local/include/gnuregex.h>
|
||||
|
||||
|
||||
__END_DECLS
|
||||
|
||||
#endif // _HAIKU_BUILD_COMPATIBILITY_DARWIN_REGEX
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_STDIO
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_STDIO
|
||||
|
||||
|
||||
#include_next <stdio.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int renameat(int oldFD, const char* oldPath, int newFD, const char* newPath);
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
||||
|
||||
|
||||
#include_next <sys/stat.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
|
||||
#ifndef UTIME_NOW
|
||||
# define UTIME_NOW (-1)
|
||||
# define UTIME_OMIT (-2)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_UNISTD
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_UNISTD
|
||||
|
||||
|
||||
#include_next <unistd.h>
|
||||
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
||||
int faccessat(int fd, const char* path, int accessMode, int flag);
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
|
||||
// There's no <endian.h> in FreeBSD, but <sys/endian.h>. And the macro naming
|
||||
// differs.
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN _BIG_ENDIAN
|
||||
#define __PDP_ENDIAN _PDP_ENDIAN
|
||||
#define BYTE_ORDER _BYTE_ORDER
|
||||
|
||||
#endif // _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
|
||||
|
||||
// There's no <endian.h> in FreeBSD, but <sys/endian.h>. And the macro naming
|
||||
// differs.
|
||||
|
||||
#include <sys/endian.h>
|
||||
|
||||
|
||||
#define __LITTLE_ENDIAN _LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN _BIG_ENDIAN
|
||||
#define __PDP_ENDIAN _PDP_ENDIAN
|
||||
#define BYTE_ORDER _BYTE_ORDER
|
||||
|
||||
#endif // _HAIKU_BUILD_COMPATIBILITY_FREEBSD_ENDIAN
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
|
||||
// There's no <regex.h> in FreeBSD, but <gnu/regex.h>.
|
||||
|
||||
#include <gnu/regex.h>
|
||||
|
||||
#endif // _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
|
||||
|
||||
// There's no <regex.h> in FreeBSD, but <gnu/regex.h>.
|
||||
|
||||
#include <gnu/regex.h>
|
||||
|
||||
|
||||
#endif // _HAIKU_BUILD_COMPATIBILITY_FREEBSD_REGEX
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
||||
|
||||
|
||||
#include_next <sys/stat.h>
|
||||
#include <sys/cdefs.h>
|
||||
|
||||
|
||||
#ifndef UTIME_NOW
|
||||
# define UTIME_NOW (-1)
|
||||
# define UTIME_OMIT (-2)
|
||||
|
||||
Reference in New Issue
Block a user