From b285f0b91abc0c662bf280f910845b5e22d0e6cf Mon Sep 17 00:00:00 2001 From: Josh Aas Date: Thu, 29 Jan 2009 23:49:27 -0500 Subject: [PATCH] Remove libreg dependency on morefilesx. b=464362 r=smichaud sr=bsmedberg --- modules/libreg/src/Makefile.in | 9 --------- modules/libreg/src/reg.c | 9 ++------- modules/libreg/standalone/Makefile.in | 5 ----- xpcom/build/Makefile.in | 6 +++--- 4 files changed, 5 insertions(+), 24 deletions(-) diff --git a/modules/libreg/src/Makefile.in b/modules/libreg/src/Makefile.in index d2be7745b483..f5f27b8c9249 100644 --- a/modules/libreg/src/Makefile.in +++ b/modules/libreg/src/Makefile.in @@ -47,11 +47,6 @@ MODULE = libreg LIBRARY_NAME = mozreg_s DIST_INSTALL = 1 -# MacOSX requires the MoreFiles module -ifeq ($(OS_ARCH),Darwin) -REQUIRES = macmorefiles -endif - CSRCS = $(MODULES_LIBREG_SRC_LCSRCS) nr_bufio.c BIN_SRCS = VerReg.c reg.c vr_stubs.c @@ -70,10 +65,6 @@ USE_STATIC_LIBS = 1 SDK_LIBRARY = $(LIBRARY) -ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) -SHARED_LIBRARY_LIBS += $(DEPTH)/xpcom/MoreFiles/libmacmorefiles_s.a -endif - include $(topsrcdir)/config/config.mk DEFINES += -DUSE_BUFFERED_REGISTRY_IO diff --git a/modules/libreg/src/reg.c b/modules/libreg/src/reg.c index d6df1c02a13d..4bf9cb4390e2 100644 --- a/modules/libreg/src/reg.c +++ b/modules/libreg/src/reg.c @@ -151,16 +151,11 @@ static int32 regStartCount = 0; char *globalRegName = NULL; static char *user_name = NULL; - - - #ifdef XP_MACOSX void nr_MacAliasFromPath(const char * fileName, void ** alias, int32 * length); char * nr_PathFromMacAlias(const void * alias, uint32 aliasLength); -#include "MoreFilesX.h" - static void copyCStringToPascal(Str255 dest, const char *src) { size_t copyLen = strlen(src); @@ -186,9 +181,9 @@ static OSErr isFileInTrash(FSRef *fsRef, PRBool *inTrash) err = FSFindFolder(catalogInfo.volume, kTrashFolderType, false, &trashFSRef); if (err == noErr) { - /* FSRefGetParentRef returns noErr and a zeroed FSRef when it reaches the top */ for (currFSRef = *fsRef; - (FSGetParentRef(&currFSRef, &parentFSRef) == noErr && FSRefValid(&parentFSRef)); + (FSGetCatalogInfo(&currFSRef, kFSCatInfoNodeID, NULL, NULL, NULL, &parentFSRef) == noErr && + FSGetCatalogInfo(&parentFSRef, kFSCatInfoNone, NULL, NULL, NULL, NULL) == noErr); currFSRef = parentFSRef) { if (FSCompareFSRefs(&parentFSRef, &trashFSRef) == noErr) diff --git a/modules/libreg/standalone/Makefile.in b/modules/libreg/standalone/Makefile.in index 24eaffbb2a52..d58010eb4e19 100644 --- a/modules/libreg/standalone/Makefile.in +++ b/modules/libreg/standalone/Makefile.in @@ -47,11 +47,6 @@ include $(srcdir)/../src/objs.mk MODULE = libreg LIBRARY_NAME = mozregsa_s -# MacOSX requires the MoreFiles module -ifeq ($(OS_ARCH),Darwin) -REQUIRES = macmorefiles -endif - ifeq ($(OS_ARCH),WINNT) USE_STATIC_LIBS = 1 endif diff --git a/xpcom/build/Makefile.in b/xpcom/build/Makefile.in index e1d3857d4857..b792a7110493 100644 --- a/xpcom/build/Makefile.in +++ b/xpcom/build/Makefile.in @@ -67,7 +67,7 @@ REQUIRES = string \ $(NULL) # pull in MoreFiles for MacOSX -ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) REQUIRES += macmorefiles endif @@ -175,12 +175,12 @@ ifdef TARGET_XPCOM_ABI DEFINES += -DTARGET_XPCOM_ABI=\"$(TARGET_XPCOM_ABI)\" endif -ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT))) +ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) CXXFLAGS += $(TK_CFLAGS) EXTRA_DSO_LDOPTS += \ - ../MoreFiles/$(LIB_PREFIX)macmorefiles_s.$(LIB_SUFFIX) \ $(TK_LIBS) \ $(NULL) +SHARED_LIBRARY_LIBS += $(DEPTH)/xpcom/MoreFiles/libmacmorefiles_s.a endif ifeq ($(OS_ARCH),BeOS)