amizilla-cvs Mailing List for AmiZilla (Page 2)
Brought to you by:
maxlarsson
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(41) |
Jul
(50) |
Aug
(3) |
Sep
(3) |
Oct
(106) |
Nov
(9) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Oliver B. <o1...@us...> - 2004-10-26 13:18:17
|
Update of /cvsroot/amizilla/amizilla/js/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12514 Modified Files: Makefile.in Log Message: double else removed. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/js/src/Makefile.in,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Makefile.in 11 Oct 2004 20:53:20 -0000 1.3 --- Makefile.in 26 Oct 2004 13:18:09 -0000 1.4 *************** *** 318,322 **** endif else - else ifeq ($(OS_TARGET), amigaos) @cp $(JSMATH_PRELINK) $@ --- 318,321 ---- |
From: Jeff S. <jsh...@us...> - 2004-10-14 22:50:26
|
Update of /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31118 Modified Files: atime.c Log Message: Fixed PR_Now to return the correct time. Took out commented out debug lines. Index: atime.c =================================================================== RCS file: /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga/atime.c,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** atime.c 22 Jun 2004 00:12:59 -0000 1.8 --- atime.c 14 Oct 2004 22:50:15 -0000 1.9 *************** *** 37,40 **** --- 37,42 ---- #include <proto/timer.h> + #define DAYS_SINCE_1970 (8*365+2) + static _PR_MD_Timeout _PR_Sleep(PRIntervalTime timeout) { *************** *** 48,52 **** if (_PR_PENDING_INTERRUPT(thread)) { - printf("%lx sleep got a pending interrupt\n", thread); PR_ClearInterrupt(); PR_SetError(PR_PENDING_INTERRUPT_ERROR, 0); --- 50,53 ---- *************** *** 62,66 **** timerIO->tr_time.tv_micro = timeout % _PR_MD_INTERVAL_PER_SEC() * (1000000 / _PR_MD_INTERVAL_PER_SEC()); - //printf("%lx, Beginning IO for sleep\n", thread); thread->io_pending = PR_TRUE; --- 63,66 ---- *************** *** 71,75 **** if (_PR_PENDING_INTERRUPT(thread)) { PR_ClearInterrupt(); - printf("%lx, Sleep got interrupted\n", thread); PR_SetError(PR_PENDING_INTERRUPT_ERROR, 0); retval = INTERRUPTED; --- 71,74 ---- *************** *** 83,96 **** ; - // printf("%lx, got msg %lx\n", thread, msg); if (!(CheckIO((struct IORequest *)timerIO))) { - //printf("%lx abort io\n", thread); AbortIO((struct IORequest *)timerIO); - //printf("%lx wait IO\n", thread); WaitIO((struct IORequest *)timerIO); } thread->io_pending = PR_FALSE; done: - //printf("%lx done sleep returning\n", thread); return retval; } --- 82,91 ---- *************** *** 126,130 **** PRTime retval = LL_INIT(0,0); struct timerequest *tr = PR_NEWZAP(struct timerequest); ! PRInt64 secs, mil; if (!(OpenDevice(TIMERNAME, UNIT_MICROHZ, (struct IORequest *)tr, 0))) { --- 121,125 ---- PRTime retval = LL_INIT(0,0); struct timerequest *tr = PR_NEWZAP(struct timerequest); ! PRInt64 secs, mil, offset; if (!(OpenDevice(TIMERNAME, UNIT_MICROHZ, (struct IORequest *)tr, 0))) { *************** *** 132,136 **** struct Library *TimerBase = (struct Library *)tr->tr_node.io_Device; GetSysTime(&tv); ! /* retval = tv.tv_sec * 1000000 + tv.tv_usec */ LL_I2L(secs, tv.tv_sec); LL_I2L(mil, 1000000); --- 127,133 ---- struct Library *TimerBase = (struct Library *)tr->tr_node.io_Device; GetSysTime(&tv); ! /* retval = tv.tv_sec * 1000000 + tv.tv_usec + usecs since 1970 to 1978 ! * ( Amiga's time is based upon Jan 1, 1978) ! */ LL_I2L(secs, tv.tv_sec); LL_I2L(mil, 1000000); *************** *** 138,142 **** LL_I2L(mil, tv.tv_usec); LL_ADD(retval, secs, mil); ! CloseDevice((struct IORequest *)tr); } --- 135,142 ---- LL_I2L(mil, tv.tv_usec); LL_ADD(retval, secs, mil); ! LL_I2L(offset, DAYS_SINCE_1970); ! LL_MUL(offset, offset, 86400); ! LL_MUL(offset, offset, 1000000); ! LL_ADD(retval, retval, offset); CloseDevice((struct IORequest *)tr); } |
From: Oliver B. <o1...@us...> - 2004-10-14 14:26:01
|
Update of /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31956 Modified Files: arandom.c Log Message: added missing include exec/interrupts.h added some casts to avoid warnings Index: arandom.c =================================================================== RCS file: /cvsroot/amizilla/amizilla/nsprpub/pr/src/md/amiga/arandom.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** arandom.c 11 Oct 2004 18:46:39 -0000 1.5 --- arandom.c 14 Oct 2004 14:25:51 -0000 1.6 *************** *** 37,40 **** --- 37,41 ---- #include <devices/inputevent.h> #include <devices/input.h> + #include <exec/interrupts.h> /* #define DEBUG_ARANDOM */ *************** *** 82,86 **** ip.p = me->p; ! ie->is_Code = InputEventHandler; ie->is_Data = &ip; ie->is_Node.ln_Pri = 100; --- 83,87 ---- ip.p = me->p; ! ie->is_Code = (VOID *)InputEventHandler; ie->is_Data = &ip; ie->is_Node.ln_Pri = 100; *************** *** 160,168 **** DoIO((struct IORequest *)io); ! if (!CheckIO(io)) ! AbortIO(io); ! WaitIO(io); ! CloseDevice(io); ! DeleteIORequest(io); DeleteMsgPort(mp); #ifdef DEBUG_ARANDOM --- 161,169 ---- DoIO((struct IORequest *)io); ! if (!CheckIO((struct IORequest *) io)) ! AbortIO((struct IORequest *) io); ! WaitIO((struct IORequest *) io); ! CloseDevice((struct IORequest *) io); ! DeleteIORequest((struct IORequest *) io); DeleteMsgPort(mp); #ifdef DEBUG_ARANDOM |
From: Jeff S. <jsh...@us...> - 2004-10-12 23:28:29
|
Update of /cvsroot/amizilla/amizilla/nsprpub/config In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4569 Modified Files: rules.mk Log Message: Only define AmigaOS shared library components if MKSHLIB is defined. Index: rules.mk =================================================================== RCS file: /cvsroot/amizilla/amizilla/nsprpub/config/rules.mk,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rules.mk 11 Oct 2004 18:55:26 -0000 1.4 --- rules.mk 12 Oct 2004 23:28:19 -0000 1.5 *************** *** 127,134 **** --- 127,136 ---- ifeq ($(OS_ARCH), AmigaOS) + ifdef MKSHLIB IMPORT_LIBRARY_X = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).x IMPORT_LIBRARY_A = $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_ixlibrary.a IMPORT_LIBRARY_H = $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).h endif + endif endif |
From: Jeff S. <jsh...@us...> - 2004-10-11 22:29:11
|
Update of /cvsroot/amizilla/amizilla/js/jsd/.deps In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17529 Removed Files: jsd_atom.pp jsd_high.pp jsd_hook.pp jsd_lock.pp jsd_obj.pp jsd_scpt.pp jsd_stak.pp jsd_step.pp jsd_text.pp jsd_val.pp jsd_xpc.pp jsdebug.pp Log Message: I don't know how these got into the repository. --- jsd_hook.pp DELETED --- --- jsd_atom.pp DELETED --- --- jsd_obj.pp DELETED --- --- jsd_text.pp DELETED --- --- jsd_xpc.pp DELETED --- --- jsd_stak.pp DELETED --- --- jsd_scpt.pp DELETED --- --- jsd_high.pp DELETED --- --- jsd_lock.pp DELETED --- --- jsdebug.pp DELETED --- --- jsd_step.pp DELETED --- --- jsd_val.pp DELETED --- |
From: Jeff S. <jsh...@us...> - 2004-10-11 22:26:56
|
Update of /cvsroot/amizilla/amizilla/htmlparser/robot/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16860 Modified Files: Makefile.in Log Message: AmigaOS build rules Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/htmlparser/robot/test/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 13:01:14 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 22:26:34 -0000 1.2 *************** *** 46,49 **** --- 46,53 ---- $(NULL) + ifeq ($(OS_ARCH), AmigaOS) + FORCE_NO_PIC=1 + endif + include $(topsrcdir)/config/config.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:24:02
|
Update of /cvsroot/amizilla/amizilla/xpcom/typelib/xpt/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4326/typelib/xpt/tools Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/typelib/xpt/tools/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:45 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:23:06 -0000 1.2 *************** *** 43,46 **** --- 43,51 ---- endif + ifeq ($(OS_ARCH), AmigaOS) + # libxpt.a needs to be in baserel format so we need to link in baserel format + OS_LDFLAGS += $(DSO_CFLAGS) + endif + include $(topsrcdir)/config/rules.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:23:59
|
Update of /cvsroot/amizilla/amizilla/xpcom/typelib/xpt/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4326/typelib/xpt/tests Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/typelib/xpt/tests/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.in 22 Jun 2003 11:43:23 -0000 1.1.1.1 --- Makefile.in 11 Oct 2004 21:23:06 -0000 1.2 *************** *** 30,33 **** --- 30,37 ---- CPP_PROG_LINK = 1 + ifeq ($(OS_ARCH), AmigaOS) + FORCE_NO_PIC=1 + endif + SIMPLE_PROGRAMS = PrimitiveTest$(BIN_SUFFIX) SimpleTypeLib$(BIN_SUFFIX) |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:23:58
|
Update of /cvsroot/amizilla/amizilla/xpcom/typelib/xpidl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4326/typelib/xpidl Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/typelib/xpidl/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:46 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:23:05 -0000 1.2 *************** *** 53,56 **** --- 53,61 ---- endif + ifeq ($(OS_ARCH), AmigaOS) + # libxpt.a needs to be in baserel format so we need to link in baserel format + OS_LDFLAGS += $(DSO_CFLAGS) + endif + include $(topsrcdir)/config/rules.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:23:45
|
Update of /cvsroot/amizilla/amizilla/xpcom/tools/registry In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4326/d/registry Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/tools/registry/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:20 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:23:05 -0000 1.2 *************** *** 58,61 **** --- 58,65 ---- $(NULL) + ifeq ($(OS_ARCH), AmigaOS) + FORCE_NO_PIC=1 + endif + include $(topsrcdir)/config/rules.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:22:10
|
Update of /cvsroot/amizilla/amizilla/xpcom/threads In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3880 Modified Files: plevent.h Log Message: AMigaOS defines. Index: plevent.h =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/threads/plevent.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plevent.h 18 Jul 2004 00:32:50 -0000 1.2 --- plevent.h 11 Oct 2004 21:21:38 -0000 1.3 *************** *** 494,498 **** PRIntervalTime postTime; #endif ! #ifdef XP_UNIX unsigned long id; #endif /* XP_UNIX */ --- 494,498 ---- PRIntervalTime postTime; #endif ! #if defined(XP_UNIX) || defined(XP_AMIGAOS) unsigned long id; #endif /* XP_UNIX */ *************** *** 597,601 **** PL_UnregisterEventIDFunc(PLEventQueue *aSelf); ! #endif /* XP_UNIX */ --- 597,601 ---- PL_UnregisterEventIDFunc(PLEventQueue *aSelf); ! #endif /* XP_UNIX || XP_AMIGAOS */ |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:21:47
|
Update of /cvsroot/amizilla/amizilla/xpcom/threads In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3789 Modified Files: plevent.c Log Message: AmigaOS defines. Use pipes in NSPR for event notification. Index: plevent.c =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/threads/plevent.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** plevent.c 18 Jul 2004 00:32:50 -0000 1.2 --- plevent.c 11 Oct 2004 21:21:21 -0000 1.3 *************** *** 137,143 **** #endif ! #if defined(XP_UNIX) && !defined(XP_MACOSX) || defined (XP_AMIGAOS) #if defined(VMS) int efn; #else PRInt32 eventPipe[2]; --- 137,145 ---- #endif ! #if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined (XP_AMIGAOS) #if defined(VMS) int efn; + #elif defined(XP_AMIGAOS) + PRFileDesc *eventPipe[2]; #else PRInt32 eventPipe[2]; *************** *** 325,329 **** PR_EnterMonitor(mon); ! #if defined(XP_UNIX) && !defined(XP_MACOSX) if (self->idFunc && event) event->id = self->idFunc(self->idFuncClosure); --- 327,331 ---- PR_EnterMonitor(mon); ! #if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_AMIGAOS) if (self->idFunc && event) event->id = self->idFunc(self->idFuncClosure); *************** *** 650,654 **** self->lock = NULL; self->condVar = NULL; ! #if defined(XP_UNIX) && !defined(XP_MACOSX) self->id = 0; #endif --- 652,656 ---- self->lock = NULL; self->condVar = NULL; ! #if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined (XP_AMIGAOS) self->id = 0; #endif *************** *** 905,908 **** --- 907,916 ---- return PR_SUCCESS; + #elif defined(XP_AMIGAOS) + + self->idFunc = 0; + self->idFuncClosure = 0; + + return PR_CreatePipe(&self->eventPipe[0], &self->eventPipe[1]); #else return PR_SUCCESS; *************** *** 951,954 **** --- 959,965 ---- DisposeEventHandlerUPP(self->eventHandlerUPP); RemoveEventHandler(self->eventHandlerRef); + #elif defined(XP_AMIGAOS) + PR_Close(self->eventPipe[0]); + PR_Close(self->eventPipe[1]); #endif } *************** *** 1212,1223 **** ("_pl_NativeNotify: self=%p", self)); count = write(self->eventPipe[1], buf, 1); if (count == 1) return PR_SUCCESS; if (count == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return PR_SUCCESS; return PR_FAILURE; }/* --- end _pl_NativeNotify() --- */ ! #endif /* defined(XP_UNIX) && !defined(XP_MACOSX) */ #if defined(XP_BEOS) --- 1223,1240 ---- ("_pl_NativeNotify: self=%p", self)); + #ifdef XP_AMIGAOS + count = PR_Write(self->eventPipe[1], buf, 1); + #else count = write(self->eventPipe[1], buf, 1); + #endif if (count == 1) return PR_SUCCESS; + #ifndef XP_AMIGAOS if (count == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) return PR_SUCCESS; + #endif return PR_FAILURE; }/* --- end _pl_NativeNotify() --- */ ! #endif /* (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_AMIGAOS) */ #if defined(XP_BEOS) *************** *** 1546,1550 **** return; } /* end _md_CreateEventQueue() */ ! #endif /* (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS) */ #if defined(MAC_USE_CARBON_EVENT) --- 1563,1567 ---- return; } /* end _md_CreateEventQueue() */ ! #endif /* (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_BEOS) ||| defined(XP_AMIGAOS) */ #if defined(MAC_USE_CARBON_EVENT) *************** *** 1616,1620 **** /* extra functions for unix */ ! #if defined(XP_UNIX) && !defined(XP_MACOSX) PR_IMPLEMENT(PRInt32) --- 1633,1637 ---- /* extra functions for unix */ ! #if (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_AMIGAOS) PR_IMPLEMENT(PRInt32) *************** *** 1707,1711 **** } ! #endif /* defined(XP_UNIX) && !defined(XP_MACOSX) */ /* --- end plevent.c --- */ --- 1724,1728 ---- } ! #endif /* (defined(XP_UNIX) && !defined(XP_MACOSX)) || defined(XP_AMIGAOS) */ /* --- end plevent.c --- */ |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:21:13
|
Update of /cvsroot/amizilla/amizilla/xpcom/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3568 Modified Files: TestObserverService.cpp Log Message: Fix delete bug. Index: TestObserverService.cpp =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/tests/TestObserverService.cpp,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** TestObserverService.cpp 29 Jun 2004 10:42:11 -0000 1.1.1.2 --- TestObserverService.cpp 11 Oct 2004 21:20:39 -0000 1.2 *************** *** 61,65 **** const char *cstr = ToNewCString(str); printf("%s", cstr); ! delete [] (char*)cstr; } --- 61,65 ---- const char *cstr = ToNewCString(str); printf("%s", cstr); ! delete (char*)cstr; } |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:20:41
|
Update of /cvsroot/amizilla/amizilla/xpcom/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3437 Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/tests/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:07 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:20:17 -0000 1.2 *************** *** 33,36 **** --- 33,40 ---- endif + ifeq ($(OS_ARCH),AmigaOS) + FORCE_NO_PIC = 1 + endif + REQUIRES = \ string \ *************** *** 93,96 **** --- 97,104 ---- endif + ifeq ($(OS_ARCH),AmigaOS) + CXXFLAGS += -fexceptions + endif + libs:: $(INSTALL) $(srcdir)/test.properties $(DIST)/bin/res |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:20:14
|
Update of /cvsroot/amizilla/amizilla/xpcom/sample In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3224/sample Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/sample/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:40 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:19:49 -0000 1.2 *************** *** 53,59 **** TESTCPPSRCS = nsTestSample.cpp CPPSRCS += $(TESTCPPSRCS) - SIMPLE_PROGRAMS = $(TESTCPPSRCS:.cpp=$(BIN_SUFFIX)) include $(topsrcdir)/config/config.mk --- 53,66 ---- TESTCPPSRCS = nsTestSample.cpp + # + # AmigaOS needs different CFLAGS for the test programs. Here is a quick hack + # to do it + # + ifeq ($(OS_ARCH), AmigaOS) + TSIMPLE_PROGRAMS = $(TESTCPPSRCS:.cpp=$(BIN_SUFFIX)) + else CPPSRCS += $(TESTCPPSRCS) SIMPLE_PROGRAMS = $(TESTCPPSRCS:.cpp=$(BIN_SUFFIX)) + endif include $(topsrcdir)/config/config.mk *************** *** 90,97 **** include $(topsrcdir)/config/rules.mk ! libs:: $(TARGETS) $(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples install:: $(TARGETS) $(SYSINSTALL) $(IFLAGS1) $(srcdir)/xpconnect-sample.html $(DESTDIR)$(mozappdir)/res/samples --- 97,115 ---- include $(topsrcdir)/config/rules.mk ! libs::$(TARGETS) testsimple $(INSTALL) $(srcdir)/xpconnect-sample.html $(DIST)/bin/res/samples + testsimple: + ifeq ($(OS_ARCH), amigaos) + make FORCE_NO_PIC=1 SIMPLE_PROGRAMS="$(TSIMPLE_PROGRAMS)" $(TSIMPLE_PROGRAMS) + endif + install:: $(TARGETS) $(SYSINSTALL) $(IFLAGS1) $(srcdir)/xpconnect-sample.html $(DESTDIR)$(mozappdir)/res/samples + testsimpleclean: + ifeq ($(OS_ARCH), amigaos) + -rm $(TSIMPLE_PROGRAMS) + endif + + clean:: testsimpleclean |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:20:09
|
Update of /cvsroot/amizilla/amizilla/xpcom/reflect/xptinfo/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3224/d/xptinfo/tests Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/reflect/xptinfo/tests/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile.in 22 Jun 2003 11:42:57 -0000 1.1.1.1 --- Makefile.in 11 Oct 2004 21:19:49 -0000 1.2 *************** *** 38,41 **** --- 38,46 ---- $(NULL) + + ifeq ($(OS_ARCH), AmigaOS) + FORCE_NO_PIC=1 + endif + include $(topsrcdir)/config/rules.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:19:27
|
Update of /cvsroot/amizilla/amizilla/xpcom/reflect/xptcall/src/md/unix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2897 Added Files: xptcinvoke_amigaos_m68k.cpp xptcstubs_amigaos_m68k.cpp Log Message: AmigaOS implementation. Copied from *_linux_m68k.cpp. --- NEW FILE: xptcinvoke_amigaos_m68k.cpp --- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Netscape Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the NPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* Platform specific code to invoke XPCOM methods on native objects */ #include "xptcprivate.h" // Remember that these 'words' are 32bit DWORDS extern "C" { static PRUint32 invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s) { PRUint32 result = 0; for(PRUint32 i = 0; i < paramCount; i++, s++) { if(s->IsPtrData()) { result++; continue; } switch(s->type) { case nsXPTType::T_I8 : case nsXPTType::T_I16 : case nsXPTType::T_I32 : result++; break; case nsXPTType::T_I64 : result+=2; break; case nsXPTType::T_U8 : case nsXPTType::T_U16 : case nsXPTType::T_U32 : result++; break; case nsXPTType::T_U64 : result+=2; break; case nsXPTType::T_FLOAT : result++; break; case nsXPTType::T_DOUBLE : result+=2; break; case nsXPTType::T_BOOL : case nsXPTType::T_CHAR : case nsXPTType::T_WCHAR : result++; break; default: // all the others are plain pointer types result++; break; } } return result; } void invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount, nsXPTCVariant* s) { for(PRUint32 i = 0; i < paramCount; i++, d++, s++) { if(s->IsPtrData()) { *((void**)d) = s->ptr; continue; } switch(s->type) { // 8 and 16 bit types should be promoted to 32 bits when copying // onto the stack. case nsXPTType::T_I8 : *((PRUint32*)d) = s->val.i8; break; case nsXPTType::T_I16 : *((PRUint32*)d) = s->val.i16; break; case nsXPTType::T_I32 : *((PRInt32*) d) = s->val.i32; break; case nsXPTType::T_I64 : *((PRInt64*) d) = s->val.i64; d++; break; case nsXPTType::T_U8 : *((PRUint32*)d) = s->val.u8; break; case nsXPTType::T_U16 : *((PRUint32*)d) = s->val.u16; break; case nsXPTType::T_U32 : *((PRUint32*)d) = s->val.u32; break; case nsXPTType::T_U64 : *((PRUint64*)d) = s->val.u64; d++; break; case nsXPTType::T_FLOAT : *((float*) d) = s->val.f; break; case nsXPTType::T_DOUBLE : *((double*) d) = s->val.d; d++; break; case nsXPTType::T_BOOL : *((PRBool*) d) = s->val.b; break; case nsXPTType::T_CHAR : *((PRUint32*)d) = s->val.c; break; case nsXPTType::T_WCHAR : *((wchar_t*) d) = s->val.wc; break; default: // all the others are plain pointer types *((void**)d) = s->val.p; break; } } } } XPTC_PUBLIC_API(nsresult) XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex, PRUint32 paramCount, nsXPTCVariant* params) { PRUint32 result, n; n = invoke_count_words(paramCount, params) * 4; __asm__ __volatile__( "subl %5, %/sp\n\t" /* make room for params */ "movl %/sp, %/a0\n\t" "movl %4, %/sp@-\n\t" "movl %3, %/sp@-\n\t" "movl %/a0, %/sp@-\n\t" "jbsr _invoke_copy_to_stack\n\t" /* copy params */ "addl #12, %/sp\n\t" "movl %1, %/a0\n\t" "movl %/a0, %/sp@-\n\t" "movl %/a0@, %/a0\n\t" "movl %2, %/d0\n\t" /* function index */ #if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */ "movl %/a0@(%/d0:l:4), %/a0\n\t" #else /* not V3 */ "movl %/a0@(8,%/d0:l:4), %/a0\n\t" #endif "jbsr %/a0@\n\t" /* safe to not cleanup sp */ "movl %/d0, %0\n\t" "addql #4, %/sp\n\t" "addl %5, %/sp" : "=g" (result) /* %0 */ : "g" (that), /* %1 */ "g" (methodIndex), /* %2 */ "g" (paramCount), /* %3 */ "g" (params), /* %4 */ "g" (n) /* %5 */ : "a0", "a1", "d0", "d1", "memory" ); return result; } --- NEW FILE: xptcstubs_amigaos_m68k.cpp --- /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Netscape Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1999 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the NPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ /* Implement shared vtbl methods. */ #include "xptcprivate.h" extern "C" { nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, uint32* args) { #define PARAM_BUFFER_COUNT 16 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT]; nsXPTCMiniVariant* dispatchParams = NULL; nsIInterfaceInfo* iface_info = NULL; const nsXPTMethodInfo* info; PRUint8 paramCount; PRUint8 i; nsresult result = NS_ERROR_FAILURE; NS_ASSERTION(self,"no self"); self->GetInterfaceInfo(&iface_info); NS_ASSERTION(iface_info,"no interface info"); iface_info->GetMethodInfo(PRUint16(methodIndex), &info); NS_ASSERTION(info,"no interface info"); paramCount = info->GetParamCount(); // setup variant array pointer if(paramCount > PARAM_BUFFER_COUNT) dispatchParams = new nsXPTCMiniVariant[paramCount]; else dispatchParams = paramBuffer; NS_ASSERTION(dispatchParams,"no place for params"); PRUint32* ap = args; for(i = 0; i < paramCount; i++, ap++) { const nsXPTParamInfo& param = info->GetParam(i); const nsXPTType& type = param.GetType(); nsXPTCMiniVariant* dp = &dispatchParams[i]; if(param.IsOut() || !type.IsArithmetic()) { dp->val.p = (void*) *ap; continue; } switch(type) { // the 8 and 16 bit types will have been promoted to 32 bits before // being pushed onto the stack. Since the 68k is big endian, we // need to skip over the leading high order bytes. case nsXPTType::T_I8 : dp->val.i8 = *(((PRInt8*) ap) + 3); break; case nsXPTType::T_I16 : dp->val.i16 = *(((PRInt16*) ap) + 1); break; case nsXPTType::T_I32 : dp->val.i32 = *((PRInt32*) ap); break; case nsXPTType::T_I64 : dp->val.i64 = *((PRInt64*) ap); ap++; break; case nsXPTType::T_U8 : dp->val.u8 = *(((PRUint8*) ap) + 3); break; case nsXPTType::T_U16 : dp->val.u16 = *(((PRUint16*)ap) + 1); break; case nsXPTType::T_U32 : dp->val.u32 = *((PRUint32*)ap); break; case nsXPTType::T_U64 : dp->val.u64 = *((PRUint64*)ap); ap++; break; case nsXPTType::T_FLOAT : dp->val.f = *((float*) ap); break; case nsXPTType::T_DOUBLE : dp->val.d = *((double*) ap); ap++; break; case nsXPTType::T_BOOL : dp->val.b = *((PRBool*) ap); break; case nsXPTType::T_CHAR : dp->val.c = *(((char*) ap) + 3); break; case nsXPTType::T_WCHAR : dp->val.wc = *((wchar_t*) ap); break; default: NS_ASSERTION(0, "bad type"); break; } } result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams); NS_RELEASE(iface_info); if(dispatchParams != paramBuffer) delete [] dispatchParams; return result; } } #define STUB_ENTRY(n) \ nsresult nsXPTCStubBase::Stub##n() \ { \ register nsresult result; \ __asm__ __volatile__( \ "lea %/a6@(12), %/a0\n\t" /* args */ \ "movl %/a0, %/sp@-\n\t" \ "movl #"#n", %/sp@-\n\t" /* method index */ \ "movl %/a6@(8), %/sp@-\n\t" /* this */ \ "jbsr _PrepareAndDispatch\n\t" \ "movl %/d0, %0\n\t" \ "addl #12, %/sp" \ : "=d" (result) /* %0 */ \ : \ : "a0", "a1", "d0", "d1", "memory" ); \ return result; \ } #define SENTINEL_ENTRY(n) \ nsresult nsXPTCStubBase::Sentinel##n() \ { \ NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \ return NS_ERROR_NOT_IMPLEMENTED; \ } #include "xptcstubsdef.inc" |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:18:12
|
Update of /cvsroot/amizilla/amizilla/xpcom/proxy/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2702/tests Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/proxy/tests/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:42:03 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:18:01 -0000 1.2 *************** *** 41,44 **** --- 41,48 ---- $(NULL) + ifeq ($(OS_ARCH), AmigaOS) + FORCE_NO_PIC=1 + endif + include $(topsrcdir)/config/rules.mk |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:17:44
|
Update of /cvsroot/amizilla/amizilla/xpcom/obsolete In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2582 Modified Files: nsFileSpec.h Log Message: AmigaOS defines. Index: nsFileSpec.h =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/obsolete/nsFileSpec.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** nsFileSpec.h 29 Jun 2004 10:43:05 -0000 1.1.1.2 --- nsFileSpec.h 11 Oct 2004 21:17:32 -0000 1.2 *************** *** 201,204 **** --- 201,206 ---- #include <os2.h> #include "prio.h" + #elif defined(XP_AMIGAOS) + #include "prio.h" #endif *************** *** 728,732 **** PRBool mResoveSymLinks; ! #if (defined(XP_UNIX) || defined(XP_BEOS) || defined (XP_WIN) || defined(XP_OS2)) nsFileSpec mStarting; #endif --- 730,734 ---- PRBool mResoveSymLinks; ! #if (defined(XP_UNIX) || defined(XP_BEOS) || defined (XP_WIN) || defined(XP_OS2) || defined(XP_AMIGAOS)) nsFileSpec mStarting; #endif *************** *** 739,743 **** #elif defined(XP_UNIX) || defined(XP_BEOS) DIR* mDir; ! #elif defined(XP_WIN) || defined(XP_OS2) PRDir* mDir; // XXX why not use PRDir for Unix too? #endif --- 741,745 ---- #elif defined(XP_UNIX) || defined(XP_BEOS) DIR* mDir; ! #elif defined(XP_WIN) || defined(XP_OS2) || defined(XP_AMIGAOS) PRDir* mDir; // XXX why not use PRDir for Unix too? #endif |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:17:09
|
Update of /cvsroot/amizilla/amizilla/xpcom/obsolete In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2415 Added Files: nsFileSpecAmigaOS.cpp Log Message: AmigaOS implementation of nsFileSpecUnix.cpp. --- NEW FILE: nsFileSpecAmigaOS.cpp --- /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* ***** BEGIN LICENSE BLOCK ***** * Version: NPL 1.1/GPL 2.0/LGPL 2.1 * * The contents of this file are subject to the Netscape Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/NPL/ * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License * for the specific language governing rights and limitations under the * License. * * The Original Code is mozilla.org code. * * The Initial Developer of the Original Code is * Netscape Communications Corporation. * Portions created by the Initial Developer are Copyright (C) 1998 * the Initial Developer. All Rights Reserved. * * Contributor(s): * * Alternatively, the contents of this file may be used under the terms of * either the GNU General Public License Version 2 or later (the "GPL"), or * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), * in which case the provisions of the GPL or the LGPL are applicable instead * of those above. If you wish to allow use of your version of this file only * under the terms of either the GPL or the LGPL, and not to allow others to * use your version of this file under the terms of the NPL, indicate your * decision by deleting the provisions above and replace them with the notice * and other provisions required by the GPL or the LGPL. If you do not delete * the provisions above, a recipient may use your version of this file under * the terms of any one of the NPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ // This file is included by nsFileSpec.cpp, and includes the Unix-specific // implementations. #include <sys/stat.h> #include <sys/param.h> #include <errno.h> #include <dirent.h> #include <unistd.h> #include <stdlib.h> #include <limits.h> #include "xpcom-private.h" #include "nsError.h" #include "prio.h" /* for PR_Rename */ #include "nsAutoBuffer.h" #ifdef HAVE_SYS_STATVFS_H #include <sys/statvfs.h> #endif #ifdef HAVE_SYS_VFS_H #include <sys/vfs.h> #endif #ifdef HAVE_SYS_STATFS_H #include <sys/statfs.h> #endif #ifdef HAVE_SYS_MOUNT_H #include <sys/mount.h> #undef Free #endif #ifdef HAVE_STATVFS #define STATFS statvfs #else #define STATFS statfs #endif #ifndef MAXPATHLEN #define MAXPATHLEN 1024 /* Guessing this is okay. Works for SCO. */ #endif //---------------------------------------------------------------------------------------- void nsFileSpecHelpers::Canonify(nsSimpleCharString& ioPath, PRBool inMakeDirs) // Canonify, make absolute, and check whether directories exist //---------------------------------------------------------------------------------------- { if (ioPath.IsEmpty()) return; if (inMakeDirs) { const mode_t mode = 0755; nsFileSpecHelpers::MakeAllDirectories((const char*)ioPath, mode); } errno = 0; // needed? if (ioPath[0] != '/') { // the ioPath that was passed in is relative. We must cat it to the cwd. char buffer[MAXPATHLEN]; (void) getcwd(buffer, MAXPATHLEN); strcat(buffer, "/"); strcat(buffer, ioPath); ioPath = buffer; } } // nsFileSpecHelpers::Canonify //---------------------------------------------------------------------------------------- void nsFileSpec::SetLeafName(const char* inLeafName) //---------------------------------------------------------------------------------------- { mPath.LeafReplace('/', inLeafName); } // nsFileSpec::SetLeafName //---------------------------------------------------------------------------------------- char* nsFileSpec::GetLeafName() const //---------------------------------------------------------------------------------------- { #ifndef XP_MACOSX return mPath.GetLeaf('/'); #else char *name = mPath.GetLeaf('/'); if (!name || !*name) return name; nsAutoString nameInNFC; CopyUTF8toUTF16NFC(nsDependentCString(name), nameInNFC); nsCRT::free(name); return nsCRT::strdup(NS_ConvertUTF16toUTF8(nameInNFC).get()); #endif } // nsFileSpec::GetLeafName //---------------------------------------------------------------------------------------- PRBool nsFileSpec::Exists() const //---------------------------------------------------------------------------------------- { struct PRFileInfo st; return !mPath.IsEmpty() && PR_GetFileInfo(mPath, &st) == PR_SUCCESS; } // nsFileSpec::Exists //---------------------------------------------------------------------------------------- void nsFileSpec::GetModDate(TimeStamp& outStamp) const //---------------------------------------------------------------------------------------- { struct PRFileInfo st; if (!mPath.IsEmpty() && PR_GetFileInfo(mPath, &st) == PR_SUCCESS) outStamp = st.modifyTime; else outStamp = 0; } // nsFileSpec::GetModDate //---------------------------------------------------------------------------------------- PRUint32 nsFileSpec::GetFileSize() const //---------------------------------------------------------------------------------------- { struct PRFileInfo st; if (!mPath.IsEmpty() && PR_GetFileInfo(mPath, &st) == PR_SUCCESS) return (PRUint32)st.size; return 0; } // nsFileSpec::GetFileSize //---------------------------------------------------------------------------------------- PRBool nsFileSpec::IsFile() const //---------------------------------------------------------------------------------------- { struct PRFileInfo st; return !mPath.IsEmpty() && PR_GetFileInfo(mPath, &st) == PR_SUCCESS && st.type == PR_FILE_FILE; } // nsFileSpec::IsFile //---------------------------------------------------------------------------------------- PRBool nsFileSpec::IsDirectory() const //---------------------------------------------------------------------------------------- { struct PRFileInfo st; return !mPath.IsEmpty() && PR_GetFileInfo(mPath, &st) == PR_SUCCESS && st.type == PR_FILE_DIRECTORY; } // nsFileSpec::IsDirectory //---------------------------------------------------------------------------------------- PRBool nsFileSpec::IsHidden() const //---------------------------------------------------------------------------------------- { PRBool hidden = PR_FALSE; return hidden; } // nsFileSpec::IsHidden //---------------------------------------------------------------------------------------- PRBool nsFileSpec::IsSymlink() const //---------------------------------------------------------------------------------------- { return PR_FALSE; } // nsFileSpec::IsSymlink //---------------------------------------------------------------------------------------- nsresult nsFileSpec::ResolveSymlink(PRBool& wasAliased) //---------------------------------------------------------------------------------------- { wasAliased = PR_FALSE; char resolvedPath[MAXPATHLEN]; int charCount = readlink(mPath, (char*)&resolvedPath, MAXPATHLEN); if (0 < charCount) { if (MAXPATHLEN > charCount) resolvedPath[charCount] = '\0'; wasAliased = PR_TRUE; /* if it's not an absolute path, replace the leaf with what got resolved */ if (resolvedPath[0] != '/') { SetLeafName(resolvedPath); } else { mPath = (char*)&resolvedPath; } char* canonicalPath = realpath((const char *)mPath, resolvedPath); NS_ASSERTION(canonicalPath, "realpath failed"); if (canonicalPath) { mPath = (char*)&resolvedPath; } else { return NS_ERROR_FAILURE; } } return NS_OK; } // nsFileSpec::ResolveSymlink //---------------------------------------------------------------------------------------- void nsFileSpec::GetParent(nsFileSpec& outSpec) const //---------------------------------------------------------------------------------------- { outSpec.mPath = mPath; char* chars = (char*)outSpec.mPath; chars[outSpec.mPath.Length() - 1] = '\0'; // avoid trailing separator, if any char* cp = strrchr(chars, '/'); if (cp++) outSpec.mPath.SetLength(cp - chars); // truncate. } // nsFileSpec::GetParent //---------------------------------------------------------------------------------------- void nsFileSpec::operator += (const char* inRelativePath) //---------------------------------------------------------------------------------------- { NS_ASSERTION(inRelativePath, "Attempt to do += with a null string"); if (!inRelativePath || mPath.IsEmpty()) return; char endChar = mPath[(int)(strlen(mPath) - 1)]; if (endChar == '/') mPath += "x"; else mPath += "/x"; SetLeafName(inRelativePath); } // nsFileSpec::operator += //---------------------------------------------------------------------------------------- void nsFileSpec::CreateDirectory(int mode) //---------------------------------------------------------------------------------------- { // Note that mPath is canonical! if (mPath.IsEmpty()) return; mkdir(mPath, mode); } // nsFileSpec::CreateDirectory //---------------------------------------------------------------------------------------- void nsFileSpec::Delete(PRBool inRecursive) const // To check if this worked, call Exists() afterwards, see? //---------------------------------------------------------------------------------------- { if (IsDirectory()) { if (inRecursive) { for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++) { nsFileSpec& child = (nsFileSpec&)i; child.Delete(inRecursive); } } rmdir(mPath); } else if (!mPath.IsEmpty()) PR_Delete(mPath); } // nsFileSpec::Delete //---------------------------------------------------------------------------------------- void nsFileSpec::RecursiveCopy(nsFileSpec newDir) const //---------------------------------------------------------------------------------------- { if (IsDirectory()) { if (!(newDir.Exists())) { newDir.CreateDirectory(); } for (nsDirectoryIterator i(*this, PR_FALSE); i.Exists(); i++) { nsFileSpec& child = (nsFileSpec&)i; if (child.IsDirectory()) { nsFileSpec tmpDirSpec(newDir); char *leafname = child.GetLeafName(); tmpDirSpec += leafname; nsCRT::free(leafname); child.RecursiveCopy(tmpDirSpec); } else { child.RecursiveCopy(newDir); } } } else if (!mPath.IsEmpty()) { nsFileSpec& filePath = (nsFileSpec&) *this; if (!(newDir.Exists())) { newDir.CreateDirectory(); } filePath.CopyToDir(newDir); } } // nsFileSpec::RecursiveCopy //---------------------------------------------------------------------------------------- nsresult nsFileSpec::Truncate(PRInt32 offset) const //---------------------------------------------------------------------------------------- { char* Path = nsCRT::strdup(mPath); int rv = truncate(Path, offset) ; nsCRT::free(Path) ; if(!rv) return NS_OK ; else return NS_ERROR_FAILURE ; } // nsFileSpec::Truncate //---------------------------------------------------------------------------------------- nsresult nsFileSpec::Rename(const char* inNewName) //---------------------------------------------------------------------------------------- { NS_ASSERTION(inNewName, "Attempt to Rename with a null string"); // This function should not be used to move a file on disk. if (mPath.IsEmpty() || strchr(inNewName, '/')) return NS_FILE_FAILURE; char* oldPath = nsCRT::strdup(mPath); SetLeafName(inNewName); if (PR_Rename(oldPath, mPath) != NS_OK) { // Could not rename, set back to the original. mPath = oldPath; return NS_FILE_FAILURE; } nsCRT::free(oldPath); return NS_OK; } // nsFileSpec::Rename //---------------------------------------------------------------------------------------- static int CrudeFileCopy(const char* in, const char* out) //---------------------------------------------------------------------------------------- { struct stat in_stat; int stat_result = -1; char buf [1024]; FILE *ifp, *ofp; int rbytes, wbytes; if (!in || !out) return -1; stat_result = stat (in, &in_stat); ifp = fopen (in, "r"); if (!ifp) { return -1; } ofp = fopen (out, "w"); if (!ofp) { fclose (ifp); return -1; } while ((rbytes = fread (buf, 1, sizeof(buf), ifp)) > 0) { while (rbytes > 0) { if ( (wbytes = fwrite (buf, 1, rbytes, ofp)) < 0 ) { fclose (ofp); fclose (ifp); unlink(out); return -1; } rbytes -= wbytes; } } fclose (ofp); fclose (ifp); if (stat_result == 0) chmod (out, in_stat.st_mode & 0777); return 0; } // nsFileSpec::Rename //---------------------------------------------------------------------------------------- nsresult nsFileSpec::CopyToDir(const nsFileSpec& inParentDirectory) const //---------------------------------------------------------------------------------------- { // We can only copy into a directory, and (for now) can not copy entire directories nsresult result = NS_FILE_FAILURE; if (inParentDirectory.IsDirectory() && (! IsDirectory() ) ) { char *leafname = GetLeafName(); nsSimpleCharString destPath(inParentDirectory.GetCString()); destPath += "/"; destPath += leafname; nsCRT::free(leafname); result = NS_FILE_RESULT(CrudeFileCopy(GetCString(), destPath)); } return result; } // nsFileSpec::CopyToDir //---------------------------------------------------------------------------------------- nsresult nsFileSpec::MoveToDir(const nsFileSpec& inNewParentDirectory) //---------------------------------------------------------------------------------------- { // We can only copy into a directory, and (for now) can not copy entire directories nsresult result = NS_FILE_FAILURE; if (inNewParentDirectory.IsDirectory() && !IsDirectory()) { char *leafname = GetLeafName(); nsSimpleCharString destPath(inNewParentDirectory.GetCString()); destPath += "/"; destPath += leafname; nsCRT::free(leafname); result = NS_FILE_RESULT(CrudeFileCopy(GetCString(), (const char*)destPath)); if (result == NS_OK) { // cast to fix const-ness ((nsFileSpec*)this)->Delete(PR_FALSE); *this = inNewParentDirectory + GetLeafName(); } } return result; } //---------------------------------------------------------------------------------------- nsresult nsFileSpec::Execute(const char* inArgs ) const //---------------------------------------------------------------------------------------- { nsresult result = NS_FILE_FAILURE; if (!mPath.IsEmpty() && !IsDirectory()) { nsSimpleCharString fileNameWithArgs = mPath + " " + inArgs; result = NS_FILE_RESULT(system(fileNameWithArgs)); } return result; } // nsFileSpec::Execute //---------------------------------------------------------------------------------------- PRInt64 nsFileSpec::GetDiskSpaceAvailable() const //---------------------------------------------------------------------------------------- { PRInt64 bytes; /* XXX dougt needs to fix this */ LL_I2L(bytes , LONG_MAX); // initialize to all the space in the world? #if defined(HAVE_SYS_STATFS_H) || defined(HAVE_SYS_STATVFS_H) char curdir [MAXPATHLEN]; if (mPath.IsEmpty()) { (void) getcwd(curdir, MAXPATHLEN); if (!curdir) return bytes; /* hope for the best as we did in cheddar */ } else sprintf(curdir, "%.200s", (const char*)mPath); struct STATFS fs_buf; #if defined(__QNX__) && !defined(HAVE_STATVFS) /* Maybe this should be handled differently? */ if (STATFS(curdir, &fs_buf, 0, 0) < 0) #else if (STATFS(curdir, &fs_buf) < 0) #endif return bytes; /* hope for the best as we did in cheddar */ #ifdef DEBUG_DISK_SPACE printf("DiskSpaceAvailable: %d bytes\n", fs_buf.f_bsize * (fs_buf.f_bavail - 1)); #endif PRInt64 bsize,bavail; LL_I2L( bsize, fs_buf.f_bsize ); LL_I2L( bavail, fs_buf.f_bavail - 1 ); LL_MUL( bytes, bsize, bavail ); return bytes; #else /* ** This platform doesn't have statfs or statvfs, so we don't have much ** choice but to "hope for the best as we did in cheddar". */ return bytes; #endif /* HAVE_SYS_STATFS_H or HAVE_SYS_STATVFS_H */ } // nsFileSpec::GetDiskSpace() //======================================================================================== // nsDirectoryIterator //======================================================================================== //---------------------------------------------------------------------------------------- nsDirectoryIterator::nsDirectoryIterator(const nsFileSpec& inDirectory, PRBool resolveSymLinks) //---------------------------------------------------------------------------------------- : mCurrent(inDirectory) , mExists(PR_FALSE) , mResoveSymLinks(resolveSymLinks) , mStarting(inDirectory) , mDir(nsnull) { mStarting += "sysygy"; // save off the starting directory mCurrent += "sysygy"; // prepare the path for SetLeafName mDir = PR_OpenDir((const char*)nsFilePath(inDirectory)); ++(*this); } // nsDirectoryIterator::nsDirectoryIterator //---------------------------------------------------------------------------------------- nsDirectoryIterator::~nsDirectoryIterator() //---------------------------------------------------------------------------------------- { if (mDir) PR_CloseDir(mDir); } // nsDirectoryIterator::nsDirectoryIterator //---------------------------------------------------------------------------------------- nsDirectoryIterator& nsDirectoryIterator::operator ++ () //---------------------------------------------------------------------------------------- { mExists = PR_FALSE; if (!mDir) return *this; PRDirEntry *entry = PR_ReadDir(mDir, PR_SKIP_BOTH); if (entry) { mExists = PR_TRUE; mCurrent = mStarting; // restore mCurrent to be the starting directory. ResolveSymlink() may have taken us to another directory mCurrent.SetLeafName(entry->name); if (mResoveSymLinks) { PRBool ignore; mCurrent.ResolveSymlink(ignore); } } return *this; } // nsDirectoryIterator::operator ++ //---------------------------------------------------------------------------------------- nsDirectoryIterator& nsDirectoryIterator::operator -- () //---------------------------------------------------------------------------------------- { return ++(*this); // can't do it backwards. } // nsDirectoryIterator::operator -- |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:16:36
|
Update of /cvsroot/amizilla/amizilla/xpcom/obsolete In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2241 Modified Files: nsFileSpec.cpp Log Message: AmigaOS defines. Index: nsFileSpec.cpp =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/obsolete/nsFileSpec.cpp,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** nsFileSpec.cpp 22 Jun 2003 11:43:34 -0000 1.1.1.1 --- nsFileSpec.cpp 11 Oct 2004 21:16:23 -0000 1.2 *************** *** 420,424 **** #endif ! #if (defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)) //---------------------------------------------------------------------------------------- --- 420,424 ---- #endif ! #if (defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)|| defined(XP_AMIGAOS)) //---------------------------------------------------------------------------------------- *************** *** 494,498 **** } // nsFileSpecHelpers::MakeAllDirectories ! #endif // XP_UNIX || XP_WIN || XP_OS2 || XP_BEOS #if 0 --- 494,498 ---- } // nsFileSpecHelpers::MakeAllDirectories ! #endif // XP_UNIX || XP_WIN || XP_OS2 || XP_BEOS || XP_AMIGAOS #if 0 *************** *** 507,512 **** #elif defined(XP_BEOS) #include "nsFileSpecBeOS.cpp" // BeOS-specific implementations ! #elif defined(XP_UNIX) || defined(XP_MACOSX) #include "nsFileSpecUnix.cpp" // Unix-specific implementations #elif defined(XP_OS2) #include "nsFileSpecOS2.cpp" // OS/2-specific implementations --- 507,514 ---- #elif defined(XP_BEOS) #include "nsFileSpecBeOS.cpp" // BeOS-specific implementations ! #elif defined(XP_UNIX) || defined(XP_MACOSX) #include "nsFileSpecUnix.cpp" // Unix-specific implementations + #elif defined(XP_AMIGAOS) + #include "nsFileSpecAmigaOS.cpp" //AmigaOS-specific implementations #elif defined(XP_OS2) #include "nsFileSpecOS2.cpp" // OS/2-specific implementations *************** *** 745,749 **** #endif ! #if (defined XP_UNIX || defined XP_BEOS) //---------------------------------------------------------------------------------------- nsFilePath::nsFilePath(const nsFileSpec& inOther) --- 747,751 ---- #endif ! #if (defined XP_UNIX || defined XP_BEOS || defined XP_AMIGAOS) //---------------------------------------------------------------------------------------- nsFilePath::nsFilePath(const nsFileSpec& inOther) *************** *** 760,764 **** } ! #if (defined XP_UNIX || defined XP_BEOS) //---------------------------------------------------------------------------------------- void nsFilePath::operator = (const nsFileSpec& inOther) --- 762,766 ---- } ! #if (defined XP_UNIX || defined XP_BEOS || defined XP_AMIGAOS) //---------------------------------------------------------------------------------------- void nsFilePath::operator = (const nsFileSpec& inOther) *************** *** 980,984 **** //======================================================================================== ! #if (defined XP_UNIX || defined XP_BEOS) //---------------------------------------------------------------------------------------- nsFileSpec::nsFileSpec(const nsFilePath& inPath) --- 982,986 ---- //======================================================================================== ! #if (defined XP_UNIX || defined XP_BEOS || defined XP_AMIGAOS) //---------------------------------------------------------------------------------------- nsFileSpec::nsFileSpec(const nsFilePath& inPath) *************** *** 999,1003 **** #endif //XP_UNIX ! #if (defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS)) //---------------------------------------------------------------------------------------- nsFileSpec::nsFileSpec(const nsFileSpec& inSpec) --- 1001,1005 ---- #endif //XP_UNIX ! #if (defined(XP_UNIX) || defined(XP_WIN) || defined(XP_OS2) || defined(XP_BEOS) || defined(XP_AMIGAOS) ) //---------------------------------------------------------------------------------------- nsFileSpec::nsFileSpec(const nsFileSpec& inSpec) *************** *** 1092,1095 **** --- 1094,1100 ---- #define DIR_STRCMP _stricmp #endif + #elif defined(XP_AMIGAOS) + #define DIR_SEPARATOR '/' + #define DIR_STRCMP stricmp #else #define DIR_SEPARATOR '/' |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:16:08
|
Update of /cvsroot/amizilla/amizilla/xpcom/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1953 Modified Files: nsLocalFileUnix.cpp Log Message: Call PR equivalents instead of native ones. AmigaOS defines. Index: nsLocalFileUnix.cpp =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/io/nsLocalFileUnix.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nsLocalFileUnix.cpp 18 Jul 2004 00:32:49 -0000 1.2 --- nsLocalFileUnix.cpp 11 Oct 2004 21:15:55 -0000 1.3 *************** *** 71,74 **** --- 71,75 ---- #include "nsNativeCharsetUtils.h" + #include "prerror.h" // On some platforms file/directory name comparisons need to *************** *** 390,394 **** { *_retval = nsnull; ! return mkdir(path, mode); } --- 391,395 ---- { *_retval = nsnull; ! return PR_MkDir(path, mode); } *************** *** 530,534 **** --- 531,539 ---- --stop; while (--it != stop) { + #ifdef XP_AMIGAOS + if (*it == '/' || *it == ':') { + #else if (*it == '/') { + #endif begin = ++it; return; *************** *** 882,885 **** --- 887,891 ---- } } + return rv; } *************** *** 892,903 **** VALIDATE_STAT_CACHE(); PRBool isSymLink, isDir; ! nsresult rv = IsSymlink(&isSymLink); if (NS_FAILED(rv)) return rv; ! if (!recursive && isSymLink) ! return NSRESULT_FOR_RETURN(unlink(mPath.get())); ! isDir = S_ISDIR(mCachedStat.st_mode); InvalidateCache(); --- 898,912 ---- VALIDATE_STAT_CACHE(); PRBool isSymLink, isDir; ! nsresult rv = IsSymlink(&isSymLink); if (NS_FAILED(rv)) return rv; ! if (!recursive && isSymLink) { ! if (PR_Delete(mPath.get()) == PR_FAILURE) ! return NS_ErrorAccordingToNSPR(); ! } ! ! isDir = S_ISDIR(mCachedStat.st_mode); InvalidateCache(); *************** *** 929,937 **** } ! if (rmdir(mPath.get()) == -1) ! return NSRESULT_FOR_ERRNO(); } else { ! if (unlink(mPath.get()) == -1) ! return NSRESULT_FOR_ERRNO(); } --- 938,947 ---- } ! if (PR_RmDir(mPath.get()) == PR_FAILURE) ! return NS_ErrorAccordingToNSPR(); ! } else { ! if (PR_Delete(mPath.get()) == PR_FAILURE) ! return NS_ErrorAccordingToNSPR(); } *************** *** 1189,1192 **** --- 1199,1207 ---- // find the last significant slash in buffer slashp = strrchr(buffer, '/'); + #ifdef XP_AMIGAOS + if (!slashp) + slashp = strchr(buffer, ':'); + #endif + NS_ASSERTION(slashp, "non-canonical mPath?"); if (!slashp) *************** *** 1223,1227 **** NS_ENSURE_ARG_POINTER(_retval); ! *_retval = (access(mPath.get(), F_OK) == 0); return NS_OK; } --- 1238,1242 ---- NS_ENSURE_ARG_POINTER(_retval); ! *_retval = (PR_Access(mPath.get(), PR_ACCESS_READ_OK) == PR_SUCCESS); return NS_OK; } |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:15:07
|
Update of /cvsroot/amizilla/amizilla/xpcom/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1780 Modified Files: nsDirectoryService.cpp Log Message: Use PROGDIR: for directories. Index: nsDirectoryService.cpp =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/io/nsDirectoryService.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nsDirectoryService.cpp 18 Jul 2004 00:32:49 -0000 1.2 --- nsDirectoryService.cpp 11 Oct 2004 21:14:50 -0000 1.3 *************** *** 60,63 **** --- 60,65 ---- #include <sys/param.h> #include "prenv.h" + #elif defined(XP_AMIGAOS) + #include <proto/dos.h> #ifdef XP_MACOSX #include <CoreServices/CoreServices.h> *************** *** 318,324 **** } #elif defined(XP_AMIGAOS) ! localFile->InitWithNativePath(nsDependentCString("progdir:")); ! *aFile = localFile; ! return NS_OK; #endif --- 320,330 ---- } #elif defined(XP_AMIGAOS) ! { ! char progdir[10]; ! strcpy(progdir, "PROGDIR:"); ! localFile->InitWithNativePath(nsDependentCString(progdir)); ! *aFile = localFile; ! return NS_OK; ! } #endif *************** *** 530,539 **** { nsresult rv; - rv = NS_NewISupportsArray(getter_AddRefs(mProviders)); if (NS_FAILED(rv)) return rv; NS_RegisterStaticAtoms(directory_atoms, NS_ARRAY_LENGTH(directory_atoms)); - // Let the list hold the only reference to the provider. nsAppFileLocationProvider *defaultProvider = new nsAppFileLocationProvider; --- 536,543 ---- *************** *** 542,546 **** // AppendElement returns PR_TRUE for success. rv = mProviders->AppendElement(defaultProvider) ? NS_OK : NS_ERROR_FAILURE; - return rv; } --- 546,549 ---- |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:10:49
|
Update of /cvsroot/amizilla/amizilla/xpcom/io In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv670 Modified Files: nsAppFileLocationProvider.cpp Log Message: AmigaOS defines. Use PROGDIR: for file locations instead of mozilla: Index: nsAppFileLocationProvider.cpp =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/io/nsAppFileLocationProvider.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** nsAppFileLocationProvider.cpp 18 Jul 2004 00:32:49 -0000 1.2 --- nsAppFileLocationProvider.cpp 11 Oct 2004 21:10:26 -0000 1.3 *************** *** 379,383 **** if (NS_FAILED(rv)) return rv; #elif defined(XP_AMIGAOS) ! rv = NS_NewNativeLocalFile(nsDependentCString("mozilla:"), PR_TRUE, getter_AddRefs(localDir)); if (NS_FAILED(rv)) return rv; #else --- 379,383 ---- if (NS_FAILED(rv)) return rv; #elif defined(XP_AMIGAOS) ! rv = NS_NewNativeLocalFile(nsDependentCString("PROGDIR:"), PR_TRUE, getter_AddRefs(localDir)); if (NS_FAILED(rv)) return rv; #else |
From: Jeff S. <jsh...@us...> - 2004-10-11 21:10:01
|
Update of /cvsroot/amizilla/amizilla/xpcom/glue/standalone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv574 Modified Files: Makefile.in Log Message: AmigaOS build rules. Index: Makefile.in =================================================================== RCS file: /cvsroot/amizilla/amizilla/xpcom/glue/standalone/Makefile.in,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -C2 -d -r1.1.1.2 -r1.2 *** Makefile.in 29 Jun 2004 10:41:21 -0000 1.1.1.2 --- Makefile.in 11 Oct 2004 21:09:41 -0000 1.2 *************** *** 71,75 **** # Force use of PIC ! FORCE_USE_PIC = 1 GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(wildcard *.$(OBJ_SUFFIX)) --- 71,79 ---- # Force use of PIC ! ifeq ($(OS_ARCH),AmigaOS) ! FORCE_NO_PIC = 1 ! else ! FORCE_USE_PIC = 1 ! endif GARBAGE += $(XPCOM_GLUE_SRC_LCSRCS) $(wildcard *.$(OBJ_SUFFIX)) |