You can subscribe to this list here.
2008 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Alexandre B. <aba...@us...> - 2008-02-15 17:00:08
|
Update of /cvsroot/wxwidget-aos/wxBase/src/amiga In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv1808/src/amiga Modified Files: amiga_specific.cpp filefnaos.cpp Log Message: Corrected line ending/spacing Index: filefnaos.cpp =================================================================== RCS file: /cvsroot/wxwidget-aos/wxBase/src/amiga/filefnaos.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** filefnaos.cpp 16 Dec 2007 01:01:38 -0000 1.4 --- filefnaos.cpp 15 Feb 2008 16:59:36 -0000 1.5 *************** *** 1,251 **** ! ///////////////////////////////////////////////////////////////////////////// ! // Name: amiga/filefnaos.cpp ! // Purpose: File related functions implementation for Amiga systems ! // Author: Alexandre Balaban ! // Modified by: ! // Created: 07.12.05 ! // RCS-ID: $Id$ ! // Copyright: (c) 2005 Alexandre Balaban <aba...@fr...> ! // Licence: wxWindows licence ! ///////////////////////////////////////////////////////////////////////////// ! ! // ============================================================================ ! // declarations ! // ============================================================================ ! ! // ---------------------------------------------------------------------------- ! // headers ! // ---------------------------------------------------------------------------- ! ! #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) ! #pragma implementation "dir.h" ! #endif ! ! // For compilers that support precompilation, includes "wx.h". ! #include "wx/wxprec.h" ! ! #ifndef WX_PRECOMP ! #include "wx/intl.h" ! #include "wx/log.h" ! #endif // PCH ! ! #include "wx/file.h" ! #include "wx/filefn.h" ! ! #include <unistd.h> ! ! // Amiga specific includes ! #include "aos_common.h" ! ! // ---------------------------------------------------------------------------- ! // macros ! // ---------------------------------------------------------------------------- ! #ifndef NO_ERROR ! #define NO_ERROR 0 ! #endif ! ! // ---------------------------------------------------------------------------- ! // private classes ! // ---------------------------------------------------------------------------- ! ! // ============================================================================ ! // implementation ! // ============================================================================ ! ! int wxOpen( const wxChar *filename, int oflag, int WXUNUSED(pmode) ) ! { ! // on AmigaOS Open() function only has three modes : ! // - MODE_OLDFILE : Open existing file read/write positioned at beginning of file ! // - MODE_NEWFILE : Open freshly created file (delete old file) read/write, exclusive lock ! // - MODE_READWRITE : Open old file w/shared lock, creates file if doesn't exist. ! // ! // So, we can ignore O_RDONLY, O_WRONLY and O_RDWR flags as this make no difference ! // However we must be carefull about the other : ! // - O_APPEND : we must *automatically* move to the end of the file after Open succeeded ! // - O_TRUNC : we must use truncate the old file -> use of MODE_NEWFILE ! // - O_CREAT : we should create the file, so we must not use MODE_OLDFILE ! // - O_EXCL, O_DSYNC, O_LARGEFILE, O_NOCTTY, O_NONBLOCK, O_NDELAY, O_RSYNC, O_SYNC and O_XATTR are ! // all ignored for now, but this could change in future... ! ! LONG access = MODE_OLDFILE; ! ! if( oflag & O_APPEND ) ! { ! if ( wxFile::Exists(filename) ) ! access = MODE_OLDFILE; ! //else: fall through as write_append is the same as write if the ! // file doesn't exist ! else ! access = MODE_NEWFILE; ! } ! if( oflag & O_TRUNC ) ! { ! access = MODE_NEWFILE; ! } ! else if (oflag & O_CREAT) ! { ! access = MODE_NEWFILE; ! } ! ! int fd = 0; ! BPTR fileHandle = Open( filename, access ); ! if( 0 == fileHandle ) ! fd = -1; ! else ! fd = (int) fileHandle; ! ! // handle the O_APPEND case ! if( -1 != fd && (oflag & O_APPEND) ) ! { ! LONG res = Seek( fileHandle, 0, OFFSET_END ); ! if( res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR ) ! { ! Close( fileHandle ); ! fd = -1; ! } ! } ! ! return fd; ! } ! ! int wxAccess(const wxChar *name, int how) ! { ! BPTR lock = (BPTR) NULL; ! LONG access = 0; ! int res = -1; ! ! if( how & R_OK == R_OK) ! access = ACCESS_READ; ! else ! access = ACCESS_WRITE; ! ! lock = Lock( name, access ); ! if( 0 != lock ) ! { ! // permission was granted to access the ! // file in the desired mode ! UnLock( lock ); ! res = 0; ! } ! ! return res; ! } ! ! int wxClose(int fd) ! { ! if( Close( (BPTR)fd ) ) ! return 0; ! ! return -1; ! } ! ! int wxFsync(int fd) ! { ! #if defined(__amigaos4__) ! // [ABA, 14/12/2005 : on OS4 new fonctions FOpen, FRead, FClose and FFlush exists to support buffered I/O ! // so when using Open, Read and Close we work with synchronised I/O so no need to Flush : ! // we are always Flushed, so return OK (=0) ;-) ] ! return 0; ! #else ! if( Flush( (BPTR)fd ) ) ! return 0; ! ! // [ABA, 14/12/2005 : we return 0 even when Flush failed ? i.e. we don't care if flush really worked or not] ! return 0; ! #endif ! } ! ! int wxRead(int fd, void *buf, unsigned int count) ! { ! LONG bytesRead = 0; ! ! bytesRead = Read( (BPTR)fd, buf, (LONG)count ); ! if(bytesRead >= 0) ! return bytesRead; ! else ! return -1; ! } ! ! int wxWrite(int fd, const void *buf, unsigned int count) ! { ! LONG bytesWritten = 0; ! ! bytesWritten = Write( (BPTR)fd, (void *)buf, (LONG)count ); ! ! if(bytesWritten >= 0) ! return bytesWritten; ! else ! return -1; ! } ! ! int wxEof(int fd) ! { ! LONG res0 = Seek( (BPTR) fd, 0, OFFSET_CURRENT ); ! if( res0 == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR ) ! return -1; ! ! LONG res1 = Seek( (BPTR) fd, 0, OFFSET_END ); ! if( res1 == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! return -1; ! ! if( res0 == res1 ) ! return 1; ! else ! { ! Seek( (BPTR)fd, res0, OFFSET_BEGINNING); ! return 0; ! } ! } ! ! wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin) ! { ! int method; ! switch ( origin ) { ! default: ! wxFAIL_MSG(_("unknown seek origin")); ! ! case SEEK_SET: ! method = OFFSET_BEGINNING; ! break; ! ! case SEEK_CUR: ! method = OFFSET_CURRENT; ! break; ! ! case SEEK_END: ! method = OFFSET_END; ! break; ! } ! ! LONG res = Seek( (BPTR) fd, offset, method ) ; ! if (res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! { ! wxLogSysError(_("can't seek on file descriptor %d"), fd); ! return wxInvalidOffset; ! } ! else ! { ! return (wxFileOffset)res; ! } ! } ! ! //#define wxLSeek wxSeek ! ! wxFileOffset wxTell(int fd) ! { ! LONG res = Seek( (BPTR) fd, 0, OFFSET_CURRENT ) ; ! if (res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! { ! wxLogSysError(_("can't get seek position on file descriptor %d"), fd); ! return wxInvalidOffset; ! } ! else ! { ! return (wxFileOffset)res; ! } ! } ! ! //#define wxMkDir(dir_name, perm) CreateDir(dir_name) ! //#define wxRmDir(dir_name) DeleteFile(dir_name) ! //#define wxStructStat struct stat ! //#define wxStat stat --- 1,254 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // Name: amiga/filefnaos.cpp ! // Purpose: File related functions implementation for Amiga systems ! // Author: Alexandre Balaban ! // Modified by: ! // Created: 07.12.05 ! // RCS-ID: $Id$ ! // Copyright: (c) 2005 Alexandre Balaban <aba...@fr...> ! // Licence: wxWindows licence ! ///////////////////////////////////////////////////////////////////////////// ! ! // ============================================================================ ! // declarations ! // ============================================================================ ! ! // ---------------------------------------------------------------------------- ! // headers ! // ---------------------------------------------------------------------------- ! ! #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) ! #pragma implementation "dir.h" ! #endif ! ! // For compilers that support precompilation, includes "wx.h". ! #include "wx/wxprec.h" ! ! #ifndef WX_PRECOMP ! #include "wx/intl.h" ! #include "wx/log.h" ! #endif // PCH ! ! #include "wx/file.h" ! #include "wx/filefn.h" ! ! #include <unistd.h> ! ! // Amiga specific includes ! #include "aos_common.h" ! ! // ---------------------------------------------------------------------------- ! // macros ! // ---------------------------------------------------------------------------- ! #ifndef NO_ERROR ! #define NO_ERROR 0 ! #endif ! ! // ---------------------------------------------------------------------------- ! // private classes ! // ---------------------------------------------------------------------------- ! ! // ============================================================================ ! // implementation ! // ============================================================================ ! ! int wxOpen( const wxChar *filename, int oflag, int WXUNUSED(pmode) ) ! { ! // on AmigaOS Open() function only has three modes : ! // - MODE_OLDFILE : Open existing file read/write positioned at beginning of file ! // - MODE_NEWFILE : Open freshly created file (delete old file) read/write, exclusive lock ! // - MODE_READWRITE : Open old file w/shared lock, creates file if doesn't exist. ! // ! // So, we can ignore O_RDONLY, O_WRONLY and O_RDWR flags as this make no difference ! // However we must be carefull about the other : ! // - O_APPEND : we must *automatically* move to the end of the file after Open succeeded ! // - O_TRUNC : we must use truncate the old file -> use of MODE_NEWFILE ! // - O_CREAT : we should create the file, so we must not use MODE_OLDFILE ! // - O_EXCL, O_DSYNC, O_LARGEFILE, O_NOCTTY, O_NONBLOCK, O_NDELAY, O_RSYNC, O_SYNC and O_XATTR are ! // all ignored for now, but this could change in future... ! ! LONG access = MODE_OLDFILE; ! ! if( oflag & O_APPEND ) ! { ! if ( wxFile::Exists(filename) ) ! access = MODE_OLDFILE; ! //else: fall through as write_append is the same as write if the ! // file doesn't exist ! else ! access = MODE_NEWFILE; ! } ! if( oflag & O_TRUNC ) ! { ! access = MODE_NEWFILE; ! } ! else if (oflag & O_CREAT) ! { ! access = MODE_NEWFILE; ! } ! ! int fd = 0; ! BPTR fileHandle = Open( filename, access ); ! if( 0 == fileHandle ) ! fd = -1; ! else ! fd = (int) fileHandle; ! ! // handle the O_APPEND case ! ! if( -1 != fd && (oflag & O_APPEND) ) ! ! { ! LONG res = Seek( fileHandle, 0, OFFSET_END ); ! if( res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR ) ! { ! Close( fileHandle ); ! fd = -1; ! } ! } ! ! return fd; ! } ! ! int wxAccess(const wxChar *name, int how) ! { ! BPTR lock = (BPTR) NULL; ! LONG access = 0; ! int res = -1; ! ! if( how & R_OK == R_OK) ! access = ACCESS_READ; ! else ! access = ACCESS_WRITE; ! ! lock = Lock( name, access ); ! if( 0 != lock ) ! { ! // permission was granted to access the ! // file in the desired mode ! UnLock( lock ); ! res = 0; ! } ! ! return res; ! } ! ! int wxClose(int fd) ! { ! if( Close( (BPTR)fd ) ) ! return 0; ! ! return -1; ! } ! ! int wxFsync(int fd) ! { ! #if defined(__amigaos4__) ! // [ABA, 14/12/2005 : on OS4 new fonctions FOpen, FRead, FClose and FFlush exists to support buffered I/O ! // so when using Open, Read and Close we work with synchronised I/O so no need to Flush : ! // we are always Flushed, so return OK (=0) ;-) ] ! return 0; ! #else ! if( Flush( (BPTR)fd ) ) ! return 0; ! ! // [ABA, 14/12/2005 : we return 0 even when Flush failed ? i.e. we don't care if flush really worked or not] ! return 0; ! #endif ! } ! ! int wxRead(int fd, void *buf, unsigned int count) ! { ! LONG bytesRead = 0; ! ! ! bytesRead = Read( (BPTR)fd, buf, (LONG)count ); ! if(bytesRead >= 0) ! return bytesRead; ! else ! return -1; ! } ! ! int wxWrite(int fd, const void *buf, unsigned int count) ! { ! LONG bytesWritten = 0; ! ! bytesWritten = Write( (BPTR)fd, (void *)buf, (LONG)count ); ! if(bytesWritten >= 0) ! return bytesWritten; ! else ! return -1; ! } ! ! int wxEof(int fd) ! { ! LONG res0 = Seek( (BPTR) fd, 0, OFFSET_CURRENT ); ! if( res0 == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR ) ! return -1; ! ! LONG res1 = Seek( (BPTR) fd, 0, OFFSET_END ); ! if( res1 == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! return -1; ! ! if( res0 == res1 ) ! return 1; ! else ! { ! Seek( (BPTR)fd, res0, OFFSET_BEGINNING); ! return 0; ! } ! } ! ! wxFileOffset wxSeek(int fd, wxFileOffset offset, int origin) ! { ! int method; ! switch ( origin ) { ! default: ! wxFAIL_MSG(_("unknown seek origin")); ! ! case SEEK_SET: ! method = OFFSET_BEGINNING; ! break; ! ! case SEEK_CUR: ! method = OFFSET_CURRENT; ! break; ! ! case SEEK_END: ! method = OFFSET_END; ! break; ! } ! ! LONG res = Seek( (BPTR) fd, offset, method ) ; ! if (res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! { ! wxLogSysError(_("can't seek on file descriptor %d"), fd); ! return wxInvalidOffset; ! } ! else ! { ! return (wxFileOffset)res; ! } ! } ! ! //#define wxLSeek wxSeek ! ! wxFileOffset wxTell(int fd) ! { ! LONG res = Seek( (BPTR) fd, 0, OFFSET_CURRENT ) ; ! if (res == (LONG)0xFFFFFFFF && IoErr() != NO_ERROR) ! { ! wxLogSysError(_("can't get seek position on file descriptor %d"), fd); ! return wxInvalidOffset; ! } ! else ! { ! return (wxFileOffset)res; ! } ! } ! ! //#define wxMkDir(dir_name, perm) CreateDir(dir_name) ! //#define wxRmDir(dir_name) DeleteFile(dir_name) ! //#define wxStructStat struct stat ! //#define wxStat stat ! Index: amiga_specific.cpp =================================================================== RCS file: /cvsroot/wxwidget-aos/wxBase/src/amiga/amiga_specific.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** amiga_specific.cpp 30 Jan 2006 18:52:28 -0000 1.1 --- amiga_specific.cpp 15 Feb 2008 16:59:36 -0000 1.2 *************** *** 1,135 **** ! ///////////////////////////////////////////////////////////////////////////// ! // Name: amiga/amiga_specific.cpp ! // Purpose: setup amiga specifics things ! // Author: Alexandre Balaban ! // Modified by: ! // Created: 16.12.05 ! // RCS-ID: $Id$ ! // Copyright: (c) 2005 Alexandre Balaban <aba...@fr...> ! // Licence: wxWindows licence ! ///////////////////////////////////////////////////////////////////////////// ! ! // ============================================================================ ! // declarations ! // ============================================================================ ! ! // ---------------------------------------------------------------------------- ! // headers ! // ---------------------------------------------------------------------------- ! ! #if defined(__amigaos4__) ! ! #undef __USE_INLINE__ ! ! #include <exec/libraries.h> ! #include <proto/exec.h> ! #include <assert.h> ! ! // gestion ouverture automatique de UserGroup ! #include <proto/usergroup.h> ! ! __attribute__((weak)) struct Library * UserGroupBase = NULL; ! __attribute__((weak)) struct UserGroupIFace * IUserGroup = NULL; ! ! void __init_usergroup_base(void) __attribute__((constructor)); ! void __exit_usergroup_base(void) __attribute__((destructor)); ! void __init_usergroup_main(void) __attribute__((constructor)); ! void __exit_usergroup_main(void) __attribute__((destructor)); ! ! /****************************************************************************/ ! ! void __init_usergroup_base(void) ! { ! if (UserGroupBase != NULL) return; /* Someone was quicker */ ! UserGroupBase = IExec->OpenLibrary(USERGROUPNAME, 0L); ! assert(UserGroupBase != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_usergroup_base(void) ! { ! if (UserGroupBase) IExec->CloseLibrary((struct Library *)UserGroupBase); ! } ! ! /****************************************************************************/ ! ! void __init_usergroup_main(void) ! { ! struct Library * LibBase; ! if (UserGroupBase == NULL) /* Library base is NULL, we need to open it */ ! { ! LibBase = IExec->OpenLibrary(USERGROUPNAME, 0L); ! assert(LibBase != NULL); ! } ! else ! { ! LibBase = UserGroupBase; ! } ! ! IUserGroup = (struct UserGroupIFace *)IExec->GetInterface((struct Library *)LibBase, "main", 1, NULL); ! assert(IUserGroup != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_usergroup_main(void) ! { ! if (IUserGroup) IExec->DropInterface ((struct Interface *)IUserGroup); ! } ! ! /****************************************************************************/ ! // gestion ouverture automatique de BSDSocket ! #include <proto/bsdsocket.h> ! ! __attribute__((weak)) struct Library * SocketBase = NULL; ! __attribute__((weak)) struct SocketIFace * ISocket = NULL; ! ! void __init_socket_base(void) __attribute__((constructor)); ! void __exit_socket_base(void) __attribute__((destructor)); ! void __init_socket_main(void) __attribute__((constructor)); ! void __exit_socket_main(void) __attribute__((destructor)); ! ! /****************************************************************************/ ! ! void __init_socket_base(void) ! { ! if (SocketBase != NULL) return; /* Someone was quicker */ ! SocketBase = IExec->OpenLibrary("bsdsocket.library", 0L); ! assert(SocketBase != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_socket_base(void) ! { ! if (SocketBase) IExec->CloseLibrary((struct Library *)SocketBase); ! } ! ! /****************************************************************************/ ! ! void __init_socket_main(void) ! { ! struct Library * LibBase; ! if (SocketBase == NULL) /* Library base is NULL, we need to open it */ ! { ! LibBase = IExec->OpenLibrary("bsdsocket.library", 0L); ! assert(LibBase != NULL); ! } ! else ! { ! LibBase = UserGroupBase; ! } ! ! ISocket = (struct SocketIFace *)IExec->GetInterface((struct Library *)LibBase, "main", 1, NULL); ! assert(ISocket != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_socket_main(void) ! { ! if (ISocket) IExec->DropInterface ((struct Interface *)ISocket); ! } ! ! #endif //__amigaos4__ --- 1,135 ---- ! ///////////////////////////////////////////////////////////////////////////// ! // Name: amiga/amiga_specific.cpp ! // Purpose: setup amiga specifics things ! // Author: Alexandre Balaban ! // Modified by: ! // Created: 16.12.05 ! // RCS-ID: $Id$ ! // Copyright: (c) 2005 Alexandre Balaban <aba...@fr...> ! // Licence: wxWindows licence ! ///////////////////////////////////////////////////////////////////////////// ! ! // ============================================================================ ! // declarations ! // ============================================================================ ! ! // ---------------------------------------------------------------------------- ! // headers ! // ---------------------------------------------------------------------------- ! ! #if defined(__amigaos4__) ! ! #undef __USE_INLINE__ ! ! #include <exec/libraries.h> ! #include <proto/exec.h> ! #include <assert.h> ! ! // gestion ouverture automatique de UserGroup ! #include <proto/usergroup.h> ! ! __attribute__((weak)) struct Library * UserGroupBase = NULL; ! __attribute__((weak)) struct UserGroupIFace * IUserGroup = NULL; ! ! void __init_usergroup_base(void) __attribute__((constructor)); ! void __exit_usergroup_base(void) __attribute__((destructor)); ! void __init_usergroup_main(void) __attribute__((constructor)); ! void __exit_usergroup_main(void) __attribute__((destructor)); ! ! /****************************************************************************/ ! ! void __init_usergroup_base(void) ! { ! if (UserGroupBase != NULL) return; /* Someone was quicker */ ! UserGroupBase = IExec->OpenLibrary(USERGROUPNAME, 0L); ! assert(UserGroupBase != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_usergroup_base(void) ! { ! if (UserGroupBase) IExec->CloseLibrary((struct Library *)UserGroupBase); ! } ! ! /****************************************************************************/ ! ! void __init_usergroup_main(void) ! { ! struct Library * LibBase; ! if (UserGroupBase == NULL) /* Library base is NULL, we need to open it */ ! { ! LibBase = IExec->OpenLibrary(USERGROUPNAME, 0L); ! assert(LibBase != NULL); ! } ! else ! { ! LibBase = UserGroupBase; ! } ! ! IUserGroup = (struct UserGroupIFace *)IExec->GetInterface((struct Library *)LibBase, "main", 1, NULL); ! assert(IUserGroup != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_usergroup_main(void) ! { ! if (IUserGroup) IExec->DropInterface ((struct Interface *)IUserGroup); ! } ! ! /****************************************************************************/ ! // gestion ouverture automatique de BSDSocket ! #include <proto/bsdsocket.h> ! ! __attribute__((weak)) struct Library * SocketBase = NULL; ! __attribute__((weak)) struct SocketIFace * ISocket = NULL; ! ! void __init_socket_base(void) __attribute__((constructor)); ! void __exit_socket_base(void) __attribute__((destructor)); ! void __init_socket_main(void) __attribute__((constructor)); ! void __exit_socket_main(void) __attribute__((destructor)); ! ! /****************************************************************************/ ! ! void __init_socket_base(void) ! { ! if (SocketBase != NULL) return; /* Someone was quicker */ ! SocketBase = IExec->OpenLibrary("bsdsocket.library", 0L); ! assert(SocketBase != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_socket_base(void) ! { ! if (SocketBase) IExec->CloseLibrary((struct Library *)SocketBase); ! } ! ! /****************************************************************************/ ! ! void __init_socket_main(void) ! { ! struct Library * LibBase; ! if (SocketBase == NULL) /* Library base is NULL, we need to open it */ ! { ! LibBase = IExec->OpenLibrary("bsdsocket.library", 0L); ! assert(LibBase != NULL); ! } ! else ! { ! LibBase = UserGroupBase; ! } ! ! ISocket = (struct SocketIFace *)IExec->GetInterface((struct Library *)LibBase, "main", 1, NULL); ! assert(ISocket != NULL); ! } ! ! /****************************************************************************/ ! ! void __exit_socket_main(void) ! { ! if (ISocket) IExec->DropInterface ((struct Interface *)ISocket); ! } ! ! #endif //__amigaos4__ |
From: Alexandre B. <aba...@us...> - 2008-02-15 16:46:16
|
Update of /cvsroot/wxwidget-aos/wxBase/src/amiga In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv26762 Modified Files: makefile-os4 Added Files: makefile.inc Log Message: New makefile system Index: makefile-os4 =================================================================== RCS file: /cvsroot/wxwidget-aos/wxBase/src/amiga/makefile-os4,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile-os4 16 Dec 2007 01:01:39 -0000 1.4 --- makefile-os4 15 Feb 2008 16:46:09 -0000 1.5 *************** *** 1,152 **** ! ROOT = ../.. ! SRCBASE = $(ROOT)/src ! INCBASE = $(ROOT)/include ! ! LIBDIR = $(ROOT)/lib ! LIBNAME = $(LIBDIR)/libwxBase.a ! CC = ppc-amigaos-gcc ! CXX = ppc-amigaos-g++ ! AR = ppc-amigaos-ar STRIP = ppc-amigaos-strip ! ARFLAGS = cru ! RANLIB = ppc-amigaos-ranlib ! ! CDEFS = -D__USE_INLINE__ -D__WXAMIGA__ $(TESTS:%=-D%) ! CFLAGS = $(CDEFS) $(CWARN) -g -O2 -mcpu=750 -mmultiple -mstring -mfused-madd -fstrict-aliasing -fomit-frame-pointer ! LINKER = $(CXX) ! LDFLAGS = -g -Wl,-Map=/T/map -mmultiple -mstring ! ! INCDIR = -I$(INCBASE) -I$(INCBASE)/wx/amiga -I. ! ! SHARED_LFLAGS = $(LDFLAGS) -nostartfiles ! ! #LIBS = -ldebug -lz -lauto ! LIBS = -lamiga -lauto ! ! CWARN = -Wall ! ! #================================================== ! ! TESTS = TEST_CMDLINE TEST_LOG ! ! BASE_OBJS = common/appbase.o \ ! common/archive.o \ ! common/clntdata.o \ ! common/cmdline.o \ ! common/config.o \ ! common/datetime.o \ ! common/datstrm.o \ ! common/dircmn.o \ ! common/dynarray.o \ ! common/dynlib.o \ ! common/dynload.o \ ! common/encconv.o \ ! common/event.o \ ! common/extended.o \ ! common/ffile.o \ ! common/file.o \ ! common/fileconf.o \ ! common/filefn.o \ ! common/filename.o \ ! common/filesys.o \ ! common/fmapbase.o \ ! common/fs_mem.o \ ! common/fs_zip.o \ ! common/hash.o \ ! common/hashmap.o \ ! common/init.o \ ! common/intl.o \ ! common/ipcbase.o \ ! common/list.o \ ! common/log.o \ ! common/longlong.o \ ! common/memory.o \ ! common/mimecmn.o \ ! common/module.o \ ! common/msgout.o \ ! common/mstream.o \ ! common/object.o \ ! common/process.o \ ! common/regex.o \ ! common/sstream.o \ ! common/stdpbase.o \ ! common/stopwatch.o \ ! common/strconv.o \ ! common/stream.o \ ! common/string.o \ ! common/sysopt.o \ ! common/textbuf.o \ ! common/textfile.o \ ! common/tokenzr.o \ ! common/txtstrm.o \ ! common/utilscmn.o \ ! common/uri.o \ ! common/variant.o \ ! common/wfstream.o \ ! common/wxchar.o \ ! common/xti.o \ ! common/xtistrm.o \ ! common/zipstrm.o \ ! common/zstream.o \ ! $(WXAMIGA_BASE_OBJS) ! ! WXAMIGA_BASE_OBJS = amiga/baseamiga.o \ ! amiga/thread.o \ ! amiga/utils.o \ ! amiga/dir.o \ ! amiga/filefnaos.o \ ! amiga/amiga_specific.o ! ! CONSOLE_OBJS = $(ROOT)/samples/console/console.o ! ! %.o : %.cpp ! $(CXX) -c $(CFLAGS) $(INCDIR) $< -o $@ ! ! %.o : %.c ! $(CC) -c $(CFLAGS) $(INCDIR) $< -o $@ ! ! BASEOBJS=$(addprefix $(SRCBASE)/,$(BASE_OBJS)) ! ! .PHONY: all strip install clean distclean dir_test FORCE test ! ! all : $(LIBNAME) ! ! $(LIBNAME): $(BASEOBJS) ! $(AR) $(ARFLAGS) $@ $^ ! $(RANLIB) $@ ! ! $(ROOT)/samples/console/console: $(CONSOLE_OBJS) $(LIBNAME) ! $(LINKER) $(LDFLAGS) $^ $(LIBS) -o $@ ! ! strip: $(LIBNAME) ! $(STRIP) --strip-unneeded --remove-section=.comment $< ! ! install: ! copy $(TARGET) $(DEST) ! delete $(TARGET) ! avail flush ! ! clean: ! -rm -f $(BASEOBJS) ! ! distclean: clean ! -rm -f $(LIBNAME) console $(INCBASE)/wx/setup.h ! dir_test: ! -rm -f $(LIBNAME) $(SRCBASE)/amiga/dir.o ! @$(MAKE) -f $(MAKEFILE_LIST) $(LIBNAME) \"CDEFS=$(CDEFS) -DBUILD_TESTS=1\" ! $(LINKER) -v $(LDFLAGS) $(BASEOBJS) $(LIBS) -o $@ ! test: $(ROOT)/samples/console/console ! $(INCBASE)/wx/setup.h : $(INCBASE)/wx/amiga/setup0.h ! cp $< $@ ! $(CONSOLE_OBJS) :: FORCE ! FORCE:; ! # Dependencies ! $(BASEOBJS) : $(INCBASE)/wx/setup.h --- 1,46 ---- ! ############################################################################# ! ## Name: src/amiga/makefile-os4 ! ## Purpose: Makefile for Amiga OS4 ! ## Author: Alexandre Balaban ! ## Modified by: ! ## Created: 15.02.08 ! ## RCS-ID: $Id$ ! ## Copyright: (c) 2007 Alexandre BALABAN <alexandre -@- balaban -.- fr> ! ## License: wxWindows licence ! ############################################################################# ! # C compiler ! CC = ppc-amigaos-gcc ! # C++ compiler ! CXX = ppc-amigaos-g++ ! # ar command ! AR = ppc-amigaos-ar ! # strip command STRIP = ppc-amigaos-strip ! # ranlib command ! RANLIB = ppc-amigaos-ranlib ! # OS specific CDEFS ! LOCAL_CDEFS = -D__USE_INLINE__ ! # OS specific CFLAGS ! LOCAL_CFLAGS = -mcpu=750 -mmultiple -mstring -mfused-madd -fstrict-aliasing -fomit-frame-pointer ! # OS specific LDFLAGS ! LOCAL_LDFLAGS = -mmultiple -mstring ! # OS specific INCDIR ! LOCAL_INCDIR = ! # OS specific link libs before libamiga ! LOCAL_LIBS_PRE = ! # OS specific link libs after libamiga ! LOCAL_LIBS_POST = -lauto ! # OS specific CWARN ! LOCAL_CWARN = ! # OS specific objects to compile ! LOCAL_WXAMIGA_BASE_OBJS = ! #================================================= + include makefile.inc --- NEW FILE: makefile.inc --- ############################################################################# ## Name: src/amiga/makefile.inc ## Purpose: Generic makefile rules included from OS specific makefiles ## Author: Alexandre Balaban ## Modified by: ## Created: 15.02.08 ## RCS-ID: $Id: makefile.inc,v 1.1 2008/02/15 16:46:09 abalabanb Exp $ ## Copyright: (c) 2007 Alexandre BALABAN <alexandre -@- balaban -.- fr> ## License: wxWindows licence ############################################################################# ROOT = ../.. SRCBASE = $(ROOT)/src INCBASE = $(ROOT)/include LIBDIR = $(ROOT)/lib LIBNAME = $(LIBDIR)/libwxBase.a ARFLAGS = cru CDEFS = $(LOCAL_CDEFS) -D__WXAMIGA__ $(TESTS:%=-D%) CFLAGS = $(CDEFS) $(CWARN) -g -O2 $(LOCAL_CFLAGS) LINKER = $(CXX) LDFLAGS = -g -Wl,-Map=/T/map $(LOCAL_LDFLAGS) INCDIR = -I$(INCBASE) -I$(INCBASE)/wx/amiga -I. $(LOCAL_INCDIR) SHARED_LFLAGS = $(LDFLAGS) -nostartfiles LIBS = $(LOCAL_LIBS_PRE) -lamiga $(LOCAL_LIBS_POST) CWARN = -Wall $(LOCAL_CWARN) #================================================== TESTS = TEST_CMDLINE TEST_LOG BASE_OBJS = common/appbase.o \ common/archive.o \ common/clntdata.o \ common/cmdline.o \ common/config.o \ common/datetime.o \ common/datstrm.o \ common/dircmn.o \ common/dynarray.o \ common/dynlib.o \ common/dynload.o \ common/encconv.o \ common/event.o \ common/extended.o \ common/ffile.o \ common/file.o \ common/fileconf.o \ common/filefn.o \ common/filename.o \ common/filesys.o \ common/fmapbase.o \ common/fs_mem.o \ common/fs_zip.o \ common/hash.o \ common/hashmap.o \ common/init.o \ common/intl.o \ common/ipcbase.o \ common/list.o \ common/log.o \ common/longlong.o \ common/memory.o \ common/mimecmn.o \ common/module.o \ common/msgout.o \ common/mstream.o \ common/object.o \ common/process.o \ common/regex.o \ common/sstream.o \ common/stdpbase.o \ common/stopwatch.o \ common/strconv.o \ common/stream.o \ common/string.o \ common/sysopt.o \ common/textbuf.o \ common/textfile.o \ common/tokenzr.o \ common/txtstrm.o \ common/utilscmn.o \ common/uri.o \ common/variant.o \ common/wfstream.o \ common/wxchar.o \ common/xti.o \ common/xtistrm.o \ common/zipstrm.o \ common/zstream.o \ $(WXAMIGA_BASE_OBJS) WXAMIGA_BASE_OBJS = amiga/baseamiga.o \ amiga/thread.o \ amiga/utils.o \ amiga/dir.o \ amiga/filefnaos.o \ amiga/amiga_specific.o \ $(LOCAL_WXAMIGA_BASE_OBJS) CONSOLE_OBJS = $(ROOT)/samples/console/console.o %.o : %.cpp $(CXX) -c $(CFLAGS) $(INCDIR) $< -o $@ %.o : %.c $(CC) -c $(CFLAGS) $(INCDIR) $< -o $@ BASEOBJS=$(addprefix $(SRCBASE)/,$(BASE_OBJS)) .PHONY: all strip install clean distclean dir_test FORCE test all : $(LIBNAME) $(LIBNAME): $(BASEOBJS) $(AR) $(ARFLAGS) $@ $^ $(RANLIB) $@ $(ROOT)/samples/console/console: $(CONSOLE_OBJS) $(LIBNAME) $(LINKER) $(LDFLAGS) $^ $(LIBS) -o $@ strip: $(LIBNAME) $(STRIP) --strip-unneeded --remove-section=.comment $< install: copy $(TARGET) $(DEST) delete $(TARGET) avail flush clean: -rm -f $(BASEOBJS) distclean: clean -rm -f $(LIBNAME) console $(INCBASE)/wx/setup.h dir_test: -rm -f $(LIBNAME) $(SRCBASE)/amiga/dir.o @$(MAKE) -f $(MAKEFILE_LIST) $(LIBNAME) \"CDEFS=$(CDEFS) -DBUILD_TESTS=1\" $(LINKER) -v $(LDFLAGS) $(BASEOBJS) $(LIBS) -o $@ test: $(ROOT)/samples/console/console $(INCBASE)/wx/setup.h : $(INCBASE)/wx/amiga/setup0.h cp $< $@ chmod a+rwx $@ $(CONSOLE_OBJS) :: FORCE FORCE:; # Dependencies $(BASEOBJS) : $(INCBASE)/wx/setup.h |
From: Alexandre B. <aba...@us...> - 2008-02-15 16:34:06
|
Update of /cvsroot/wxwidget-aos/wxBase/include/wx/amiga In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv21564/include/wx/amiga Modified Files: setup0.h Log Message: - Fixed warning about including <iostream.h> under OS4 - OS4 can also use the GetTimeOfDay() function Index: setup0.h =================================================================== RCS file: /cvsroot/wxwidget-aos/wxBase/include/wx/amiga/setup0.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** setup0.h 1 Mar 2006 20:56:28 -0000 1.4 --- setup0.h 15 Feb 2008 16:34:02 -0000 1.5 *************** *** 3,7 **** // Purpose: setup.h settings // Author: Vadim Zeitlin ! // Modified by: Guillaume ROGUEZ for AmigaOS/WxBase // Created: // RCS-ID: $Id$ --- 3,7 ---- // Purpose: setup.h settings // Author: Vadim Zeitlin ! // Modified by: Alexandre BALABAN for AmigaOS/WxBase // Created: // RCS-ID: $Id$ *************** *** 981,993 **** #define REMOVE_UNUSED_ARG 1 ! // VC++ 4.2 and above allows <iostream> and <iostream.h> but you can't mix ! // them. Set to 1 for <iostream.h>, 0 for <iostream>. Note that VC++ 7.1 ! // and later doesn't support wxUSE_IOSTREAMH == 1 and so <iostream> will be ! // used anyhow. // // Default is 1. // // Recommended setting: whatever your compiler likes more ! #define wxUSE_IOSTREAMH 1 // ---------------------------------------------------------------------------- --- 981,997 ---- #define REMOVE_UNUSED_ARG 1 ! // Amiga OS4's GCC standard version echoes a deprecated warning when ! // including <iostream.h>, as such I set it to include <iostream> when ! // GCC version is greater or equal to 3, if you are experiencing warnings ! // with your compiler, please, feel free to correct this. // // Default is 1. // // Recommended setting: whatever your compiler likes more ! #if (__GNUC__ >= 3) ! #define wxUSE_IOSTREAMH 0 ! #else ! #define wxUSE_IOSTREAMH 1 ! #endif // ---------------------------------------------------------------------------- *************** *** 1041,1048 **** /* struct tm doesn't always have the tm_gmtoff field, define this if it does */ #define WX_GMTOFF_IN_TM 1 /* Define if you have gettimeofday() */ #define HAVE_GETTIMEOFDAY 1 - #endif /* Define if fsync() is available */ --- 1045,1052 ---- /* struct tm doesn't always have the tm_gmtoff field, define this if it does */ #define WX_GMTOFF_IN_TM 1 + #endif /* Define if you have gettimeofday() */ #define HAVE_GETTIMEOFDAY 1 /* Define if fsync() is available */ |