History log of /haiku/src/build/libroot/fs_darwin.cpp
Revision Date Author Comments
# fdc59e4e 24-Jun-2019 John Scipione <jscipione@gmail.com>

fs_darwin fix warning: '&&' within '||'

place parentheses around the '&&' expression to silence this warning

Change-Id: Ie6152d2371ed65f57e6e75c9541263a5e1511513
Reviewed-on: https://review.haiku-os.org/c/1532
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>


# 5fd3766e 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

libroot_build: fs_darwin: fdopendir(): close FD on success

fdopendir() is supposed to consume the specified FD on success.


# 19a18af3 13-Aug-2012 John Scipione <jscipione@gmail.com>

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


# e4e68917 12-Aug-2012 John Scipione <jscipione@gmail.com>

Cleanup darwin build system some more.

* Convert fs_darwin.cpp and fs_freebsd.cpp to C.
* Convert extern C calls to __BEGIN_DECLS and __END_DECLS macros
* Link rm_attrs with dynamic libroot


# a43b1ed6 11-Aug-2012 John Scipione <jscipione@gmail.com>

Split fs_darwin.h defines into various platform dependent headers.

This completes the final 1/3 of #8857. Changes again by nielx with
style fixes by me.

The one part that I couldn't figure out, and maybe Ingo can chime
in here. If headers/build/host/darwin/sys/stat.h is surrounded in

extern "C" {

}

guards then I get a link error complaining that the functions defined
here are duplicate symbols, once in fs.o and once in function_remapper.o.
For example:

ld: duplicate symbol _futimens in generated/objects/darwin/x86_64/release/build/libroot/libroot_build_function_remapper.a(function_remapper.o) and generated/objects/darwin/x86_64/release/build/libroot/libroot_build.a(fs.o) for architecture x86_64

I'm not sure why that is.


# ef7e9d6b 11-Aug-2012 John Scipione <jscipione@gmail.com>

Add fopendir() to fs_darwin.cpp and fix symlinkat().

This completes 2/3 of #8857 and is courtesy of nielx.


# fd1d8a60 15-Mar-2012 John Scipione <jscipione@gmail.com>

Make private helper function static in fs_darwin.cpp in order to not pollute
the public namespace.


# b6a1a815 09-Mar-2012 John Scipione <jscipione@gmail.com>

Use a stack variable of MAXPATHLEN size to hold the full path to avoid having to manually malloc and free the variable.


# d7f3dac1 09-Mar-2012 John Scipione <jscipione@gmail.com>

Style fixes suggested by Axeld.
Added Ingo to the copyright
Updated copyright year to 2012 for my contribution.


# 3836fb6d 08-Mar-2012 John Scipione <jscipione@gmail.com>

Fix flag checking in fs_darwin.cpp
Somehow this commit got left out in my earlier push.


# 81b45e48 29-Feb-2012 John Scipione <jscipione@gmail.com>

Fix build on Mac OS X 10.6 gcc2 and gcc4 and 10.7 gcc4 by adding some Mac OS X specific files that implement missing *at() functions.
Mac OS X 10.7 generates a gcc2 cross-compiler that fails when assigning NULL to a static method pointer so is still broken.
Added a weak attribute in driver_settings.cpp.
Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD.
Implemented eaccess(), for the AT_EACCESS flag of faccessat()
Fix configure script to correctly detect case-sensitive file system


# 2f9bd2c0 08-Mar-2012 John Scipione <jscipione@gmail.com>

Move the invalid fd check to after checking if fd == AT_FDCWD in the fchownat() function


# adf4838a 08-Mar-2012 John Scipione <jscipione@gmail.com>

Implement the rest of chmod AT_SYMLINK_NOFOLLOW flag, fix the flag error detection code, a few comment changes.


# 9b547456 08-Mar-2012 John Scipione <jscipione@gmail.com>

Implement the AT_SYMLINK_NOFOLLOW flag to fchmodat() by calling open at fchmod emulating lchmod()


# bffc9788 08-Mar-2012 John Scipione <jscipione@gmail.com>

Fix build error and implement AT_SYMLINK_NO_FOLLOW in fstatat() by calling lstat()


# 6ad9d01a 08-Mar-2012 John Scipione <jscipione@gmail.com>

