|
bagder: curl/lib amigaos.c, 1.3, 1.4 amigaos.h, 1.4, 1.5 config-amigaos.h, : msg#00020web.curl.cvs
Update of /cvsroot/curl/curl/lib In directory labb:/tmp/cvs-serv15744/lib Modified Files: amigaos.c amigaos.h config-amigaos.h if2ip.c makefile.amiga mprintf.c Log Message: Diego Casorran patches to make (lib)curl build fine on Amiga again Index: makefile.amiga =================================================================== RCS file: /cvsroot/curl/curl/lib/makefile.amiga,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- makefile.amiga 7 Apr 2005 20:56:04 -0000 1.3 +++ makefile.amiga 13 Jul 2005 18:06:40 -0000 1.4 @@ -7,8 +7,8 @@ ATCPSDKI= /GG/netinclude -CC = gcc -CFLAGS = -I$(ATCPSDKI) -m68020-60 -noixemul -I. -I../include -W -Wall +CC = m68k-amigaos-gcc +CFLAGS = -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall OBJS = amigaos.c base64.c connect.c content_encoding.c cookie.c dict.c easy.c \ escape.c file.c formdata.c ftp.c getenv.c getinfo.c hash.c hostip.c \ @@ -17,7 +17,7 @@ ldap.c llist.c md5.c memdebug.c mprintf.c multi.c netrc.c parsedate.c \ progress.c security.c select.c sendf.c share.c speedcheck.c ssluse.c \ strequal.c strtok.c telnet.c timeval.c transfer.c url.c version.c \ - sslgen.c gtls.c + sslgen.c gtls.c strerror.c all: $(OBJS:.c=.o) ar cru libcurl.a $(OBJS:.c=.o) Index: amigaos.c =================================================================== RCS file: /cvsroot/curl/curl/lib/amigaos.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- amigaos.c 6 Oct 2004 07:50:18 -0000 1.3 +++ amigaos.c 13 Jul 2005 18:06:40 -0000 1.4 @@ -22,28 +22,53 @@ ***************************************************************************/ #include "amigaos.h" -#include <stdio.h> /* for stderr */ +#include <amitcp/socketbasetags.h> struct Library *SocketBase = NULL; +extern int errno, h_errno; + +#ifdef __libnix__ +#include <stabs.h> +void __request(const char *msg); +#else +# define __request( msg ) Printf( msg "\n\a") +#endif void amiga_cleanup() { - if(SocketBase) - CloseLibrary(SocketBase); - - SocketBase = NULL; + if(SocketBase) { + CloseLibrary(SocketBase); + SocketBase = NULL; + } } BOOL amiga_init() { - if(!SocketBase) - SocketBase = OpenLibrary("bsdsocket.library", 4); - - if(!SocketBase) { - fprintf(stderr, "No TCP/IP Stack running!\n\a"); - return FALSE; - } - - atexit(amiga_cleanup); - return TRUE; + if(!SocketBase) + SocketBase = OpenLibrary("bsdsocket.library", 4); + + if(!SocketBase) { + __request("No TCP/IP Stack running!"); + return FALSE; + } + + if(SocketBaseTags( + SBTM_SETVAL(SBTC_ERRNOPTR(sizeof(errno))), (ULONG) &errno, +// SBTM_SETVAL(SBTC_HERRNOLONGPTR), (ULONG) &h_errno, + SBTM_SETVAL(SBTC_LOGTAGPTR), (ULONG) "cURL", + TAG_DONE)) { + + __request("SocketBaseTags ERROR"); + return FALSE; + } + +#ifndef __libnix__ + atexit(amiga_cleanup); +#endif + + return TRUE; } + +#ifdef __libnix__ +ADD2EXIT(amiga_cleanup,-50); +#endif Index: amigaos.h =================================================================== RCS file: /cvsroot/curl/curl/lib/amigaos.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- amigaos.h 6 Oct 2004 07:50:18 -0000 1.4 +++ amigaos.h 13 Jul 2005 18:06:40 -0000 1.5 @@ -32,13 +32,19 @@ #include <proto/exec.h> #include <proto/dos.h> -#include <bsdsocket.h> +#include <sys/socket.h> #include "config-amigaos.h" -#define select(args...) WaitSelect( args, NULL) -#define inet_ntoa(x) Inet_NtoA( x ## .s_addr) -#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c) +#ifndef select +# define select(args...) WaitSelect( args, NULL) +#endif +#ifndef inet_ntoa +# define inet_ntoa(x) Inet_NtoA( x ## .s_addr) +#endif +#ifndef ioctl +# define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c) +#endif #define _AMIGASF 1 extern void amiga_cleanup(); Index: config-amigaos.h =================================================================== RCS file: /cvsroot/curl/curl/lib/config-amigaos.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- config-amigaos.h 11 Mar 2005 05:28:07 -0000 1.5 +++ config-amigaos.h 13 Jul 2005 18:06:40 -0000 1.6 @@ -54,6 +54,7 @@ #define HAVE_UTIME_H 1 #define HAVE_WRITABLE_ARGV 1 #define HAVE_ZLIB_H 1 +#define HAVE_SYS_IOCTL_H 1 #define USE_OPENSSL 1 #define USE_SSLEAY 1 @@ -80,7 +81,9 @@ #define TIME_WITH_SYS_TIME 1 #define in_addr_t int -#define socklen_t int +#ifndef socklen_t +# define socklen_t int +#endif #ifndef O_RDONLY # define O_RDONLY 0x0000 Index: mprintf.c =================================================================== RCS file: /cvsroot/curl/curl/lib/mprintf.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- mprintf.c 26 Apr 2005 13:08:49 -0000 1.51 +++ mprintf.c 13 Jul 2005 18:06:40 -0000 1.52 @@ -75,6 +75,9 @@ # define BOOL char #endif +#ifdef _AMIGASF +# undef FORMAT_INT +#endif /* Lower-case digits. */ static const char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz"; Index: if2ip.c =================================================================== RCS file: /cvsroot/curl/curl/lib/if2ip.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- if2ip.c 8 Apr 2005 05:01:40 -0000 1.43 +++ if2ip.c 13 Jul 2005 18:06:40 -0000 1.44 @@ -34,7 +34,8 @@ #include "if2ip.h" #if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \ - !defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE) + !defined(__riscos__) && !defined(__INTERIX) && !defined(NETWARE) && \ + !defined(_AMIGASF) #ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> _______________________________________________ http://cool.haxx.se/mailman/listinfo/curl-commits |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | bagder: curl/src config-amigaos.h,1.5,1.6 makefile.amiga,1.2,1.3: 00020, cvs |
|---|---|
| Next by Date: | bagder: curl RELEASE-NOTES,1.267,1.268: 00020, cvs |
| Previous by Thread: | bagder: curl/src config-amigaos.h,1.5,1.6 makefile.amiga,1.2,1.3i: 00020, cvs |
| Next by Thread: | bagder: curl RELEASE-NOTES,1.267,1.268: 00020, cvs |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |