mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Diego Casorran patches to make (lib)curl build fine on Amiga again
This commit is contained in:
parent
ee0666c8df
commit
16bbd13af7
3
CHANGES
3
CHANGES
@ -7,6 +7,9 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
|
||||||
|
Daniel (13 July 2005)
|
||||||
|
- Diego Casorran provided patches to make curl build fine on Amiga again.
|
||||||
|
|
||||||
Daniel (12 July 2005)
|
Daniel (12 July 2005)
|
||||||
- Adrian Schuur added trailer support in the chunked encoding stream. The
|
- Adrian Schuur added trailer support in the chunked encoding stream. The
|
||||||
trailer is then sent to the normal header callback/stream. I wrote up test
|
trailer is then sent to the normal header callback/stream. I wrote up test
|
||||||
|
@ -17,6 +17,7 @@ This release includes the following changes:
|
|||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o builds fine on AmigaOS again
|
||||||
o corrected date parsing on Windows with auto-DST-adjust enabled
|
o corrected date parsing on Windows with auto-DST-adjust enabled
|
||||||
o treats CONNECT 407 responses with bodies better during Digest/NTLM auth
|
o treats CONNECT 407 responses with bodies better during Digest/NTLM auth
|
||||||
o improved strerror_r() API guessing when cross-compiling
|
o improved strerror_r() API guessing when cross-compiling
|
||||||
@ -44,6 +45,6 @@ advice from friends like these:
|
|||||||
|
|
||||||
John McGowan, Georg Wicherski, Andres Garcia, Eric Cooper, Todd Kulesza,
|
John McGowan, Georg Wicherski, Andres Garcia, Eric Cooper, Todd Kulesza,
|
||||||
Tupone Alfredo, Gisle Vanem, David Shaw, Andrew Bushnell, Dan Fandrich,
|
Tupone Alfredo, Gisle Vanem, David Shaw, Andrew Bushnell, Dan Fandrich,
|
||||||
Adrian Schuur
|
Adrian Schuur, Diego Casorran
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -22,16 +22,24 @@
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
#include "amigaos.h"
|
#include "amigaos.h"
|
||||||
#include <stdio.h> /* for stderr */
|
#include <amitcp/socketbasetags.h>
|
||||||
|
|
||||||
struct Library *SocketBase = NULL;
|
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()
|
void amiga_cleanup()
|
||||||
{
|
{
|
||||||
if(SocketBase)
|
if(SocketBase) {
|
||||||
CloseLibrary(SocketBase);
|
CloseLibrary(SocketBase);
|
||||||
|
|
||||||
SocketBase = NULL;
|
SocketBase = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL amiga_init()
|
BOOL amiga_init()
|
||||||
@ -40,10 +48,27 @@ BOOL amiga_init()
|
|||||||
SocketBase = OpenLibrary("bsdsocket.library", 4);
|
SocketBase = OpenLibrary("bsdsocket.library", 4);
|
||||||
|
|
||||||
if(!SocketBase) {
|
if(!SocketBase) {
|
||||||
fprintf(stderr, "No TCP/IP Stack running!\n\a");
|
__request("No TCP/IP Stack running!");
|
||||||
return FALSE;
|
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);
|
atexit(amiga_cleanup);
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __libnix__
|
||||||
|
ADD2EXIT(amiga_cleanup,-50);
|
||||||
|
#endif
|
||||||
|
@ -32,13 +32,19 @@
|
|||||||
#include <proto/exec.h>
|
#include <proto/exec.h>
|
||||||
#include <proto/dos.h>
|
#include <proto/dos.h>
|
||||||
|
|
||||||
#include <bsdsocket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "config-amigaos.h"
|
#include "config-amigaos.h"
|
||||||
|
|
||||||
#define select(args...) WaitSelect( args, NULL)
|
#ifndef select
|
||||||
#define inet_ntoa(x) Inet_NtoA( x ## .s_addr)
|
# define select(args...) WaitSelect( args, NULL)
|
||||||
#define ioctl(a,b,c,d) IoctlSocket( (LONG)a, (ULONG)b, (char*)c)
|
#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
|
#define _AMIGASF 1
|
||||||
|
|
||||||
extern void amiga_cleanup();
|
extern void amiga_cleanup();
|
||||||
|
@ -54,6 +54,7 @@
|
|||||||
#define HAVE_UTIME_H 1
|
#define HAVE_UTIME_H 1
|
||||||
#define HAVE_WRITABLE_ARGV 1
|
#define HAVE_WRITABLE_ARGV 1
|
||||||
#define HAVE_ZLIB_H 1
|
#define HAVE_ZLIB_H 1
|
||||||
|
#define HAVE_SYS_IOCTL_H 1
|
||||||
|
|
||||||
#define USE_OPENSSL 1
|
#define USE_OPENSSL 1
|
||||||
#define USE_SSLEAY 1
|
#define USE_SSLEAY 1
|
||||||
@ -80,7 +81,9 @@
|
|||||||
#define TIME_WITH_SYS_TIME 1
|
#define TIME_WITH_SYS_TIME 1
|
||||||
|
|
||||||
#define in_addr_t int
|
#define in_addr_t int
|
||||||
#define socklen_t int
|
#ifndef socklen_t
|
||||||
|
# define socklen_t int
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef O_RDONLY
|
#ifndef O_RDONLY
|
||||||
# define O_RDONLY 0x0000
|
# define O_RDONLY 0x0000
|
||||||
|
@ -34,7 +34,8 @@
|
|||||||
#include "if2ip.h"
|
#include "if2ip.h"
|
||||||
|
|
||||||
#if !defined(WIN32) && !defined(__BEOS__) && !defined(__CYGWIN32__) && \
|
#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
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
ATCPSDKI= /GG/netinclude
|
ATCPSDKI= /GG/netinclude
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = m68k-amigaos-gcc
|
||||||
CFLAGS = -I$(ATCPSDKI) -m68020-60 -noixemul -I. -I../include -W -Wall
|
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 \
|
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 \
|
escape.c file.c formdata.c ftp.c getenv.c getinfo.c hash.c hostip.c \
|
||||||
@ -17,7 +17,7 @@ OBJS = amigaos.c base64.c connect.c content_encoding.c cookie.c dict.c easy.c \
|
|||||||
ldap.c llist.c md5.c memdebug.c mprintf.c multi.c netrc.c parsedate.c \
|
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 \
|
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 \
|
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)
|
all: $(OBJS:.c=.o)
|
||||||
ar cru libcurl.a $(OBJS:.c=.o)
|
ar cru libcurl.a $(OBJS:.c=.o)
|
||||||
|
@ -75,6 +75,9 @@
|
|||||||
# define BOOL char
|
# define BOOL char
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _AMIGASF
|
||||||
|
# undef FORMAT_INT
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Lower-case digits. */
|
/* Lower-case digits. */
|
||||||
static const char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
static const char lower_digits[] = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||||
|
@ -17,14 +17,20 @@
|
|||||||
#define HAVE_SYS_TIME_H 1
|
#define HAVE_SYS_TIME_H 1
|
||||||
#define HAVE_TIME_H 1
|
#define HAVE_TIME_H 1
|
||||||
#define TIME_WITH_SYS_TIME 1
|
#define TIME_WITH_SYS_TIME 1
|
||||||
#define HAVE_TERMIOS_H 1
|
|
||||||
#define HAVE_FTRUNCATE 1
|
#if 0
|
||||||
|
# define HAVE_TERMIOS_H 1
|
||||||
|
# define HAVE_FTRUNCATE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#define HAVE_PWD_H 1
|
#define HAVE_PWD_H 1
|
||||||
|
|
||||||
#ifndef F_OK
|
#ifndef F_OK
|
||||||
# define F_OK 0
|
# define F_OK 0
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef O_RDONLY
|
||||||
|
# define O_RDONLY 0x0000 /* open for reading only */
|
||||||
|
#endif
|
||||||
#ifndef LONG_MAX
|
#ifndef LONG_MAX
|
||||||
# define LONG_MAX 0x7fffffffL /* max value for a long */
|
# define LONG_MAX 0x7fffffffL /* max value for a long */
|
||||||
#endif
|
#endif
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
ATCPSDKI= /GG/netinclude
|
ATCPSDKI= /GG/netinclude
|
||||||
|
|
||||||
|
|
||||||
CC = gcc
|
CC = m68k-amigaos-gcc
|
||||||
CFLAGS = -I$(ATCPSDKI) -m68020-60 -noixemul -I. -I../include -W -Wall
|
CFLAGS = -I$(ATCPSDKI) -m68020-60 -O2 -msoft-float -noixemul -g -I. -I../include -W -Wall
|
||||||
LIBS = ../lib/libcurl.a -lsslnix -lcryptonix -lz
|
LIBS = ../lib/libcurl.a -lssl -lcrypto -lz
|
||||||
MANPAGE = ../docs/curl.1
|
MANPAGE = ../docs/curl.1
|
||||||
README = ../docs/MANUAL
|
README = ../docs/MANUAL
|
||||||
MKHELP = ../src/mkhelp.pl
|
MKHELP = ../src/mkhelp.pl
|
||||||
@ -18,7 +18,7 @@ OBJS = getpass.c hugehelp.c main.c urlglob.c writeenv.c writeout.c
|
|||||||
|
|
||||||
|
|
||||||
all: hugehelp.c $(OBJS:.c=.o)
|
all: hugehelp.c $(OBJS:.c=.o)
|
||||||
$(CC) $(CFLAGS) -s -o cURL $(OBJS:.c=.o) $(LIBS)
|
$(CC) $(CFLAGS) -o cURL $(OBJS:.c=.o) $(LIBS) -Wl,-Map,cURL.map,--cref
|
||||||
|
|
||||||
hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
|
hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
|
||||||
rm -f hugehelp.c
|
rm -f hugehelp.c
|
||||||
|
Loading…
Reference in New Issue
Block a user