diff options
author | Brian Swetland <swetland@google.com> | 2009-06-04 14:09:04 -0700 |
---|---|---|
committer | Brian Swetland <swetland@google.com> | 2009-06-04 14:54:15 -0700 |
commit | 2dd82d8cd642b6217e62eb8bed49193ed2742614 (patch) | |
tree | c20f4c0352d3bb350a6ed9d8bf849403fc687bde /libs | |
parent | 39528d6bace1457d21e76824fe94d85c880fe4be (diff) | |
download | platform_build-2dd82d8cd642b6217e62eb8bed49193ed2742614.tar.gz platform_build-2dd82d8cd642b6217e62eb8bed49193ed2742614.tar.bz2 platform_build-2dd82d8cd642b6217e62eb8bed49193ed2742614.zip |
remove mkdirs/etc which caused us to depend on libutils
Depending on libutils causes a build layering violation,
requiring frameworks/base/... for libhost...
Signed-off-by: Brian Swetland <swetland@google.com>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/host/Android.mk | 1 | ||||
-rw-r--r-- | libs/host/Directories.cpp | 42 |
2 files changed, 0 insertions, 43 deletions
diff --git a/libs/host/Android.mk b/libs/host/Android.mk index 81f2cc5c47..d02e4b2745 100644 --- a/libs/host/Android.mk +++ b/libs/host/Android.mk @@ -3,7 +3,6 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ CopyFile.c \ - Directories.cpp \ pseudolocalize.cpp ifeq ($(HOST_OS),cygwin) diff --git a/libs/host/Directories.cpp b/libs/host/Directories.cpp deleted file mode 100644 index a34f5b7bc3..0000000000 --- a/libs/host/Directories.cpp +++ /dev/null @@ -1,42 +0,0 @@ -#include <host/Directories.h> -#include <utils/String8.h> -#include <sys/types.h> -#include <sys/stat.h> - -#ifdef HAVE_MS_C_RUNTIME -#include <direct.h> -#endif - -using namespace android; -using namespace std; - -string -parent_dir(const string& path) -{ - return string(String8(path.c_str()).getPathDir().string()); -} - -int -mkdirs(const char* last) -{ - String8 dest; - const char* s = last-1; - int err; - do { - s++; - if (s > last && (*s == '.' || *s == 0)) { - String8 part(last, s-last); - dest.appendPath(part); -#ifdef HAVE_MS_C_RUNTIME - err = _mkdir(dest.string()); -#else - err = mkdir(dest.string(), S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP|S_IXGRP); -#endif - if (err != 0) { - return err; - } - last = s+1; - } - } while (*s); - return 0; -} |