aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-13 08:35:57 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-13 08:35:57 +0000
commit36f76396ea913b4596e6af3e7114e800d9aafef9 (patch)
tree369b5e0229194c8ad638fbdb542b1e357bb29c94 /src
parent1cb3cd1463c7a661863662dccf5c12600b4a4c70 (diff)
Diego Casorran's fixes to allow native AmigaOS builds
Diffstat (limited to 'src')
-rw-r--r--src/config-amigaos.h10
-rw-r--r--src/main.c16
-rw-r--r--src/makefile.amiga11
-rw-r--r--src/setup.h3
4 files changed, 38 insertions, 2 deletions
diff --git a/src/config-amigaos.h b/src/config-amigaos.h
index 38a52d22f..ca700ad47 100644
--- a/src/config-amigaos.h
+++ b/src/config-amigaos.h
@@ -1,4 +1,7 @@
+#ifndef CURL_CONFIG_AMIGAOS_H
+#define CURL_CONFIG_AMIGAOS_H
+
#define OS "AmigaOS"
#define HAVE_UNISTD_H 1
@@ -27,4 +30,11 @@
#ifndef F_OK
# define F_OK 0
#endif
+#ifndef LONG_MAX
+# define LONG_MAX 0x7fffffffL /* max value for a long */
+#endif
+#ifndef LONG_MIN
+# define LONG_MIN (-0x7fffffffL-1) /* min value for a long */
+#endif
+#endif /* CURL_CONFIG_AMIGAOS_H */
diff --git a/src/main.c b/src/main.c
index cb6d5a43d..aac07bef2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1995,6 +1995,7 @@ static int parseconfig(const char *filename,
#define CURLRC DOT_CHAR "curlrc"
+#ifndef AMIGA
filename = CURLRC; /* sensible default */
home = homedir(); /* portable homedir finder */
if(home) {
@@ -2006,6 +2007,13 @@ static int parseconfig(const char *filename,
}
free(home); /* we've used it, now free it */
}
+
+# else /* AmigaOS */
+ /* On AmigaOS all the config files are into env:
+ */
+ filename = "ENV:" CURLRC;
+
+#endif
}
if(strcmp(filename,"-"))
@@ -3300,6 +3308,14 @@ operate(struct Configurable *config, int argc, char *argv[])
}
}
#endif
+#ifdef AMIGA
+ /* Set the url as comment for the file. (up to 80 chars are allowed)
+ */
+ if( strlen(url) > 78 )
+ url[79] = '\0';
+
+ SetComment( outs.filename, url);
+#endif
if(headerfilep)
fclose(headerfilep);
diff --git a/src/makefile.amiga b/src/makefile.amiga
index ea303508d..51e084d4b 100644
--- a/src/makefile.amiga
+++ b/src/makefile.amiga
@@ -10,13 +10,20 @@ ATCPSDKI= /GG/netinclude
CC = gcc
CFLAGS = -I$(ATCPSDKI) -m68020-60 -noixemul -I. -I../include -W -Wall
LIBS = ../lib/libcurl.a -lsslnix -lcryptonix -lz
+MANPAGE = ../docs/curl.1
+README = ../docs/MANUAL
+MKHELP = ../src/mkhelp.pl
-OBJS = getpass.c homedir.c hugehelp.c main.c urlglob.c writeenv.c writeout.c
+OBJS = getpass.c hugehelp.c main.c urlglob.c writeenv.c writeout.c
-all: $(OBJS:.c=.o)
+all: hugehelp.c $(OBJS:.c=.o)
$(CC) $(CFLAGS) -s -o cURL $(OBJS:.c=.o) $(LIBS)
+hugehelp.c: $(README) $(MANPAGE) mkhelp.pl
+ rm -f hugehelp.c
+ /bin/nroff -man $(MANPAGE) | /bin/perl $(MKHELP) -c $(README) > hugehelp.c
+
install:
$(INSTALL) -c cURL /c/cURL
diff --git a/src/setup.h b/src/setup.h
index ee0868a07..4dfb10466 100644
--- a/src/setup.h
+++ b/src/setup.h
@@ -46,6 +46,9 @@
#ifdef __riscos__
#include "config-riscos.h"
#endif
+#ifdef __amigaos__
+#include "config-amigaos.h"
+#endif
#endif
#ifdef CURLDEBUG