renamed library name from libfaketime.dylib.1 to libfaketime.1.dylib based on Apple design guidelines. Thanks to ryandesign at MacPorts

This commit is contained in:
Wolfgang Hommel
2013-10-11 16:33:37 +02:00
parent ed9009495b
commit a0987efa5c
6 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@
timetest
src/libfaketime.dylib.1
src/libfaketime.1.dylib
src/core
src/faketime

4
README
View File

@@ -116,9 +116,9 @@ calls will be passed through unaltered.
On OS X, it is necessary to compile differently, due to the different
behavior dyld has. Use the Makefile.MacOS provided to compile
libfaketime.dylib.1. Additionally, instead of using LD_PRELOAD,
libfaketime.1.dylib. Additionally, instead of using LD_PRELOAD,
the variable DYLD_INSERT_LIBRARIES should be set to the path to
libfaketime.dylib.1, and the variable DYLD_FORCE_FLAT_NAMESPACE should be
libfaketime.1.dylib, and the variable DYLD_FORCE_FLAT_NAMESPACE should be
set (to anything). Mac OS X users should read README.OSX for additional
details.

View File

@@ -25,7 +25,7 @@ Use the OSX-specific Makefiles that are provided, e.g.:
cd src/
make -f Makefile.MacOS
The resulting library will be named libfaketime.dylib.1
The resulting library will be named libfaketime.1.dylib
2) Using libfaketime from the command line on OS X
@@ -35,7 +35,7 @@ You will need to set three environment variables. In a Terminal.app
or iTerm session, the following commands can be used:
export DYLD_FORCE_FLAT_NAMESPACE=1
export DYLD_INSERT_LIBRARIES=/path/to/libfaketime.dylib.1
export DYLD_INSERT_LIBRARIES=/path/to/libfaketime.1.dylib
export FAKETIME="your favorite faketime-spec here"
Please refer to the general README file concerning the format
@@ -77,7 +77,7 @@ with the three keys like this:
<key>DYLD_FORCE_FLAT_NAMESPACE</key>
<string>1</string>
<key>DYLD_INSERT_LIBRARIES</key>
<string>/path/to/libfaketime.dylib.1</string>
<string>/path/to/libfaketime.1.dylib</string>
<key>FAKETIME</key>
<string>value of FAKETIME here</string>
</dict>

View File

@@ -277,11 +277,11 @@ int main (int argc, char **argv)
{
char *ftpl_path;
#ifdef __APPLE__
ftpl_path = PREFIX "/libfaketime.dylib.1";
ftpl_path = PREFIX "/libfaketime.1.dylib";
FILE *check;
check = fopen(ftpl_path, "ro");
if (check == NULL) {
ftpl_path = PREFIX "/lib/faketime/libfaketime.dylib.1";
ftpl_path = PREFIX "/lib/faketime/libfaketime.1.dylib";
}
else {
fclose(check);

View File

@@ -18,7 +18,7 @@ platform()
mac_fakecmd()
{
typeset timestring="$1"; shift
typeset fakelib=../src/libfaketime.dylib.1
typeset fakelib=../src/libfaketime.1.dylib
export DYLD_INSERT_LIBRARIES=$fakelib
export DYLD_FORCE_FLAT_NAMESPACE=1
FAKETIME="$timestring" \

View File

@@ -1,7 +1,7 @@
#!/bin/sh
export DYLD_FORCE_FLAT_NAMESPACE=1
export DYLD_INSERT_LIBRARIES=../src/libfaketime.dylib.1
export DYLD_INSERT_LIBRARIES=../src/libfaketime.1.dylib
if [ -f /etc/faketimerc ] ; then
echo "Running the test program with your system-wide default in /etc/faketimerc"