Style fixes suggested by Axeld.
Added Ingo to the copyright Updated copyright year to 2012 for my contribution.
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
#ifndef _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
||||||
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
#define _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT
|
||||||
|
|
||||||
|
|
||||||
#include_next <sys/stat.h>
|
#include_next <sys/stat.h>
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
@@ -28,4 +29,4 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT */
|
#endif /* _HAIKU_BUILD_COMPATIBILITY_DARWIN_SYS_STAT */
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
#ifndef _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
||||||
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
#define _HAIKU_BUILD_COMPATIBILITY_FREEBSD_SYS_STAT
|
||||||
|
|
||||||
|
|
||||||
#include_next <sys/stat.h>
|
#include_next <sys/stat.h>
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011, John Scipione, [email protected].
|
* Copyright 2005-2011, Ingo Weinhold, [email protected].
|
||||||
|
* Copyright 2012, John Scipione, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "fs_darwin.h"
|
#include "fs_darwin.h"
|
||||||
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
@@ -51,6 +53,7 @@ get_path(int fd, const char* path, char** fullPath)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
eaccess(const char* path, int accessMode)
|
eaccess(const char* path, int accessMode)
|
||||||
{
|
{
|
||||||
@@ -126,7 +129,7 @@ faccessat(int fd, const char* path, int accessMode, int flag)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -172,7 +175,7 @@ fchmodat(int fd, const char* path, mode_t mode, int flag)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -220,7 +223,7 @@ fchownat(int fd, const char* path, uid_t owner, gid_t group, int flag)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -260,7 +263,7 @@ fstatat(int fd, const char *path, struct stat *st, int flag)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -293,7 +296,7 @@ mkdirat(int fd, const char *path, mode_t mode)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -325,7 +328,7 @@ mkfifoat(int fd, const char *path, mode_t mode)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -357,7 +360,7 @@ mknodat(int fd, const char *path, mode_t mode, dev_t dev)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -459,7 +462,7 @@ readlinkat(int fd, const char *path, char *buffer, size_t bufferSize)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -529,7 +532,7 @@ unlinkat(int fd, const char *path, int flag)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
@@ -643,7 +646,7 @@ futimesat(int fd, const char *path, const struct timeval times[2])
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *fullPath = (char *)malloc(MAXPATHLEN);
|
char* fullPath = (char *)malloc(MAXPATHLEN);
|
||||||
if (fullPath == NULL) {
|
if (fullPath == NULL) {
|
||||||
// ran out of memory allocating dirpath
|
// ran out of memory allocating dirpath
|
||||||
errno = ENOMEM;
|
errno = ENOMEM;
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2011, John Scipione, [email protected].
|
* Copyright 2005-2011, Ingo Weinhold, [email protected].
|
||||||
|
* Copyright 2012, John Scipione, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef FS_DARWIN_H
|
#ifndef FS_DARWIN_H
|
||||||
#define FS_DARWIN_H
|
#define FS_DARWIN_H
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Magic value that specify the use of the current working directory
|
* Magic value that specify the use of the current working directory
|
||||||
* to determine the target of relative file paths in the openat() and
|
* to determine the target of relative file paths in the openat() and
|
||||||
@@ -38,4 +40,5 @@ int linkat(int oldFD, const char *oldPath, int newFD, const char *newPath,
|
|||||||
|
|
||||||
int futimesat(int fd, const char *path, const struct timeval times[2]);
|
int futimesat(int fd, const char *path, const struct timeval times[2]);
|
||||||
|
|
||||||
|
|
||||||
#endif // FS_DARWIN_H
|
#endif // FS_DARWIN_H
|
||||||
|
|||||||
Reference in New Issue
Block a user