Check for valid flags in faccessat() and fchmodat() and implement AT_SYMLINK_NOFOLLOW in fatchownat() using lchown().


# f2d343d4 08-Mar-2012 John Scipione <jscipione@gmail.com>

Use S_ISDIR instead of S_IFDIR to check if the fd points to a directory and take AT_SYMLINK_NO_FOLLOW out of faccessat because IEEE Std 1003.1-2008 doesn't call for it even though Linux implements it.


# 98188715 08-Mar-2012 John Scipione <jscipione@gmail.com>

Error if file descriptor is negative after checking for AT_FDCWD


# 5529a1c1 07-Mar-2012 John Scipione <jscipione@gmail.com>

Refactor so that all methods call a common get_path method to grab the full path from the fd and relative path string


# 2e24957d 06-Mar-2012 John Scipione <jscipione@gmail.com>

insert a / between the directory path and relative path. in faccessat() use dirpath at the end, not path.


# 156eeb43 06-Mar-2012 John Scipione <jscipione@gmail.com>

Reverse logic when checking if dirst points to a directory.


# a38ff2d4 06-Mar-2012 John Scipione <jscipione@gmail.com>

Check if flags bitmap != 0, not that it does == 0


# b51d823d 05-Mar-2012 John Scipione <jscipione@gmail.com>

Error if unsupported flag is passed to fstatat()


# 8c7f0a89 05-Mar-2012 John Scipione <jscipione@gmail.com>

Cleanup the flags and make them the same as FreeBSD


# 0ee852ad 05-Mar-2012 John Scipione <jscipione@gmail.com>

Explicitly check path against NULL instead of relying on boolality. Yes, I just made that word up.


# 95dd0de5 05-Mar-2012 John Scipione <jscipione@gmail.com>

Rename to and from to old and new in order to be consistant with Linux.


# c8dd9f3e 05-Mar-2012 John Scipione <jscipione@gmail.com>

Fix memory leak for the full path including fd directory.


# a598261f 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement linkat()


# 263ac669 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement renameat()


# 46804eff 05-Mar-2012 John Scipione <jscipione@gmail.com>

Remove extraneous line where I called just unlinkat()


# 6f0d1fc9 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement unlinkat()


# 8e094e5a 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement symlinkat()


# 02e902bf 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement readlinkat()


# 9970cc92 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implemented eaccess(), the AT_EACCESS flag of faccessat(), fchmodat(), fchownat(), fstatat(), mkdirat(), mkfifoat(), mknodat(), and futimesat().


# 62540ce5 03-Mar-2012 John Scipione <jscipione@gmail.com>

Check to see that fd points to a directory before resolving the full path.


# f0d84745 02-Mar-2012 John Scipione <jscipione@gmail.com>

Implement a basic faccessat method. There are still a few missing pieces to it.


# c72a1d4e 01-Mar-2012 John Scipione <jscipione@gmail.com>

Don't return 0 for the unimplemented *at() functions, set errno to ENOSYS (not implemented) and return -1 instead.


# 00f72094 29-Feb-2012 John Scipione <jscipione@gmail.com>

Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD. It is stubbed out for now.


# 9d6e5fdb 29-Feb-2012 John Scipione <jscipione@gmail.com>

Fix build by adding some Mac OS X specific files that implement fs function missing on that OS. The functions are stubbed out currently and have not been implemented. However, it does build now. I also added a weak attribute in driver_settings.cpp that I have no idea what does but was necessary to fix the build.


# 5fd3766e032ca6b3a712dab6b3e3f9bf9700ad22 29-Sep-2013 Ingo Weinhold <ingo_weinhold@gmx.de>

libroot_build: fs_darwin: fdopendir(): close FD on success

fdopendir() is supposed to consume the specified FD on success.


# 19a18af35e4641e1d48f32ed9440e52e21865990 13-Aug-2012 John Scipione <jscipione@gmail.com>

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


# e4e68917c3993aa63a726021dce8e05c80901d09 12-Aug-2012 John Scipione <jscipione@gmail.com>

Cleanup darwin build system some more.

* Convert fs_darwin.cpp and fs_freebsd.cpp to C.
* Convert extern C calls to __BEGIN_DECLS and __END_DECLS macros
* Link rm_attrs with dynamic libroot


