From 0427e94465661ef1b8127c3cd483dc5ffab04f2a Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Thu, 17 May 2007 06:04:44 +0000 Subject: [PATCH] Added support for compiling under Minix 3.1.3 using ACK. --- CHANGES | 3 +++ configure.ac | 15 +++++++++++++++ docs/INSTALL | 29 ++++++++++++++++++++--------- lib/setup.h | 6 ++++++ 4 files changed, 44 insertions(+), 9 deletions(-) diff --git a/CHANGES b/CHANGES index 30e9dbd..d897071 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,9 @@ \___|\___/|_| \_\_____| Changelog +Dan F (16 May 2007) +- Added support for compiling under Minix 3.1.3 using ACK. + Dan F (14 May 2007) - Added SFTP directory listing test case 613. diff --git a/configure.ac b/configure.ac index 778cfdf..76b9dc8 100644 --- a/configure.ac +++ b/configure.ac @@ -418,6 +418,21 @@ fi if test "$HAVE_GETHOSTBYNAME" != "1" then + dnl This is for Minix 3.1 + AC_MSG_CHECKING([for gethostbyname for Minix 3]) + AC_TRY_LINK([ +/* Older Minix versions may need here instead */ +#include ], + [gethostbyname("www.dummysite.com");], + [ dnl worked! + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1"], + AC_MSG_RESULT(no) + ) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then dnl This is for eCos with a stubbed DNS implementation AC_MSG_CHECKING([for gethostbyname for eCos]) AC_TRY_LINK([ diff --git a/docs/INSTALL b/docs/INSTALL index 60a5b1f..1a34363 100644 --- a/docs/INSTALL +++ b/docs/INSTALL @@ -577,21 +577,32 @@ eCos Minix ===== - curl can be compiled on Minix 3 using gcc (ACK has a few problems due - to mismatched headers and libraries as of ver. 3.1.2). The gcc and bash - packages must be installed first. The default heap size allocated to - bash is inadequate for running configure and will result in out of memory - errors. Increase it with the command: + curl can be compiled on Minix 3 using gcc or ACK (starting with + ver. 3.1.3). The gcc and bash packages must be installed first. + The default heap size allocated to bash is inadequate for running + configure and will result in out of memory errors. Increase it with + the command: chmem =2048000 /usr/local/bin/bash - Make sure gcc and bash are in the PATH then configure curl with a - command like this: + Make sure gcc and bash are in the PATH with the command: + + export PATH=/usr/gnu/bin:$PATH + + then configure curl with a command like this: - ./configure GREP=/usr/bin/grep AR=/usr/gnu/bin/gar --disable-ldap + ./configure CC=gcc GREP=grep AR=/usr/gnu/bin/gar --disable-ldap Then simply run 'make'. + To compile with the ACK C compiler: + + chmem =1024000 /usr/lib/em_cemcom.ansi + chmem =512000 /usr/lib/i386/as + ./configure CC=cc LD=cc GREP=grep CPPFLAGS=-D_POSIX_SOURCE=1 \ + --disable-ldap + make + CROSS COMPILE ============= @@ -728,7 +739,7 @@ PORTS - i386 FreeBSD - i386 HURD - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4, 2.6 - - i386 MINIX 3.1.2 + - i386 MINIX 3.1 - i386 NetBSD - i386 Novell NetWare - i386 OS/2 diff --git a/lib/setup.h b/lib/setup.h index 201f374..3eb6718 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -259,6 +259,12 @@ #define sclose(x) CloseSocket(x) #endif +#ifdef __minix +/* Minix 3 versions up to at least 3.1.3 are missing these prototypes */ +extern char * strtok_r(char *s, const char *delim, char **last); +extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp); +#endif + #define DIR_CHAR "/" #ifndef DOT_CHAR #define DOT_CHAR "." -- 2.7.4