# a43b1ed6d894723ed5dbc26e2c399e8ad46022d6 11-Aug-2012 John Scipione <jscipione@gmail.com>

Split fs_darwin.h defines into various platform dependent headers.

This completes the final 1/3 of #8857. Changes again by nielx with
style fixes by me.

The one part that I couldn't figure out, and maybe Ingo can chime
in here. If headers/build/host/darwin/sys/stat.h is surrounded in

extern "C" {

}

guards then I get a link error complaining that the functions defined
here are duplicate symbols, once in fs.o and once in function_remapper.o.
For example:

ld: duplicate symbol _futimens in generated/objects/darwin/x86_64/release/build/libroot/libroot_build_function_remapper.a(function_remapper.o) and generated/objects/darwin/x86_64/release/build/libroot/libroot_build.a(fs.o) for architecture x86_64

I'm not sure why that is.


# ef7e9d6b9bd4959ef8e6f5b324d4a0fbc2870b81 11-Aug-2012 John Scipione <jscipione@gmail.com>

Add fopendir() to fs_darwin.cpp and fix symlinkat().

This completes 2/3 of #8857 and is courtesy of nielx.


# fd1d8a6031eb128bf1d663983f42bce883e1c0f3 15-Mar-2012 John Scipione <jscipione@gmail.com>

Make private helper function static in fs_darwin.cpp in order to not pollute
the public namespace.


# b6a1a815a1df8aff9d74fb2c32a984bd83e95fc7 09-Mar-2012 John Scipione <jscipione@gmail.com>

Use a stack variable of MAXPATHLEN size to hold the full path to avoid having to manually malloc and free the variable.


# d7f3dac1eb807c46d06fbca9424409876d51dbf2 09-Mar-2012 John Scipione <jscipione@gmail.com>

Style fixes suggested by Axeld.
Added Ingo to the copyright
Updated copyright year to 2012 for my contribution.


# 3836fb6d2dfbdbec2e72b9ca6c62439a2e01aa79 08-Mar-2012 John Scipione <jscipione@gmail.com>

Fix flag checking in fs_darwin.cpp
Somehow this commit got left out in my earlier push.


# 81b45e484a2f71f1235d48ab743c20357f070593 29-Feb-2012 John Scipione <jscipione@gmail.com>

Fix build on Mac OS X 10.6 gcc2 and gcc4 and 10.7 gcc4 by adding some Mac OS X specific files that implement missing *at() functions.
Mac OS X 10.7 generates a gcc2 cross-compiler that fails when assigning NULL to a static method pointer so is still broken.
Added a weak attribute in driver_settings.cpp.
Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD.
Implemented eaccess(), for the AT_EACCESS flag of faccessat()
Fix configure script to correctly detect case-sensitive file system


# 2f9bd2c0905da9df770b1a6083fb59a13a4c97da 08-Mar-2012 John Scipione <jscipione@gmail.com>

Move the invalid fd check to after checking if fd == AT_FDCWD in the fchownat() function


# adf4838afe99a78d0489b559f1549d8573cba99a 08-Mar-2012 John Scipione <jscipione@gmail.com>

Implement the rest of chmod AT_SYMLINK_NOFOLLOW flag, fix the flag error detection code, a few comment changes.


# 9b54745611b7426b07866aa91c8c51671f2183ae 08-Mar-2012 John Scipione <jscipione@gmail.com>

Implement the AT_SYMLINK_NOFOLLOW flag to fchmodat() by calling open at fchmod emulating lchmod()


# bffc978823daba4d83eaf4360eb2a318e61f3330 08-Mar-2012 John Scipione <jscipione@gmail.com>

Fix build error and implement AT_SYMLINK_NO_FOLLOW in fstatat() by calling lstat()


# 6ad9d01a41a3b965851ed9a034954059fec3ed90 08-Mar-2012 John Scipione <jscipione@gmail.com>

Check for valid flags in faccessat() and fchmodat() and implement AT_SYMLINK_NOFOLLOW in fatchownat() using lchown().


# f2d343d4163e55e054019d71c7bb91dd89d6cb49 08-Mar-2012 John Scipione <jscipione@gmail.com>

Use S_ISDIR instead of S_IFDIR to check if the fd points to a directory and take AT_SYMLINK_NO_FOLLOW out of faccessat because IEEE Std 1003.1-2008 doesn't call for it even though Linux implements it.


# 981887153dbfcc868ee935a292c8788cb5ba0693 08-Mar-2012 John Scipione <jscipione@gmail.com>

Error if file descriptor is negative after checking for AT_FDCWD


# 5529a1c1e7842a497f97ac233dfa2166d57d1034 07-Mar-2012 John Scipione <jscipione@gmail.com>

Refactor so that all methods call a common get_path method to grab the full path from the fd and relative path string


# 2e24957db9ee1cc93f626e42b55c62ca1f1cce6d 06-Mar-2012 John Scipione <jscipione@gmail.com>

insert a / between the directory path and relative path. in faccessat() use dirpath at the end, not path.


# 156eeb439b50205bb29f8c0a1fc11b7d47d44e61 06-Mar-2012 John Scipione <jscipione@gmail.com>

Reverse logic when checking if dirst points to a directory.


# a38ff2d402b3b649d7f2d9680a0fbff66207785b 06-Mar-2012 John Scipione <jscipione@gmail.com>

Check if flags bitmap != 0, not that it does == 0


# b51d823d927192b35cfbffd5dc78c4ad89628c6a 05-Mar-2012 John Scipione <jscipione@gmail.com>

Error if unsupported flag is passed to fstatat()


# 8c7f0a896773b325db79e4a03d07b0193888c058 05-Mar-2012 John Scipione <jscipione@gmail.com>

Cleanup the flags and make them the same as FreeBSD


# 0ee852ad558206c6c3bb7557b4563cc5ff7d9343 05-Mar-2012 John Scipione <jscipione@gmail.com>

Explicitly check path against NULL instead of relying on boolality. Yes, I just made that word up.


# 95dd0de5ea9509bb0cf21c262aa0ee125fe7815a 05-Mar-2012 John Scipione <jscipione@gmail.com>

Rename to and from to old and new in order to be consistant with Linux.


# c8dd9f3e8cdda7fa974f2720b9b17e392a559f72 05-Mar-2012 John Scipione <jscipione@gmail.com>

Fix memory leak for the full path including fd directory.


# a598261feacd4ef8594b179e3b28d41af70dcd66 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement linkat()


# 263ac6693500df6cac624d327198193be5418e82 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement renameat()


# 46804eff55c702f1a4463b915b273c5162460ff3 05-Mar-2012 John Scipione <jscipione@gmail.com>

Remove extraneous line where I called just unlinkat()


# 6f0d1fc94a5c4ae15788031862ff38f7cda8f397 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement unlinkat()


# 8e094e5a5bcbc7c4504784155b1458f974706beb 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement symlinkat()


# 02e902bf286ee53bd2343795ec97118a2ac18056 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implement readlinkat()


# 9970cc92bf17c5538f9a62cb0959997ad319f792 05-Mar-2012 John Scipione <jscipione@gmail.com>

Implemented eaccess(), the AT_EACCESS flag of faccessat(), fchmodat(), fchownat(), fstatat(), mkdirat(), mkfifoat(), mknodat(), and futimesat().


# 62540ce5eb965be0f4383ad7e605920787dbbe33 03-Mar-2012 John Scipione <jscipione@gmail.com>

Check to see that fd points to a directory before resolving the full path.


# f0d84745dffa5ab2e2807579fd3c1a423d6f41ee 02-Mar-2012 John Scipione <jscipione@gmail.com>

Implement a basic faccessat method. There are still a few missing pieces to it.


# c72a1d4e6a1077b18592ff3ac7c26e9de868a641 01-Mar-2012 John Scipione <jscipione@gmail.com>

Don't return 0 for the unimplemented *at() functions, set errno to ENOSYS (not implemented) and return -1 instead.


# 00f72094a1381200077f6cc7a40b3ab649fab11e 29-Feb-2012 John Scipione <jscipione@gmail.com>

Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD. It is stubbed out for now.


# 9d6e5fdb651066357cf4e24f10c42238ad08d0b7 29-Feb-2012 John Scipione <jscipione@gmail.com>

Fix build by adding some Mac OS X specific files that implement fs function missing on that OS. The functions are stubbed out currently and have not been implemented. However, it does build now. I also added a weak attribute in driver_settings.cpp that I have no idea what does but was necessary to fix the build.