CVE-2016-8618
Description
CURL before 7.51.0 contains a double-free vulnerability in curl_maprintf() due to integer overflow on 32-bit systems.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
CURL before 7.51.0 contains a double-free vulnerability in curl_maprintf() due to integer overflow on 32-bit systems.
Vulnerability
The libcurl function curl_maprintf() in versions before 7.51.0 contains a double-free vulnerability. On systems with 32-bit size_t, an unsafe integer multiplication during memory allocation can be exploited to cause a double-free when the result overflows [1][2]. The issue exists in the mprintf facility of libcurl, which is used for formatted output [4].
Exploitation
An attacker can trigger the vulnerability by supplying a specially crafted input that causes the internal buffer size calculation to overflow. This can be done without authentication if the attacker can send data to an application that calls curl_maprintf() with attacker-controlled parameters [2][4]. The double-free occurs in the alloc_addbyter() callback function [4].
Impact
Successful exploitation leads to a double-free condition, which can result in a denial of service or, under favorable heap conditions, arbitrary code execution [2][3]. The CVSS base score is moderate, but potential impacts include application crashes or remote code execution in the context of the affected process [1].
Mitigation
The vulnerability is fixed in curl version 7.51.0, released December 2016 [1]. Red Hat provided updates via RHSA-2018:3558 for httpd24-curl (7.61.1) [1] and RHSA-2018:2486 for JBoss Core Services [3]. Tenable LCE users should upgrade to version 4.8.2 [4]. Users should update their curl installations to a patched version or apply vendor-supplied patches.
AI Insight generated on May 24, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.
Affected products
12- osv-coords10 versionspkg:rpm/opensuse/curl&distro=openSUSE%20Tumbleweedpkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Desktop%2012%20SP1pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2011%20SP4pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%2012%20SP1pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2011%20SP4pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Server%20for%20SAP%20Applications%2012%20SP1pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2011%20SP4pkg:rpm/suse/curl&distro=SUSE%20Linux%20Enterprise%20Software%20Development%20Kit%2012%20SP1pkg:rpm/suse/curl&distro=SUSE%20Studio%20Onsite%201.3pkg:rpm/suse/curl-openssl1&distro=SUSE%20Linux%20Enterprise%20Server%2011-SECURITY
< 7.51.0-1.1+ 9 more
- (no CPE)range: < 7.51.0-1.1
- (no CPE)range: < 7.37.0-31.1
- (no CPE)range: < 7.19.7-1.64.1
- (no CPE)range: < 7.37.0-31.1
- (no CPE)range: < 7.19.7-1.64.1
- (no CPE)range: < 7.37.0-31.1
- (no CPE)range: < 7.19.7-1.64.1
- (no CPE)range: < 7.37.0-31.1
- (no CPE)range: < 7.19.7-1.20.47.2
- (no CPE)range: < 7.19.7-1.64.1
- The Curl Project/curlv5Range: 7.51.0
Patches
31 file changed · +23 −1
docs/THANKS+23 −1 modified@@ -20,6 +20,7 @@ Adriano Meirelles Ajit Dhumale Aki Koskinen Akos Pasztory +Akshay Vernekar Alain Danteny Alan Pinstein Albert Chin-A-Young @@ -48,6 +49,7 @@ Alexander Krasnostavsky Alexander Lazic Alexander Pepper Alexander Peslyak +Alexander Sinditskiy Alexander Traud Alexander Zhuravlev Alexey Borzov @@ -77,10 +79,12 @@ Andreas Ntaflos Andreas Olsson Andreas Rieke Andreas Schuldei +Andreas Streichardt Andreas Wurf Andrei Benea Andrei Cipu Andrei Kurushin +Andrei Sedoi Andrej E Baranov Andrew Benham Andrew Biggs @@ -215,6 +219,7 @@ Chris Smowton Chris Young Christian Fillion Christian Grothoff +Christian Heimes Christian Hägele Christian Krause Christian Kurz @@ -291,6 +296,7 @@ Daniel Theron Daniel at touchtunes Darryl House Darshan Mody +Darío Hereñú Dave Dribin Dave Halbakken Dave Hamilton @@ -496,6 +502,7 @@ Greg Morse Greg Onufer Greg Pratt Greg Zavertnik +Gregory Szorc Grigory Entin Guenole Bescon Guenter Knauf @@ -817,6 +824,7 @@ Luke Call Luke Dashjr Luo Jinghua Luong Dinh Dung +Luật Nguyễn Lyndon Hill Maciej Karpiuk Maciej Puzio @@ -869,12 +877,13 @@ Marquis de Muesli Martijn Koster Martin C. Martin Martin Drasar +Martin Frodl Martin Hager Martin Hedenfalk Martin Jansen Martin Lemke Martin Skinner -Martin Storsjo +Martin Storsjö Martin Vejnár Marty Kuhrt Maruko @@ -948,6 +957,7 @@ Mike Power Mike Protts Mike Revi Miklos Nemeth +Miloš Ljumović Miroslav Franc Miroslav Spousta Mitz Wark @@ -1031,6 +1041,7 @@ Pau Garcia i Quiles Paul Donohue Paul Harrington Paul Howarth +Paul Joyce Paul Marks Paul Marquis Paul Moore @@ -1101,6 +1112,7 @@ Rafaël Carré Rainer Canavan Rainer Jung Rainer Koenig +Rainer Müller Rajesh Naganathan Rajkumar Mandal Ralf S. Engelschall @@ -1117,6 +1129,7 @@ Razvan Cojocaru Reinhard Max Reinout van Schouwen Remi Gacogne +Remo E Renato Botelho Renaud Chaillat Renaud Duhaut @@ -1145,6 +1158,7 @@ Richard Silverman Richard van den Berg Rick Jones Rick Richardson +Rider Linden Rob Crittenden Rob Davies Rob Jones @@ -1216,9 +1230,11 @@ Scott Cantor Scott Davis Scott McCreary Sean Boudreau +Sebastian Mundry Sebastian Pohlschmidt Sebastian Rasmussen Senthil Raja Velu +Sergei Kuzmin Sergei Nikulov Sergey Tatarincev Sergio Ballestrero @@ -1260,6 +1276,7 @@ Stefan Tomanek Stefan Ulrich Steinar H. Gunderson Stephan Bergmann +Stephen Brokenshire Stephen Collyer Stephen Kick Stephen More @@ -1330,6 +1347,7 @@ Tobias Stoeckmann Toby Peterson Todd A Ouska Todd Kulesza +Todd Short Todd Vierling Tom Benoist Tom Donovan @@ -1357,6 +1375,7 @@ Toni Moreno Tony Kelman Toon Verwaest Tor Arntsen +Torben Dannhauer Torsten Foertsch Toshio Kuratomi Toshiyuki Maezawa @@ -1372,6 +1391,7 @@ Ulf Samuelsson Ulrich Doehner Ulrich Telle Ulrich Zadow +Valentin David Venkat Akella Victor Snezhko Vijay Panghal @@ -1439,9 +1459,11 @@ dkjjr89 on github eXeC64 on github jveazey on github kreshano on github +lukaszgn on github marc-groundctl on github neex on github nk +nopjmp on github silveja1 on github swalkaus at yahoo.com tommink[at]post.pl
8732ec40db65aprintf: detect wrap-around when growing allocation
1 file changed · +6 −3
lib/mprintf.c+6 −3 modified@@ -1036,16 +1036,19 @@ static int alloc_addbyter(int output, FILE *data) infop->len =0; } else if(infop->len+1 >= infop->alloc) { - char *newptr; + char *newptr = NULL; + size_t newsize = infop->alloc*2; - newptr = realloc(infop->buffer, infop->alloc*2); + /* detect wrap-around or other overflow problems */ + if(newsize > infop->alloc) + newptr = realloc(infop->buffer, newsize); if(!newptr) { infop->fail = 1; return -1; /* fail */ } infop->buffer = newptr; - infop->alloc *= 2; + infop->alloc = newsize; } infop->buffer[ infop->len ] = outc;
144 files changed · +35172 −0
acconfig.h+12 −0 added@@ -0,0 +1,12 @@ +/* Name of this package! */ +#undef PACKAGE + +/* Version number of this archive. */ +#undef VERSION + +/* Define if you have the getpass function. */ +#undef HAVE_GETPASS + +/* Define cpu-machine-OS */ +#undef OS +
aclocal.m4+127 −0 added@@ -0,0 +1,127 @@ +dnl aclocal.m4 generated automatically by aclocal 1.4 + +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl This program is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without +dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A +dnl PARTICULAR PURPOSE. + +# Like AC_CONFIG_HEADER, but automatically create stamp file. + +AC_DEFUN(AM_CONFIG_HEADER, +[AC_PREREQ([2.12]) +AC_CONFIG_HEADER([$1]) +dnl When config.status generates a header, we must update the stamp-h file. +dnl This file resides in the same directory as the config header +dnl that is generated. We must strip everything past the first ":", +dnl and everything past the last "/". +AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl +ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, +<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, +<<am_indx=1 +for am_file in <<$1>>; do + case " <<$>>CONFIG_HEADERS " in + *" <<$>>am_file "*<<)>> + echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "<<$>>am_indx" + 1` +done<<>>dnl>>) +changequote([,]))]) + +# Do all the work for Automake. This macro actually does too much -- +# some checks are only needed if your package does certain things. +# But this isn't really a big deal. + +# serial 1 + +dnl Usage: +dnl AM_INIT_AUTOMAKE(package,version, [no-define]) + +AC_DEFUN(AM_INIT_AUTOMAKE, +[AC_REQUIRE([AC_PROG_INSTALL]) +PACKAGE=[$1] +AC_SUBST(PACKAGE) +VERSION=[$2] +AC_SUBST(VERSION) +dnl test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi +ifelse([$3],, +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) +AC_REQUIRE([AM_SANITY_CHECK]) +AC_REQUIRE([AC_ARG_PROGRAM]) +dnl FIXME This is truly gross. +missing_dir=`cd $ac_aux_dir && pwd` +AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir) +AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) +AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) +AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) +AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +AC_REQUIRE([AC_PROG_MAKE_SET])]) + +# +# Check to make sure that the build environment is sane. +# + +AC_DEFUN(AM_SANITY_CHECK, +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftestfile +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` + if test "[$]*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftestfile` + fi + if test "[$]*" != "X $srcdir/configure conftestfile" \ + && test "[$]*" != "X conftestfile $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "[$]2" = conftestfile + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +rm -f conftest* +AC_MSG_RESULT(yes)]) + +dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) +dnl The program must properly implement --version. +AC_DEFUN(AM_MISSING_PROG, +[AC_MSG_CHECKING(for working $2) +# Run test in a subshell; some versions of sh will print an error if +# an executable is not found, even if stderr is redirected. +# Redirect stdin to placate older versions of autoconf. Sigh. +if ($2 --version) < /dev/null > /dev/null 2>&1; then + $1=$2 + AC_MSG_RESULT(found) +else + $1="$3/missing $2" + AC_MSG_RESULT(missing) +fi +AC_SUBST($1)]) +
CHANGES+1656 −0 added@@ -0,0 +1,1656 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + History of Changes + + +Version 6.4 + +Daniel (28 December 1999): + - Tim Verhoeven <dj@walhalla.sin.khk.be> correctly identified that curl + doesn't support URL formatted file names when getting ftp. Now, there's a + problem with getting very weird file names off FTP servers. RFC 959 defines + that the file name syntax to use should be the same as in the native OS of + the server. Since we don't know the peer server system we currently just + translate the URL syntax into plain letters. It is still better and with + the solaris 2.6-supplied ftp server it works with spaces in the file names. + +Daniel (27 December 1999): + - When curl parsed cookies straight off a remote site, it corrupted the input + data, which, if the downloaded headers were stored made very odd characters + in the saved data. Correctfully identified and reported by Paul Harrington + <paul@pizza.org>. + +Daniel (13 December 1999): + - General cleanups in the library interface. There had been some bad kludges + added during times of stress and I did my best to clean them off. It was + both regarding the lib API as well as include file confusions. + +Daniel (3 December 1999): + - A small --stderr bug was reported by Eetu Ojanen <esojanen@jyu.fi>... + + - who also brought the suggestion of extending the -X flag to ftp list as + well. So, now it is and the long option is now --request instead. It is + only for ftp list for now (and the former http stuff too of course). + +Lars J. Aas <larsa@sim.no> (24 November 1999): + - Patched curl to compile and build under BeOS. Doesn't work yet though! + + - Corrected the Makefile.am files to allow putting object files in + different directories than the sources. + +Version 6.3.1 + +Daniel (23 November 1999): + - I've had this major disk crash. My good old trust-worthy source disk died + along with the machine that hosted it. Thank goodness most of all the + things I've done are either backed up elsewhere or stored in this CVS + server! + + - Michael S. Steuer <michael@steuer.com> pointed out a bug in the -F handling + that made curl hang if you posted an empty variable such as '-F name='. It + was one of those old bugs that never have worked properly... + + - Jason Baietto <jason@durians.com> pointed out a general flaw in the HTTP + download. Curl didn't complain if it was prematurely aborted before the + entire download was completed. It does now. + +Daniel (19 November 1999): + - Chris Maltby <chris@aurema.com> very accurately criticized the lack of + return code checks on the fwrite() calls. I did a thorough check for all + occurrences and corrected this. + +Daniel (17 November 1999): + - Paul Harrington <paul@pizza.org> pointed out that the -m/--max-time option + doesn't work for the slow system calls like gethostbyname()... I don't have + any good fix yet, just a slightly less bad one that makes curl exit hard + when the timeout is reached. + + - Bjorn Reese helped me point out a possible problem that might be the reason + why Thomas Hurst experience problems in his Amiga version. + + Daniel (12 November 1999): + - I found a crash in the new cookie file parser. It crashed when you gave + a plain http header file as input... + +Version 6.3 + + Daniel (10 November 1999): + - I kind of found out that the HTTP time-conditional GETs (-z) aren't always + respected by the web server and the document is therefore sent in whole + again, even though it doesn't match the requested condition. After reading + section 13.3.4 of RFC 2616, I think I'm doing the right thing now when I do + my own check as well. If curl thinks the condition isn't met, the transfer + is aborted prematurely (after all the headers have been received). + + - After comments from Robert Linden <robert.linden@postcom.deutschepost.de> I + also rewrote some parts of the man page to better describe how the -F + works. + + - Michael Anti <anti@pshowing.com> put up a new curl download mirror in + China: http://www.pshowing.com/curl/ + + - I added the list of download mirrors to the README file + + - I did add more explanations to the man page + + Daniel (8 November 1999): + - I made the -b/--cookie option capable of reading netscape formatted cookie + files as well as normal http-header files. It should be able to + transparantly figure out what kind of file it got as input. + + Daniel (29 October 1999): + - Another one of Sebastiaan van Erk's ideas (that has been requested before + but I seem to have forgotten who it was), is to add support for ranges in + FTP downloads. As usual, one request is just a request, when they're two + it is a demand. I've added simple support for X-Y style fetches. X has to + be the lower number, though you may omit one of the numbers. Use the -r/ + --range switch (previously HTTP-only). + + - Sebastiaan van Erk <sebster@sebster.com> suggested that curl should be + able to show the file size of a specified file. I think this is a splendid + idea and the -I flag is now working for FTP. It displays the file size in + this manner: + Content-Length: XXXX + As it resembles normal headers, and leaves us the opportunity to add more + info in that display if we can come up with more in the future! It also + makes sense since if you access ftp through a HTTP proxy, you'd get the + file size the same way. + + I changed the order of the QUOTE command execusions. They're now executed + just after the login and before any other command. I made this to enable + quote commands to run before the -I stuff is done too. + + - I found out that -D/--dump-header and -V/--version weren't documented in + the man page. + + - Many HTTP/1.1 servers do not support ranges. Don't ask me why. I did add + some text about this in the man page for the range option. The thread in + the mailing list that started this was initiated by Michael Anti + <anti@pshowing.com>. + + - I get reports about nroff crashes on solaris 2.6+ when displaying the curl + man page. Switch to gnroff instead, it is reported to work(!). Adam Barclay + <adam@oz.org> reported and brought the suggestion. + + - In a dialogue with Johannes G. Kristinsson <d98is@dtek.chalmers.se> we came + up with the idea to let -H/--header specified headers replace the + internally generated headers, if you happened to select to add a header + that curl normally uses by itself. The advantage with this is not entirely + obvious, but in Johannes' case it means that he can use another Host: than + the one curl would set. + + Daniel (27 October 1999): + - Jongki Suwandi <Jongki.Suwandi@eng.sun.com> brought a nice patch for + (yet another) crash when following a location:. This time you had to + follow a https:// server's redirect to get the core. + +Version 6.2 + + Daniel (21 October 1999): + - I think I managed to remove the suspicious (nil) that has been seen just + before the "Host:" in HTTP requests when -v was used. + - I found out that if you followed a location: when using a proxy, without + having specified http:// in the URL, the protocol part was added once again + when moving to the next URL! (The protocol part has to be added to the + URL when going through a proxy since it has no protocol-guessing system + such as curl has.) + - Benjamin Ritcey <ritcey@tfn.com> reported a core dump under solaris 2.6 + with OpenSSL 0.9.4. It turned out this was due to a bad free() in main.c + that occurred after the download was done and completed. + - Benjamin found ftp downloads to show the first line of the download meter + to get written twice, and I removed that problem. It was introduced with + the multiple URL support. + - Dan Zitter <dzitter@zitter.net> correctly pointed out that curl 6.1 and + earlier versions didn't honor RFC 2616 chapter 4 section 2, "Message + Headers": "...Field names are case-insensitive..." + HTTP header parsing assumed a certain casing. Dan also provided me with + a patch that corrected this, which I took the liberty of editing slightly. + - Dan Zitter also provided a nice patch for config.guess to better recognize + the Mac OS X + - Dan also corrected a minor problem in the lib/Makefile that caused linking + to fail on OS X. + + Daniel (19 October 1999): + - Len Marinaccio <len@goodnet.com> came up with some problems with curl. + Since Windows has a crippled shell, it can't redirect stderr and that + causes trouble. I added --stderr today which allows the user to redirect + the stderr stream to a file or stdout. + + Daniel (18 October 1999): + - The configure script now understands the '--without-ssl' flag, which now + totally disable SSL/https support. Previously it wasn't possible to force + the configure script to leave SSL alone. The previous functionality has + been retained. Troy Engel helped test this new one. + +Version 6.1 + + Daniel (17 October 1999): + - I ifdef'ed or commented all the zlib stuff in the sources and configure + script. It turned out we needed to mock more with zlib than I initially + thought, to make it capable of downloading compressed HTTP documents and + uncompress them on the fly. I didn't mean the zlib parts of curl to become + more than minor so this means I halt the zlib expedition for now and wait + until someone either writes the code or zlib gets updated and better + adjusted for this kind of usage. I won't get into details here, but a + short a summary is suitable: + - zlib can't automatically detect whether to use zlib or gzip + decompression methods. + - zlib is very neat for reading gzipped files from a file descriptor, + although not as nice for reading buffer-based data such as we would + want it. + - there are still some problems with the win32 version when reading from + a file descriptor if that is a socket + + Daniel (14 October 1999): + - Moved the (external) include files for libcurl into a subdirectory named + curl and adjusted all #include lines to use <curl/XXXX> to maintain a + better name space and control of the headers. This has been requested. + + Daniel (12 October 1999): + - I modified the 'maketgz' script to perform a 'make' too before a release + archive is put together in an attempt to make the time stamps better and + hopefully avoid the double configure-running that use to occur. + + Daniel (11 October 1999): + - Applied J�rn's patches that fixes zlib for mingw32 compiles as well as + some other missing zlib #ifdef and more text on the multiple URL docs in + the man page. + +Version 6.1beta + + Daniel (6 October 1999): + - Douglas E. Wegscheid <wegscd@whirlpool.com> sent me a patch that made the + exact same thing as I just made: the -d switch is now capable of reading + post data from a named file or stdin. Use it similarly to the -F. To read + the post data from a given file: + + curl -d @path/to/filename www.postsite.com + + or let curl read it out from stdin: + + curl -d @- www.postit.com + + J�rn Hartroth (3 October 1999): + - Brought some more patches for multiple URL functionality. The MIME + separation ideas are almost scrapped now, and a custom separator is being + used instead. This is still compile-time "flagged". + + Daniel + - Updated curl.1 with multiple URL info. + + Daniel (30 September 1999): + - Felix von Leitner <felix@convergence.de> brought openssl-check fixes + for configure.in to work out-of-the-box when the openssl files are + installed in the system default dirs. + + Daniel (28 September 1999) + - Added libz functionality. This should enable decompressing gzip, compress + or deflate encoding HTTP documents. It also makes curl send an accept that + it accepts that kind of encoding. Compressed contents usually shortens + download time. I *need* someone to tell me a site that uses compressed HTTP + documents so that I can test this out properly. + + - As a result of the adding of zlib awareness, I changed the version string + a little. I plan to add openldap version reporting in there too. + + Daniel (17 September 1999) + - Made the -F option allow stdin when specifying files. By using '-' instead + of file name, the data will be read from stdin. + +Version 6.0 + + Daniel (13 September 1999) + - Added -X/--http-request <request> to enable any HTTP command to be sent. + Do not that your server has to support the exact string you enter. This + should possibly a string like DELETE or TRACE. + + - Applied Douglas' mingw32-fixes for the makefiles. + + Daniel (10 September 1999) + - Douglas E. Wegscheid <wegscd@whirlpool.com> pointed out a problem. Curl + didn't check the FTP servers return code properly after the --quote + commands were issued. It took anything non 200 as an error, when all 2XX + codes should be accepted as OK. + + - Sending cookies to the same site in multiple lines like curl used to do + turned out to be bad and breaking the cookie specs. Curl now sends all + cookies on a single Cookie: line. Curl is not yet RFC 2109 compliant, but I + doubt that many servers do use that syntax (yet). + + Daniel (8 September 1999) + - J�rn helped me make sure it still compiles nicely with mingw32 under win32. + + Daniel (7 September 1999) + - FTP upload through proxy is now turned into a HTTP PUT. Requested by + Stefan Kanthak <Stefan.Kanthak@mchp.siemens.de>. + + - Added the ldap files to the .m32 makefile. + + Daniel (3 September 1999) + - Made cookie matching work while using HTTP proxy. + + Bjorn Reese <breese@mail1.stofanet.dk> (31 August 1999) + - Passed his ldap:// patch. Note that this requires the openldap shared + library to be installed and that LD_LIBRARY_PATH points to the + directory where the lib will be found when curl is run with a + ldap:// URL. + + J�rn Hartroth <Joern.Hartroth@telekom.de> (31 August 1999) + - Made the Mingw32 makefiles into single files. + - Made file:// work for Win32. The same code is now used for unix as well for + performance reasons. + + Douglas E. Wegscheid <wegscd@whirlpool.com> (30 August 1999) + - Patched the Mingw32 makefiles for SSL builds. + + Matthew Clarke <clamat@van.maves.ca> (30 August 1999) + - Made a cool patch for configure.in to allow --with-ssl to specify the + root dir of the openssl installation, as in + + ./configure --with-ssl=/usr/ssl_here + + - Corrected the 'reconf' script to work better with some shells. + + J�rn Hartroth <Joern.Hartroth@telekom.de> (26 August 1999) + - Fixed the Mingw32 makefiles in lib/ and corrected the file.c for win32 + compiles. + +Version 5.11 + + Daniel (25 August 1999) + - John Weismiller <johnweis@home.com> pointed out a bug in the header-line + realloc() system in download.c. + + - I added lib/file.[ch] to offer a first, simple, file:// support. It + probably won't do much good on win32 system at this point, but I see it + as a start. + + - Made the release archives get a Makefile in the root dir, which can be + used to start the compiling/building process easier. I haven't really + changed any INSTALL text yet, I wanted to get some feed-back on this + first. + + Daniel (17 August 1999) + - Another Location: bug. Curl didn't do proper relative locations if the + original URL had cgi-parameters that contained a slash. Nusu's page + again. + + - Corrected the NO_PROXY usage. It is a list of substrings that if one of + them matches the tail of the host name it should connect to, curl should + not use a proxy to connect there. Pointed out to me by Douglas E. Wegscheid + <wegscd@whirlpool.com>. I also changed the README text a little regarding + this. + + Daniel (16 August 1999) + - Fixed a memory bug with http-servers that sent Location: to a Location: + page. Nusu's page showed this too. + + - Made cookies work a lot better. Setting the same cookie name several times + used to add more cookies instead of replacing the former one which it + should've. Nusu <nus@intergorj.ro> brought me an URL that made this + painfully visible... + + Troy (15 August 1999) + - Brought new .spec files as well as a patch for configure.in that lets the + configure script find the openssl files better, even when the include + files are in /usr/include/openssl + +Version 5.10 + + Daniel (13 August 1999) + - SSL_CTX_set_default_passwd_cb() has been modified in the 0.9.4 version of + OpenSSL. Now why couldn't they simply add a *new* function instead of + modifying the parameters of an already existing function? This way, we get + a compiler warning if compiling with 0.9.4 but not with earlier. So, I had + to come up with a #if contruction that deals with this... + + - Made curl output the SSL version number get displayed properly with 0.9.4. + + Troy (12 August 1999) + - Added MingW32 (GCC-2.95) support under Win32. The INSTALL file was also + a bit rearranged. + + Daniel (12 August 1999) + - I had to copy a good <arpa/telnet.h> include file into the curl source + tree to enable the silly win32 systems to compile. The distribution rights + allows us to do that as long as the file remains unmodified. + + - I corrected a few minor things that made the compiler complain when + -Wall -pedantic was used. + + - I'm moving the official curl web page to http://curl.haxx.nu. I think it + will make it easier to remember as it is a lot shorter and less cryptic. + The old one still works and shows the same info. + + Daniel (11 August 1999) + - Albert Chin-A-Young mailed me another correction for NROFF in the + configure.in that is supposed to be better for IRIX users. + + Daniel (10 August 1999) + - Albert Chin-A-Young <china@thewrittenword.com> helped me with some stupid + Makefile things, as well as some fiddling with the getdate.c + stuff that he had problems with under HP-UX v10. getdate.y will now be + compiled into getdate.c if the appropriate yacc or bison is found by the + configure script. Since this is slightly new, we need to test the output + getdate.c with win32 systems to make sure it still compiles there. + + Daniel (5 August 1999) + - I've just setup a new mailing list with the intention to keep discussions + around libcurl development in it. I mainly expect it to be for thoughts and + brainstorming around a "next generation" library, rather than nitpicking + about the current implementation or details in the current libcurl. + + To join our happy bunch of future-looking geeks, enter 'subscribe + <address>' in the body of a mail and send it to + libcurl-request@listserv.fts.frontec.se. Curl bug reports, the usual curl + talk and everything else should still be kept in this mailing list. I've + started to archive this mailing list and have put the libcurl web page at + www.fts.frontec.se/~dast/libcurl/. + + - Stefan Kanthak <Stefan.Kanthak@mchp.siemens.de> contacted me regarding a + few problems in the configure script which he discovered when trying to + make curl compile and build under Siemens SINIX-Z V5.42B2004! + + - Marcus Klein <m.klein@in-olpe.de> very accurately informed me that + src/version.h was not present in the CVS repository. Oh, how silly... + + - Linus Nielsen <Linus.Nielsen@sth.frontec.se> rewrote the telnet:// part and + now curl offers limited telnet support. If you run curl like 'curl + telnet://host' you'll get all output on the screen and curl will read input + from stdin. You'll be able to login and run commands etc, but since the + output is buffered, expect to get a little weird output. + + This is still in its infancy and it might get changed. We need your + feed-back and input in how this is best done. + + WIN32 NOTE: I bet we'll get problems when trying to compile the current + lib/telnet.c on win32, but I think we can sort them out in time. + + - David Sanderson <david@transarc.com> reported that FORCE_ALLOCA_H or + HAVE_ALLOCA_H must be defined for getdate.c to compile properly on HP-UX + 11.0. I updated the configure script to check for alloca.h which should + make it. + + Daniel (4 August 1999) + - I finally got to understand Marcus Klein's ftp download resume problem, + which turns out to be due to different outputs from different ftp + servers. It makes ftp download resuming a little trickier, but I've made + some modifications I really believe will work for most ftp servers and I do + hope you report if you have problems with this! + + - Added text about file transfer resuming to README.curl. + + Daniel (2 August 1999) + - Applied a progress-bar patch from Lars J. Aas <larsa@sim.no>. It offers + a new styled progress bar enabled with -#/--progress-bar. + + T. Yamada <tai@imasy.or.jp> (30 July 1999) + - It breaks with segfault when 1) curl is using .netrc to obtain + username/password (option '-n'), and 2) is auto-matically redirected to + another location (option '-L'). + + There is a small bug in lib/url.c (block starting from line 641), which + tries to take out username/password from user- supplied command-line + argument ('-u' option). This block is never executed on first attempt since + CONF_USERPWD bit isn't set at first, but curl later turns it on when it + checks for CONF_NETRC bit. So when curl tries to redo everything due to + redirection, it segfaults trying to access *data->userpwd. + +Version 5.9.1 + + Daniel (30 July 1999) + - Steve Walch <swalch@cisoft.com> pointed out that there is a memory leak in + the formdata functions. I added a FormFree() function that is now used and + supposed to correct this flaw. + + - Mark Wotton <mwotton@black.ug.cs.usyd.edu.au> reported: + 'curl -L https://www.cwa.com.au/' core dumps. I managed to cure this by + correcting the cleanup procedure. The bug seems to be gone with my OpenSSL + 0.9.2b, although still occurs when I run the ~100 years old SSLeay 0.8.0. I + don't know whether it is curl or SSLeay that is to blame for that. + + - Marcus Klein <m.klein@in-olpe.de>: + Reported an FTP upload resume bug that I really can't repeat nor understand. + I leave it here so that it won't be forgotten. + + Daniel (29 July 1999) + - Costya Shulyupin <costya@trivnet.com> suggested support for longer URLs + when following Location: and I could only agree and fix it! + + - Leigh Purdie <leighp@defcen.gov.au> found a problem in the upload/POST + department. It turned out that http.c accidentaly cleared the pointer + instead of the byte counter when supposed to. + + - Costya Shulyupin <costya@trivnet.com> pointed out a problem with port + numbers and Location:. If you had a server at a non-standard port that + redirected to an URL using a standard port number, curl still used that + first port number. + + - Ralph Beckmann <rabe@uni-paderborn.de> pointed out a problem when using both + CONF_FOLLOWLOCATION and CONF_FAILONERROR simultaneously. Since the + CONF_FAILONERROR exits on the 302-code that the follow location header + outputs it will never show any html on location: pages. I have now made it + look for >=400 codes if CONF_FOLLOWLOCATION is set. + + - 'struct slist' is now renamed to 'struct curl_slist' (as suggested by Ralph + Beckmann). + + - Joshua Swink <jpswink@hotmail.com> and Rick Welykochy <rick@praxis.com.au> + were the first to point out to me that the latest OpenSSL package now have + moved the standard include path. It is now in + /usr/local/ssl/include/openssl and I have now modified the --enable-ssl + option for the configure script to use that as the primary path, and I + leave the former path too to work with older packages of OpenSSL too. + + Daniel (9 June 1999) + - I finally understood the IRIX problem and now it seem to compile on it! + I am gonna remove those #define strcasecmp() things once and for all now. + + Daniel (4 June 1999) + - I adjusted the FTP reply 227 parser to make the PASV command work better + with more ftp servers. Appearantly the Roxen Challanger server replied + something curl 5.9 could deal with! :-( Reported by Ashley Reid-Montanaro + <ashley@compsoc.man.ac.uk> and Mark Butler <butlerm@xmission.com> brought a + solution for it. + + Daniel (26 May 1999) + - Rearranged. README is new, the old one is now README.curl and I added a + README.libcurl with text I got from Ralph Beckmann <rabe@uni-paderborn.de>. + + - I also updated the INSTALL text. + + Daniel (25 May 1999) + - David Jonathan Lowsky <dlowsky@leland.stanford.edu> correctly pointed out + that curl didn't properly deal with form posting where the variable + shouldn't have any content, as in curl -F "form=" www.site.com. It was + now fixed. + +Version 5.9 + + Daniel (22 May 1999) + - I've got a bug report from Aaron Scarisbrick <aaronsca@hotmail.com> in + which he states he has some problems with -L under FreeBSD 3.0. I have + previously got another bug report from Stefan Grether + <stefan.grether@ubs.com> which points at an error with similar sympthoms + when using win32. I made the allocation of the new url string a bit faster + and different, don't know if it actually improves anything though... + + Daniel (20 May 1999) + - Made the cookie parser deal with CRLF newlines too. + + Daniel (19 May 1999) + - Download() didn't properly deal with failing return codes from the + sread() function. Adam Coyne <adam@gamespy.com> found the problem in the + win32 version, and Troy Engel helped me out isolating it. + + Daniel (16 May 1999) + - Richard Adams <Richard@Slayford.com> pointed out a bug I introduced in + 5.8. --dump-header doesn't work anymore! :-/ I fixed it now. + + - After a suggestion by Joshua Swink <jpswink@hotmail.com> I added -S / + --show-error to force curl to display the error message in case of an + error, even if -s/--silent was used. + + Daniel (10 May 1999) + - I moved the stuff concerning HTTP, DICT and TELNET it their own source + files now. It is a beginning on my clean-up of the sources to make them + layer all those protocols better to enable more to be added easier in the + future! + + - Leon Breedt <ljb@debian.org> sent me some files I've not put into the main + curl archive. They're for creating the Debian package thingie. He also sent + me a debian package that I've made available for download at the web page + + Daniel (9 May 1999) + - Made it compile on cygwin too. + + Troy Engel (7 May 1999) + - Brought a series of patches to allow curl to compile smoothly on MSVC++ 6 + again! + + Daniel (6 May 1999) + - I changed the #ifdef HAVE_STRFTIME placement for the -z code so that it + will be easier to discover systems that don't have that function and thus + can't use -z successfully. Made the strftime() get used if WIN32 is defined + too. + +Version 5.8 + + Daniel (5 May 1999) + - I've had it with this autoconf/automake mess. It seems to work allright + for most people who don't have automake installed, but for those who have + there are problems all over. + + I've got like five different bug reports on this only the last + week... Claudio Neves <claudio@nextis.com> and Federico Bianchi + <bianchi@pc-arte2.arte.unipi.it> and root <duggerj001@hawaii.rr.com> are + some of them reporting this. + + Currently, I have no really good fix since I want to use automake myself to + generate the Makefile.in files. I've found out that the @SHELL@-problems + can often be fixed by manually invoking 'automake' in the archive root + before you run ./configure... I've hacked my maketgz script now to fiddle + a bit with this and my tests seem to work better than before at least! + + Daniel (4 May 1999) + - mkhelp.pl has been doing badly lately. I corrected a case problem in + the regexes. + + - I've now remade the -o option to not touch the file unless it needs to. + I had to do this to make -z option really fine, since now you can make a + curl fetch and use a local copy's time when downloading to that file, as + in: + + curl -z dump -o dump remote.site.com/file.html + + This will only get the file if the remote one is newer than the local. + I'm aware that this alters previous behaviour a little. Some scripts out + there may depend on that the file is always touched... + + - Corrected a bug in the SSLv2/v3 selection. + + - Felix von Leitner <leitner@math.fu-berlin.de> requested that curl should + be able to send "If-Modified-Since" headers, which indeed is a fair idea. + I implemented it right away! Try -z <expression> where expression is a full + GNU date expression or a file name to get the date from! + + Stephan Lagerholm <stephan@unilog.se> (30 Apr 1999) + - Pointed out a problem with the src/Makefile for FreeBSD. The RM variable + isn't set and causes the make to fail. + + Daniel (26 April 1999) + - Am I silly or what? <Irving_Wolfe@wolfe.net> pointed out to me that the + curl version number was not set properly. Hasn't been since 5.6. This was + due to a bug in my maketgz script! + + David Eriksson <david@2good.com> (25 Apr 1999) + - Found a bug in cookies.c that made it crash at times. + +Version 5.7.1 + + Doug Kaufman <dkaufman@rahul.net> (23 Apr 1999) + - Brought two sunos 4 fixes. One of them being the hostip.c fix mentioned + below and the other one a correction in include/stdcheaders.h + + - Added a paragraph about compiling with the US-version of openssl to the + INSTALL file. + + Daniel + - New mailing list address. Info updated on the web page as well as in the + README file + + Greg Onufer <Greg.Onufer@Eng.Sun.COM> (20 Apr 1999) + - hostip.c didn't compile properly on SunOS 5.5.1. + It needs an #include <sys/types.h> + +Version 5.7 + + Daniel (Apr 20 1999) + - Decided to upload a non-beta version right now! + + - Made curl support any-length HTTP headers. The destination buffer is now + simply enlarged every time it turns out to be too small! + + - Added the FAQ file to the archive. Still a bit smallish, but it is a + start. + + Eric Thelin <eric@generation-i.com> (15 Apr 1999) + - Made -D accept '-' instead of filename to write to stdout. + +Version 5.6.3beta + + Daniel (Apr 12 1999) + + - Changed two #ifdef WIN32 to better #ifdef <errorcode> when connect()ing + in url.c and ftp.c. Makes cygwin32 deal with them better too. We should + try to get some decent win32-replacement there. Anyone? + + - The old -3/--crlf option is now ONLY --crlf! + + - I changed the "SSL fix" to a more lame one, but that doesn't remove as + much functionality. Now I've enabled the lib to select what SSL version it + should try first. Appearantly some older SSL-servers don't like when you + talk v3 with them so you need to be able to force curl to talk v2 from the + start. The fix dated April 6 and posted on the mailing list forced curl to + use v2 at all times using a modern OpenSSL version, but we don't really + want such a crippled solution. + + - Marc Boucher <marc@mbsi.ca> sent me a patch that corrected a math error + for the "Curr.Speed" progress meter. + + - Eric Thelin <eric@generation-i.com> sent me a patch that enables '-K -' + to read a config file from stdin. + + - I found out we didn't close the file properly before so I added it! + + Daniel (Apr 9 1999) + - Yu Xin <is@isee.za.net> pointed out a problem with ftp download resume. + It didn't work at all! ;-O + + Daniel (Apr 6 1999) + - Corrected the version string part generated for the SSL version. + + - I found a way to make some other SSL page work with openssl 0.9.1+ that + previously didn't (ssleay 0.8.0 works with it though!). Trying to get + some real info from the OpenSSL guys to see how I should do to behave the + best way. SSLeay 0.8.0 shouldn't be that much in use anyway these days! + +Version 5.6.2beta + + Daniel (Apr 4 1999) + - Finally have curl more cookie "aware". Now read carefully. This is how + it works. + To make curl read cookies from an already existing file, in plain header- + format (like from the headers of a previous fetch) invoke curl with the + -b flag like: + + curl -b file http://site/foo.html + + Curl will then use all cookies it finds matching. The old style that sets + a single cookie with -b is still supported and is used if the string + following -b includes a '=' letter, as in "-b name=daniel". + + To make curl read the cookies sent in combination with a location: (which + sites often do) point curl to read a non-existing file at first (i.e + to start with no existing cookies), like: + + curl -b nowhere http://site/setcookieandrelocate.html + + - Added a paragraph in the TODO file about the SSL problems recently + reported. Evidently, some kind of SSL-problem curl may need to address. + + - Better "Location:" following. + + Douglas E. Wegscheid <wegscd@whirlpool.com> (Tue, 30 Mar 1999) + - A subsecond display patch. + + Daniel (Mar 14 1999) + - I've separated the version number of libcurl and curl now. To make + things a little easier, I decided to start the curl numbering from + 5.6 and the former version number known as "curl" is now the one + set for libcurl. + + - Removed the 'enable-no-pass' from configure, I doubt anyone wanted + that. + + - Made lots of tiny adjustments to compile smoothly with cygwin under + win32. It's a killer for porting this to win32, bye bye VC++! ;-) + Compiles and builds out-of-the-box now. See the new wordings in + INSTALL for details. + + - Beginning experiments with downloading multiple document from a http + server while remaining connected. + +Version 5.6beta + + Daniel (Mar 13 1999) + - Since I've changed so much, I thought I'd just go ahead and implement + the suggestion from Douglas E. Wegscheid <wegscd@whirlpool.com>. -D or + --dump-header is now storing HTTP headers separately in the specified + file. + + - Added new text to INSTALL on what to do to build this on win32 now. + + - Aaargh. I had to take a step back and prefix the shared #include files + in the sources with "../include/" to please VC++... + + Daniel (Mar 12 1999) + - Split the url.c source into many tiny sources for better readability + and smaller size. + + Daniel (Mar 11 1999) + - Started to change stuff for a move to make libcurl and a more separate + curl application that uses the libcurl. Made the libcurl sources into + the new lib directory while the curl application will remain in src as + before. New makefiles, adjusted configure script and so. + + libcurl.a built quickly and easily. I better make a better interface to + the lib functions though. + + The new root dir include/ is supposed to contain the public information + about the new libcurl. It is a little ugly so far :-) + + + Daniel (Mar 1 1999) + - Todd Kaufmann <tkaufmann@adforce.com> sent me a good link to Netscape's + cookie spec as well as the info that RFC 2109 specifies how to use them. + The link is now in the README and the RFC in the RESOURCES. + + Daniel (Feb 23 1999) + - Finally made configure accept --with-ssl to look for SSL libs and includes + in the "standard" place /usr/local/ssl... + + Daniel (Feb 22 1999) + - Verified that curl linked fine with OpenSSL 0.9.1c which seems to be + the most recent. + + Henri Gomez <gomez@slib.fr> (Fri Feb 5 1999) + - Sent in an updated curl-ssl.spec. I still miss the script that builds an + RPM automatically... + +Version 5.5.1 + + Mark Butler <butlerm@xmission.com> (27 Jan 1999) + - Corrected problems in Download(). + + Danitel Stenberg (25 Jan 1999) + - Jeremie Petit <Jeremie.Petit@Digital.com> pointed out a few flaws in the + source that prevented it from compile warning free with the native + compiler under Digital Unix v4.0d. + +Version 5.5 + + Daniel Stenberg (15 Jan 1999) + - Added Bjorns small text to the README about the DICT protocol. + + Daniel Stenberg (11 Jan 1999) + - <jswink@softcom.net> reported about the win32-versioin: "Doesn't use + ALL_PROXY environment variable". Turned out to be because of the static- + buffer nature of the win32 environment variable calls! + + Bjorn Reese <breese@imada.ou.dk> (10 Jan 1999) + - I have attached a simple addition for the DICT protocol (RFC 2229). + It performs dictionary lookups. The output still needs to be better + formatted. + + To test it try (the exact format, and more examples are described in + the RFC) + + dict://dict.org/m:hello + dict://dict.org/m:hello::soundex + + + Vicente Garcia <verot@redestb.es> (10 Jan 1999) + - Corrected the progress meter for files larger than 20MB. + + Daniel Stenberg (7 Jan 1999) + - Corrected the -t and -T help texts. They claimed to be FTP only. + +Version 5.4 + + Daniel Stenberg + (7 Jan 1999) + - <Irving_Wolfe@Wolfe.Net> reported that curl -s didn't always supress the + progress reporting. It was the form post that autoamtically always switched + it on again. This is now corrected! + + (4 Jan 1999) + - Andreas Kostyrka <andreas@mtg.co.at> suggested I'd add PUT and he helped me + out to test it. If you use -t or -T now on a http or https server, PUT will + be used for file upload. + + I removed the former use of -T with HTTP. I doubt anyone ever really used + that. + + (4 Jan 1999) + - Erik Jacobsen <erik@mint.com> found a width bug in the mprintf() function. + I corrected it now. + + (4 Jan 1999) + - As John V. Chow <johnchow@brooklinetech.com> pointed out to me, curl + accepted very limited URL sizes. It should now accept path parts that are + up to at least 4096 bytes. + + - Somehow I screwed up when applying the AIX fix from Gilbert Ramirez, so + I redid that now. + +Version 5.3a (win32 only) + + Troy Engel + - Corrected a win32 bug in the environment variable part. + +Version 5.3 + + Gilbert Ramirez Jr. (21 Dec 1998) + - I have implemented the "quote" function of FTP clients. It allows you to + send arbitrary commands to the remote FTP server. I chose the -Q/--quote + command-line arguments. + + You can have more than one quoted string, and curl will apply them in + order. This is what I use for my MVS upload: + + curl -B --crlf -Q "site lrecl=80" -Q "site blk=8000" -T file ftp://os390/test + + Curl will send the two quoted "site" commands in the proper order. + + - Made it compile smoothly on AIX. + + Gilbert Ramirez Jr. <gram@verdict.uthscsa.edu> (18 Dec 1998) + - Brought an MVS patch: -3/--mvs, for ftp upload to the MVS ftp server. + + Troy Engel <tengel@sonic.net> (17 Dec 1998) + - Brought a correction that fixes the win32 curl bug. + + Daniel Stenberg + - A bug, pointed out to me by Dr H. T. Leung <htl10@cus.cam.ac.uk>, caused + curl to crash on the -A flag on certain systems. Actually, all systems + should've! + + - Added a few defines to make directories/file names get build nicer (with _ + instead of . and \ instead of / in win32). + + - steve <fisk@polar.bowdoin.edu> reported a weird bug that occured if the + ftp server response line had a parenthesis on the line before the (size) + info. I hope it works better now! + +Version 5.2.1 + + Steven G. Johnson <stevenj@alum.mit.edu> (Dec 14, 1998) + - Brought a fix that corrected a crash in 5.2 due to bad treatment of the + environment variables. + +Version 5.2 + + Daniel Stenberg (Dec 14, 1998) + - Rewrote the mkhelp script and now, the mkhelp.pl script generates the + hugehelp.c file from the README *and* the man page file curl.1. By using + both files, I no longer need to have double information in both the man + page and the README as well. So, win32-users will only have the hugehelp.c + file for all info, but then, they download the plain binary most times + anyway. + + - gcc2.8.1 with the -Wall flag complaints a lot on subscript has type `char' + if I don't explicitly typecast the argument to isdigit() or isspace() to + int. So I did to compile warning free with that too. + + - Added checks for 'long double' and 'long long' in the configure script. I + need those for the mprintf.c source to compile well on non long long + comforming systems! + +Version 5.1 (not publicly released) + + Daniel Stenberg (Dec 10, 1998) + - I got a request for a pre-compiled NT Alpha version. Anyone? + + - Added Lynx/CERN www lib proxy environment variable support. That means curl + now reads and understands the following environment variables: + + HTTP_PROXY, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY + + They should be set for protocol-specific proxies. General proxy should be + set with + + ALL_PROXY + + And a comma-separated list of host names that shouldn't go through any + proxy is set in (only an asterisk, '*' matches all hosts). + + NO_PROXY + + The usage of the -x/--proxy flag overrides the environment variables. + + - Proxy can now be specified with a procotol:// prefix. + + - Wrote the curl.1 man page. + + - Introduced a whole new dynamic buffer system for all sprintf()s. It is + based on the *printf() package by yours truly and Bjorn Reese. Hopefully, + there aren't that many buffer overflow risks left now. + + - Ah, I should mention I've compiled and built curl successfully under + solaris 2.6 with gcc now, gcc 2.7.2 won't work but 2.8.1 did ok. + + Oren Tirosh <oren@hishome.net> (Dec 3, 1998) + - Brought two .spec files, to use when creating (Linux) Redhat style RPM + packages. They're named curl.spec and curl-ssl.spec. + + Troy Engel <tengel@sonic.net> + - Supplied the src/Makefile.vc6 for easy compiling with VC++ under Win32. + +Version 5.0 + + Daniel Stenberg (Dec 1, 1998) + - Not a single bug report in ages. + - Corrected getpass.c and main.c to compile warning and error free with the + Win32 VC++ crap. + +Version 5.0 beta 24 + + Daniel Stenberg (Nov 20, 1998) + + HOW TO BUILD A RELEASE ARCHIVE: + + * Pre-requisite software: + What To build what Reads data from + ==== ============= =============== + GNU automake Makefile.in, aclocal.m4 configure.in + GNU make(1) - " - + GNU gcc(1) - " - + GNU autoconf configure configure.in + GNU autoheader(2) config.h.in configure.in, acconfig.h + + * Make sure all files that should be part of the archive are put in FILES. + + * Run './maketgz' and enter version number of the new to become archive. + + maketgz does: + + - Enters the newly created version number in url.h. + - (If you don't have automake, this script will warn about that, but unless + you have changed the Makefile.am files, that is nothing to care about.) + If you have it, it'll run it. + - If you have autoconf, the configure.in will be edited to get the newly + created version number and autoconf will be run. + - Creates a new directory named curl-<version>. (Actually, it uses the base + name of the current directory up to the first '-'.) + - Copies all files mentioned in FILES to the new directory. Saving + permissions and directory structure. + - Uses tar to create an archive of it all, named curl-<version>.tar.gz + - gzips the archive + - Removes the new directory and all its contents. + + * When done, you have an archive stored in your directory named + curl-<version>.tar.gz. + + Done! + + (1) They're required to make automake run properly. + (2) It is distributed as a part of the GNU autoconf archive. + + Daniel Stenberg (Nov 18, 1998) + - I changed the TAG-system. If you ever used urlget() from this package in + another product, you need to recompile with the new headers. I did this + new stuff to better deal with different compilers and system with different + variable sizes. I think it makes it a little more portable. This proves + to compile warning free with the problematic IRIX compiler! + - Win32 compiled with a silly error. Corrected now. + - Brian Chaplin <bchaplin@capital-mkts.com> reported yet another problem in + multiline FTP responses. I've tried to correct it. I mailed him a new + version and I hope he gets back soon with positive feedback! + - Improved the 'maketgz' to create a temporary directory tree which it makes + an archive from instead of the previous renaming of the current one. + - Mailing list opened (see README). + - Made -v more verbose on the PASV section of ftp transfers. Now it tells + host name and IP of the new host (and port number). I also added a section + about PORT vs PASV in the README. + +Version 5.0 beta 21 + + Angus Mackay (Nov 15, 1998) + - Introduced automake stuff. + + Daniel Stenberg (Nov 13, 1998) + - Just made a successful GET of a document from an SSL-server using my own + private certificate for authentication! The certificate has to be in PEM + format. You do that the easiest way (although not *that* easy) by + downloading the SSLyeay PKCS#12-patch by Dr Stephen N. Henson from his site + at: http://www.drh-consultancy.demon.co.uk/. Using his tool, you can + convert any modern Netscape or (even) MSIE certificate to PEM-format. Use + it with 'curl -E <certificate:password> https://site.com'. If this isn't a + cool feature, then I don't know what cool features look like! ;-) + - Working slowly on telnet connections. #define TRY_TELNET to try it out. + (curl -u user:passwd "telnet://host.com/cat .login" is one example) I do + have problem to define how it should work. The prime purpose for this must + be to get (8bit clean) files via telnet, and it really isn't that easy to + get files this way. Still having problems with \n being converted to \r\n. + + Angus Mackay (Nov 12, 1998) + - Corrected another bug in the long parameter name parser. + - Modified getpass.c (NOTE: see the special licensing in the top of that + source file). + + Daniel Stenberg (Nov 12, 1998) + - We may have removed the silly warnings from url.c when compiled under IRIX. + Thanks again to Bjorn Reese <breese@imada.ou.dk> and Martin Staael + <martin@netgroup.dk>. + - Wrote formfind.pl which is a new perl script intended to help you find out + how a FORM submission should be done. This needs a little more work to get + really good. + + Daniel Stenberg (Nov 11, 1998) + - Made the HTTP header-checker accept white spaces before the HTTP/1.? line. + Appearantly some proxies/sites add such at times (my test proxy did when I + downloaded a gopher page with it)! + - Moved the former -h to -M and made -h show the short help text instead. I + had to enable a forced help text option. Now an even shorter help text will + be presented when an unknown option and similar, is used. + - stdcheaders.h didn't work with IRIX 6.4 native cc compiler. I hope my + changes don't make other versions go nuts instead. + + Daniel Stenberg (Nov 10, 1998) + - Added a weird check in the configure script to check for the silly AIX + warnings about my #define strcasecmp() stuff. I do that define to prevent + me and other contributors to accidentaly use that function name instead + of strequal()... + - I bugfixed Angus's getpass.c very little. + - Fixed the verbose flag names to getopt-style, i.e 'curl --loc' will be + sufficient instead of --location as "loc" is a unique prefix. Also, anything + after a '--' is treated as an URL. So if you do have a host with a weeeird + name you can do 'curl -- -host.com'. + - Another getopt-adjust; curl now accepts flags after the URL on the command + line. 'curl www.foo.com -O' is perfectly valid. + - Corrected the .curlrc parser so that strtok() is no longer used and I + believe it works better. Even URLs can be specified in it now. + + Angus Mackay (Nov 9, 1998) + - Replaced getpass.c with a newly written one, not under GPL license + - Changed OS to a #define in config.h instead of compiler flag + - Makefile now uses -DHAVE_CONFIG_H + + Daniel Stenberg (Nov 9, 1998) + - Ok, I expanded the tgz-target to update the version string on each occation + I build a release archive! + - I reacted on Angus Mackay's initiative and remade the parameter parser to + be more getopt compliant. Curl now supports "merged" flags as in + curl -lsv ftp.site.com + Do note that I had to move three short-names of the options. Parameters + that needs an additional string such as -x must be stand-alone or the + last in a merged sequence: + curl -lsx my-proxy ftp.site.com + is ok, but using the flags in a different order like '-lxs' would cause + unexpected results (as the 's' option would be skipped). + - I've changed the headers in all files that are subject to the MozPL + license, as they are supposed to look like when conforming. + - Made the configure script make the config.h. The former config.h is now + setup.h. + - The RESOURCES and TODO files have been added to the archive. + + Angus Mackay <amackay@gus.ml.org> (Nov 5, 1998) + - Fixed getpass.c and various configure stuff + + Daniel Stenberg (Nov 3, 1998) + - Use -H/--header for custom HTTP-headers. Lets you pass on your own + specified headers to the remote server. I wouldn't recommend trying to use + a header with a defined usage according to standards. Use this flag once + for every custom header you want to add. + - Use -B/--ftp-ascii to force ftp to use ASCII mode when transfering files. + - Corrected the 'getlinks.pl' script, I accidentally left my silly proxy + usage in there! Since the introduction of the .curlrc file, it is easier to + write scripts that use curl since proxies and stuff should be in the + .curlrc file anyway. + - Introducing the new -F flag for HTTP POST. It supports multipart/form-data + which means it is gonna be possible to upload files etc through HTTP POST. + Shiraz Kanga <skanga@bigfoot.com> asked for the feature and my brother, + Bj�rn Stenberg <Bjorn.Stenberg@sth.frontec.se> helped me design the user + interface for this beast. This feature requires quite some docs, + since it has turned out not only quite capable, but also complicated! :-) + - A note here, since I've received mail about it. SSLeay versions prior to + 0.8 will *not* work with curl! + - Wil Langford <wil@langford.net> reported a bug that occurred since curl + did not properly use CRLF when issuing ftp commands. I fixed it. + - Rearranged the order config files are read. .curlrc is now *always* read + first and before the command line flags. -K config files then act as + additional config items. + - Use -q AS THE FIRST OPTION specified to prevent .curlrc from being read. + - You can now disable a proxy by using -x "". Useful if the .curlrc file + specifies a proxy and you wanna fetch something without going through + that. + - I'm thinking of dropping the -p support. Its really not useful since ports + could (and should?) be specified as :<port> appended on the host name + instead, both in URLs and to proxy host names. + - Martin Staael <martin@netgroup.dk> reports curl -L bugs under Windows NT + (test with URL http://come.to/scsde). This bug is not present in this + version anymore. + - Added support for the weird FTP URL type= thing. You can download a file + using ASCII transfer by appending ";type=A" to the right of it. Other + available types are type=D for dir-list (NLST) and type=I for binary + transfer. I can't say I've ever seen anyone use this kind of URL though! + :-) + - Troy Engel <tengel@palladium.net> pointed out a bug in my getenv("HOME") + usage for win32 systems. I introduce getenv.c to better cope with + this. Mr Engel helps me with the details around that... + - A little note to myself and others, I should make the win32-binary built + with SSL support... + - r-y-a-n/n-e-l-s-o-n <ryan@inch.com> sent me comments about building curl + with SSL under FreeBSD. See the Makefile for details. Using the configure + script, it should work better and automatically now... + - Cleaned up in the port number mess in the source. No longer stores and uses + proxy port number separate from normal port number. + - 'configure' script working. Confirmed compiles on: + Host SSL Compiler + SunOS 5.5 no gcc + SunOS 5.5.1 yes gcc + SunOS 5.6 no cc (with gcc, it has the "gcc include files" problem) + SunOS 4.1.3 no gcc (without ANSI C headers) + SunOS 4.1.2 no gcc (native compiler failed) + Linux 2.0.18 no gcc + Linux 2.0.32 yes gcc + Linux 2.0.35 no gcc (with glibc) + IRIX 6.2 no gcc (cc compiles generate a few warnings) + IRIX 6.4 no cc (generated warnings though) + Win32 no Borland + OSF4.0 no ? + + - Ooops. The 5beta (and 4.10) under win32 failed if the HOME variable wasn't + set. + - When using a proxy, curl now guesses and uses the protocol part in cases + like: + curl -x proxy:80 www.site.com + Proxies normally go nuts unless http:// is prepended to the host name, so + if curl is used like this, it guesses protocol and appends the protocol + string before passing it to the proxy. It already did this when used + without proxy. + - Better port usage with SSL through proxy now. If you specified a different + https-port when accessing through a proxy, it didn't use that number + correctly. I also rewrote the code that parses the stuff read from the + proxy when you wanna connect through it with SSL. + - Bjorn Reese <breese@imada.ou.dk> helped me work around one of the compiler + warnings on IRIX native cc compiles. + +Version 4.10 (Oct 26, 1998) + Daniel Stenberg + - John A. Bristor <jbristor@bellsouth.net> suggested a config file switch, + and since I've been having that idea kind of in the background for a long + time I rewrote the parameter parsing function a little and now I introduce + the -K/--config flag. I also made curl *always* (unless -K is used) try to + load the .curlrc file for command line parameters. The syntax for the + config file is the standard command line argument style. Details in 'curl + -h' or the README. + - I removed the -k option. Keep-alive isn't really anything anyone would + want to enable with curl anyway. + - Martin Staael <Martin@Staael.dk> helped me add the 'irix' target. Now + "make irix" should build curl successfully on non-gcc SGI machines. + - Single switches now toggle behaviours. I.e if you use -v -v the second + will switch off the verbose mode the first one enabled. This is so that + you can disable a default setting a .curlrc file enables etc. + +Version 4.9 (Oct 7, 1998) + Daniel Stenberg + - Martin Staael <Martin@Staael.dk> suggested curl would support cookies. + I added -b/--cookie to enable free-text cookie data to be passed. There's + also a little blurb about general cookie stuff in the README/help text. + - dmh <dmh@jet.es> suggested HTTP resume capabilities. Although you could + manually get curl to resume HTTP documents, I made the -c resume flag work + for HTTP too (unless -r is used too, which would be very odd anyway). + - Added checklinks.pl to the archive. It is a still experimental perl script + that checks all links of a web page by using curl. + - Rearranged the archive hierarchy a little. Build the executable in the + src/ dir from now on! + - Version 4.9 and hereafter, is no longer released under the GPL license. + I have now updated the LEGAL file etc and now this is released using the + Mozilla Public License to avoid the plague known as "the GPL virus". You + must make the source available if you decide to change and/or redistribute + curl, but if you decide to use curl within something else you do not need + to offer the world the source to that too. + - Curl did not like HTTP servers that sent no headers at all on a GET + request. It is a violation of RFC2068 but appearantly some servers do + that anyway. Thanks to Gordon Beaton <gordon@erix.ericsson.se> for the + report! + - -L/--location was added after a suggestion from Martin Staael + <Martin@Staael.dk>. This makes curl ATTEMPT to follow the Location: + redirect if one is present in the HTTP headers. If -i or -I is used with + this flag, you will see headers from all sites the Location: points to. Do + note that the first server can point to a second that points to a third + etc. It seems the Location: parameter (said to be an AbsoluteURI in + RFC2068) isn't always absolute.. :-/ Anyway, I've made curl ATTEMPT to do + the best it can to deal with the reality. + - Added getlinks.pl to the archive. getlinks.pl selectively downloads + files that a web page links to. + +Version 4.8.4 + Daniel Stenberg + - As Julian Romero Nieto <jromero@anaya.es> reported, curl reported wrong + version number. + - As Teemu Yli-Elsila <tylielsi@mail.student.oulu.fi> pointed out, + the win32 version of 4.8 (and probably all other versions for win32) + didn't work with binary files since I'm too used to the UNIX style + fopen() where binary and text don't differ... + - Ralph Beckmann <rabe@uni-paderborn.de> brought me some changes that lets + curl compile error and warning free with -Wall -pedantic with + g++. I also took the opportunity to clean off some unused variables + and similar. + - Ralph Beckmann <rabe@uni-paderborn.de> made me aware of a really odd bug + now corrected. When curl read a set of headers from a HTTP server, divided + into more than one read and the first read showed a full line *exactly* + (i.e ending with a newline), curl did not behave well. + +Version 4.8.3 + Daniel Stenberg + - I was too quick to release 4.8.2 with too little testing. One of the + changes is now reverted slightly to the 4.8.1 way since 4.8.2 couldn't + upload files. I still think both problems corrected in 4.8.2 remain + corrected. Reported by Julian Romero Nieto <jromero@anaya.es>. + +Version 4.8.2 + Daniel Stenberg + - Bernhard Iselborn <biselbor@rhrk.uni-kl.de> reported two FTP protocol + errors curl did. They're now corrected. Both appeared when getting files + from a MS FTP server! :-) + +Version 4.8.1 + Daniel Stenberg + - Added a last update of the progress meter when the transfer is done. The + final output on the screen didn't have to be the final size transfered + which made it sometimes look odd. + - Thanks to David Long <long@research.bell-labs.com> I got rid of a silly + bug that happened if a HTTP-page had nothing but header. Appearantly + Solaris deals with negative sizes in fwrite() calls a lot better than + Linux does... =B-] + +Version 4.8 + Daniel Stenberg + - Continue FTP file transfer. -c is the switch. Note that you need to + specify a file name if you wanna resume a download (you can't resume a + download sent to stdout). Resuming upload may be limited by the server + since curl is then using the non-RFC959 command SIZE to get the size of + the target file before upload begins (to figure out which offset to + use). Use -C to specify the offset yourself! -C is handy if you're doing + the output to something else but a plain file or when you just want to get + the end of a file. + - recursiveftpget.pl now features a maximum recursive level argument. + +Version 4.7 + Daniel Stenberg + - Added support to abort a download if the speed is below a certain amount + (speed-limit) bytes per second for a certain (speed-time) time. + - Wrote a perl script 'recursiveftpget.pl' to recursively use curl to get a + whole ftp directory tree. It is meant as an example of how curl can be + used. I agree it isn't the wisest thing to do to make a separate new + connection for each file and directory for this. + +Version 4.6 + Daniel Stenberg + - Added a first attempt to optionally parse the .netrc file for login user + and password. If used with http, it enables user authentication. -n is + the new switch. + - Removed the extra newlines on the default user-agent string. + - Corrected the missing ftp upload error messages when it failed without the + verbose flag set. Gary W. Swearingen found it. + - Now using alarm() to enable second-precision timeout even on the name + resolving/connecting phase. The timeout is although reset after that first + sequence. (This should be corrected.) Gary W. Swearingen <swear@aa.net> + reported. + - Now spells "Unknown" properly, as in "Unknown option 'z'"... :-) + - Added bug report email address in the README. + - Added a "current speed" field to the progress meter. It shows the average + speed the last 5 seconds. The other speed field shows the average speed of + the entire transfer so far. + +Version 4.5.1 + Linas Vepstas + - SSL through proxy fix + - Added -A to allow User-Agent: changes + + Daniel Stenberg + - Made the -A work when SSL-through-proxy. + +Version 4.5 + Linas Vepstas <linas@linas.org> + - More SSL corrections + - I've added a port to AIX. + - running SSL through a proxy causes a chunk of code to be executred twice. + one of those blocks needs to be deleted. + + Daniel Stenberg + - Made -i and -I work again + +Version 4.4 + Linas Vepstas <linas@us.ibm.com> + - -x can now also specify proxyport when used as in 'proxyhost:proxyport' + - SSL fixes + +Version 4.3 + Daniel Stenberg + - Adjusted to compile under win32 (VisualC++ 5). The -P switch does not + support network interface names in win32. I couldn't figure out how! + +Version 4.2 + Linas Vepstas / Sampo Kellomaki + - Added SSL / SSLeay support (https://) + - Added the -T usage for HTTP POST. + + Daniel Stenberg + - Bugfixed the SSL implementation. + - Made -P a lot better to use other IP addresses. It now accepts a following + parameter that can be either + interface - i.e "eth0" to specify which interface's IP address you + want to use + IP address - i.e "192.168.10.1" to specify exact IP number + host name - i.e "my.host.domain" to specify machine + "-" - (any single-letter string) to make it pick the machine's + default + - The Makefile is now ready to compile for solaris, sunos4 and linux right + out of the box. + - Better generated version string seen with 'curl -V' + +Version 4.1 + Daniel Stenberg + - The IP number returned by the ftp server as a reply to PASV does no longer + have to DNS resolve. In fact, no IP-number-only addresses have to anymore. + - Binds better to available port when -P is used. + - Now LISTs ./ instead of / when used as in ftp://ftp.funet.fi/. The reason + for this is that exactly that site, ftp.funet.fi, does not allow LIST / + while LIST ./ is fine. Any objections? + +Version 4 (1998-03-20) + Daniel Stenberg + - I took another huge step and changed both version number and project name! + The reason for the new name is that there are just one too many programs + named urlget already and this program already can a lot more than merely + getting URLs, and the reason for the version number is that I did add the + pretty big change in -P and since I changed name I wanted to start with + something fresh! + - The --style flags are working better now. + - Listing directories with FTP often reported that the file transfer was + incomplete. Wrong assumptions were too common for directories, why no + size will be attempted to get compared on them from now on. + - Implemented the -P flag that let's the ftp control issue a PORT command + instead of the standard PASV. + - -a for appending FTP uploads works. + +*************************************************************************** + +Version 3.12 + Daniel Stenberg + - End-of-header tracking still lacked support for \r\n or just \n at the + end of the last header line. + Sergio Barresi <sbarresi@imispa.it> + - Added PROXY authentication. + Rafael Sagula + - Fixed some little bugs. + +Version 3.11 + Daniel Stenberg + - The header parsing was still not correct since the 3.2 modification... + +Version 3.10 + Daniel Stenberg + - 3.7 and 3.9 were simultaneously developed and merged into this version. + - FTP upload did not work correctly since 3.2. + +Version 3.9 + Rafael Sagula + - Added the "-e <url> / --referer <url>" option where we can specify + the referer page. Obviously, this is necessary only to fool the + server, but... + +Version 3.7 + Daniel Stenberg + - Now checks the last error code sent from the ftp server after a file has + been received or uploaded. Wasn't done previously. + - When 'urlget <host>' is used without a 'protocol://' first in the host part, + it now checks for host names starting with ftp or gopher and if it does, + it uses that protocol by default instead of http. + +Version 3.6 + Daniel Stenberg + - Silly mistake made the POST bug. This has now also been tested to work with + proxy. + +Version 3.5 + Daniel Stenberg + - Highly inspired by Rafael Sagula's changes to the 3.1 that added an almost + functional POST, I applied his changes into this version and made them work. + (It seems POST requires the Content-Type and Content-Length headers.) It is + now usable with the -d switch. + +Version 3.3 - 3.4 + Passed to avoid confusions + +Version 3.2 + Daniel Stenberg + - Major rewrite of two crucial parts of this code: upload and download. + They are both now using a select() switch, that allows much better + progress meter and time control. ... [truncated]
config.cache+86 −0 added@@ -0,0 +1,86 @@ +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs. It is not useful on other systems. +# If it contains results you don't want to keep, you may remove or edit it. +# +# By default, configure uses ./config.cache as the cache file, +# creating it if it does not exist already. You can give configure +# the --cache-file=FILE option to use a different cache file; that is +# what configure does when it calls configure scripts in +# subdirectories, so they share the cache. +# Giving --cache-file=/dev/null disables caching, for debugging configure. +# config.status only pays attention to the cache file if you give it the +# --recheck option to rerun configure. +# +ac_cv_c_const=${ac_cv_c_const='yes'} +ac_cv_func_closesocket=${ac_cv_func_closesocket='no'} +ac_cv_func_connect=${ac_cv_func_connect='no'} +ac_cv_func_dlopen=${ac_cv_func_dlopen='no'} +ac_cv_func_gethostbyaddr=${ac_cv_func_gethostbyaddr='yes'} +ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname='no'} +ac_cv_func_gethostname=${ac_cv_func_gethostname='yes'} +ac_cv_func_getpass=${ac_cv_func_getpass='yes'} +ac_cv_func_getservbyname=${ac_cv_func_getservbyname='yes'} +ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday='yes'} +ac_cv_func_inet_addr=${ac_cv_func_inet_addr='yes'} +ac_cv_func_inet_ntoa=${ac_cv_func_inet_ntoa='yes'} +ac_cv_func_perror=${ac_cv_func_perror='yes'} +ac_cv_func_select=${ac_cv_func_select='yes'} +ac_cv_func_socket=${ac_cv_func_socket='yes'} +ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp='yes'} +ac_cv_func_strdup=${ac_cv_func_strdup='yes'} +ac_cv_func_strftime=${ac_cv_func_strftime='yes'} +ac_cv_func_strstr=${ac_cv_func_strstr='yes'} +ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'} +ac_cv_func_tcsetattr=${ac_cv_func_tcsetattr='yes'} +ac_cv_func_uname=${ac_cv_func_uname='yes'} +ac_cv_func_vprintf=${ac_cv_func_vprintf='yes'} +ac_cv_header_alloca_h=${ac_cv_header_alloca_h='yes'} +ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h='yes'} +ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h='yes'} +ac_cv_header_fcntl_h=${ac_cv_header_fcntl_h='yes'} +ac_cv_header_getopt_h=${ac_cv_header_getopt_h='no'} +ac_cv_header_io_h=${ac_cv_header_io_h='no'} +ac_cv_header_net_if_h=${ac_cv_header_net_if_h='yes'} +ac_cv_header_netdb_h=${ac_cv_header_netdb_h='yes'} +ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h='yes'} +ac_cv_header_openssl_crypto_h=${ac_cv_header_openssl_crypto_h='yes'} +ac_cv_header_openssl_err_h=${ac_cv_header_openssl_err_h='yes'} +ac_cv_header_openssl_pem_h=${ac_cv_header_openssl_pem_h='yes'} +ac_cv_header_openssl_rsa_h=${ac_cv_header_openssl_rsa_h='yes'} +ac_cv_header_openssl_ssl_h=${ac_cv_header_openssl_ssl_h='yes'} +ac_cv_header_openssl_x509_h=${ac_cv_header_openssl_x509_h='yes'} +ac_cv_header_sgtty_h=${ac_cv_header_sgtty_h='yes'} +ac_cv_header_stdc=${ac_cv_header_stdc='yes'} +ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h='yes'} +ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h='yes'} +ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h='yes'} +ac_cv_header_sys_sockio_h=${ac_cv_header_sys_sockio_h='yes'} +ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h='yes'} +ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h='yes'} +ac_cv_header_termio_h=${ac_cv_header_termio_h='yes'} +ac_cv_header_termios_h=${ac_cv_header_termios_h='yes'} +ac_cv_header_time=${ac_cv_header_time='yes'} +ac_cv_header_time_h=${ac_cv_header_time_h='yes'} +ac_cv_header_unistd_h=${ac_cv_header_unistd_h='yes'} +ac_cv_header_winsock_h=${ac_cv_header_winsock_h='no'} +ac_cv_lib_crypto_CRYPTO_lock=${ac_cv_lib_crypto_CRYPTO_lock='yes'} +ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen='yes'} +ac_cv_lib_nsl_gethostbyname=${ac_cv_lib_nsl_gethostbyname='yes'} +ac_cv_lib_socket_connect=${ac_cv_lib_socket_connect='yes'} +ac_cv_lib_ssl_SSL_connect=${ac_cv_lib_ssl_SSL_connect='yes'} +ac_cv_path_NROFF=${ac_cv_path_NROFF='/bin/nroff'} +ac_cv_path_PERL=${ac_cv_path_PERL='/usr/local/bin/perl'} +ac_cv_prog_CC=${ac_cv_prog_CC='gcc'} +ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'} +ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB='ranlib'} +ac_cv_prog_YACC=${ac_cv_prog_YACC='bison -y'} +ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross='no'} +ac_cv_prog_cc_g=${ac_cv_prog_cc_g='yes'} +ac_cv_prog_cc_works=${ac_cv_prog_cc_works='yes'} +ac_cv_prog_gcc=${ac_cv_prog_gcc='yes'} +ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'} +ac_cv_sizeof_long_double=${ac_cv_sizeof_long_double='16'} +ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'} +ac_cv_type_signal=${ac_cv_type_signal='void'} +ac_cv_type_size_t=${ac_cv_type_size_t='yes'}
config.guess+997 −0 added@@ -0,0 +1,997 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner <bothner@cygnus.com>. +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Please send patches to the Autoconf mailing list <autoconf@gnu.org>. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <<EOF >$dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*|MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + macppc:NetBSD:*:*) + echo powerpc-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/6?? | 9000/7?? | 9000/80[024] | 9000/8?[136790] | 9000/892 ) + sed 's/^ //' << EOF >$dummy.c + #include <stdlib.h> + #include <unistd.h> + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (${CC-cc} $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + rm -f $dummy.c $dummy + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE*:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + *9??*:MPE*:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*T3E:*:*:*) + echo t3e-cray-unicosmk${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | i?86:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + if test -x /usr/bin/objformat; then + if test "elf" = "`/usr/bin/objformat`"; then + echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'` + exit 0 + fi + fi + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) +# # uname on the ARM produces all sorts of strangeness, and we need to +# # filter it out. +# case "$UNAME_MACHINE" in +# armv*) UNAME_MACHINE=$UNAME_MACHINE ;; +# arm* | sa110*) UNAME_MACHINE="arm" ;; +# esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32arm) echo "${UNAME_MACHINE}-unknown-linux-gnu" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <<EOF >$dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + ./$dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers $dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >$dummy.c <<EOF +#ifdef __cplusplus + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c <<EOF +#include <features.h> +#ifdef __cplusplus + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i?86:UnixWare:*:*) + if /bin/uname -X 2>/dev/null >/dev/null ; then + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + fi + echo ${UNAME_MACHINE}-unixware-${UNAME_RELEASE}-${UNAME_VERSION} + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R4000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1
config.guess-991124+900 −0 added@@ -0,0 +1,900 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. +# +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner <bothner@cygnus.com>. +# The master version of this file is at the FSF in /home/gd/gnu/lib. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit system type (host/target name). +# +# Only a few systems have been added to this list; please add others +# (but try to keep the structure clean). +# + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 8/24/94.) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <<EOF >dummy.s + .globl main + .ent main +main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]` + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-cbm-sysv4 + exit 0;; + amiga:NetBSD:*:*) + echo m68k-cbm-netbsd${UNAME_RELEASE} + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + arm32:NetBSD:*:*) + echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + SR2?01:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:NetBSD:*:*) + echo m68k-atari-netbsd${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:NetBSD:*:*) + echo m68k-sun-netbsd${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:NetBSD:*:*) + echo m68k-apple-netbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >dummy.c + int main (argc, argv) int argc; char **argv; { + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + ${CC-cc} dummy.c -o dummy \ + && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ + -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i?86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >dummy.c + #include <sys/systemcfg.h> + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:4) + if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=4.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[3478]??:HP-UX:*:*) + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; + 9000/8?? ) HP_ARCH=hppa1.0 ;; + esac + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >dummy.c + #include <unistd.h> + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i?86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F300:UNIX_System_V:*:*) + FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + F301:UNIX_System_V:*:*) + echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` + exit 0 ;; + hp3[0-9][05]:NetBSD:*:*) + echo m68k-hp-netbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i?86:BSD/386:*:* | *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:NetBSD:*:*) + echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin32 + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin32 + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:Linux:*:*) + # uname on the ARM produces all sorts of strangeness, and we need to + # filter it out. + case "$UNAME_MACHINE" in + arm* | sa110*) UNAME_MACHINE="arm" ;; + esac + + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. + ld_help_string=`ld --help 2>&1` + ld_supported_emulations=`echo $ld_help_string \ + | sed -ne '/supported emulations:/!d + s/[ ][ ]*/ /g + s/.*supported emulations: *// + s/ .*// + p'` + case "$ld_supported_emulations" in + i?86linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" ; exit 0 ;; + i?86coff) echo "${UNAME_MACHINE}-pc-linux-gnucoff" ; exit 0 ;; + sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + armlinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + m68klinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;; + elf32ppc) echo "powerpc-unknown-linux-gnu" ; exit 0 ;; + esac + + if test "${UNAME_MACHINE}" = "alpha" ; then + sed 's/^ //' <<EOF >dummy.s + .globl main + .ent main + main: + .frame \$30,0,\$26,0 + .prologue 0 + .long 0x47e03d80 # implver $0 + lda \$2,259 + .long 0x47e20c21 # amask $2,$1 + srl \$1,8,\$2 + sll \$2,2,\$2 + sll \$0,3,\$0 + addl \$1,\$0,\$0 + addl \$2,\$0,\$0 + ret \$31,(\$26),1 + .end main +EOF + LIBC="" + ${CC-cc} dummy.s -o dummy 2>/dev/null + if test "$?" = 0 ; then + ./dummy + case "$?" in + 7) + UNAME_MACHINE="alpha" + ;; + 15) + UNAME_MACHINE="alphaev5" + ;; + 14) + UNAME_MACHINE="alphaev56" + ;; + 10) + UNAME_MACHINE="alphapca56" + ;; + 16) + UNAME_MACHINE="alphaev6" + ;; + esac + + objdump --private-headers dummy | \ + grep ld.so.1 > /dev/null + if test "$?" = 0 ; then + LIBC="libc1" + fi + fi + rm -f dummy.s dummy + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0 + elif test "${UNAME_MACHINE}" = "mips" ; then + cat >dummy.c <<EOF +main(argc, argv) + int argc; + char *argv[]; +{ +#ifdef __MIPSEB__ + printf ("%s-unknown-linux-gnu\n", argv[1]); +#endif +#ifdef __MIPSEL__ + printf ("%sel-unknown-linux-gnu\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + else + # Either a pre-BFD a.out linker (linux-gnuoldld) + # or one that does not give us useful --help. + # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout. + # If ld does not provide *any* "supported emulations:" + # that means it is gnuoldld. + echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:" + test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0 + + case "${UNAME_MACHINE}" in + i?86) + VENDOR=pc; + ;; + *) + VENDOR=unknown; + ;; + esac + # Determine whether the default compiler is a.out or elf + cat >dummy.c <<EOF +#include <features.h> +main(argc, argv) + int argc; + char *argv[]; +{ +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-${VENDOR}-linux-gnu\n", argv[1]); +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 + rm -f dummy.c dummy + fi ;; +# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions +# are messed up and put the nodename in both sysname and nodename. + i?86:DYNIX/ptx:4*:*) + echo i386-sequent-sysv4 + exit 0 ;; + i?86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + fi + exit 0 ;; + i?86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` + echo ${UNAME_MACHINE}-pc-isc$UNAME_REL + elif /bin/uname -X 2>/dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i?86:LynxOS:2.*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says <Richard.M.Bartel@ccMail.Census.GOV> + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes <hewes@openmarket.com>. + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:*:6*) + echo mips-sony-newsos6 + exit 0 ;; + R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >dummy.c <<EOF +#ifdef _SEQUENT_ +# include <sys/types.h> +# include <sys/utsname.h> +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include <sys/param.h> + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined(__APPLE__) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*Kernel Release \([0-9]*\).*/\1/p') 2>/dev/null`; + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +#if !defined (ultrix) + printf ("vax-dec-bsd\n"); exit (0); +#else + printf ("vax-dec-ultrix\n"); exit (0); +#endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 +rm -f dummy.c dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +#echo '(Unable to guess system type)' 1>&2 + +exit 1
config.h+220 −0 added@@ -0,0 +1,220 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* #undef _ALL_SOURCE */ +#endif + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define as the return type of signal handlers (int or void). */ +#define RETSIGTYPE void + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#define TIME_WITH_SYS_TIME 1 + +/* Define cpu-machine-OS */ +#define OS "sparc-sun-solaris2.6" + +/* The number of bytes in a long double. */ +#define SIZEOF_LONG_DOUBLE 16 + +/* The number of bytes in a long long. */ +#define SIZEOF_LONG_LONG 8 + +/* Define if you have the closesocket function. */ +/* #undef HAVE_CLOSESOCKET */ + +/* Define if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define if you have the gethostname function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define if you have the getpass function. */ +#define HAVE_GETPASS 1 + +/* Define if you have the getservbyname function. */ +#define HAVE_GETSERVBYNAME 1 + +/* Define if you have the gettimeofday function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the inet_addr function. */ +#define HAVE_INET_ADDR 1 + +/* Define if you have the inet_ntoa function. */ +#define HAVE_INET_NTOA 1 + +/* Define if you have the perror function. */ +#define HAVE_PERROR 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define if you have the strcasecmp function. */ +#define HAVE_STRCASECMP 1 + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the tcgetattr function. */ +#define HAVE_TCGETATTR 1 + +/* Define if you have the tcsetattr function. */ +#define HAVE_TCSETATTR 1 + +/* Define if you have the uname function. */ +#define HAVE_UNAME 1 + +/* Define if you have the <alloca.h> header file. */ +#define HAVE_ALLOCA_H 1 + +/* Define if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define if you have the <crypto.h> header file. */ +/* #undef HAVE_CRYPTO_H */ + +/* Define if you have the <dlfcn.h> header file. */ +#define HAVE_DLFCN_H 1 + +/* Define if you have the <err.h> header file. */ +/* #undef HAVE_ERR_H */ + +/* Define if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the <getopt.h> header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define if you have the <io.h> header file. */ +/* #undef HAVE_IO_H */ + +/* Define if you have the <net/if.h> header file. */ +#define HAVE_NET_IF_H 1 + +/* Define if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define if you have the <openssl/crypto.h> header file. */ +#define HAVE_OPENSSL_CRYPTO_H 1 + +/* Define if you have the <openssl/err.h> header file. */ +#define HAVE_OPENSSL_ERR_H 1 + +/* Define if you have the <openssl/pem.h> header file. */ +#define HAVE_OPENSSL_PEM_H 1 + +/* Define if you have the <openssl/rsa.h> header file. */ +#define HAVE_OPENSSL_RSA_H 1 + +/* Define if you have the <openssl/ssl.h> header file. */ +#define HAVE_OPENSSL_SSL_H 1 + +/* Define if you have the <openssl/x509.h> header file. */ +#define HAVE_OPENSSL_X509_H 1 + +/* Define if you have the <pem.h> header file. */ +/* #undef HAVE_PEM_H */ + +/* Define if you have the <rsa.h> header file. */ +/* #undef HAVE_RSA_H */ + +/* Define if you have the <sgtty.h> header file. */ +#define HAVE_SGTTY_H 1 + +/* Define if you have the <ssl.h> header file. */ +/* #undef HAVE_SSL_H */ + +/* Define if you have the <sys/param.h> header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the <sys/socket.h> header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define if you have the <sys/sockio.h> header file. */ +#define HAVE_SYS_SOCKIO_H 1 + +/* Define if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the <termio.h> header file. */ +#define HAVE_TERMIO_H 1 + +/* Define if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Define if you have the <winsock.h> header file. */ +/* #undef HAVE_WINSOCK_H */ + +/* Define if you have the <x509.h> header file. */ +/* #undef HAVE_X509_H */ + +/* Define if you have the crypto library (-lcrypto). */ +#define HAVE_LIBCRYPTO 1 + +/* Define if you have the dl library (-ldl). */ +#define HAVE_LIBDL 1 + +/* Define if you have the nsl library (-lnsl). */ +#define HAVE_LIBNSL 1 + +/* Define if you have the resolve library (-lresolve). */ +/* #undef HAVE_LIBRESOLVE */ + +/* Define if you have the socket library (-lsocket). */ +#define HAVE_LIBSOCKET 1 + +/* Define if you have the ssl library (-lssl). */ +#define HAVE_LIBSSL 1 + +/* Define if you have the ucb library (-lucb). */ +/* #undef HAVE_LIBUCB */ + +/* Name of package */ +#define PACKAGE "curl" + +/* Version number of package */ +#define VERSION "6.3.1" +
config.h.in+219 −0 added@@ -0,0 +1,219 @@ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +#undef _ALL_SOURCE +#endif + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define if you don't have vprintf but do have _doprnt. */ +#undef HAVE_DOPRNT + +/* Define if you have the vprintf function. */ +#undef HAVE_VPRINTF + +/* Define as the return type of signal handlers (int or void). */ +#undef RETSIGTYPE + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +#undef size_t + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +#undef TIME_WITH_SYS_TIME + +/* Define cpu-machine-OS */ +#undef OS + +/* The number of bytes in a long double. */ +#undef SIZEOF_LONG_DOUBLE + +/* The number of bytes in a long long. */ +#undef SIZEOF_LONG_LONG + +/* Define if you have the closesocket function. */ +#undef HAVE_CLOSESOCKET + +/* Define if you have the gethostbyaddr function. */ +#undef HAVE_GETHOSTBYADDR + +/* Define if you have the gethostname function. */ +#undef HAVE_GETHOSTNAME + +/* Define if you have the getpass function. */ +#undef HAVE_GETPASS + +/* Define if you have the getservbyname function. */ +#undef HAVE_GETSERVBYNAME + +/* Define if you have the gettimeofday function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define if you have the inet_addr function. */ +#undef HAVE_INET_ADDR + +/* Define if you have the inet_ntoa function. */ +#undef HAVE_INET_NTOA + +/* Define if you have the perror function. */ +#undef HAVE_PERROR + +/* Define if you have the select function. */ +#undef HAVE_SELECT + +/* Define if you have the socket function. */ +#undef HAVE_SOCKET + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the strftime function. */ +#undef HAVE_STRFTIME + +/* Define if you have the strstr function. */ +#undef HAVE_STRSTR + +/* Define if you have the tcgetattr function. */ +#undef HAVE_TCGETATTR + +/* Define if you have the tcsetattr function. */ +#undef HAVE_TCSETATTR + +/* Define if you have the uname function. */ +#undef HAVE_UNAME + +/* Define if you have the <alloca.h> header file. */ +#undef HAVE_ALLOCA_H + +/* Define if you have the <arpa/inet.h> header file. */ +#undef HAVE_ARPA_INET_H + +/* Define if you have the <crypto.h> header file. */ +#undef HAVE_CRYPTO_H + +/* Define if you have the <dlfcn.h> header file. */ +#undef HAVE_DLFCN_H + +/* Define if you have the <err.h> header file. */ +#undef HAVE_ERR_H + +/* Define if you have the <fcntl.h> header file. */ +#undef HAVE_FCNTL_H + +/* Define if you have the <getopt.h> header file. */ +#undef HAVE_GETOPT_H + +/* Define if you have the <io.h> header file. */ +#undef HAVE_IO_H + +/* Define if you have the <net/if.h> header file. */ +#undef HAVE_NET_IF_H + +/* Define if you have the <netdb.h> header file. */ +#undef HAVE_NETDB_H + +/* Define if you have the <netinet/in.h> header file. */ +#undef HAVE_NETINET_IN_H + +/* Define if you have the <openssl/crypto.h> header file. */ +#undef HAVE_OPENSSL_CRYPTO_H + +/* Define if you have the <openssl/err.h> header file. */ +#undef HAVE_OPENSSL_ERR_H + +/* Define if you have the <openssl/pem.h> header file. */ +#undef HAVE_OPENSSL_PEM_H + +/* Define if you have the <openssl/rsa.h> header file. */ +#undef HAVE_OPENSSL_RSA_H + +/* Define if you have the <openssl/ssl.h> header file. */ +#undef HAVE_OPENSSL_SSL_H + +/* Define if you have the <openssl/x509.h> header file. */ +#undef HAVE_OPENSSL_X509_H + +/* Define if you have the <pem.h> header file. */ +#undef HAVE_PEM_H + +/* Define if you have the <rsa.h> header file. */ +#undef HAVE_RSA_H + +/* Define if you have the <sgtty.h> header file. */ +#undef HAVE_SGTTY_H + +/* Define if you have the <ssl.h> header file. */ +#undef HAVE_SSL_H + +/* Define if you have the <sys/param.h> header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the <sys/select.h> header file. */ +#undef HAVE_SYS_SELECT_H + +/* Define if you have the <sys/socket.h> header file. */ +#undef HAVE_SYS_SOCKET_H + +/* Define if you have the <sys/sockio.h> header file. */ +#undef HAVE_SYS_SOCKIO_H + +/* Define if you have the <sys/stat.h> header file. */ +#undef HAVE_SYS_STAT_H + +/* Define if you have the <sys/types.h> header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define if you have the <termio.h> header file. */ +#undef HAVE_TERMIO_H + +/* Define if you have the <termios.h> header file. */ +#undef HAVE_TERMIOS_H + +/* Define if you have the <time.h> header file. */ +#undef HAVE_TIME_H + +/* Define if you have the <unistd.h> header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the <winsock.h> header file. */ +#undef HAVE_WINSOCK_H + +/* Define if you have the <x509.h> header file. */ +#undef HAVE_X509_H + +/* Define if you have the crypto library (-lcrypto). */ +#undef HAVE_LIBCRYPTO + +/* Define if you have the dl library (-ldl). */ +#undef HAVE_LIBDL + +/* Define if you have the nsl library (-lnsl). */ +#undef HAVE_LIBNSL + +/* Define if you have the resolve library (-lresolve). */ +#undef HAVE_LIBRESOLVE + +/* Define if you have the socket library (-lsocket). */ +#undef HAVE_LIBSOCKET + +/* Define if you have the ssl library (-lssl). */ +#undef HAVE_LIBSSL + +/* Define if you have the ucb library (-lucb). */ +#undef HAVE_LIBUCB + +/* Name of package */ +#undef PACKAGE + +/* Version number of package */ +#undef VERSION +
config.log+90 −0 added@@ -0,0 +1,90 @@ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +configure:562: checking for a BSD compatible install +configure:615: checking whether build environment is sane +configure:672: checking whether make sets ${MAKE} +configure:718: checking for working aclocal +configure:731: checking for working autoconf +configure:744: checking for working automake +configure:757: checking for working autoheader +configure:770: checking for working makeinfo +configure:787: checking for gcc +configure:900: checking whether the C compiler (gcc ) works +configure:916: gcc -o conftest conftest.c 1>&5 +configure:942: checking whether the C compiler (gcc ) is a cross-compiler +configure:947: checking whether we are using GNU C +configure:975: checking whether gcc accepts -g +configure:1018: checking for a BSD compatible install +configure:1071: checking whether make sets ${MAKE} +configure:1099: checking how to run the C preprocessor +configure:1179: checking for AIX +configure:1205: checking for gethostbyname +configure:1251: checking for gethostbyname in -lnsl +configure:1301: checking for strcasecmp +configure:1397: checking for connect +configure:1443: checking for connect in -lsocket +configure:1493: checking for gethostname +configure:1589: checking for dlopen +configure:1635: checking for dlopen in -ldl +configure:1701: checking where to look for SSL +configure:1713: checking for CRYPTO_lock in -lcrypto +configure:1762: checking for SSL_connect in -lssl +configure:1813: checking for openssl/x509.h +configure:1813: checking for openssl/rsa.h +configure:1813: checking for openssl/crypto.h +configure:1813: checking for openssl/pem.h +configure:1813: checking for openssl/ssl.h +configure:1813: checking for openssl/err.h +configure:1903: checking for ANSI C header files +configure:2032: checking for unistd.h +configure:2032: checking for arpa/inet.h +configure:2032: checking for net/if.h +configure:2032: checking for netinet/in.h +configure:2032: checking for netdb.h +configure:2032: checking for sys/select.h +configure:2032: checking for sys/socket.h +configure:2032: checking for sys/sockio.h +configure:2032: checking for sys/stat.h +configure:2032: checking for sys/types.h +configure:2032: checking for getopt.h +configure:2032: checking for sys/param.h +configure:2032: checking for termios.h +configure:2032: checking for termio.h +configure:2032: checking for sgtty.h +configure:2032: checking for fcntl.h +configure:2032: checking for dlfcn.h +configure:2032: checking for alloca.h +configure:2032: checking for winsock.h +configure:2032: checking for time.h +configure:2032: checking for io.h +configure:2071: checking for working const +configure:2146: checking for size_t +configure:2179: checking whether time.h and sys/time.h may both be included +configure:2218: checking size of long double +configure:2258: checking size of long long +configure:2304: checking host system type +configure:2330: checking return type of signal handlers +configure:2371: checking for vprintf +configure:2496: checking for socket +configure:2496: checking for select +configure:2496: checking for strdup +configure:2496: checking for strstr +configure:2496: checking for strftime +configure:2496: checking for uname +configure:2496: checking for strcasecmp +configure:2496: checking for gethostname +configure:2496: checking for gethostbyaddr +configure:2496: checking for getservbyname +configure:2496: checking for gettimeofday +configure:2496: checking for inet_addr +configure:2496: checking for inet_ntoa +configure:2496: checking for tcsetattr +configure:2496: checking for tcgetattr +configure:2496: checking for perror +configure:2496: checking for getpass +configure:2496: checking for closesocket +configure:2554: checking for perl +configure:2593: checking for nroff +configure:2633: checking for ranlib +configure:2665: checking for bison
config.status+492 −0 added@@ -0,0 +1,492 @@ +#! /bin/sh +# Generated automatically by configure. +# Run this file to recreate the current configuration. +# This directory was configured as follows, +# on host pm1: +# +# ./configure --with-ssl=/home/dast +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: ./config.status [--recheck] [--version] [--help]" +for ac_option +do + case "$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running ${CONFIG_SHELL-/bin/sh} ./configure --with-ssl=/home/dast --no-create --no-recursion" + exec ${CONFIG_SHELL-/bin/sh} ./configure --with-ssl=/home/dast --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "./config.status generated by autoconf version 2.13" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "$ac_cs_usage"; exit 0 ;; + *) echo "$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=. +ac_given_INSTALL="./install-sh -c" + +trap 'rm -fr Makefile src/Makefile lib/Makefile perl/checklinks.pl perl/getlinks.pl perl/formfind.pl perl/recursiveftpget.pl config.h src/config.h conftest*; exit 1' 1 2 15 + +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\&%]/\\&/g; + s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF +/^[ ]*VPATH[ ]*=[^:]*$/d + +s%@SHELL@%/bin/sh%g +s%@CFLAGS@%-g -O2%g +s%@CPPFLAGS@% -I/home/dast/include/openssl -I/home/dast/include%g +s%@CXXFLAGS@%%g +s%@FFLAGS@%%g +s%@DEFS@%-DHAVE_CONFIG_H%g +s%@LDFLAGS@%%g +s%@LIBS@%-lssl -lcrypto -ldl -lsocket -lnsl -L/home/dast/lib%g +s%@exec_prefix@%${prefix}%g +s%@prefix@%/usr/local%g +s%@program_transform_name@%s,x,x,%g +s%@bindir@%${exec_prefix}/bin%g +s%@sbindir@%${exec_prefix}/sbin%g +s%@libexecdir@%${exec_prefix}/libexec%g +s%@datadir@%${prefix}/share%g +s%@sysconfdir@%${prefix}/etc%g +s%@sharedstatedir@%${prefix}/com%g +s%@localstatedir@%${prefix}/var%g +s%@libdir@%${exec_prefix}/lib%g +s%@includedir@%${prefix}/include%g +s%@oldincludedir@%/usr/include%g +s%@infodir@%${prefix}/info%g +s%@mandir@%${prefix}/man%g +s%@INSTALL_PROGRAM@%${INSTALL}%g +s%@INSTALL_SCRIPT@%${INSTALL_PROGRAM}%g +s%@INSTALL_DATA@%${INSTALL} -m 644%g +s%@PACKAGE@%curl%g +s%@VERSION@%6.3.1%g +s%@ACLOCAL@%aclocal%g +s%@AUTOCONF@%autoconf%g +s%@AUTOMAKE@%automake%g +s%@AUTOHEADER@%autoheader%g +s%@MAKEINFO@%makeinfo%g +s%@SET_MAKE@%%g +s%@CC@%gcc%g +s%@CPP@%gcc -E%g +s%@host@%sparc-sun-solaris2.6%g +s%@host_alias@%sparc-sun-solaris2.6%g +s%@host_cpu@%sparc%g +s%@host_vendor@%sun%g +s%@host_os@%solaris2.6%g +s%@PERL@%/usr/local/bin/perl%g +s%@NROFF@%/bin/nroff%g +s%@RANLIB@%ranlib%g +s%@YACC@%bison -y%g + +CEOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi + +CONFIG_FILES=${CONFIG_FILES-"Makefile src/Makefile lib/Makefile perl/checklinks.pl perl/getlinks.pl perl/formfind.pl perl/recursiveftpget.pl "} +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + case "$ac_given_INSTALL" in + [/$]*) INSTALL="$ac_given_INSTALL" ;; + *) INSTALL="$ac_dots$ac_given_INSTALL" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +s%@INSTALL@%$INSTALL%g +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file +fi; done +rm -f conftest.s* + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +if test "${CONFIG_HEADERS+set}" != set; then + CONFIG_HEADERS="config.h src/config.h" +fi +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}PACKAGE${ac_dB}PACKAGE${ac_dC}"curl"${ac_dD} +${ac_uA}PACKAGE${ac_uB}PACKAGE${ac_uC}"curl"${ac_uD} +${ac_eA}PACKAGE${ac_eB}PACKAGE${ac_eC}"curl"${ac_eD} +${ac_dA}VERSION${ac_dB}VERSION${ac_dC}"6.3.1"${ac_dD} +${ac_uA}VERSION${ac_uB}VERSION${ac_uC}"6.3.1"${ac_uD} +${ac_eA}VERSION${ac_eB}VERSION${ac_eC}"6.3.1"${ac_eD} +${ac_dA}HAVE_LIBNSL${ac_dB}HAVE_LIBNSL${ac_dC}1${ac_dD} +${ac_uA}HAVE_LIBNSL${ac_uB}HAVE_LIBNSL${ac_uC}1${ac_uD} +${ac_eA}HAVE_LIBNSL${ac_eB}HAVE_LIBNSL${ac_eC}1${ac_eD} +${ac_dA}HAVE_LIBSOCKET${ac_dB}HAVE_LIBSOCKET${ac_dC}1${ac_dD} +${ac_uA}HAVE_LIBSOCKET${ac_uB}HAVE_LIBSOCKET${ac_uC}1${ac_uD} +${ac_eA}HAVE_LIBSOCKET${ac_eB}HAVE_LIBSOCKET${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_LIBDL${ac_dB}HAVE_LIBDL${ac_dC}1${ac_dD} +${ac_uA}HAVE_LIBDL${ac_uB}HAVE_LIBDL${ac_uC}1${ac_uD} +${ac_eA}HAVE_LIBDL${ac_eB}HAVE_LIBDL${ac_eC}1${ac_eD} +${ac_dA}HAVE_LIBCRYPTO${ac_dB}HAVE_LIBCRYPTO${ac_dC}1${ac_dD} +${ac_uA}HAVE_LIBCRYPTO${ac_uB}HAVE_LIBCRYPTO${ac_uC}1${ac_uD} +${ac_eA}HAVE_LIBCRYPTO${ac_eB}HAVE_LIBCRYPTO${ac_eC}1${ac_eD} +${ac_dA}HAVE_LIBSSL${ac_dB}HAVE_LIBSSL${ac_dC}1${ac_dD} +${ac_uA}HAVE_LIBSSL${ac_uB}HAVE_LIBSSL${ac_uC}1${ac_uD} +${ac_eA}HAVE_LIBSSL${ac_eB}HAVE_LIBSSL${ac_eC}1${ac_eD} +${ac_dA}HAVE_OPENSSL_X509_H${ac_dB}HAVE_OPENSSL_X509_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_X509_H${ac_uB}HAVE_OPENSSL_X509_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_X509_H${ac_eB}HAVE_OPENSSL_X509_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_OPENSSL_RSA_H${ac_dB}HAVE_OPENSSL_RSA_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_RSA_H${ac_uB}HAVE_OPENSSL_RSA_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_RSA_H${ac_eB}HAVE_OPENSSL_RSA_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_OPENSSL_CRYPTO_H${ac_dB}HAVE_OPENSSL_CRYPTO_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_CRYPTO_H${ac_uB}HAVE_OPENSSL_CRYPTO_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_CRYPTO_H${ac_eB}HAVE_OPENSSL_CRYPTO_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_OPENSSL_PEM_H${ac_dB}HAVE_OPENSSL_PEM_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_PEM_H${ac_uB}HAVE_OPENSSL_PEM_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_PEM_H${ac_eB}HAVE_OPENSSL_PEM_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_OPENSSL_SSL_H${ac_dB}HAVE_OPENSSL_SSL_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_SSL_H${ac_uB}HAVE_OPENSSL_SSL_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_SSL_H${ac_eB}HAVE_OPENSSL_SSL_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_OPENSSL_ERR_H${ac_dB}HAVE_OPENSSL_ERR_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_OPENSSL_ERR_H${ac_uB}HAVE_OPENSSL_ERR_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_OPENSSL_ERR_H${ac_eB}HAVE_OPENSSL_ERR_H${ac_eC}1${ac_eD} +${ac_dA}STDC_HEADERS${ac_dB}STDC_HEADERS${ac_dC}1${ac_dD} +${ac_uA}STDC_HEADERS${ac_uB}STDC_HEADERS${ac_uC}1${ac_uD} +${ac_eA}STDC_HEADERS${ac_eB}STDC_HEADERS${ac_eC}1${ac_eD} +${ac_dA}HAVE_UNISTD_H${ac_dB}HAVE_UNISTD_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_UNISTD_H${ac_uB}HAVE_UNISTD_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_UNISTD_H${ac_eB}HAVE_UNISTD_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_ARPA_INET_H${ac_dB}HAVE_ARPA_INET_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_ARPA_INET_H${ac_uB}HAVE_ARPA_INET_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_ARPA_INET_H${ac_eB}HAVE_ARPA_INET_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_NET_IF_H${ac_dB}HAVE_NET_IF_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_NET_IF_H${ac_uB}HAVE_NET_IF_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_NET_IF_H${ac_eB}HAVE_NET_IF_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_NETINET_IN_H${ac_dB}HAVE_NETINET_IN_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_NETINET_IN_H${ac_uB}HAVE_NETINET_IN_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_NETINET_IN_H${ac_eB}HAVE_NETINET_IN_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_NETDB_H${ac_dB}HAVE_NETDB_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_NETDB_H${ac_uB}HAVE_NETDB_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_NETDB_H${ac_eB}HAVE_NETDB_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_SYS_SELECT_H${ac_dB}HAVE_SYS_SELECT_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_SELECT_H${ac_uB}HAVE_SYS_SELECT_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_SELECT_H${ac_eB}HAVE_SYS_SELECT_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_SYS_SOCKET_H${ac_dB}HAVE_SYS_SOCKET_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_SOCKET_H${ac_uB}HAVE_SYS_SOCKET_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_SOCKET_H${ac_eB}HAVE_SYS_SOCKET_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_SYS_SOCKIO_H${ac_dB}HAVE_SYS_SOCKIO_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_SOCKIO_H${ac_uB}HAVE_SYS_SOCKIO_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_SOCKIO_H${ac_eB}HAVE_SYS_SOCKIO_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_SYS_STAT_H${ac_dB}HAVE_SYS_STAT_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_STAT_H${ac_uB}HAVE_SYS_STAT_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_STAT_H${ac_eB}HAVE_SYS_STAT_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_SYS_TYPES_H${ac_dB}HAVE_SYS_TYPES_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_TYPES_H${ac_uB}HAVE_SYS_TYPES_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_TYPES_H${ac_eB}HAVE_SYS_TYPES_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_SYS_PARAM_H${ac_dB}HAVE_SYS_PARAM_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SYS_PARAM_H${ac_uB}HAVE_SYS_PARAM_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SYS_PARAM_H${ac_eB}HAVE_SYS_PARAM_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_TERMIOS_H${ac_dB}HAVE_TERMIOS_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_TERMIOS_H${ac_uB}HAVE_TERMIOS_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_TERMIOS_H${ac_eB}HAVE_TERMIOS_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_TERMIO_H${ac_dB}HAVE_TERMIO_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_TERMIO_H${ac_uB}HAVE_TERMIO_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_TERMIO_H${ac_eB}HAVE_TERMIO_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_SGTTY_H${ac_dB}HAVE_SGTTY_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_SGTTY_H${ac_uB}HAVE_SGTTY_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_SGTTY_H${ac_eB}HAVE_SGTTY_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_FCNTL_H${ac_dB}HAVE_FCNTL_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_FCNTL_H${ac_uB}HAVE_FCNTL_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_FCNTL_H${ac_eB}HAVE_FCNTL_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_DLFCN_H${ac_dB}HAVE_DLFCN_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_DLFCN_H${ac_uB}HAVE_DLFCN_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_DLFCN_H${ac_eB}HAVE_DLFCN_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_ALLOCA_H${ac_dB}HAVE_ALLOCA_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_ALLOCA_H${ac_uB}HAVE_ALLOCA_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_ALLOCA_H${ac_eB}HAVE_ALLOCA_H${ac_eC}1${ac_eD} +${ac_dA}HAVE_TIME_H${ac_dB}HAVE_TIME_H${ac_dC}1${ac_dD} +${ac_uA}HAVE_TIME_H${ac_uB}HAVE_TIME_H${ac_uC}1${ac_uD} +${ac_eA}HAVE_TIME_H${ac_eB}HAVE_TIME_H${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}TIME_WITH_SYS_TIME${ac_dB}TIME_WITH_SYS_TIME${ac_dC}1${ac_dD} +${ac_uA}TIME_WITH_SYS_TIME${ac_uB}TIME_WITH_SYS_TIME${ac_uC}1${ac_uD} +${ac_eA}TIME_WITH_SYS_TIME${ac_eB}TIME_WITH_SYS_TIME${ac_eC}1${ac_eD} +${ac_dA}SIZEOF_LONG_DOUBLE${ac_dB}SIZEOF_LONG_DOUBLE${ac_dC}16${ac_dD} +${ac_uA}SIZEOF_LONG_DOUBLE${ac_uB}SIZEOF_LONG_DOUBLE${ac_uC}16${ac_uD} +${ac_eA}SIZEOF_LONG_DOUBLE${ac_eB}SIZEOF_LONG_DOUBLE${ac_eC}16${ac_eD} +${ac_dA}SIZEOF_LONG_LONG${ac_dB}SIZEOF_LONG_LONG${ac_dC}8${ac_dD} +${ac_uA}SIZEOF_LONG_LONG${ac_uB}SIZEOF_LONG_LONG${ac_uC}8${ac_uD} +${ac_eA}SIZEOF_LONG_LONG${ac_eB}SIZEOF_LONG_LONG${ac_eC}8${ac_eD} +${ac_dA}OS${ac_dB}OS${ac_dC}"sparc-sun-solaris2.6"${ac_dD} +${ac_uA}OS${ac_uB}OS${ac_uC}"sparc-sun-solaris2.6"${ac_uD} +${ac_eA}OS${ac_eB}OS${ac_eC}"sparc-sun-solaris2.6"${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}RETSIGTYPE${ac_dB}RETSIGTYPE${ac_dC}void${ac_dD} +${ac_uA}RETSIGTYPE${ac_uB}RETSIGTYPE${ac_uC}void${ac_uD} +${ac_eA}RETSIGTYPE${ac_eB}RETSIGTYPE${ac_eC}void${ac_eD} +${ac_dA}HAVE_VPRINTF${ac_dB}HAVE_VPRINTF${ac_dC}1${ac_dD} +${ac_uA}HAVE_VPRINTF${ac_uB}HAVE_VPRINTF${ac_uC}1${ac_uD} +${ac_eA}HAVE_VPRINTF${ac_eB}HAVE_VPRINTF${ac_eC}1${ac_eD} +${ac_dA}HAVE_SOCKET${ac_dB}HAVE_SOCKET${ac_dC}1${ac_dD} +${ac_uA}HAVE_SOCKET${ac_uB}HAVE_SOCKET${ac_uC}1${ac_uD} +${ac_eA}HAVE_SOCKET${ac_eB}HAVE_SOCKET${ac_eC}1${ac_eD} +${ac_dA}HAVE_SELECT${ac_dB}HAVE_SELECT${ac_dC}1${ac_dD} +${ac_uA}HAVE_SELECT${ac_uB}HAVE_SELECT${ac_uC}1${ac_uD} +${ac_eA}HAVE_SELECT${ac_eB}HAVE_SELECT${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_STRDUP${ac_dB}HAVE_STRDUP${ac_dC}1${ac_dD} +${ac_uA}HAVE_STRDUP${ac_uB}HAVE_STRDUP${ac_uC}1${ac_uD} +${ac_eA}HAVE_STRDUP${ac_eB}HAVE_STRDUP${ac_eC}1${ac_eD} +${ac_dA}HAVE_STRSTR${ac_dB}HAVE_STRSTR${ac_dC}1${ac_dD} +${ac_uA}HAVE_STRSTR${ac_uB}HAVE_STRSTR${ac_uC}1${ac_uD} +${ac_eA}HAVE_STRSTR${ac_eB}HAVE_STRSTR${ac_eC}1${ac_eD} +${ac_dA}HAVE_STRFTIME${ac_dB}HAVE_STRFTIME${ac_dC}1${ac_dD} +${ac_uA}HAVE_STRFTIME${ac_uB}HAVE_STRFTIME${ac_uC}1${ac_uD} +${ac_eA}HAVE_STRFTIME${ac_eB}HAVE_STRFTIME${ac_eC}1${ac_eD} +${ac_dA}HAVE_UNAME${ac_dB}HAVE_UNAME${ac_dC}1${ac_dD} +${ac_uA}HAVE_UNAME${ac_uB}HAVE_UNAME${ac_uC}1${ac_uD} +${ac_eA}HAVE_UNAME${ac_eB}HAVE_UNAME${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_STRCASECMP${ac_dB}HAVE_STRCASECMP${ac_dC}1${ac_dD} +${ac_uA}HAVE_STRCASECMP${ac_uB}HAVE_STRCASECMP${ac_uC}1${ac_uD} +${ac_eA}HAVE_STRCASECMP${ac_eB}HAVE_STRCASECMP${ac_eC}1${ac_eD} +${ac_dA}HAVE_GETHOSTNAME${ac_dB}HAVE_GETHOSTNAME${ac_dC}1${ac_dD} +${ac_uA}HAVE_GETHOSTNAME${ac_uB}HAVE_GETHOSTNAME${ac_uC}1${ac_uD} +${ac_eA}HAVE_GETHOSTNAME${ac_eB}HAVE_GETHOSTNAME${ac_eC}1${ac_eD} +${ac_dA}HAVE_GETHOSTBYADDR${ac_dB}HAVE_GETHOSTBYADDR${ac_dC}1${ac_dD} +${ac_uA}HAVE_GETHOSTBYADDR${ac_uB}HAVE_GETHOSTBYADDR${ac_uC}1${ac_uD} +${ac_eA}HAVE_GETHOSTBYADDR${ac_eB}HAVE_GETHOSTBYADDR${ac_eC}1${ac_eD} +${ac_dA}HAVE_GETSERVBYNAME${ac_dB}HAVE_GETSERVBYNAME${ac_dC}1${ac_dD} +${ac_uA}HAVE_GETSERVBYNAME${ac_uB}HAVE_GETSERVBYNAME${ac_uC}1${ac_uD} +${ac_eA}HAVE_GETSERVBYNAME${ac_eB}HAVE_GETSERVBYNAME${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_GETTIMEOFDAY${ac_dB}HAVE_GETTIMEOFDAY${ac_dC}1${ac_dD} +${ac_uA}HAVE_GETTIMEOFDAY${ac_uB}HAVE_GETTIMEOFDAY${ac_uC}1${ac_uD} +${ac_eA}HAVE_GETTIMEOFDAY${ac_eB}HAVE_GETTIMEOFDAY${ac_eC}1${ac_eD} +${ac_dA}HAVE_INET_ADDR${ac_dB}HAVE_INET_ADDR${ac_dC}1${ac_dD} +${ac_uA}HAVE_INET_ADDR${ac_uB}HAVE_INET_ADDR${ac_uC}1${ac_uD} +${ac_eA}HAVE_INET_ADDR${ac_eB}HAVE_INET_ADDR${ac_eC}1${ac_eD} +${ac_dA}HAVE_INET_NTOA${ac_dB}HAVE_INET_NTOA${ac_dC}1${ac_dD} +${ac_uA}HAVE_INET_NTOA${ac_uB}HAVE_INET_NTOA${ac_uC}1${ac_uD} +${ac_eA}HAVE_INET_NTOA${ac_eB}HAVE_INET_NTOA${ac_eC}1${ac_eD} +${ac_dA}HAVE_TCSETATTR${ac_dB}HAVE_TCSETATTR${ac_dC}1${ac_dD} +${ac_uA}HAVE_TCSETATTR${ac_uB}HAVE_TCSETATTR${ac_uC}1${ac_uD} +${ac_eA}HAVE_TCSETATTR${ac_eB}HAVE_TCSETATTR${ac_eC}1${ac_eD} +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + cat > conftest.frag <<CEOF +${ac_dA}HAVE_TCGETATTR${ac_dB}HAVE_TCGETATTR${ac_dC}1${ac_dD} +${ac_uA}HAVE_TCGETATTR${ac_uB}HAVE_TCGETATTR${ac_uC}1${ac_uD} +${ac_eA}HAVE_TCGETATTR${ac_eB}HAVE_TCGETATTR${ac_eC}1${ac_eD} +${ac_dA}HAVE_PERROR${ac_dB}HAVE_PERROR${ac_dC}1${ac_dD} +${ac_uA}HAVE_PERROR${ac_uB}HAVE_PERROR${ac_uC}1${ac_uD} +${ac_eA}HAVE_PERROR${ac_eB}HAVE_PERROR${ac_eC}1${ac_eD} +${ac_dA}HAVE_GETPASS${ac_dB}HAVE_GETPASS${ac_dC}1${ac_dD} +${ac_uA}HAVE_GETPASS${ac_uB}HAVE_GETPASS${ac_uC}1${ac_uD} +${ac_eA}HAVE_GETPASS${ac_eB}HAVE_GETPASS${ac_eC}1${ac_eD} +s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */% +CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in + + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + + + +am_indx=1 +for am_file in config.h src/config.h; do + case " $CONFIG_HEADERS " in + *" $am_file "*) + echo timestamp > `echo $am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx + ;; + esac + am_indx=`expr "$am_indx" + 1` +done + +exit 0
config.sub+979 −0 added@@ -0,0 +1,979 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 \ + | hppa2.0w \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el | armv[34][lb] \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* \ + | hppa2.0w-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* | armv[34][lb]-*\ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-* | armv*-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + os=-mpeix + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netwinder) + basic_machine=armv4l-corel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -rhapsody* \ + | -openstep* | -mpeix* | -oskit*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-corel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os
config.sub-991124+952 −0 added@@ -0,0 +1,952 @@ +#! /bin/sh +# Configuration validation subroutine script, version 1.1. +# Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc. +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +if [ x$1 = x ] +then + echo Configuration name missing. 1>&2 + echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 + echo "or $0 ALIAS" 1>&2 + echo where ALIAS is a recognized configuration type. 1>&2 + exit 1 +fi + +# First pass through any local machine types. +case $1 in + *local*) + echo $1 + exit 0 + ;; + *) + ;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + linux-gnu*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple) + os= + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \ + | arme[lb] | pyramid | mn10200 | mn10300 \ + | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ + | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper \ + | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 \ + | mips64 | mipsel | mips64el | mips64orion | mips64orionel \ + | mipstx39 | mipstx39el \ + | sparc | sparclet | sparclite | sparc64 | v850) + basic_machine=$basic_machine-unknown + ;; + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i[34567]86) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* \ + | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* \ + | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* \ + | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* \ + | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparc64-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mipstx39-* | mipstx39el-* \ + | f301-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-cbm + ;; + amigaos | amigados) + basic_machine=m68k-cbm + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-cbm + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [ctj]90-cray) + basic_machine=c90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + os=-mvs + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i[34567]86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i[34567]86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i[34567]86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i[34567]86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + miniframe) + basic_machine=m68000-convergent + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + np1) + basic_machine=np1-gould + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | nexen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | k6 | 6x86) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | nexen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | k6-* | 6x86-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=rs6000-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sparc) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -xenix) + os=-xenix + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-semi) + os=-aout + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-ibm) + os=-aix + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f301-fujitsu) + os=-uxpv + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -hpux*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os
configure+3091 −0 addedconfigure.in+210 −0 added@@ -0,0 +1,210 @@ +dnl $Id$ +dnl Process this file with autoconf to produce a configure script. +AC_INIT(lib/urldata.h) +AM_CONFIG_HEADER(config.h src/config.h) +AM_INIT_AUTOMAKE(curl,"6.3.1") + +dnl Checks for programs. +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_MAKE_SET + +dnl Check for AIX weirdos +AC_AIX + +dnl ********************************************************************** +dnl Checks for libraries. +dnl ********************************************************************** + +dnl nsl lib? +AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, gethostbyname)) + +dnl resolve lib? +AC_CHECK_FUNC(strcasecmp, , AC_CHECK_LIB(resolve, strcasecmp)) + +dnl socket lib? +AC_CHECK_FUNC(connect, , AC_CHECK_LIB(socket, connect)) + +dnl ucb lib? +AC_CHECK_FUNC(gethostname, , AC_CHECK_LIB(ucb, gethostname)) + +dnl dl lib? +AC_CHECK_FUNC(dlopen, , AC_CHECK_LIB(dl, dlopen)) + +dnl ********************************************************************** +dnl Check for the presence of SSL libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for SSL files & libraries. +OPT_SSL=off +AC_ARG_WITH(ssl,dnl +[ --with-ssl[=DIR] where to look for SSL [compiler/linker default paths] + DIR points to the SSL installation [/usr/local/ssl]], + OPT_SSL=$withval +) + +if test X"$OPT_SSL" = Xno +then + AC_MSG_WARN(SSL/https support disabled) +else + + dnl Check for & handle argument to --with-ssl. + + AC_MSG_CHECKING(where to look for SSL) + if test X"$OPT_SSL" = Xoff + then + AC_MSG_RESULT([defaults (or given in environment)]) + else + test X"$OPT_SSL" = Xyes && OPT_SSL=/usr/local/ssl + LIBS="$LIBS -L$OPT_SSL/lib" + CPPFLAGS="$CPPFLAGS -I$OPT_SSL/include/openssl -I$OPT_SSL/include" + AC_MSG_RESULT([$OPT_SSL]) + fi + + dnl check for crypto libs (part of SSLeay) + AC_CHECK_LIB(crypto, CRYPTO_lock) + + if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then + dnl This is only reasonable to do if crypto actually is there: check for + dnl SSL libs NOTE: it is important to do this AFTER the crypto lib + AC_CHECK_LIB(ssl, SSL_connect) + + dnl Check for SSLeay headers + AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h openssl/pem.h openssl/ssl.h openssl/err.h) + + if test $ac_cv_header_openssl_x509_h = no; then + AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h) + fi + + fi +fi + +dnl ********************************************************************** +dnl Check for the presence of ZLIB libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for files & libraries. +dnl OPT_ZLIB=no +dnl AC_ARG_WITH(zlib,dnl +dnl [ --with-zlib[=DIR] where to look for ZLIB [compiler/linker default paths] +dnl DIR points to the ZLIB installation prefix [/usr/local]], +dnl OPT_ZLIB=$withval, +dnl ) + +dnl Check for & handle argument to --with-zlib. +dnl +dnl NOTE: We *always* look for ZLIB headers & libraries, all this option +dnl does is change where we look (by adjusting LIBS and CPPFLAGS.) +dnl + +dnl AC_MSG_CHECKING(where to look for ZLIB) +dnl if test X"$OPT_ZLIB" = Xno +dnl then +dnl AC_MSG_RESULT([defaults (or given in environment)]) +dnl else +dnl test X"$OPT_ZLIB" = Xyes && OPT_ZLIB=/usr/local +dnl LIBS="$LIBS -L$OPT_ZLIB/lib" +dnl CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" +dnl AC_MSG_RESULT([$OPT_ZLIB]) +dnl fi + +dnl z lib? +dnl AC_CHECK_FUNC(gzread, , AC_CHECK_LIB(z, gzread)) + +dnl ********************************************************************** +dnl Back to "normal" configuring +dnl ********************************************************************** + +dnl Checks for header files. +AC_HEADER_STDC +AC_CHECK_HEADERS( \ + unistd.h \ + arpa/inet.h \ + net/if.h \ + netinet/in.h \ + netdb.h \ + sys/select.h \ + sys/socket.h \ + sys/sockio.h \ + sys/stat.h \ + sys/types.h \ + getopt.h \ + sys/param.h \ + termios.h \ + termio.h \ + sgtty.h \ + fcntl.h \ + dlfcn.h \ + alloca.h \ + winsock.h \ + time.h \ + io.h \ +) + +dnl Check for libz header +dnl AC_CHECK_HEADERS(zlib.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_HEADER_TIME + +# mprintf() checks: + +# check for 'long double' +AC_CHECK_SIZEOF(long double, 8) +# check for 'long long' +AC_CHECK_SIZEOF(long long, 4) + +dnl Get system canonical name +AC_CANONICAL_HOST +AC_DEFINE_UNQUOTED(OS, "${host}") + +dnl Checks for library functions. +dnl AC_PROG_GCC_TRADITIONAL +AC_TYPE_SIGNAL +AC_FUNC_VPRINTF +AC_CHECK_FUNCS( socket \ + select \ + strdup \ + strstr \ + strftime \ + uname \ + strcasecmp \ + gethostname \ + gethostbyaddr \ + getservbyname \ + gettimeofday \ + inet_addr \ + inet_ntoa \ + tcsetattr \ + tcgetattr \ + perror \ + getpass \ + closesocket +) + + + +AC_PATH_PROG( PERL, perl, , + $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) +AC_SUBST(PERL) + +AC_PATH_PROGS( NROFF, nroff gnroff, , + $PATH:/usr/bin/:/usr/local/bin ) +AC_SUBST(NROFF) + +AC_PROG_RANLIB +AC_PROG_YACC + +dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib, +dnl $PATH:/usr/bin/:/usr/local/bin ) +dnl AC_SUBST(RANLIB) + +AC_OUTPUT( Makefile \ + src/Makefile \ + lib/Makefile \ + perl/checklinks.pl \ + perl/getlinks.pl \ + perl/formfind.pl \ + perl/recursiveftpget.pl )
config-win32.h+168 −0 added@@ -0,0 +1,168 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if on AIX 3. + System headers sometimes define this. + We just want to avoid a redefinition error message. */ +#ifndef _ALL_SOURCE +/* #undef _ALL_SOURCE */ +#endif + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you don't have vprintf but do have _doprnt. */ +/* #undef HAVE_DOPRNT */ + +/* Define if you have the vprintf function. */ +#define HAVE_VPRINTF 1 + +/* Define as the return type of signal handlers (int or void). */ +/*#define RETSIGTYPE void */ + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +/* #undef size_t */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you can safely include both <sys/time.h> and <time.h>. */ +/* #define TIME_WITH_SYS_TIME 1 */ + +/* Define cpu-machine-OS */ +#define OS "win32" + +/* The number of bytes in a long double. */ +#define SIZEOF_LONG_DOUBLE 16 + +/* The number of bytes in a long long. */ +#define SIZEOF_LONG_LONG 8 + +/* Define if you have the gethostbyaddr function. */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define if you have the gethostname function. */ +#define HAVE_GETHOSTNAME 1 + +/* Define if you have the getpass function. */ +/*#define HAVE_GETPASS 1*/ + +/* Define if you have the getservbyname function. */ +#define HAVE_GETSERVBYNAME 1 + +/* Define if you have the gettimeofday function. */ +#define HAVE_GETTIMEOFDAY 1 + +/* Define if you have the inet_addr function. */ +#define HAVE_INET_ADDR 1 + +/* Define if you have the inet_ntoa function. */ +#define HAVE_INET_NTOA 1 + +/* Define if you have the perror function. */ +#define HAVE_PERROR 1 + +/* Define if you have the select function. */ +#define HAVE_SELECT 1 + +/* Define if you have the socket function. */ +#define HAVE_SOCKET 1 + +/* Define if you have the strcasecmp function. */ +/*#define HAVE_STRCASECMP 1*/ + +/* Define if you have the strdup function. */ +#define HAVE_STRDUP 1 + +/* Define if you have the strftime function. */ +#define HAVE_STRFTIME 1 + +/* Define if you have the strstr function. */ +#define HAVE_STRSTR 1 + +/* Define if you have the tcgetattr function. */ +/*#define HAVE_TCGETATTR 1*/ + +/* Define if you have the tcsetattr function. */ +/*#define HAVE_TCSETATTR 1*/ + +/* Define if you have the uname function. */ +#define HAVE_UNAME 1 + +/* Define if you have the <alloca.h> header file. */ +/*#define HAVE_ALLOCA_H 1*/ + +/* Define if you have the <arpa/inet.h> header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define if you have the <crypto.h> header file. */ +/* #undef HAVE_CRYPTO_H */ + +/* Define if you have the <dlfcn.h> header file. */ +/*#define HAVE_DLFCN_H 1*/ + +/* Define if you have the <err.h> header file. */ +/* #undef HAVE_ERR_H */ + +/* Define if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the <getopt.h> header file. */ +/* #undef HAVE_GETOPT_H */ + +/* Define if you have the <netdb.h> header file. */ +#define HAVE_NETDB_H 1 + +/* Define if you have the <netinet/in.h> header file. */ +#define HAVE_NETINET_IN_H 1 + +/* Define if you have the <sgtty.h> header file. */ +/*#define HAVE_SGTTY_H 1*/ + +/* Define if you have the <ssl.h> header file. */ +/* #undef HAVE_SSL_H */ + +/* Define if you have the <sys/param.h> header file. */ +/*#define HAVE_SYS_PARAM_H 1*/ + +/* Define if you have the <sys/select.h> header file. */ +#define HAVE_SYS_SELECT_H 1 + +/* Define if you have the <sys/socket.h> header file. */ +/*#define HAVE_SYS_SOCKET_H 1*/ + +/* Define if you have the <sys/sockio.h> header file. */ +#define HAVE_SYS_SOCKIO_H 1 + +/* Define if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the <termio.h> header file. */ +#define HAVE_TERMIO_H 1 + +/* Define if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 + +/* Name of package */ +#define PACKAGE "curl" + +/* Version number of package */ +#define VERSION "6.3.1" + +/* Define if you have the <io.h> header file. */ +#define HAVE_IO_H 1 + +/* Define if you have the <time.h> header file. */ +#define HAVE_TIME_H 1 + +/* Define if you have the <winsock.h> header file. */ +#define HAVE_WINSOCK_H 1 + +/* Define if you have the closesocket function. */ +#define HAVE_CLOSESOCKET 1
CONTRIBUTE+68 −0 added@@ -0,0 +1,68 @@ + Date: 1999-08-04 + +To Think About When Contributing Source Code + + This document is intended to offer some guidelines that can be useful to + keep in mind when you decide to write a contribution to the project. This + concerns new features as well as corrections to existing flaws or bugs. + +Naming + + Try using a non-confusing naming scheme for your new functions and variable + names. It doesn't necessarily have to mean that you should use the same as + in other places of the code, just that the names should be logical, + understandable and be named according to what they're used for. + +Indenting + + Please try using the same indenting levels and bracing method as all the + other code already does. It makes the source code a lot easier to follow if + all of it is written using the same style. I don't ask you to like it, I + just ask you to follow the tradition! ;-) + +Commenting + + Comment your source code extensively. I don't see myself as a very good + source commenter, but I try to become one. Commented code is quality code + and enables future modifications much more. Uncommented code much more risk + being completely replaced when someone wants to extend things, since other + persons' source code can get quite hard to read. + +General Style + + Keep your functions small. If they're small you avoid a lot of mistakes and + you don't accidentaly mix up variables. + +Non-clobbering All Over + + When you write new functionality or fix bugs, it is important that you + don't fiddle all over the source files and functions. Remember that it is + likely that other people have done changes in the same source files as you + have and possibly even in the same functions. If you bring completely new + functionality, try writing it in a new source file. If you fix bugs, try to + fix one bug at a time and send them as separate patches. + +Separate Patches Doing Different Things + + It is annoying when you get a huge patch from someone that is said to fix 511 + odd problems, but discussions and opinions don't agree with 510 of them - or + 509 of them were already fixed in a different way. Then the patcher needs to + extract the single interesting patch from somewhere within the huge pile of + source, and that gives a lot of extra work. Preferably, all fixes that + correct different problems should be in their own patch with an attached + description exactly what they correct so that all patches can be selectively + applied by the maintainer or other interested parties. + +Document + + Writing docs is dead boring and one of the big problems with many open + source projects. Someone's gotta do it. It makes it a lot easier if you + submit a small description of your fix or your new features with every + contribution so that it can be swiftly added to the package documentation. + +Write Access to CVS Repository + + If you are a frequent contributor, or have another good reason, you can of + course get write access to the CVS repository and then you'll be able to + check-in all your changes straight into the CVS tree instead of sending all + changes by mail as patches. Just ask if this is what you'd want.
curl.1+402 −0 added@@ -0,0 +1,402 @@ +.\" You can view this file with: +.\" nroff -man curl.1 +.\" Written by Daniel Stenberg +.\" +.TH curl 1 "8 November 1999" "Curl 6.3" "Curl Manual" +.SH NAME +curl \- get a URL with FTP, TELNET, LDAP, GOPHER, DICT, FILE, HTTP or +HTTPS syntax. +.SH SYNOPSIS +.B curl [options] +.I url +.SH DESCRIPTION +.B curl +is a client to get documents/files from servers, using any of the +supported protocols. The command is designed to work without user +interaction or any kind of interactivity. + +curl offers a busload of useful tricks like proxy support, user +authentication, ftp upload, HTTP post, SSL (https:) connections, cookies, file +transfer resume and more. +.SH URL +The URL syntax is protocol dependent. You'll find a detailed description in +RFC 2396. + +You can specify multiple URLs or parts of URLs by writing part sets within +braces as in: + + http://site.{one,two,three}.com + +or you can get sequences of alphanumeric series by using [] as in: + + ftp://ftp.numericals.com/file[1-100].txt + ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) + ftp://ftp.letters.com/file[a-z].txt + +It is possible to specify up to 9 sets or series for a URL, but no nesting is +supported at the moment: + + http://www.any.org/archive[1996-1999]/volume[1-4]part{a,b,c,index}.html +.SH OPTIONS +.IP "-a/--append" +(FTP) +When used in a ftp upload, this will tell curl to append to the target +file instead of overwriting it. If the file doesn't exist, it will +be created. +.IP "-A/--user-agent <agent string>" +(HTTP) +Specify the User-Agent string to send to the HTTP server. Some badly done CGIs +fail if its not set to "Mozilla/4.0". To encode blanks in the string, +surround the string with single quote marks. This can also be set with the +-H/--header flag of course. +.IP "-b/--cookie <name=data>" +(HTTP) +Pass the data to the HTTP server as a cookie. It is supposedly the +data previously received from the server in a "Set-Cookie:" line. +The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". + +If no '=' letter is used in the line, it is treated as a filename to use to +read previously stored cookie lines from, which should be used in this session +if they match. Using this method also activates the "cookie parser" which +will make curl record incoming cookies too, which may be handy if you're using +this in combination with the -L/--location option. The file format of the file +to read cookies from should be plain HTTP headers or the netscape cookie file +format. +.IP "-B/--ftp-ascii" +(FTP/LDAP) +Use ASCII transfer when getting an FTP file or LDAP info. For FTP, this can +also be enforced by using an URL that ends with ";type=A". +.IP "-c/--continue" +Continue/Resume a previous file transfer. This instructs curl to +continue appending data on the file where it was previously left, +possibly because of a broken connection to the server. There must be +a named physical file to append to for this to work. +Note: Upload resume is depening on a command named SIZE not always +present in all ftp servers! Upload resume is for FTP only. +HTTP resume is only possible with HTTP/1.1 or later servers. +.IP "-C/--continue-at <offset>" +Continue/Resume a previous file transfer at the given offset. The +given offset is the exact number of bytes that will be skipped +counted from the beginning of the source file before it is transfered +to the destination. +If used with uploads, the ftp server command SIZE will not be used by +curl. Upload resume is for FTP only. +HTTP resume is only possible with HTTP/1.1 or later servers. +.IP "-d/--data <data>" +(HTTP) +Sends the specified data in a POST request to the HTTP server. Note +that the data is sent exactly as specified with no extra processing. +The data is expected to be "url-encoded". This will cause curl to +pass the data to the server using the content-type +application/x-www-form-urlencoded. Compare to -F. + +If you start the data with the letter @, the rest should be a file name to +read the data from, or - if you want curl to read the data from stdin. +The contents of the file must already be url-encoded. +.IP "-D/--dump-header <file>" +(HTTP/FTP) +Write the HTTP headers to this file. Write the FTP file info to this +file if -I/--head is used. +.IP "-e/--referer <URL>" +(HTTP) +Sends the "Referer Page" information to the HTTP server. Some badly +done CGIs fail if it's not set. This can also be set with the -H/--header +flag of course. +.IP "-E/--cert <certificate[:password]>" +(HTTPS) +Tells curl to use the specified certificate file when getting a file +with HTTPS. The certificate must be in PEM format. +If the optional password isn't specified, it will be queried for on +the terminal. Note that this certificate is the private key and the private +certificate concatenated! +.IP "-f/--fail" +(HTTP) +Fail silently (no output at all) on server errors. This is mostly done +like this to better enable scripts etc to better deal with failed +attempts. In normal cases when a HTTP server fails to deliver a +document, it returns a HTML document stating so (which often also +describes why and more). This flag will prevent curl from +outputting that and fail silently instead. +.IP "-F/--form <name=content>" +(HTTP) +This lets curl emulate a filled in form in which a user has pressed +the submit button. This causes curl to POST data using the +content-type multipart/form-data according to RFC1867. This enables +uploading of binary files etc. To force the 'content' part to be +read from a file, prefix the file name with an @ sign. Example, to +send your password file to the server, where 'password' is the +name of the form-field to which /etc/passwd will be the input: + +.B curl +-F password=@/etc/passwd www.mypasswords.com + +To read the file's content from stdin insted of a file, use - where the file +name should've been. +.IP "-h/--help" +Usage help. +.IP "-H/--header <header>" +(HTTP) +Extra header to use when getting a web page. You may specify any number of +extra headers. Note that if you should add a custom header that has the same +name as one of the internal ones curl would use, your externally set header +will be used instead of the internal one. This allows you to make even +trickier stuff than curl would normally do. You should not replace internally +set headers without knowing perfectly well what you're doing. +.IP "-i/--include" +(HTTP) +Include the HTTP-header in the output. The HTTP-header includes things +like server-name, date of the document, HTTP-version and more... +.IP "-I/--head" +(HTTP/FTP) +Fetch the HTTP-header only! HTTP-servers feature the command HEAD +which this uses to get nothing but the header of a document. When used +on a FTP file, curl displays the file size only. +.IP "-K/--config <config file>" +Specify which config file to read curl arguments from. The config +file is a text file in which command line arguments can be written +which then will be used as if they were written on the actual command +line. If the first column of a config line is a '#' character, the +rest of the line will be treated as a comment. + +Specify the filename as '-' to make curl read the file from stdin. +.IP "-l/--list-only" +(FTP) +When listing an FTP directory, this switch forces a name-only view. +Especially useful if you want to machine-parse the contents of an FTP +directory since the normal directory view doesn't use a standard look +or format. +.IP "-L/--location" +(HTTP/HTTPS) +If the server reports that the requested page has a different location +(indicated with the header line Location:) this flag will let curl +attempt to reattempt the get on the new place. If used together with +-i or -I, headers from all requested pages will be shown. +.IP "-m/--max-time <seconds>" +Maximum time in seconds that you allow the whole operation to take. +This is useful for preventing your batch jobs from hanging for hours +due to slow networks or links going down. +This doesn't work properly in win32 systems. +.IP "-M/--manual" +Manual. Display the huge help text. +.IP "-n/--netrc" +Makes curl scan the +.I .netrc +file in the user's home directory for login name and password. This is +typically used for ftp on unix. If used with http, curl will enable user +authentication. See +.BR netrc(4) +for details on the file format. Curl will not complain if that file +hasn't the right permissions (it should not be world nor group +readable). The environment variable "HOME" is used to find the home +directory. + +A quick and very simple example of how to setup a +.I .netrc +to allow curl to ftp to the machine host.domain.com with user name +'myself' and password 'secret' should look similar to: + +.B "machine host.domain.com user myself password secret" +.IP "-o/--output <file>" +Write output to <file> instead of stdout. If you are using {} or [] to fetch +multiple documents, you can use #<num> in the <file> specifier. That variable +will be replaced with the current string for the URL being fetched. Like in: + + curl http://{one,two}.site.com -o "file_#1.txt" + +or use several variables like: + + curl http://{site,host}.host[1-5].com -o "#1_#2" +.IP "-O/--remote-name" +Write output to a local file named like the remote file we get. (Only +the file part of the remote file is used, the path is cut off.) +.IP "-P/--ftpport <address>" +(FTP) +Reverses the initiator/listenor roles when connecting with ftp. This +switch makes Curl use the PORT command instead of PASV. In +practice, PORT tells the server to connect to the client's specified +address and port, while PASV asks the server for an ip address and +port to connect to. <address> should be one of: + interface - i.e "eth0" to specify which interface's IP address you want to use (Unix only) + IP address - i.e "192.168.10.1" to specify exact IP number + host name - i.e "my.host.domain" to specify machine + "-" - (any single-letter string) to make it pick the machine's default +.IP "-q" +If used as the first parameter on the command line, the +.I $HOME/.curlrc +file will not be read and used as a config file. +.IP "-Q/--quote <comand>" +(FTP) Send an arbitrary command to the remote FTP server, by using the QUOTE +command of the server. Not all servers support this command, and the set of +QUOTE commands are server specific! +.IP "-r/--range <range>" +(HTTP/FTP) +Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP +server. Ranges can be specified in a number of ways. + 0-499 - specifies the first 500 bytes + 500-999 - specifies the second 500 bytes + -500 - specifies the last 500 bytes + 9500- - specifies the bytes from offset 9500 and forward + 0-0,-1 - specifies the first and last byte only(*)(H) + 500-700,600-799 - specifies 300 bytes from offset 500(H) + 100-199,500-599 - specifies two separate 100 bytes ranges(*)(H) + +(*) = NOTE that this will cause the server to reply with a multipart +response! + +You should also be aware that many HTTP/1.1 servers do not have this feature +enabled, so that when you attempt to get a range, you'll instead get the whole +document. + +FTP range downloads only support the simple syntax 'start-stop' (optionally +with one of the numbers omitted). It depends on the non-RFC command SIZE. +.IP "-s/--silent" +Silent mode. Don't show progress meter or error messages. Makes +Curl mute. +.IP "-S/--show-error" +When used with -s it makes curl show error message if it fails. +.IP "-t/--upload" +Transfer the stdin data to the specified file. Curl will read +everything from stdin until EOF and store with the supplied name. If +this is used on a http(s) server, the PUT command will be used. +.IP "-T/--upload-file <file>" +Like -t, but this transfers the specified local file. If there is no +file part in the specified URL, Curl will append the local file +name. NOTE that you must use a trailing / on the last directory to +really prove to Curl that there is no file name or curl will +think that your last directory name is the remote file name to +use. That will most likely cause the upload operation to fail. If +this is used on a http(s) server, the PUT command will be used. +.IP "-u/--user <user:password>" +Specify user and password to use when fetching. See README.curl for detailed +examples of how to use this. If no password is specified, curl will +ask for it interactively. +.IP "-U/--proxy-user <user:password>" +Specify user and password to use for Proxy authentication. If no +password is specified, curl will ask for it interactively. +.IP "-v/--verbose" +Makes the fetching more verbose/talkative. Mostly usable for +debugging. Lines starting with '>' means data sent by curl, '<' +means data received by curl that is hidden in normal cases and lines +starting with '*' means additional info provided by curl. +.IP "-V/--version" +Displays the full version of curl, libcurl and other 3rd party libraries +linked with the executable. +.IP "-x/--proxy <proxyhost[:port]>" +Use specified proxy. If the port number is not specified, it is assumed at +port 1080. +.IP "-X/--request <command>" +(HTTP) +Specifies a custom request to use when communicating with the HTTP server. +The specified request will be used instead of the standard GET. Read the +HTTP 1.1 specification for details and explanations. + +(FTP) +Specifies a custom FTP command to use instead of LIST when doing file lists +with ftp. +.IP "-y/--speed-time <speed>" +Speed Limit. If a download is slower than this given speed, in bytes +per second, for Speed Time seconds it gets aborted. Speed Time is set +with -Y and is 30 if not set. +.IP "-Y/--speed-limit <time>" +Speed Time. If a download is slower than Speed Limit bytes per second +during a Speed Time period, the download gets aborted. If Speed Time +is used, the default Speed Limit will be 1 unless set with -y. +.IP "-z/--time-cond <date expression>" +(HTTP) +Request to get a file that has been modified later than the given time and +date, or one that has been modified before that time. The date expression can +be all sorts of date strings or if it doesn't match any internal ones, it +tries to get the time from a given file name instead! See the +.BR "GNU date(1)" +man page for date expression details. + +Start the date expression with a dash (-) to make it request for a document +that is older than the given date/time, default is a document that is newer +than the specified date/time. +.IP "-3/--sslv3" +(HTTPS) +Forces curl to use SSL version 3 when negotiating with a remote SSL server. +.IP "-2/--sslv2" +(HTTPS) +Forces curl to use SSL version 2 when negotiating with a remote SSL server. +.IP "-#/--progress-bar" +Make curl display progress information as a progress bar instead of the +default statistics. +.IP "--crlf" +(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). +.IP "--stderr <file>" +Redirect all writes to stderr to the specified file instead. If the file name +is a plain '-', it is instead written to stdout. This option has no point when +you're using a shell with decent redirecting capabilities. +.SH FILES +.I ~/.curlrc +.RS +Default config file. + +.SH ENVIRONMENT +.IP "HTTP_PROXY [protocol://]<host>[:port]" +Sets proxy server to use for HTTP. +.IP "HTTPS_PROXY [protocol://]<host>[:port]" +Sets proxy server to use for HTTPS. +.IP "FTP_PROXY [protocol://]<host>[:port]" +Sets proxy server to use for FTP. +.IP "GOPHER_PROXY [protocol://]<host>[:port]" +Sets proxy server to use for GOPHER. +.IP "ALL_PROXY [protocol://]<host>[:port]" +Sets proxy server to use if no protocol-specific proxy is set. +.IP "NO_PROXY <comma-separated list of hosts>" +list of host names that shouldn't go through any proxy. If set to a +asterisk '*' only, it matches all hosts. +.IP "COLUMNS <integer>" +The width of the terminal. This variable only affects curl when the +--progress-bar option is used. +.SH DIAGNOSTICS +There exists a bunch of different error messages that may appear during +bad conditions. They're all pretty verbose and descriptive and therefore +you won't find any closer description of them here. +.SH BUGS +If you do find any (or have other suggestions), mail Daniel Stenberg +<Daniel.Stenberg@haxx.nu>. +.SH AUTHORS / CONTRIBUTORS + - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + - Rafael Sagula <sagula@inf.ufrgs.br> + - Sampo Kellomaki <sampo@iki.fi> + - Linas Vepstas <linas@linas.org> + - Bjorn Reese <breese@mail1.stofanet.dk> + - Johan Anderson <johan@homemail.com> + - Kjell Ericson <Kjell.Ericson@sth.frontec.se> + - Troy Engel <tengel@sonic.net> + - Ryan Nelson <ryan@inch.com> + - Bjorn Stenberg <Bjorn.Stenberg@sth.frontec.se> + - Angus Mackay <amackay@gus.ml.org> + - Eric Young <eay@cryptsoft.com> + - Simon Dick <simond@totally.irrelevant.org> + - Oren Tirosh <oren@monty.hishome.net> + - Steven G. Johnson <stevenj@alum.mit.edu> + - Gilbert Ramirez Jr. <gram@verdict.uthscsa.edu> + - Andr�s Garc�a <ornalux@redestb.es> + - Douglas E. Wegscheid <wegscd@whirlpool.com> + - Mark Butler <butlerm@xmission.com> + - Eric Thelin <eric@generation-i.com> + - Marc Boucher <marc@mbsi.ca> + - Greg Onufer <Greg.Onufer@Eng.Sun.COM> + - Doug Kaufman <dkaufman@rahul.net> + - David Eriksson <david@2good.com> + - Ralph Beckmann <rabe@uni-paderborn.de> + - T. Yamada <tai@imasy.or.jp> + - Lars J. Aas <larsa@sim.no> + - J�rn Hartroth <Joern.Hartroth@telekom.de> + - Matthew Clarke <clamat@van.maves.ca> + - Linus Nielsen <Linus.Nielsen@haxx.nu> + - Felix von Leitner <felix@convergence.de> + - Dan Zitter <dzitter@zitter.net> + - Jongki Suwandi <Jongki.Suwandi@eng.sun.com> + - Chris Maltby <chris@aurema.com> +.SH WWW +http://curl.haxx.nu +.SH FTP +ftp://ftp.sunet.se/pub/www/utilities/curl/ +.SH "SEE ALSO" +.BR ftp (1), +.BR wget (1), +.BR snarf (1)
curl_631_general.patch+1265 −0 added@@ -0,0 +1,1265 @@ +Only in curl-6.3.1: config-win32.h +Only in curl-6.3.1: config-win32.h~ +Only in curl-6.3.1: config.cache +Only in curl-6.3.1: config.h +diff -cr curl-6.3.1-org/config.h.in curl-6.3.1/config.h.in +*** curl-6.3.1-org/config.h.in Sun Oct 17 13:18:34 1999 +--- curl-6.3.1/config.h.in Thu Dec 9 14:23:01 1999 +*************** +*** 37,42 **** +--- 37,45 ---- + /* The number of bytes in a long long. */ + #undef SIZEOF_LONG_LONG + ++ /* Define if you have the closesocket function. */ ++ #undef HAVE_CLOSESOCKET ++ + /* Define if you have the gethostbyaddr function. */ + #undef HAVE_GETHOSTBYADDR + +*************** +*** 109,114 **** +--- 112,120 ---- + /* Define if you have the <getopt.h> header file. */ + #undef HAVE_GETOPT_H + ++ /* Define if you have the <io.h> header file. */ ++ #undef HAVE_IO_H ++ + /* Define if you have the <netdb.h> header file. */ + #undef HAVE_NETDB_H + +*************** +*** 169,177 **** +--- 175,189 ---- + /* Define if you have the <termios.h> header file. */ + #undef HAVE_TERMIOS_H + ++ /* Define if you have the <time.h> header file. */ ++ #undef HAVE_TIME_H ++ + /* Define if you have the <unistd.h> header file. */ + #undef HAVE_UNISTD_H + ++ /* Define if you have the <winsock.h> header file. */ ++ #undef HAVE_WINSOCK_H ++ + /* Define if you have the <x509.h> header file. */ + #undef HAVE_X509_H + +Only in curl-6.3.1: config.log +Only in curl-6.3.1: config.status +Only in curl-6.3.1: configure +diff -cr curl-6.3.1-org/configure.in curl-6.3.1/configure.in +*** curl-6.3.1-org/configure.in Wed Nov 24 14:48:38 1999 +--- curl-6.3.1/configure.in Thu Dec 9 14:34:36 1999 +*************** +*** 1,7 **** + dnl $Id$ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(lib/urldata.h) +! AM_CONFIG_HEADER(config.h) + AM_INIT_AUTOMAKE(curl,"6.3.1") + + dnl Checks for programs. +--- 1,7 ---- + dnl $Id$ + dnl Process this file with autoconf to produce a configure script. + AC_INIT(lib/urldata.h) +! AM_CONFIG_HEADER(config.h src/config.h) + AM_INIT_AUTOMAKE(curl,"6.3.1") + + dnl Checks for programs. +*************** +*** 133,139 **** + sgtty.h \ + fcntl.h \ + dlfcn.h \ +! alloca.h ) + + + dnl Check for libz header +--- 133,143 ---- + sgtty.h \ + fcntl.h \ + dlfcn.h \ +! alloca.h \ +! winsock.h \ +! time.h \ +! io.h +! ) + + + dnl Check for libz header +*************** +*** 175,181 **** + tcsetattr \ + tcgetattr \ + perror \ +! getpass ) + + + +--- 179,187 ---- + tcsetattr \ + tcgetattr \ + perror \ +! getpass \ +! closesocket +! ) + + + +Only in curl-6.3.1: configure.in~ +Common subdirectories: curl-6.3.1-org/include and curl-6.3.1/include +Common subdirectories: curl-6.3.1-org/lib and curl-6.3.1/lib +Common subdirectories: curl-6.3.1-org/perl and curl-6.3.1/perl +Common subdirectories: curl-6.3.1-org/src and curl-6.3.1/src +Only in curl-6.3.1: stamp-h1 +Common subdirectories: curl-6.3.1-org/include/curl and curl-6.3.1/include/curl +diff -cr curl-6.3.1-org/include/curl/curl.h curl-6.3.1/include/curl/curl.h +*** curl-6.3.1-org/include/curl/curl.h Wed Nov 24 14:48:37 1999 +--- curl-6.3.1/include/curl/curl.h Wed Dec 8 15:34:53 1999 +*************** +*** 352,360 **** +--- 352,367 ---- + /* HTTP request, for odd commands like DELETE, TRACE and others */ + T(HTTPREQUEST, OBJECTPOINT, 35), + ++ /* Progress mode sets alternative progress mode displays, the only ++ one defined today is 1 which makes the #-style progress bar. */ ++ T(PROGRESSMODE, LONG, 36), ++ + URGTAG_LASTENTRY /* the last unusued */ + } UrgTag; + ++ #define CURL_PROGRESS_STATS 0 /* default progress display */ ++ #define CURL_PROGRESS_BAR 1 ++ + typedef enum { + TIMECOND_NONE, + +Only in curl-6.3.1/include/curl: curl.h~ +Only in curl-6.3.1-org/include/curl: setup.h +Only in curl-6.3.1/include/curl: setup.h~ +diff -cr curl-6.3.1-org/lib/Makefile curl-6.3.1/lib/Makefile +*** curl-6.3.1-org/lib/Makefile Wed Dec 8 13:38:22 1999 +--- curl-6.3.1/lib/Makefile Thu Dec 9 15:42:21 1999 +*************** +*** 90,98 **** + + + DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. +! CPPFLAGS = +! LDFLAGS = +! LIBS = -ldl -lsocket -lnsl + libcurl_a_LIBADD = + libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \ + formdata.o upload.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \ +--- 90,98 ---- + + + DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. +! CPPFLAGS = -I/homes/qradlsg/openssl-0.9.4/include +! LDFLAGS = -L/homes/qradlsg/openssl-0.9.4 +! LIBS = -lssl -lcrypto -ldl -lsocket -lnsl + libcurl_a_LIBADD = + libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \ + formdata.o upload.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \ +*************** +*** 99,105 **** + speedcheck.o getdate.o download.o ldap.o ssluse.o version.o getenv.o \ + escape.o mprintf.o telnet.o getpass.o netrc.o + AR = ar +! CFLAGS = -g -O2 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +--- 99,105 ---- + speedcheck.o getdate.o download.o ldap.o ssluse.o version.o getenv.o \ + escape.o mprintf.o telnet.o getpass.o netrc.o + AR = ar +! CFLAGS = -g -O2 -Wall -pedantic + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +Only in curl-6.3.1/lib: Makefile~ +diff -cr curl-6.3.1-org/lib/cookie.c curl-6.3.1/lib/cookie.c +*** curl-6.3.1-org/lib/cookie.c Fri Nov 12 15:54:59 1999 +--- curl-6.3.1/lib/cookie.c Thu Dec 9 15:44:37 1999 +*************** +*** 60,66 **** + #include <ctype.h> + + #include "cookie.h" +! #include <curl/setup.h> + #include "getdate.h" + + /**************************************************************************** +--- 60,66 ---- + #include <ctype.h> + + #include "cookie.h" +! #include "setup.h" + #include "getdate.h" + + /**************************************************************************** +*************** +*** 134,140 **** + } + } + ptr=strtok(NULL, ";"); +! while(ptr && *ptr && isspace(*ptr)) + ptr++; + } + } +--- 134,140 ---- + } + } + ptr=strtok(NULL, ";"); +! while(ptr && *ptr && isspace((int)*ptr)) + ptr++; + } + } +*************** +*** 288,294 **** + { + char line[MAX_COOKIE_LINE]; + struct CookieInfo *c; +- struct Cookie *co; + FILE *fp; + + c = (struct CookieInfo *)malloc(sizeof(struct CookieInfo)); +--- 288,293 ---- +*************** +*** 303,309 **** + if(strnequal("Set-Cookie:", line, 11)) { + /* This is a cookie line, get it! */ + char *lineptr=&line[11]; +! while(*lineptr && isspace(*lineptr)) + lineptr++; + + cookie_add(c, TRUE, lineptr); +--- 302,308 ---- + if(strnequal("Set-Cookie:", line, 11)) { + /* This is a cookie line, get it! */ + char *lineptr=&line[11]; +! while(*lineptr && isspace((int)*lineptr)) + lineptr++; + + cookie_add(c, TRUE, lineptr); +*************** +*** 311,317 **** + else { + /* This might be a netscape cookie-file line, get it! */ + char *lineptr=line; +! while(*lineptr && isspace(*lineptr)) + lineptr++; + + cookie_add(c, FALSE, lineptr); +--- 310,316 ---- + else { + /* This might be a netscape cookie-file line, get it! */ + char *lineptr=line; +! while(*lineptr && isspace((int)*lineptr)) + lineptr++; + + cookie_add(c, FALSE, lineptr); +Only in curl-6.3.1/lib: cookie.c~ +Binary files curl-6.3.1-org/lib/cookie.o and curl-6.3.1/lib/cookie.o differ +diff -cr curl-6.3.1-org/lib/dict.c curl-6.3.1/lib/dict.c +*** curl-6.3.1-org/lib/dict.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/dict.c Thu Dec 9 14:27:23 1999 +*************** +*** 49,55 **** + + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 49,55 ---- + + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Binary files curl-6.3.1-org/lib/dict.o and curl-6.3.1/lib/dict.o differ +diff -cr curl-6.3.1-org/lib/download.c curl-6.3.1/lib/download.c +*** curl-6.3.1-org/lib/download.c Tue Nov 23 09:24:26 1999 +--- curl-6.3.1/lib/download.c Thu Dec 9 14:27:23 1999 +*************** +*** 42,48 **** + #include <stdio.h> + #include <string.h> + +! #include <curl/setup.h> + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +--- 42,48 ---- + #include <stdio.h> + #include <string.h> + +! #include "setup.h" + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +Binary files curl-6.3.1-org/lib/download.o and curl-6.3.1/lib/download.o differ +diff -cr curl-6.3.1-org/lib/file.c curl-6.3.1/lib/file.c +*** curl-6.3.1-org/lib/file.c Fri Nov 19 08:25:40 1999 +--- curl-6.3.1/lib/file.c Thu Dec 9 14:27:24 1999 +*************** +*** 49,55 **** + + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 49,55 ---- + + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Binary files curl-6.3.1-org/lib/file.o and curl-6.3.1/lib/file.o differ +diff -cr curl-6.3.1-org/lib/formdata.c curl-6.3.1/lib/formdata.c +*** curl-6.3.1-org/lib/formdata.c Tue Nov 23 17:54:36 1999 +--- curl-6.3.1/lib/formdata.c Thu Dec 9 14:27:25 1999 +*************** +*** 56,62 **** + + #include <time.h> + +! #include <curl/setup.h> + #include <curl/curl.h> + #include "formdata.h" + +--- 56,62 ---- + + #include <time.h> + +! #include "setup.h" + #include <curl/curl.h> + #include "formdata.h" + +Binary files curl-6.3.1-org/lib/formdata.o and curl-6.3.1/lib/formdata.o differ +diff -cr curl-6.3.1-org/lib/ftp.c curl-6.3.1/lib/ftp.c +*** curl-6.3.1-org/lib/ftp.c Tue Nov 23 09:25:06 1999 +--- curl-6.3.1/lib/ftp.c Thu Dec 9 15:43:10 1999 +*************** +*** 44,50 **** + #include <ctype.h> + #include <errno.h> + +! #include <curl/setup.h> + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +--- 44,50 ---- + #include <ctype.h> + #include <errno.h> + +! #include "setup.h" + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +*************** +*** 728,734 **** + char *ptr2; + + from=strtol(data->range, &ptr, 0); +! while(ptr && *ptr && (isspace(*ptr) || (*ptr=='-'))) + ptr++; + to=strtol(ptr, &ptr2, 0); + if(ptr == ptr2) { +--- 728,734 ---- + char *ptr2; + + from=strtol(data->range, &ptr, 0); +! while(ptr && *ptr && (isspace((int)*ptr) || (*ptr=='-'))) + ptr++; + to=strtol(ptr, &ptr2, 0); + if(ptr == ptr2) { +*************** +*** 886,892 **** + if('(' == *bytes) + break; + /* if only skip digits, or else we're in deep trouble */ +! if(!isdigit(*bytes)) { + bytes=NULL; + break; + } +--- 886,892 ---- + if('(' == *bytes) + break; + /* if only skip digits, or else we're in deep trouble */ +! if(!isdigit((int)*bytes)) { + bytes=NULL; + break; + } +Only in curl-6.3.1/lib: ftp.c~ +Binary files curl-6.3.1-org/lib/ftp.o and curl-6.3.1/lib/ftp.o differ +diff -cr curl-6.3.1-org/lib/hostip.c curl-6.3.1/lib/hostip.c +*** curl-6.3.1-org/lib/hostip.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/hostip.c Thu Dec 9 14:27:27 1999 +*************** +*** 40,46 **** + + #include <string.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 40,46 ---- + + #include <string.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Binary files curl-6.3.1-org/lib/hostip.o and curl-6.3.1/lib/hostip.o differ +diff -cr curl-6.3.1-org/lib/http.c curl-6.3.1/lib/http.c +*** curl-6.3.1-org/lib/http.c Sat Oct 30 17:43:52 1999 +--- curl-6.3.1/lib/http.c Thu Dec 9 14:27:27 1999 +*************** +*** 49,55 **** + + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 49,55 ---- + + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Binary files curl-6.3.1-org/lib/http.o and curl-6.3.1/lib/http.o differ +diff -cr curl-6.3.1-org/lib/if2ip.c curl-6.3.1/lib/if2ip.c +*** curl-6.3.1-org/lib/if2ip.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/if2ip.c Thu Dec 9 14:27:28 1999 +*************** +*** 42,48 **** + #include <stdlib.h> + #include <string.h> + +! #include <curl/setup.h> + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +--- 42,48 ---- + #include <stdlib.h> + #include <string.h> + +! #include "setup.h" + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +diff -cr curl-6.3.1-org/lib/if2ip.h curl-6.3.1/lib/if2ip.h +*** curl-6.3.1-org/lib/if2ip.h Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/if2ip.h Thu Dec 9 14:27:49 1999 +*************** +*** 39,45 **** + * + * ------------------------------------------------------------ + ****************************************************************************/ +! #include <curl/setup.h> + + #ifndef WIN32 + char *if2ip(char *interface); +--- 39,45 ---- + * + * ------------------------------------------------------------ + ****************************************************************************/ +! #include "setup.h" + + #ifndef WIN32 + char *if2ip(char *interface); +Binary files curl-6.3.1-org/lib/if2ip.o and curl-6.3.1/lib/if2ip.o differ +diff -cr curl-6.3.1-org/lib/ldap.c curl-6.3.1/lib/ldap.c +*** curl-6.3.1-org/lib/ldap.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/ldap.c Thu Dec 9 15:44:17 1999 +*************** +*** 48,54 **** + #include <sys/stat.h> + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) + #else +--- 48,54 ---- + #include <sys/stat.h> + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) + #else +*************** +*** 125,130 **** +--- 125,131 ---- + struct UrlData *data = (struct UrlData *)param; + + printf("%s\n", text); ++ return 0; + } + + /*********************************************************************** +*************** +*** 145,155 **** +--- 146,158 ---- + void *server; + void *result; + void *entryIterator; ++ #if 0 + char *dn; + char **attrArray; + char *attrIterator; + char *attrString; + void *dummy; ++ #endif + int ldaptext; + + infof(data, "LDAP: %s %s\n", data->url); +Only in curl-6.3.1/lib: ldap.c~ +Binary files curl-6.3.1-org/lib/ldap.o and curl-6.3.1/lib/ldap.o differ +Binary files curl-6.3.1-org/lib/libcurl.a and curl-6.3.1/lib/libcurl.a differ +diff -cr curl-6.3.1-org/lib/netrc.c curl-6.3.1/lib/netrc.c +*** curl-6.3.1-org/lib/netrc.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/netrc.c Thu Dec 9 14:27:29 1999 +*************** +*** 54,60 **** + #include <stdlib.h> + #include <string.h> + +! #include <curl/setup.h> + #include "getenv.h" + + /* Debug this single source file with: +--- 54,60 ---- + #include <stdlib.h> + #include <string.h> + +! #include "setup.h" + #include "getenv.h" + + /* Debug this single source file with: +Binary files curl-6.3.1-org/lib/netrc.o and curl-6.3.1/lib/netrc.o differ +diff -cr curl-6.3.1-org/lib/progress.c curl-6.3.1/lib/progress.c +*** curl-6.3.1-org/lib/progress.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/progress.c Thu Dec 9 14:27:29 1999 +*************** +*** 39,45 **** + ****************************************************************************/ + + #include <string.h> +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #if defined(__MINGW32__) +--- 39,45 ---- + ****************************************************************************/ + + #include <string.h> +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #if defined(__MINGW32__) +*************** +*** 56,77 **** + /* --- start of progress routines --- */ + int progressmax=-1; + +- static int progressmode=0; + static int prev = 0; + static int width = 0; + +- void ProgressMode(int mode) +- { +- progressmode=mode; +- } +- + void ProgressInit(struct UrlData *data, int max) + { +! static char beenhere=0; +! +! if(beenhere || (data->conf&(CONF_NOPROGRESS|CONF_MUTE))) + return; +! /*beenhere=1;*/ + prev = 0; + + /* TODO: get terminal width through ansi escapes or something similar. +--- 56,69 ---- + /* --- start of progress routines --- */ + int progressmax=-1; + + static int prev = 0; + static int width = 0; + + void ProgressInit(struct UrlData *data, int max) + { +! if(data->conf&(CONF_NOPROGRESS|CONF_MUTE)) + return; +! + prev = 0; + + /* TODO: get terminal width through ansi escapes or something similar. +*************** +*** 89,95 **** + return; + } + +! if ( progressmode == URG_PROGRESS_MODE_STATS ) + fprintf(stderr, " %% Received Total Speed Time left Total Curr.Speed\n"); + } + +--- 81,87 ---- + return; + } + +! if ( data->progressmode == CURL_PROGRESS_STATS ) + fprintf(stderr, " %% Received Total Speed Time left Total Curr.Speed\n"); + } + +*************** +*** 104,111 **** + void ProgressShow(struct UrlData *data, + int point, struct timeval start, struct timeval now, bool force) + { +! switch ( progressmode ) { +! case URG_PROGRESS_MODE_STATS: + { + static long lastshow; + double percen; +--- 96,103 ---- + void ProgressShow(struct UrlData *data, + int point, struct timeval start, struct timeval now, bool force) + { +! switch ( data->progressmode ) { +! case CURL_PROGRESS_STATS: + { + static long lastshow; + double percen; +*************** +*** 172,178 **** + lastshow = now.tv_sec; + break; + } +! case URG_PROGRESS_MODE_BAR: /* 19990617 larsa */ + { + if (point == prev) break; + if (progressmax == -1) { +--- 164,170 ---- + lastshow = now.tv_sec; + break; + } +! case CURL_PROGRESS_BAR: /* 19990617 larsa */ + { + if (point == prev) break; + if (progressmax == -1) { +Only in curl-6.3.1/lib: progress.c~ +diff -cr curl-6.3.1-org/lib/progress.h curl-6.3.1/lib/progress.h +*** curl-6.3.1-org/lib/progress.h Mon Sep 6 08:59:41 1999 +--- curl-6.3.1/lib/progress.h Thu Dec 9 14:27:50 1999 +*************** +*** 51,58 **** + /* Don't show progress for sizes smaller than: */ + #define LEAST_SIZE_PROGRESS BUFSIZE + +- /* we want more progress info modes... */ +- #define URG_PROGRESS_MODE_STATS (0) /* default is the mode with value 0 */ +- #define URG_PROGRESS_MODE_BAR (1) +- + #endif /* __PROGRESS_H */ +--- 51,54 ---- +Only in curl-6.3.1/lib: progress.h~ +Binary files curl-6.3.1-org/lib/progress.o and curl-6.3.1/lib/progress.o differ +Only in curl-6.3.1/lib: replace.sh +Only in curl-6.3.1/lib: replace.sh~ +diff -cr curl-6.3.1-org/lib/sendf.c curl-6.3.1/lib/sendf.c +*** curl-6.3.1-org/lib/sendf.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/sendf.c Thu Dec 9 14:27:30 1999 +*************** +*** 42,48 **** + #include <stdarg.h> + #include <stdlib.h> + +! #include <curl/setup.h> + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +--- 42,48 ---- + #include <stdarg.h> + #include <stdlib.h> + +! #include "setup.h" + + #ifdef HAVE_UNISTD_H + #include <unistd.h> +Binary files curl-6.3.1-org/lib/sendf.o and curl-6.3.1/lib/sendf.o differ +Only in curl-6.3.1/lib: setup.h +Only in curl-6.3.1/lib: setup.h~ +diff -cr curl-6.3.1-org/lib/speedcheck.h curl-6.3.1/lib/speedcheck.h +*** curl-6.3.1-org/lib/speedcheck.h Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/speedcheck.h Thu Dec 9 14:27:50 1999 +*************** +*** 40,46 **** + * ------------------------------------------------------------ + ****************************************************************************/ + +! #include <curl/setup.h> + + #include "timeval.h" + +--- 40,46 ---- + * ------------------------------------------------------------ + ****************************************************************************/ + +! #include "setup.h" + + #include "timeval.h" + +Binary files curl-6.3.1-org/lib/speedcheck.o and curl-6.3.1/lib/speedcheck.o differ +diff -cr curl-6.3.1-org/lib/ssluse.c curl-6.3.1/lib/ssluse.c +*** curl-6.3.1-org/lib/ssluse.c Mon Sep 6 08:59:41 1999 +--- curl-6.3.1/lib/ssluse.c Thu Dec 9 14:27:30 1999 +*************** +*** 133,138 **** +--- 133,152 ---- + + #endif + ++ #if SSL_VERIFY_CERT ++ int cert_verify_callback(int ok, X509_STORE_CTX *ctx) ++ { ++ X509 *err_cert; ++ char buf[256]; ++ ++ err_cert=X509_STORE_CTX_get_current_cert(ctx); ++ X509_NAME_oneline(X509_get_subject_name(err_cert),buf,256); ++ ++ return 1; ++ } ++ ++ #endif ++ + /* ====================================================== */ + int + UrgSSLConnect (struct UrlData *data) +*************** +*** 176,182 **** + return 2; + } + } +! /* Lets make a SSL structure */ + data->ssl = SSL_new (data->ctx); + SSL_set_connect_state (data->ssl); + +--- 190,204 ---- + return 2; + } + } +! +! #if SSL_VERIFY_CERT +! SSL_CTX_set_verify(data->ctx, +! SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT| +! SSL_VERIFY_CLIENT_ONCE, +! cert_verify_callback); +! #endif +! +! /* Lets make an SSL structure */ + data->ssl = SSL_new (data->ctx); + SSL_set_connect_state (data->ssl); + +*************** +*** 227,232 **** +--- 249,261 ---- + /* We could do all sorts of certificate verification stuff here before + deallocating the certificate. */ + ++ ++ #if SSL_VERIFY_CERT ++ infof(data, "Verify result: %d\n", SSL_get_verify_result(data->ssl)); ++ #endif ++ ++ ++ + X509_free (data->server_cert); + #else /* USE_SSLEAY */ + /* this is for "-ansi -Wall -pedantic" to stop complaining! (rabe) */ +Only in curl-6.3.1/lib: ssluse.c~ +Binary files curl-6.3.1-org/lib/ssluse.o and curl-6.3.1/lib/ssluse.o differ +diff -cr curl-6.3.1-org/lib/telnet.c curl-6.3.1/lib/telnet.c +*** curl-6.3.1-org/lib/telnet.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/telnet.c Thu Dec 9 14:27:31 1999 +*************** +*** 57,63 **** + + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 57,63 ---- + + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Binary files curl-6.3.1-org/lib/telnet.o and curl-6.3.1/lib/telnet.o differ +diff -cr curl-6.3.1-org/lib/timeval.h curl-6.3.1/lib/timeval.h +*** curl-6.3.1-org/lib/timeval.h Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/timeval.h Thu Dec 9 14:27:51 1999 +*************** +*** 46,52 **** + #include <sys/time.h> + #endif + +! #include <curl/setup.h> + + #ifndef HAVE_GETTIMEOFDAY + #if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) +--- 46,52 ---- + #include <sys/time.h> + #endif + +! #include "setup.h" + + #ifndef HAVE_GETTIMEOFDAY + #if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) +Binary files curl-6.3.1-org/lib/timeval.o and curl-6.3.1/lib/timeval.o differ +diff -cr curl-6.3.1-org/lib/upload.c curl-6.3.1/lib/upload.c +*** curl-6.3.1-org/lib/upload.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/upload.c Thu Dec 9 14:27:32 1999 +*************** +*** 38,44 **** + * ------------------------------------------------------------ + ****************************************************************************/ + +! #include <curl/setup.h> + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif +--- 38,44 ---- + * ------------------------------------------------------------ + ****************************************************************************/ + +! #include "setup.h" + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif +Binary files curl-6.3.1-org/lib/upload.o and curl-6.3.1/lib/upload.o differ +diff -cr curl-6.3.1-org/lib/url.c curl-6.3.1/lib/url.c +*** curl-6.3.1-org/lib/url.c Fri Nov 19 08:07:10 1999 +--- curl-6.3.1/lib/url.c Thu Dec 9 14:27:32 1999 +*************** +*** 54,60 **** + + #include <errno.h> + +! #include <curl/setup.h> + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +--- 54,60 ---- + + #include <errno.h> + +! #include "setup.h" + + #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) + #include <winsock.h> +*************** +*** 387,392 **** +--- 387,395 ---- + case URGTAG_POSTFIELDS: + data->postfields = (char *)param_obj; + break; ++ case URGTAG_PROGRESSMODE: ++ data->progressmode = (long)param_long; ++ break; + case URGTAG_REFERER: + data->referer = (char *)param_obj; + break; +Only in curl-6.3.1/lib: url.c~ +Binary files curl-6.3.1-org/lib/url.o and curl-6.3.1/lib/url.o differ +diff -cr curl-6.3.1-org/lib/urldata.h curl-6.3.1/lib/urldata.h +*** curl-6.3.1-org/lib/urldata.h Sat Oct 30 17:44:42 1999 +--- curl-6.3.1/lib/urldata.h Thu Dec 9 14:27:52 1999 +*************** +*** 42,48 **** + + /* This file is for lib internal stuff */ + +! #include <curl/setup.h> + + #ifndef MAXHOSTNAMELEN + #define MAXHOSTNAMELEN 256 +--- 42,48 ---- + + /* This file is for lib internal stuff */ + +! #include "setup.h" + + #ifndef MAXHOSTNAMELEN + #define MAXHOSTNAMELEN 256 +*************** +*** 184,189 **** +--- 184,190 ---- + + char *headerbuff; /* allocated buffer to store headers in */ + int headersize; /* size of the allocation */ ++ int progressmode; /* what kind of progress meter to display */ + + #define MAX_CURL_USER_LENGTH 128 + #define MAX_CURL_PASSWORD_LENGTH 128 +Only in curl-6.3.1/lib: urldata.h~ +diff -cr curl-6.3.1-org/lib/version.c curl-6.3.1/lib/version.c +*** curl-6.3.1-org/lib/version.c Thu Oct 14 00:27:12 1999 +--- curl-6.3.1/lib/version.c Thu Dec 9 14:27:32 1999 +*************** +*** 41,47 **** + #include <string.h> + #include <stdio.h> + +! #include <curl/setup.h> + #include <curl/curl.h> + #include "urldata.h" + +--- 41,47 ---- + #include <string.h> + #include <stdio.h> + +! #include "setup.h" + #include <curl/curl.h> + #include "urldata.h" + +Binary files curl-6.3.1-org/lib/version.o and curl-6.3.1/lib/version.o differ +diff -cr curl-6.3.1-org/src/Makefile curl-6.3.1/src/Makefile +*** curl-6.3.1-org/src/Makefile Wed Dec 8 13:39:41 1999 +--- curl-6.3.1/src/Makefile Thu Dec 9 14:47:51 1999 +*************** +*** 97,107 **** + + + DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. +! LDFLAGS = +! LIBS = -ldl -lsocket -lnsl + curl_OBJECTS = main.o hugehelp.o urlglob.o + curl_LDFLAGS = +! CFLAGS = -g -O2 + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +--- 97,107 ---- + + + DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. +! LDFLAGS = -L/homes/qradlsg/openssl-0.9.4 +! LIBS = -lssl -lcrypto -ldl -lsocket -lnsl + curl_OBJECTS = main.o hugehelp.o urlglob.o + curl_LDFLAGS = +! CFLAGS = -g -O2 -Wall + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +diff -cr curl-6.3.1-org/src/Makefile.in curl-6.3.1/src/Makefile.in +*** curl-6.3.1-org/src/Makefile.in Wed Dec 8 13:38:21 1999 +--- curl-6.3.1/src/Makefile.in Thu Dec 9 14:40:07 1999 +*************** +*** 101,107 **** + LIBS = @LIBS@ + curl_OBJECTS = main.o hugehelp.o urlglob.o + curl_LDFLAGS = +! CFLAGS = @CFLAGS@ + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +--- 101,107 ---- + LIBS = @LIBS@ + curl_OBJECTS = main.o hugehelp.o urlglob.o + curl_LDFLAGS = +! CFLAGS = @CFLAGS@ -Wall + COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) + CCLD = $(CC) + LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +Only in curl-6.3.1/src: Makefile.in~ +Only in curl-6.3.1/src: config-win32.h +Only in curl-6.3.1/src: config-win32.h~ +Only in curl-6.3.1/src: config.h +Only in curl-6.3.1/src: config.h.in +Only in curl-6.3.1/src: config.h.in~ +Only in curl-6.3.1/src: curl +Only in curl-6.3.1/src: hugehelp.c +Binary files curl-6.3.1-org/src/hugehelp.o and curl-6.3.1/src/hugehelp.o differ +diff -cr curl-6.3.1-org/src/main.c curl-6.3.1/src/main.c +*** curl-6.3.1-org/src/main.c Sat Oct 30 17:45:12 1999 +--- curl-6.3.1/src/main.c Thu Dec 9 14:50:12 1999 +*************** +*** 45,53 **** + #include <sys/stat.h> + #include <ctype.h> + +! #include "curl/setup.h" +! #include "curl/curl.h" +! #include "curl/mprintf.h" + #include "../lib/getdate.h" + #ifdef GLOBURL + #include "urlglob.h" +--- 45,52 ---- + #include <sys/stat.h> + #include <ctype.h> + +! #include <curl/curl.h> +! #include <curl/mprintf.h> + #include "../lib/getdate.h" + #ifdef GLOBURL + #include "urlglob.h" +*************** +*** 54,71 **** + #define CURLseparator "--_curl_--" + #define MIMEseparator "_curl_" + #endif + #include "version.h" + +! #ifdef WIN32 + #include <io.h> +! #else + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif +- #endif + + extern void hugehelp(void); +- extern void ProgressMode(int); + + static void helpf(char *fmt, ...) + { +--- 53,73 ---- + #define CURLseparator "--_curl_--" + #define MIMEseparator "_curl_" + #endif ++ ++ /* This is now designed to have its own local setup.h */ ++ #include "setup.h" ++ + #include "version.h" + +! #ifdef HAVE_IO_H /* typical win32 habit */ + #include <io.h> +! #endif +! + #ifdef HAVE_UNISTD_H + #include <unistd.h> + #endif + + extern void hugehelp(void); + + static void helpf(char *fmt, ...) + { +*************** +*** 173,178 **** +--- 175,181 ---- + bool crlf; + char *cookiefile; + char *httprequest; ++ bool progressmode; + + FILE *errors; /* if stderr redirect is requested */ + +*************** +*** 412,419 **** + else + config->errors = stdout; + break; +! case '#': /* 19990617 larsa */ +! ProgressMode(1); + break; + case '2': + /* SSL version 2 */ +--- 415,422 ---- + else + config->errors = stdout; + break; +! case '#': /* added 19990617 larsa */ +! config->progressmode ^= CURL_PROGRESS_BAR; + break; + case '2': + /* SSL version 2 */ +*************** +*** 833,839 **** + int infilesize=-1; /* -1 means unknown */ + bool stillflags=TRUE; + +! int res; + int i; + struct Configurable config; + +--- 836,842 ---- + int infilesize=-1; /* -1 means unknown */ + bool stillflags=TRUE; + +! int res=URG_OK; + int i; + struct Configurable config; + +*************** +*** 937,943 **** + printf("Content-Type: multipart/mixed; boundary=%s\n\n", MIMEseparator); + #endif + } +! for (i = 0; url = next_url(urls); ++i) { + if (outfiles) + config.outfile = strdup(outfiles); + #endif +--- 940,946 ---- + printf("Content-Type: multipart/mixed; boundary=%s\n\n", MIMEseparator); + #endif + } +! for (i = 0; (url = next_url(urls)); ++i) { + if (outfiles) + config.outfile = strdup(outfiles); + #endif +*************** +*** 1105,1116 **** + URGTAG_CRLF, config.crlf, + URGTAG_QUOTE, config.quote, + URGTAG_WRITEHEADER, headerfilep, +- + URGTAG_COOKIEFILE, config.cookiefile, + URGTAG_SSLVERSION, config.ssl_version, + URGTAG_TIMECONDITION, config.timecond, + URGTAG_TIMEVALUE, config.condtime, + URGTAG_HTTPREQUEST, config.httprequest, + URGTAG_DONE); /* always terminate the list of tags */ + if(!config.errors) + config.errors = stderr; +--- 1108,1119 ---- + URGTAG_CRLF, config.crlf, + URGTAG_QUOTE, config.quote, + URGTAG_WRITEHEADER, headerfilep, + URGTAG_COOKIEFILE, config.cookiefile, + URGTAG_SSLVERSION, config.ssl_version, + URGTAG_TIMECONDITION, config.timecond, + URGTAG_TIMEVALUE, config.condtime, + URGTAG_HTTPREQUEST, config.httprequest, ++ URGTAG_PROGRESSMODE, config.progressmode, + URGTAG_DONE); /* always terminate the list of tags */ + if(!config.errors) + config.errors = stderr; +Only in curl-6.3.1/src: main.c~ +Binary files curl-6.3.1-org/src/main.o and curl-6.3.1/src/main.o differ +Only in curl-6.3.1/src: setup.h +Only in curl-6.3.1/src: setup.h~ +Only in curl-6.3.1/src: stamp-h2 +diff -cr curl-6.3.1-org/src/urlglob.c curl-6.3.1/src/urlglob.c +*** curl-6.3.1-org/src/urlglob.c Thu Oct 14 00:28:43 1999 +--- curl-6.3.1/src/urlglob.c Wed Dec 8 16:55:55 1999 +*************** +*** 41,46 **** +--- 41,47 ---- + #include <stdio.h> + #include <stdlib.h> + #include <string.h> ++ #include <ctype.h> + #include <curl/curl.h> + #include "urlglob.h" + +*************** +*** 117,123 **** + - num range with leading zeros: e.g. "001-999]" + expression is checked for well-formedness and collected until the next ']' + */ +- char* buf = glob_buffer; + URLPattern *pat; + char *c; + +--- 118,123 ---- +*************** +*** 125,131 **** + /* patterns 0,1,2,... correspond to size=1,3,5,... */ + ++glob_expand->size; + +! if (isalpha(*pattern)) { /* character range detected */ + pat->type = UPTCharRange; + if (sscanf(pattern, "%c-%c]", &pat->content.CharRange.min_c, &pat->content.CharRange.max_c) != 2 || + pat->content.CharRange.min_c >= pat->content.CharRange.max_c || +--- 125,131 ---- + /* patterns 0,1,2,... correspond to size=1,3,5,... */ + ++glob_expand->size; + +! if (isalpha((int)*pattern)) { /* character range detected */ + pat->type = UPTCharRange; + if (sscanf(pattern, "%c-%c]", &pat->content.CharRange.min_c, &pat->content.CharRange.max_c) != 2 || + pat->content.CharRange.min_c >= pat->content.CharRange.max_c || +*************** +*** 139,145 **** + return (pat->content.CharRange.max_c - pat->content.CharRange.min_c + 1) * + glob_word(pattern + 4, pos + 4); + } +! if (isdigit(*pattern)) { /* numeric range detected */ + pat->type = UPTNumRange; + pat->content.NumRange.padlength = 0; + if (sscanf(pattern, "%d-%d]", &pat->content.NumRange.min_n, &pat->content.NumRange.max_n) != 2 || +--- 139,145 ---- + return (pat->content.CharRange.max_c - pat->content.CharRange.min_c + 1) * + glob_word(pattern + 4, pos + 4); + } +! if (isdigit((int)*pattern)) { /* numeric range detected */ + pat->type = UPTNumRange; + pat->content.NumRange.padlength = 0; + if (sscanf(pattern, "%d-%d]", &pat->content.NumRange.min_n, &pat->content.NumRange.max_n) != 2 || +*************** +*** 150,156 **** + } + if (*pattern == '0') { /* leading zero specified */ + c = pattern; +! while (isdigit(*c++)) + ++pat->content.NumRange.padlength; /* padding length is set for all instances + of this pattern */ + } +--- 150,156 ---- + } + if (*pattern == '0') { /* leading zero specified */ + c = pattern; +! while (isdigit((int)*c++)) + ++pat->content.NumRange.padlength; /* padding length is set for all instances + of this pattern */ + } +*************** +*** 296,302 **** + + while (*filename != '\0') { + if (*filename == '#') { +! if (!isdigit(*++filename) || + *filename == '0') { /* only '#1' ... '#9' allowed */ + printf("illegal matching expression\n"); + exit(URG_URL_MALFORMAT); +--- 296,302 ---- + + while (*filename != '\0') { + if (*filename == '#') { +! if (!isdigit((int)*++filename) || + *filename == '0') { /* only '#1' ... '#9' allowed */ + printf("illegal matching expression\n"); + exit(URG_URL_MALFORMAT); +Only in curl-6.3.1/src: urlglob.c~ +Binary files curl-6.3.1-org/src/urlglob.o and curl-6.3.1/src/urlglob.o differ
curl-6.3.1.tar.gz+0 −0 addedcurl_63_form.patch+92 −0 added@@ -0,0 +1,92 @@ +*** /homes/qradlsg/curl-org/lib/formdata.c Thu Oct 14 00:27:12 1999 +--- formdata.c Mon Nov 22 16:55:20 1999 +*************** +*** 41,47 **** + /* + Debug the form generator stand-alone by compiling this source file with: + +! 'make formdata' + + run the 'formdata' executable and make sure the output is ok! + +--- 41,47 ---- + /* + Debug the form generator stand-alone by compiling this source file with: + +! gcc -DHAVE_CONFIG_H -I../ -g -D_FORM_DEBUG -o formdata -I../include formdata.c + + run the 'formdata' executable and make sure the output is ok! + +*************** +*** 313,320 **** + if(!length) + length = strlen((char *)line); + +! newform->line = (char *)malloc(length); +! memcpy(newform->line, line, length); + newform->length = length; + + if(*formp) { +--- 313,320 ---- + if(!length) + length = strlen((char *)line); + +! newform->line = (char *)malloc(length+1); +! memcpy(newform->line, line, length+1); + newform->length = length; + + if(*formp) { +*************** +*** 499,504 **** +--- 499,505 ---- + size += AddFormDataf(&form, + "\r\n--%s--", + fileboundary); ++ free(fileboundary); + } + + } while((post=post->next)); /* for each field */ +*************** +*** 511,518 **** + *sizep = size; + + free(boundary); +- if(fileboundary) +- free(fileboundary); + + return firstform; + } +--- 512,517 ---- +*************** +*** 572,577 **** +--- 571,583 ---- + + form->data = form->data->next; /* advance */ + ++ if(!gotsize && form->data) { ++ /* If we got an empty line and we have more data, we proceed to the next ++ line immediately to avoid returning zero before we've reached the end. ++ This is the bug reported November 22 1999 on curl 6.3. (Daniel) */ ++ gotsize = FormReader(buffer, size, nitems, mydata); ++ } ++ + return gotsize; + } + +*************** +*** 615,621 **** + FormInit(&formread, form); + + while(nread = FormReader(buffer, 1, sizeof(buffer), (FILE *)&formread)) { +! fwrite(buffer, nread, 1, stdout); + } + + fprintf(stderr, "size: %d\n", size); +--- 621,627 ---- + FormInit(&formread, form); + + while(nread = FormReader(buffer, 1, sizeof(buffer), (FILE *)&formread)) { +! fwrite(buffer, nread, 1, stderr); + } + + fprintf(stderr, "size: %d\n", size);
curl_63_partialdl.patch+106 −0 added@@ -0,0 +1,106 @@ +*** /homes/qradlsg/curl-org/lib/download.c Thu Nov 11 08:57:12 1999 +--- lib/download.c Mon Nov 22 08:33:13 1999 +*************** +*** 455,461 **** + #endif + } + } +! + ProgressShow (data, bytecount, start, now, TRUE); + + *bytecountp = bytecount; +--- 455,464 ---- + #endif + } + } +! if(contentlength && (bytecount != contentlength)) { +! failf(data, "transfer closed with %d bytes remaining", contentlength-bytecount); +! return URG_PARTIAL_FILE; +! } + ProgressShow (data, bytecount, start, now, TRUE); + + *bytecountp = bytecount; +*** /homes/qradlsg/curl-org/include/curl/curl.h Thu Nov 11 21:58:02 1999 +--- include/curl/curl.h Mon Nov 22 08:33:59 1999 +*************** +*** 159,165 **** + URG_FTP_CANT_GET_HOST, + URG_FTP_CANT_RECONNECT, + URG_FTP_COULDNT_SET_BINARY, +! URG_FTP_PARTIAL_FILE, + URG_FTP_COULDNT_RETR_FILE, + URG_FTP_WRITE_ERROR, + URG_FTP_QUOTE_ERROR, +--- 159,165 ---- + URG_FTP_CANT_GET_HOST, + URG_FTP_CANT_RECONNECT, + URG_FTP_COULDNT_SET_BINARY, +! URG_PARTIAL_FILE, + URG_FTP_COULDNT_RETR_FILE, + URG_FTP_WRITE_ERROR, + URG_FTP_QUOTE_ERROR, +*************** +*** 197,202 **** +--- 197,205 ---- + URL_LAST + } UrgError; + ++ /* This is just to make older programs not break: */ ++ #define URG_FTP_PARTIAL_FILE URG_PARTIAL_FILE ++ + #define URGTAG_DONE -1 + #define URGTAG_LAST -1 + #define URGTAG_END -1 +*** /homes/qradlsg/curl-org/lib/ftp.c Sat Oct 30 17:43:25 1999 +--- lib/ftp.c Mon Nov 22 08:34:27 1999 +*************** +*** 707,713 **** + if((-1 != data->infilesize) && (data->infilesize != *bytecountp)) { + failf(data, "Wrote only partial file (%d out of %d bytes)", + *bytecountp, data->infilesize); +! return URG_FTP_PARTIAL_FILE; + } + } + else { +--- 707,713 ---- + if((-1 != data->infilesize) && (data->infilesize != *bytecountp)) { + failf(data, "Wrote only partial file (%d out of %d bytes)", + *bytecountp, data->infilesize); +! return URG_PARTIAL_FILE; + } + } + else { +*************** +*** 908,914 **** + if(size <= 0) { + failf(data, "Offset (%d) was beyond file size (%d)", + data->resume_from, data->resume_from+size); +! return URG_FTP_PARTIAL_FILE; + } + } + #endif +--- 908,914 ---- + if(size <= 0) { + failf(data, "Offset (%d) was beyond file size (%d)", + data->resume_from, data->resume_from+size); +! return URG_PARTIAL_FILE; + } + } + #endif +*************** +*** 929,935 **** + + if((-1 != size) && (size != *bytecountp)) { + failf(data, "Received only partial file"); +! return URG_FTP_PARTIAL_FILE; + } + else if(0 == *bytecountp) { + failf(data, "No data was received!"); +--- 929,935 ---- + + if((-1 != size) && (size != *bytecountp)) { + failf(data, "Received only partial file"); +! return URG_PARTIAL_FILE; + } + else if(0 == *bytecountp) { + failf(data, "No data was received!");
curl.beos-patch+695 −0 added@@ -0,0 +1,695 @@ +? Makefile.in +? autogen.sh +? configure +? lib/Makefile.in +? src/Makefile.in +Index: config.h.in +=================================================================== +RCS file: /cvs/curl/curl/config.h.in,v +retrieving revision 1.10 +diff -u -r1.10 config.h.in +--- config.h.in 1999/10/17 11:18:34 1.10 ++++ config.h.in 1999/11/24 15:15:21 +@@ -109,6 +109,9 @@ + /* Define if you have the <getopt.h> header file. */ + #undef HAVE_GETOPT_H + ++/* Define if you have the <net/if.h> header file. */ ++#undef HAVE_NET_IF_H ++ + /* Define if you have the <netdb.h> header file. */ + #undef HAVE_NETDB_H + +Index: configure.in +=================================================================== +RCS file: /cvs/curl/curl/configure.in,v +retrieving revision 1.35 +diff -u -r1.35 configure.in +--- configure.in 1999/11/11 21:05:38 1.35 ++++ configure.in 1999/11/24 15:15:21 +@@ -117,24 +117,26 @@ + + dnl Checks for header files. + AC_HEADER_STDC +-AC_CHECK_HEADERS( unistd.h \ +- arpa/inet.h \ +- netinet/in.h \ +- netdb.h \ +- sys/select.h \ +- sys/socket.h \ +- sys/sockio.h \ +- sys/stat.h \ +- sys/types.h \ +- getopt.h \ +- sys/param.h \ +- termios.h \ +- termio.h \ +- sgtty.h \ +- fcntl.h \ +- dlfcn.h \ +- alloca.h ) +- ++AC_CHECK_HEADERS( \ ++ unistd.h \ ++ arpa/inet.h \ ++ net/if.h \ ++ netinet/in.h \ ++ netdb.h \ ++ sys/select.h \ ++ sys/socket.h \ ++ sys/sockio.h \ ++ sys/stat.h \ ++ sys/types.h \ ++ getopt.h \ ++ sys/param.h \ ++ termios.h \ ++ termio.h \ ++ sgtty.h \ ++ fcntl.h \ ++ dlfcn.h \ ++ alloca.h \ ++) + + dnl Check for libz header + dnl AC_CHECK_HEADERS(zlib.h) +Index: include/curl/curl.h +=================================================================== +RCS file: /cvs/curl/curl/include/curl/curl.h,v +retrieving revision 1.5 +diff -u -r1.5 curl.h +--- curl.h 1999/11/23 08:22:42 1.5 ++++ curl.h 1999/11/24 15:15:21 +@@ -365,9 +365,13 @@ + TIMECOND_LAST + } TimeCond; + ++#ifdef __BEOS__ ++#include <support/SupportDefs.h> ++#else + #ifndef __cplusplus /* (rabe) */ + typedef char bool; + #endif /* (rabe) */ ++#endif + + /********************************************************************** + * +Index: lib/Makefile.am +=================================================================== +RCS file: /cvs/curl/curl/lib/Makefile.am,v +retrieving revision 1.16 +diff -u -r1.16 Makefile.am +--- Makefile.am 1999/10/22 13:27:36 1.16 ++++ Makefile.am 1999/11/24 15:15:21 +@@ -9,7 +9,7 @@ + # Some flags needed when trying to cause warnings ;-) + # CFLAGS = -Wall -pedantic + +-INCLUDES = -I../include ++INCLUDES = -I$(top_srcdir)/include + + libcurl_a_SOURCES = \ + arpa_telnet.h file.c getpass.h netrc.h timeval.c \ +Index: lib/dict.c +=================================================================== +RCS file: /cvs/curl/curl/lib/dict.c,v +retrieving revision 1.5 +diff -u -r1.5 dict.c +--- dict.c 1999/10/13 22:27:12 1.5 ++++ dict.c 1999/11/24 15:15:22 +@@ -66,8 +66,12 @@ + #include <unistd.h> + #endif + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + #include <signal.h> + +Index: lib/download.c +=================================================================== +RCS file: /cvs/curl/curl/lib/download.c,v +retrieving revision 1.30 +diff -u -r1.30 download.c +--- download.c 1999/11/23 08:24:26 1.30 ++++ download.c 1999/11/24 15:15:23 +@@ -54,6 +54,10 @@ + #include "urldata.h" + #include <curl/curl.h> + ++#ifdef __BEOS__ ++#include <net/socket.h> ++#endif ++ + #ifdef WIN32 + #if !defined( __GNUC__) || defined(__MINGW32__) + #include <winsock.h> +Index: lib/file.c +=================================================================== +RCS file: /cvs/curl/curl/lib/file.c,v +retrieving revision 1.6 +diff -u -r1.6 file.c +--- file.c 1999/11/19 07:25:40 1.6 ++++ file.c 1999/11/24 15:15:23 +@@ -67,8 +67,12 @@ + #include <unistd.h> + #endif + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + #include <signal.h> + +Index: lib/ftp.c +=================================================================== +RCS file: /cvs/curl/curl/lib/ftp.c,v +retrieving revision 1.18 +diff -u -r1.18 ftp.c +--- ftp.c 1999/11/23 08:25:06 1.18 ++++ ftp.c 1999/11/24 15:15:26 +@@ -58,7 +58,9 @@ + #else /* some kind of unix */ + #include <sys/socket.h> + #include <netinet/in.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif + #include <sys/utsname.h> + #include <netdb.h> + #endif +Index: lib/getdate.c +=================================================================== +RCS file: /cvs/curl/curl/lib/getdate.c,v +retrieving revision 1.5 +diff -u -r1.5 getdate.c +--- getdate.c 1999/08/12 06:43:33 1.5 ++++ getdate.c 1999/11/24 15:15:31 +@@ -1,26 +1,26 @@ + + /* A Bison parser, made from getdate.y +- by GNU Bison version 1.25 ++ by GNU Bison version 1.27 + */ + + #define YYBISON 1 /* Identify Bison output. */ + +-#define tAGO 258 +-#define tDAY 259 +-#define tDAY_UNIT 260 +-#define tDAYZONE 261 +-#define tDST 262 +-#define tHOUR_UNIT 263 +-#define tID 264 +-#define tMERIDIAN 265 +-#define tMINUTE_UNIT 266 +-#define tMONTH 267 +-#define tMONTH_UNIT 268 +-#define tSEC_UNIT 269 +-#define tSNUMBER 270 +-#define tUNUMBER 271 +-#define tYEAR_UNIT 272 +-#define tZONE 273 ++#define tAGO 257 ++#define tDAY 258 ++#define tDAY_UNIT 259 ++#define tDAYZONE 260 ++#define tDST 261 ++#define tHOUR_UNIT 262 ++#define tID 263 ++#define tMERIDIAN 264 ++#define tMINUTE_UNIT 265 ++#define tMONTH 266 ++#define tMONTH_UNIT 267 ++#define tSEC_UNIT 268 ++#define tSNUMBER 269 ++#define tUNUMBER 270 ++#define tYEAR_UNIT 271 ++#define tZONE 272 + + #line 1 "getdate.y" + +@@ -211,9 +211,11 @@ + + #ifndef __cplusplus + #ifndef __STDC__ ++#ifndef const + #define const + #endif + #endif ++#endif + + + +@@ -221,7 +223,7 @@ + #define YYFLAG -32768 + #define YYNTBASE 22 + +-#define YYTRANSLATE(x) ((unsigned)(x) <= 273 ? yytranslate[x] : 32) ++#define YYTRANSLATE(x) ((unsigned)(x) <= 272 ? yytranslate[x] : 32) + + static const char yytranslate[] = { 0, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +@@ -249,9 +251,9 @@ + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, +- 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, +- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, +- 16, 17, 18 ++ 2, 2, 2, 2, 2, 1, 3, 4, 5, 6, ++ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, ++ 17, 18 + }; + + #if YYDEBUG != 0 +@@ -370,7 +372,8 @@ + 56 + }; + /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ +-#line 3 "/usr/lib/bison.simple" ++#line 3 "/boot/apps/GeekGadgets/share/bison.simple" ++/* This file comes from bison-1.27. */ + + /* Skeleton output parser for bison, + Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc. +@@ -387,46 +390,66 @@ + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software +- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ ++ Foundation, Inc., 59 Temple Place - Suite 330, ++ Boston, MA 02111-1307, USA. */ + + /* As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. */ + +-#ifndef alloca ++/* This is the parser code that is written into each bison parser ++ when the %semantic_parser declaration is not specified in the grammar. ++ It was written by Richard Stallman by simplifying the hairy parser ++ used when %semantic_parser is specified. */ ++ ++#ifndef YYSTACK_USE_ALLOCA ++#ifdef alloca ++#define YYSTACK_USE_ALLOCA ++#else /* alloca not defined */ + #ifdef __GNUC__ ++#define YYSTACK_USE_ALLOCA + #define alloca __builtin_alloca + #else /* not GNU C. */ +-#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) ++#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi) || (defined (__sun) && defined (__i386)) ++#define YYSTACK_USE_ALLOCA + #include <alloca.h> + #else /* not sparc */ +-#if defined (MSDOS) && !defined (__TURBOC__) ++/* We think this test detects Watcom and Microsoft C. */ ++/* This used to test MSDOS, but that is a bad idea ++ since that symbol is in the user namespace. */ ++#if (defined (_MSDOS) || defined (_MSDOS_)) && !defined (__TURBOC__) ++#if 0 /* No need for malloc.h, which pollutes the namespace; ++ instead, just don't use alloca. */ + #include <malloc.h> ++#endif + #else /* not MSDOS, or __TURBOC__ */ + #if defined(_AIX) +-#include <malloc.h> ++/* I don't know what this was needed for, but it pollutes the namespace. ++ So I turned it off. rms, 2 May 1997. */ ++/* #include <malloc.h> */ + #pragma alloca +-#else /* not MSDOS, __TURBOC__, or _AIX */ +-#ifdef __hpux +-#ifdef __cplusplus +-extern "C" { +-void *alloca (unsigned int); +-}; +-#else /* not __cplusplus */ +-void *alloca (); +-#endif /* not __cplusplus */ ++#define YYSTACK_USE_ALLOCA ++#else /* not MSDOS, or __TURBOC__, or _AIX */ ++#if 0 ++#ifdef __hpux /* haible@ilog.fr says this works for HPUX 9.05 and up, ++ and on HPUX 10. Eventually we can turn this on. */ ++#define YYSTACK_USE_ALLOCA ++#define alloca __builtin_alloca + #endif /* __hpux */ ++#endif + #endif /* not _AIX */ + #endif /* not MSDOS, or __TURBOC__ */ +-#endif /* not sparc. */ +-#endif /* not GNU C. */ +-#endif /* alloca not defined. */ ++#endif /* not sparc */ ++#endif /* not GNU C */ ++#endif /* alloca not defined */ ++#endif /* YYSTACK_USE_ALLOCA not defined */ + +-/* This is the parser code that is written into each bison parser +- when the %semantic_parser declaration is not specified in the grammar. +- It was written by Richard Stallman by simplifying the hairy parser +- used when %semantic_parser is specified. */ ++#ifdef YYSTACK_USE_ALLOCA ++#define YYSTACK_ALLOC alloca ++#else ++#define YYSTACK_ALLOC malloc ++#endif + + /* Note: there must be only one dollar sign in this file. + It is replaced by the list of actions, each action +@@ -436,8 +459,8 @@ + #define yyclearin (yychar = YYEMPTY) + #define YYEMPTY -2 + #define YYEOF 0 +-#define YYACCEPT return(0) +-#define YYABORT return(1) ++#define YYACCEPT goto yyacceptlab ++#define YYABORT goto yyabortlab + #define YYERROR goto yyerrlab1 + /* Like YYERROR except do call yyerror. + This remains here temporarily to ease the +@@ -518,12 +541,12 @@ + #ifndef YYMAXDEPTH + #define YYMAXDEPTH 10000 + #endif +- +-/* Prevent warning if -Wstrict-prototypes. */ +-#ifdef __GNUC__ +-int yyparse (void); +-#endif + ++/* Define __yy_memcpy. Note that the size argument ++ should be passed with type unsigned int, because that is what the non-GCC ++ definitions require. With GCC, __builtin_memcpy takes an arg ++ of type size_t, but it can handle unsigned int. */ ++ + #if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ + #define __yy_memcpy(TO,FROM,COUNT) __builtin_memcpy(TO,FROM,COUNT) + #else /* not GNU C or C++ */ +@@ -535,7 +558,7 @@ + __yy_memcpy (to, from, count) + char *to; + char *from; +- int count; ++ unsigned int count; + { + register char *f = from; + register char *t = to; +@@ -550,10 +573,10 @@ + /* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ + static void +-__yy_memcpy (char *to, char *from, int count) ++__yy_memcpy (char *to, char *from, unsigned int count) + { +- register char *f = from; + register char *t = to; ++ register char *f = from; + register int i = count; + + while (i-- > 0) +@@ -563,7 +586,7 @@ + #endif + #endif + +-#line 196 "/usr/lib/bison.simple" ++#line 216 "/boot/apps/GeekGadgets/share/bison.simple" + + /* The user can define YYPARSE_PARAM as the name of an argument to be passed + into yyparse. The argument should have type void *. +@@ -584,6 +607,15 @@ + #define YYPARSE_PARAM_DECL + #endif /* not YYPARSE_PARAM */ + ++/* Prevent warning if -Wstrict-prototypes. */ ++#ifdef __GNUC__ ++#ifdef YYPARSE_PARAM ++int yyparse (void *); ++#else ++int yyparse (void); ++#endif ++#endif ++ + int + yyparse(YYPARSE_PARAM_ARG) + YYPARSE_PARAM_DECL +@@ -612,6 +644,7 @@ + #endif + + int yystacksize = YYINITDEPTH; ++ int yyfree_stacks = 0; + + #ifdef YYPURE + int yychar; +@@ -696,18 +729,32 @@ + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; +- yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); +- __yy_memcpy ((char *)yyss, (char *)yyss1, size * sizeof (*yyssp)); +- yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); +- __yy_memcpy ((char *)yyvs, (char *)yyvs1, size * sizeof (*yyvsp)); ++#ifndef YYSTACK_USE_ALLOCA ++ yyfree_stacks = 1; ++#endif ++ yyss = (short *) YYSTACK_ALLOC (yystacksize * sizeof (*yyssp)); ++ __yy_memcpy ((char *)yyss, (char *)yyss1, ++ size * (unsigned int) sizeof (*yyssp)); ++ yyvs = (YYSTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yyvsp)); ++ __yy_memcpy ((char *)yyvs, (char *)yyvs1, ++ size * (unsigned int) sizeof (*yyvsp)); + #ifdef YYLSP_NEEDED +- yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); +- __yy_memcpy ((char *)yyls, (char *)yyls1, size * sizeof (*yylsp)); ++ yyls = (YYLTYPE *) YYSTACK_ALLOC (yystacksize * sizeof (*yylsp)); ++ __yy_memcpy ((char *)yyls, (char *)yyls1, ++ size * (unsigned int) sizeof (*yylsp)); + #endif + #endif /* no yyoverflow */ + +@@ -1230,7 +1277,7 @@ + break;} + } + /* the action file gets copied in in place of this dollarsign */ +-#line 498 "/usr/lib/bison.simple" ++#line 542 "/boot/apps/GeekGadgets/share/bison.simple" + + yyvsp -= yylen; + yyssp -= yylen; +@@ -1425,6 +1472,30 @@ + + yystate = yyn; + goto yynewstate; ++ ++ yyacceptlab: ++ /* YYACCEPT comes here. */ ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } ++ return 0; ++ ++ yyabortlab: ++ /* YYABORT comes here. */ ++ if (yyfree_stacks) ++ { ++ free (yyss); ++ free (yyvs); ++#ifdef YYLSP_NEEDED ++ free (yyls); ++#endif ++ } ++ return 1; + } + #line 451 "getdate.y" + +Index: lib/hostip.c +=================================================================== +RCS file: /cvs/curl/curl/lib/hostip.c,v +retrieving revision 1.8 +diff -u -r1.8 hostip.c +--- hostip.c 1999/10/13 22:27:12 1.8 ++++ hostip.c 1999/11/24 15:15:31 +@@ -53,7 +53,9 @@ + #endif + #include <netinet/in.h> + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif + #endif + + #include "urldata.h" +Index: lib/http.c +=================================================================== +RCS file: /cvs/curl/curl/lib/http.c,v +retrieving revision 1.17 +diff -u -r1.17 http.c +--- http.c 1999/10/30 15:43:52 1.17 ++++ http.c 1999/11/24 15:15:31 +@@ -66,8 +66,12 @@ + #include <unistd.h> + #endif + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + #include <signal.h> + +Index: lib/if2ip.c +=================================================================== +RCS file: /cvs/curl/curl/lib/if2ip.c,v +retrieving revision 1.7 +diff -u -r1.7 if2ip.c +--- if2ip.c 1999/10/13 22:27:12 1.7 ++++ if2ip.c 1999/11/24 15:15:31 +@@ -48,13 +48,17 @@ + #include <unistd.h> + #endif + +-#ifndef WIN32 ++#if ! defined(WIN32) && ! defined(__BEOS__) + + #include <sys/socket.h> + #include <netinet/in.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif + #include <netinet/in.h> ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + + /* -- if2ip() -- */ +Index: lib/if2ip.h +=================================================================== +RCS file: /cvs/curl/curl/lib/if2ip.h,v +retrieving revision 1.5 +diff -u -r1.5 if2ip.h +--- if2ip.h 1999/10/13 22:27:12 1.5 ++++ if2ip.h 1999/11/24 15:15:31 +@@ -41,7 +41,7 @@ + ****************************************************************************/ + #include <curl/setup.h> + +-#ifndef WIN32 ++#if ! defined(WIN32) && ! defined(__BEOS__) + char *if2ip(char *interface); + #else + #define if2ip(x) NULL +Index: lib/telnet.c +=================================================================== +RCS file: /cvs/curl/curl/lib/telnet.c,v +retrieving revision 1.9 +diff -u -r1.9 telnet.c +--- telnet.c 1999/10/13 22:27:12 1.9 ++++ telnet.c 1999/11/24 15:15:32 +@@ -74,8 +74,12 @@ + #include <unistd.h> + #endif + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + #include <signal.h> + +Index: lib/upload.c +=================================================================== +RCS file: /cvs/curl/curl/lib/upload.c,v +retrieving revision 1.9 +diff -u -r1.9 upload.c +--- upload.c 1999/10/13 22:27:12 1.9 ++++ upload.c 1999/11/24 15:15:32 +@@ -58,6 +58,11 @@ + #endif + + #include <curl/curl.h> ++ ++#ifdef __BEOS__ ++#include <net/socket.h> ++#endif ++ + #include "urldata.h" + #include "speedcheck.h" + #include "sendf.h" +Index: lib/url.c +=================================================================== +RCS file: /cvs/curl/curl/lib/url.c,v +retrieving revision 1.31 +diff -u -r1.31 url.c +--- url.c 1999/11/19 07:07:10 1.31 ++++ url.c 1999/11/24 15:15:36 +@@ -71,8 +71,12 @@ + #include <unistd.h> + #endif + #include <netdb.h> ++#ifdef HAVE_ARPA_INET_H + #include <arpa/inet.h> ++#endif ++#ifdef HAVE_NET_IF_H + #include <net/if.h> ++#endif + #include <sys/ioctl.h> + #include <signal.h> + +Index: src/Makefile.am +=================================================================== +RCS file: /cvs/curl/curl/src/Makefile.am,v +retrieving revision 1.13 +diff -u -r1.13 Makefile.am +--- Makefile.am 1999/10/13 22:50:30 1.13 ++++ Makefile.am 1999/11/24 15:15:36 +@@ -6,7 +6,7 @@ + # CFLAGS = -Wall -pedantic + CPPFLAGS = -DGLOBURL -DCURL_SEPARATORS + +-INCLUDES = -I../include ++INCLUDES = -I$(top_srcdir)/include + + bin_PROGRAMS = curl + +@@ -22,6 +22,6 @@ + AUTOMAKE_OPTIONS = foreign no-dependencies + + # This generates the hugehelp.c file +-hugehelp.c: ../README.curl ../curl.1 mkhelp.pl ++hugehelp.c: $(top_srcdir)/README.curl $(top_srcdir)/curl.1 mkhelp.pl + rm -f hugehelp.c +- $(NROFF) -man ../curl.1 | $(PERL) mkhelp.pl ../README.curl > hugehelp.c ++ $(NROFF) -man $(top_srcdir)/curl.1 | $(PERL) $(top_srcdir)/src/mkhelp.pl $(top_srcdir)/README.curl > hugehelp.c
curl.spec+52 −0 added@@ -0,0 +1,52 @@ +%define name curl +%define version 6.0 +%define release 1 +%define prefix /usr/local + +%define builddir $RPM_BUILD_DIR/%{name}-%{version} + +Summary: get a file from a FTP, GOPHER or HTTP server. +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: MPL +Vendor: Daniel Stenberg <Daniel.Stenberg@haxx.nu> +Packager: Troy Engel <tengel@sonic.net> +Group: Utilities/Console +Source: %{name}-%{version}.tar.gz +URL: http://curl.haxx.nu/ +BuildRoot: /tmp/%{name}-%{version}-root + +%description +curl is a client to get documents/files from servers, using any of the +supported protocols. The command is designed to work without user +interaction or any kind of interactivity. + +curl offers a busload of useful tricks like proxy support, user +authentication, ftp upload, HTTP post, file transfer resume and more. + +Note: this version is compiled without SSL (https:) support. + +%prep +rm -rf $RPM_BUILD_ROOT +rm -rf %{builddir} + +%setup + +%build +export CFLAGS=$RPM_OPT_FLAGS +./configure --prefix=$RPM_BUILD_ROOT%{prefix} +make + +%install +make install-strip + +%clean +rm -rf $RPM_BUILD_ROOT +rm -rf %{builddir} + +%files +%defattr(-,root,root) +%attr(0755,root,root) %{prefix}/bin/curl +%doc curl.1 README* CHANGES CONTRIBUTE FAQ FILES INSTALL LEGAL MPL-1.0.txt RESOURCES TODO perl/ +
curl-ssl.spec+52 −0 added@@ -0,0 +1,52 @@ +%define name curl-ssl +%define tarball curl +%define version 6.0 +%define release 1 +%define prefix /usr/local + +%define builddir $RPM_BUILD_DIR/%{tarball}-%{version} + +Summary: get a file from a FTP, GOPHER or HTTP server. +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: MPL +Vendor: Daniel Stenberg <Daniel.Stenberg@haxx.nu> +Packager: Troy Engel <tengel@sonic.net> +Group: Utilities/Console +Source: %{tarball}-%{version}.tar.gz +URL: http://curl.haxx.nu/ +BuildRoot: /tmp/%{tarball}-%{version}-root + +%description +curl is a client to get documents/files from servers, using any of the +supported protocols. The command is designed to work without user +interaction or any kind of interactivity. + +curl offers a busload of useful tricks like proxy support, user +authentication, ftp upload, HTTP post, file transfer resume and more. + +Note: this version is compiled with SSL (https:) support. + +%prep +rm -rf $RPM_BUILD_ROOT +rm -rf %{builddir} + +%setup -n %{tarball}-%{version} + +%build +CFLAGS=$RPM_OPT_FLAGS ./configure --prefix=$RPM_BUILD_ROOT%{prefix} --with-ssl +make CFLAGS="-DUSE_SSLEAY -I/usr/include/openssl" + +%install +make install-strip + +%clean +rm -rf $RPM_BUILD_ROOT +rm -rf %{builddir} + +%files +%defattr(-,root,root) +%attr(0755,root,root) %{prefix}/bin/curl +%doc curl.1 README* CHANGES CONTRIBUTE FAQ FILES INSTALL LEGAL MPL-1.0.txt RESOURCES TODO perl/ +
FAQ+31 −0 added@@ -0,0 +1,31 @@ +Date: 19 November 1999 + + Frequently Asked Questions about Curl + +1. Problems connecting to SSL servers. + + It took a very long time before I could sort out why curl had problems + to connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. + The error sometimes showed up similar to: + + 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: + + It turned out to be because many older SSL servers don't deal with SSLv3 + requests properly. To correct this problem, tell curl to select SSLv2 from + the command line (-2/--sslv2). + + I have also seen examples where the remote server didn't like the SSLv2 + request and instead you had to force curl to use SSLv3 with -3/--sslv3. + +2. Does curl support resume? + + Yes. Both ways on FTP, download ways on HTTP. + +3. Is libcurl thread safe? + + Yes, as far as curl's own code goes. It does use system calls that often + aren't thread safe in most environments, such as gethostbyname(). + + I am very interested in once and for all getting some kind of report or + README file from those who have used libcurl in a threaded environment, + since I haven't and I get this question more and more frequently!
FEATURES+72 −0 added@@ -0,0 +1,72 @@ +Misc + - full URL syntax + - custom maximum download time + - custom least download speed acceptable + - multiple URLs + - guesses protocol from host name unless specified + - uses .netrc + - progress bar/time specs while downloading + - PROXY environment variables support + - config file support + - compiles on win32 + +HTTP + - GET + - PUT + - HEAD + - POST + - multipart POST + - authentication + - resume + - follow redirects + - custom HTTP request + - cookie get/send + - custom headers (that can replace internally generated headers) + - custom user-agent string + - custom referer string + - range + - proxy authentication + - time conditions + - via http-proxy + +HTTPS (*1) + - (all the HTTP features) + - using certificates + - via http-proxy + +FTP + - download + - authentication + - PORT or PASV + - single file size information (compare to HTTP HEAD) + - 'type=' URL support + - dir listing + - dir listing names-only + - upload + - upload append + - upload via http-proxy as HTTP PUT + - download resume + - upload resume + - QUOT commands + - simple "range" support + - via http-proxy + +TELNET + - connection negotiation + - stdin/stdout I/O + +LDAP (*2) + - full LDAP URL support + +DICT + - extended DICT URL support + +GOPHER + - GET + - via http-proxy + +FILE + - URL support + + *1 = requires OpenSSL + *2 = requires OpenLDAP
FILES+47 −0 added@@ -0,0 +1,47 @@ +CHANGES +CONTRIBUTE +FEATURES +FAQ +FILES +INSTALL +LEGAL +MPL-1.0.txt +README +README.curl +README.libcurl +curl.1 +*spec +RESOURCES +TODO +maketgz +Makefile.in +Makefile.am +acconfig.h +aclocal.m4 +config.guess +config.h.in +config.sub +configure +configure.in +install-sh +missing +mkinstalldirs +reconf +stamp-h.in +perl/README +perl/*.pl.in +src/*.[ch] +src/*in +src/*am +src/mkhelp.pl +src/Makefile.vc6 +src/*m32 +lib/getdate.y +lib/*.[ch] +lib/*in +lib/*am +lib/Makefile.vc6 +lib/*m32 +include/README +include/curl/*.h +
head+7 −0 added@@ -0,0 +1,7 @@ +HTTP/1.1 200 OK +Server: Microsoft-IIS/4.0 +Date: Thu, 02 Dec 1999 23:15:03 GMT +Content-Type: text/html +Set-Cookie: ASPSESSIONIDGQQQGGPD=HEDEOJCAIDADIKKLCFIFEJAJ; path=/ +Cache-control: private +
include/curl/curl.beos-patch+46 −0 added@@ -0,0 +1,46 @@ +Index: include/curl/curl.h +=================================================================== +RCS file: /cvs/curl/curl/include/curl/curl.h,v +retrieving revision 1.5 +diff -u -r1.5 curl.h +--- curl.h 1999/11/23 08:22:42 1.5 ++++ curl.h 1999/11/24 16:19:11 +@@ -365,9 +365,13 @@ + TIMECOND_LAST + } TimeCond; + ++#ifdef __BEOS__ ++#include <support/SupportDefs.h> ++#else + #ifndef __cplusplus /* (rabe) */ + typedef char bool; + #endif /* (rabe) */ ++#endif + + /********************************************************************** + * +Index: include/curl/setup.h +=================================================================== +RCS file: /cvs/curl/curl/include/curl/setup.h,v +retrieving revision 1.2 +diff -u -r1.2 setup.h +--- setup.h 1999/10/17 11:18:34 1.2 ++++ setup.h 1999/11/24 16:19:11 +@@ -139,10 +139,17 @@ + #define DOT_CHAR "_" + + #else ++#ifdef __BEOS__ ++#define sclose(x) closesocket(x) ++#define sread(x,y,z) recv(x,y,z,0) ++#define swrite(x,y,z) send(x,y,z,0) ++#define myalarm(x) alarm(x) ++#else + #define sclose(x) close(x) + #define sread(x,y,z) read(x,y,z) + #define swrite(x,y,z) write(x,y,z) + #define myalarm(x) alarm(x) ++#endif + + #define PATH_CHAR ":" + #define DIR_CHAR "/"
include/curl/curl.h+434 −0 added@@ -0,0 +1,434 @@ +#ifndef __URL_H +#define __URL_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +#ifndef TRUE +#define TRUE 1 +#endif +#ifndef FALSE +#define FALSE 0 +#endif + + +#define CONF_DEFAULT 0 +#define CONF_PROXY (1<<0) /* set if proxy is in use */ +#define CONF_PORT (1<<1) /* set if different port than protcol-defines is + used */ +#define CONF_HTTP (1<<2) /* http get */ +#define CONF_GOPHER (1<<3) /* gopher get */ +#define CONF_FTP (1<<4) /* ftp get (binary mode) */ +#define CONF_VERBOSE (1<<5) /* talk a lot */ + +#define CONF_TELNET (1<<6) + +#define CONF_HEADER (1<<8) /* throw the header out too */ +#define CONF_USERPWD (1<<9) /* user+passwd has been specified */ +#define CONF_NOPROGRESS (1<<10) /* shut off the progress meter (auto) + see also _MUTE */ +#define CONF_NOBODY (1<<11) /* use HEAD to get http document */ +#define CONF_FAILONERROR (1<<12) /* Makes urlget() fail with a return code + WITHOUT writing anything to the output if + a return code >=300 is returned from the + server. */ +#define CONF_RANGE (1<<13) /* Byte-range request, specified parameter is set */ +#define CONF_UPLOAD (1<<14) /* this is an upload, only supported for ftp + currently */ + +#define CONF_POST (1<<15) /* HTTP POST method */ + +/* When getting an FTP directory, this switch makes the listing only show file + names and nothing else. Makes machine parsing of the output possible. This + enforces the NLST command to the ftp server, compared to the otherwise + used: LIST. */ +#define CONF_FTPLISTONLY (1<<16) + +/* Set the referer string */ +#define CONF_REFERER (1<<17) +#define CONF_PROXYUSERPWD (1<<18) /* Proxy user+passwd has been specified */ + +/* For FTP, use PORT instead of PASV! */ +#define CONF_FTPPORT (1<<19) + +/* FTP: Append instead of overwrite on upload! */ +#define CONF_FTPAPPEND (1<<20) + +#define CONF_HTTPS (1<<21) /* Use SSLeay for encrypted communication */ + +#define CONF_NETRC (1<<22) /* read user+password from .netrc */ + +#define CONF_FOLLOWLOCATION (1<<23) /* get the page that the Location: tells + us to get */ + +#define CONF_FTPASCII (1<<24) /* use TYPE A for transfer */ + +#define CONF_HTTPPOST (1<<25) /* this causes a multipart/form-data + HTTP POST */ +#define CONF_NOPROT (1<<26) /* host name specified without protocol */ + +#define CONF_PUT (1<<27) /* PUT the input file */ + +#define CONF_MUTE (1<<28) /* force NOPROGRESS */ + +#define CONF_DICT (1<<29) /* DICT:// protocol */ + +#define CONF_FILE (1<<30) /* FILE:// protocol */ + +#define CONF_LDAP (1<<31) /* LDAP:// protocol */ + +#ifdef MULTIDOC +struct MoreDoc { + struct MoreDoc *next; /* next entry in the list */ + char *path; /* pointer to allocated path */ + FILE *store; /* where to put the doc */ +}; +#endif + +struct HttpHeader { + struct HttpHeader *next; /* next entry in the list */ + char *header; /* pointer to allocated line without newline */ +}; + +struct HttpPost { + struct HttpPost *next; /* next entry in the list */ + char *name; /* pointer to allocated name */ + char *contents; /* pointer to allocated data contents */ + char *contenttype; /* Content-Type */ + struct HttpPost *more; /* if one field name has more than one file, this + link should link to following files */ + long flags; /* as defined below */ +#define HTTPPOST_FILENAME (1<<0) /* specified content is a file name */ +}; + + +/* All possible error codes from this version of urlget(). Future versions + may return other values, stay prepared. */ + +typedef enum { + URG_OK = 0, + URG_UNSUPPORTED_PROTOCOL, + URG_FAILED_INIT, + URG_URL_MALFORMAT, + URG_URL_MALFORMAT_USER, + URG_COULDNT_RESOLVE_PROXY, + URG_COULDNT_RESOLVE_HOST, + URG_COULDNT_CONNECT, + URG_FTP_WEIRD_SERVER_REPLY, + URG_FTP_ACCESS_DENIED, + URG_FTP_USER_PASSWORD_INCORRECT, + URG_FTP_WEIRD_PASS_REPLY, + URG_FTP_WEIRD_USER_REPLY, + URG_FTP_WEIRD_PASV_REPLY, + URG_FTP_WEIRD_227_FORMAT, + URG_FTP_CANT_GET_HOST, + URG_FTP_CANT_RECONNECT, + URG_FTP_COULDNT_SET_BINARY, + URG_PARTIAL_FILE, + URG_FTP_COULDNT_RETR_FILE, + URG_FTP_WRITE_ERROR, + URG_FTP_QUOTE_ERROR, + URG_HTTP_NOT_FOUND, + URG_WRITE_ERROR, + + URG_MALFORMAT_USER, /* the user name is illegally specified */ + URG_FTP_COULDNT_STOR_FILE, /* failed FTP upload */ + URG_READ_ERROR, /* could open/read from file */ + + URG_OUT_OF_MEMORY, + URG_OPERATION_TIMEOUTED, /* the timeout time was reached */ + URG_FTP_COULDNT_SET_ASCII, /* TYPE A failed */ + + URG_FTP_PORT_FAILED, /* FTP PORT operation failed */ + + URG_FTP_COULDNT_USE_REST, /* the REST command failed */ + URG_FTP_COULDNT_GET_SIZE, /* the SIZE command failed */ + + URG_HTTP_RANGE_ERROR, /* The RANGE "command" didn't seem to work */ + + URG_HTTP_POST_ERROR, + + URG_SSL_CONNECT_ERROR, /* something was wrong when connecting with SSL */ + + URG_FTP_BAD_DOWNLOAD_RESUME, /* couldn't resume download */ + + URG_FILE_COULDNT_READ_FILE, + + URG_LDAP_CANNOT_BIND, + URG_LDAP_SEARCH_FAILED, + URG_LIBRARY_NOT_FOUND, + URG_FUNCTION_NOT_FOUND, + + URL_LAST +} UrgError; + +/* This is just to make older programs not break: */ +#define URG_FTP_PARTIAL_FILE URG_PARTIAL_FILE + +#define URGTAG_DONE -1 +#define URGTAG_LAST -1 +#define URGTAG_END -1 + +#define URLGET_ERROR_SIZE 256 + +/* maximum URL length we deal with */ +#define URL_MAX_LENGTH 4096 +#define URL_MAX_LENGTH_TXT "4095" + +/* name is uppercase URGTAG_<name>, + type is one of the defined URGTYPE_<type> + number is unique identifier */ +#define T(name,type,number) URGTAG_ ## name = URGTYPE_ ## type + number + +/* long may be 32 or 64 bits, but we should never depend on anything else + but 32 */ +#define URGTYPE_LONG 0 +#define URGTYPE_OBJECTPOINT 10000 +#define URGTYPE_FUNCTIONPOINT 20000 + +typedef enum { + URGTAG_NOTHING, /* the first unused */ + + /* This is the FILE * the regular output should be written to. */ + T(FILE, OBJECTPOINT, 1), + + /* The full URL to get/put */ + T(URL, OBJECTPOINT, 2), + + /* Port number to connect to, if other than default. Specify the CONF_PORT + flag in the URGTAG_FLAGS to activate this */ + T(PORT, LONG, 3), + + /* Name of proxy to use. Specify the CONF_PROXY flag in the URGTAG_FLAGS to + activate this */ + T(PROXY, OBJECTPOINT, 4), + + /* Name and password to use when fetching. Specify the CONF_USERPWD flag in + the URGTAG_FLAGS to activate this */ + T(USERPWD, OBJECTPOINT, 5), + + /* Name and password to use with Proxy. Specify the CONF_PROXYUSERPWD + flag in the URGTAG_FLAGS to activate this */ + T(PROXYUSERPWD, OBJECTPOINT, 6), + + /* Range to get, specified as an ASCII string. Specify the CONF_RANGE flag + in the URGTAG_FLAGS to activate this */ + T(RANGE, OBJECTPOINT, 7), + + /* Configuration flags */ + T(FLAGS, LONG, 8), + + /* Specified file stream to upload from (use as input): */ + T(INFILE, OBJECTPOINT, 9), + + /* Buffer to receive error messages in, must be at least URLGET_ERROR_SIZE + bytes big. If this is not used, error messages go to stderr instead: */ + T(ERRORBUFFER, OBJECTPOINT, 10), + + /* Function that will be called to store the output (instead of fwrite). The + parameters will use fwrite() syntax, make sure to follow them. */ + T(WRITEFUNCTION, FUNCTIONPOINT, 11), + + /* Function that will be called to read the input (instead of fread). The + parameters will use fread() syntax, make sure to follow them. */ + T(READFUNCTION, FUNCTIONPOINT, 12), + + /* Time-out the read operation after this amount of seconds */ + T(TIMEOUT, LONG, 13), + + /* If the URGTAG_INFILE is used, this can be used to inform urlget about how + large the file being sent really is. That allows better error checking + and better verifies that the upload was succcessful. -1 means unknown + size. */ + T(INFILESIZE, LONG, 14), + + /* POST input fields. */ + T(POSTFIELDS, OBJECTPOINT, 15), + + /* Set the referer page (needed by some CGIs) */ + T(REFERER, OBJECTPOINT, 16), + + /* Set the FTP PORT string (interface name, named or numerical IP address) + Use i.e '-' to use default address. */ + T(FTPPORT, OBJECTPOINT, 17), + + /* Set the User-Agent string (examined by some CGIs) */ + T(USERAGENT, OBJECTPOINT, 18), + + /* If the download receives less than "low speed limit" bytes/second + * during "low speed time" seconds, the operations is aborted. + * You could i.e if you have a pretty high speed connection, abort if + * it is less than 2000 bytes/sec during 20 seconds. + */ + + /* Set the "low speed limit" */ + T(LOW_SPEED_LIMIT, LONG , 19), + + /* Set the "low speed time" */ + T(LOW_SPEED_TIME, LONG, 20), + + /* Set the continuation offset */ + T(RESUME_FROM, LONG, 21), + + /* Set cookie in request: */ + T(COOKIE, OBJECTPOINT, 22), + + /* This points to a linked list of headers, struct HttpHeader kind */ + T(HTTPHEADER, OBJECTPOINT, 23), + + /* This points to a linked list of post entries, struct HttpPost */ + T(HTTPPOST, OBJECTPOINT, 24), + + /* name of the file keeping your private SSL-certificate */ + T(SSLCERT, OBJECTPOINT, 25), + + /* password for the SSL-certificate */ + T(SSLCERTPASSWD, OBJECTPOINT, 26), + + /* send TYPE parameter? */ + T(CRLF, LONG, 27), + + /* send linked-list of QUOTE commands */ + T(QUOTE, OBJECTPOINT, 28), + + /* send FILE * to store headers to */ + T(WRITEHEADER, OBJECTPOINT, 29), + +#ifdef MULTIDOC + /* send linked list of MoreDoc structs */ + T(MOREDOCS, OBJECTPOINT, 30), +#endif + + /* point to a file to read the initial cookies from, also enables + "cookie awareness" */ + T(COOKIEFILE, OBJECTPOINT, 31), + + /* What version to specifly try to use. + 3 = SSLv3, 2 = SSLv2, all else makes it try v3 first then v2 */ + T(SSLVERSION, LONG, 32), + + /* What kind of HTTP time condition to use, see defines */ + T(TIMECONDITION, LONG, 33), + + /* Time to use with the above condition. Specified in number of seconds + since 1 Jan 1970 */ + T(TIMEVALUE, LONG, 34), + + /* HTTP request, for odd commands like DELETE, TRACE and others */ + /* OBSOLETE DEFINE, left for tradition only */ + T(HTTPREQUEST, OBJECTPOINT, 35), + + /* Custom request, for customizing the get command like + HTTP: DELETE, TRACE and others + FTP: to use a different list command + */ + T(CUSTOMREQUEST, OBJECTPOINT, 35), + + /* HTTP request, for odd commands like DELETE, TRACE and others */ + T(STDERR, OBJECTPOINT, 36), + + /* Progress mode sets alternative progress mode displays, the only + one defined today is 1 which makes the #-style progress bar. */ + T(PROGRESSMODE, LONG, 37), + + URGTAG_LASTENTRY /* the last unusued */ +} UrgTag; + +#define CURL_PROGRESS_STATS 0 /* default progress display */ +#define CURL_PROGRESS_BAR 1 + +typedef enum { + TIMECOND_NONE, + + TIMECOND_IFMODSINCE, + TIMECOND_IFUNMODSINCE, + TIMECOND_LASTMOD, + + TIMECOND_LAST +} TimeCond; + +#ifdef __BEOS__ +#include <support/SupportDefs.h> +#else +#ifndef __cplusplus /* (rabe) */ +typedef char bool; +#endif /* (rabe) */ +#endif + +/********************************************************************** + * + * >>> urlget() interface #defines changed in v5! <<< + * + * You enter parameters as tags. Tags are specified as a pair of parameters. + * The first parameter in a pair is the tag identifier, telling urlget what + * kind of tag it is, and the second is the data. The tags may come in any + * order but MUST ALWAYS BE TERMINATED with an ending URGTAG_DONE (which + * needs no data). + * + * _Very_ simple example: + * + * curl_urlget(URGTAG_URL, "http://www.fts.frontec.se/~dast/", URGTAG_DONE); + * + ***********************************************************************/ + +UrgError curl_urlget(UrgTag, ...); + +/* external form function */ +int curl_FormParse(char *string, + struct HttpPost **httppost, + struct HttpPost **last_post); + +/* Unix and Win32 getenv function call */ +char *curl_GetEnv(char *variable); + +/* returns ascii string of the libcurl version */ +char *curl_version(void); + +/* This is the version number */ +#define LIBCURL_VERSION "6.3.1" + +/* linked-list structure for QUOTE */ +struct curl_slist { + char *data; + struct curl_slist *next; +}; + +struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); +void curl_slist_free_all(struct curl_slist *list); + +#endif /* __URLGET_H */
include/curl/getdate.h+0 −0 addedinclude/curl/mprintf.h+93 −0 added@@ -0,0 +1,93 @@ +/************************************************************************* + * + * $Id$ + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See + * the License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Triacle. + * + * The Initial Developers of the Original Code are Bjorn Reese and + * Daniel Stenberg. + * + * Portions created by Initial Developers are + * + * Copyright (C) 1998 Bjorn Reese and Daniel Stenberg. + * All Rights Reserved. + * + * Contributor(s): + * + ************************************************************************* + * + * Preliminary documentation + * + * printf conversions: + * + * conversion ::= '%%' | '%' [position] ( number | float | string ) + * position ::= digits '$' + * number ::= [number-flags] ( 'd' | 'i' | 'o' | 'x' | 'X' | 'u') + * number-flags ::= 'h' | 'l' | 'L' ... + * float ::= [float-flags] ( 'f' | 'e' | 'E' | 'g' | 'G' ) + * string ::= [string-flags] 's' + * string-flags ::= padding | '#' + * digits ::= (digit)+ + * digit ::= 0-9 + * + * c + * p + * n + * + * qualifiers + * + * - : left adjustment + * + : show sign + * SPACE : padding + * # : alterative + * . : precision + * * : width + * 0 : padding / size + * 1-9 : size + * h : short + * l : long + * ll : longlong + * L : long double + * Z : long / longlong + * q : longlong + * + ************************************************************************/ + +#ifndef H_MPRINTF +#define H_MPRINTF + +#include <stdarg.h> + +int mprintf(const char *format, ...); +int mfprintf(FILE *fd, const char *format, ...); +int msprintf(char *buffer, const char *format, ...); +int msnprintf(char *buffer, size_t maxlength, const char *format, ...); +int mvprintf(const char *format, va_list args); +int mvfprintf(FILE *fd, const char *format, va_list args); +int mvsprintf(char *buffer, const char *format, va_list args); +int mvsnprintf(char *buffer, size_t maxlength, const char *format, va_list args); +char *maprintf(const char *format, ...); +char *mvaprintf(const char *format, va_list args); + +#ifdef _MPRINTF_REPLACE +# define printf mprintf +# define fprintf mfprintf +# define sprintf msprintf +# define snprintf msnprintf +# define vprintf mvprintf +# define vfprintf mvfprintf +# define vsprintf mvsprintf +# define vsnprintf mvsnprintf +#endif + +#endif /* H_MPRINTF */
include/curl/stdcheaders.h+53 −0 added@@ -0,0 +1,53 @@ +#ifndef __STDC_HEADERS_H +#define __STDC_HEADERS_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + +size_t fread (void *, size_t, size_t, FILE *); +size_t fwrite (const void *, size_t, size_t, FILE *); + +int strcasecmp(const char *, const char *); +int strncasecmp(const char *, const char *, size_t); + +#endif
include/README+15 −0 added@@ -0,0 +1,15 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +Include files for libcurl, external users. + +They're all placed in the curl subdirectory here for better fit in any kind +of environment. You should include files from here using... + + #include <curl/curl.h> + +... style and point the compiler's include path to the directory holding the +curl subdirectory. It makes it more likely to survice future modifications.
INSTALL+195 −0 added@@ -0,0 +1,195 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How To Compile + +UNIX +==== + + The configure script *always* tries to find a working SSL library unless + explicitely told not to. If you have SSLeay or OpenSSL installed in the + default search path for your compiler/linker, you don't need to do anything + special. + + If you have SSLeay or OpenSSL installed in /usr/local/ssl, you can + run configure like so: + + ./configure --with-ssl + + If you have SSLeay or OpenSSL installed somewhere else (for example, + /opt/OpenSSL,) you can run configure like this: + + ./configure --with-ssl=/opt/OpenSSL + + If you insist on forcing a build *without* SSL support, even though you may + have it installed in your system, you can run configure like this: + + ./configure --without-ssl + + If you have SSLeay or OpenSSL installed, but with the libraries in + one place and the header files somewhere else, you'll have to set the + LDFLAGS and CPPFLAGS environment variables prior to running configure. + Something like this should work: + + (with the Bourne shell and its clones): + + CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ + ./configure + + (with csh, tcsh and their clones): + + env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ + ./configure + + If your SSL library was compiled with rsaref (usually for use in + the United States), you may also need to set: + + LIBS=-lRSAglue -lrsaref + (from Doug Kaufman <dkaufman@rahul.net>) + + Without SSL support, just run: + + ./configure + + Then run: + + make + + Use the executable `curl` in src/ directory. + + 'make install' copies the curl file to /usr/local/bin/ (or $prefix/bin + if you used the --prefix option to configure) and copies the curl.1 + man page to a suitable place too. + + KNOWN PROBLEMS + + If you happen to have autoconf installed, but a version older than + 2.12 you will get into trouble. Then you can still build curl by + issuing these commands: (from Ralph Beckmann <rabe@uni-paderborn.de>) + + ./configure [...] + cd lib; make; cd .. + cd src; make; cd .. + cp src/curl elsewhere/bin/ + + OPTIONS + + Remember, to force configure to use the standard cc compiler if both + cc and gcc are present, run configure like + + CC=cc ./configure + or + env Cc=cc ./configure + + +Win32 +===== + + Without SSL: + + MingW32 (GCC-2.95) style + ------------------------ + Run the 'mingw32.bat' file to get the proper environment variables + set, then run 'make -f Makefile.m32' in the lib/ dir and then + 'make -f Makefile.m32' in the src/ dir. + + If you have any problems linking libraries or finding header files, + be sure to look at the provided "Makefile.m32" files for the proper + paths, and adjust as necessary. + + Cygwin style + ------------ + Almost identical to the unix installation. Run the configure script + in the curl root with 'sh configure'. Make sure you have the sh + executable in /bin/ or you'll see the configure fail towards the + end. + + Run 'make' + + Microsoft command line style + ---------------------------- + Run the 'vcvars32.bat' file to get the proper environment variables + set, then run 'nmake -f Makefile.vc6' in the lib/ dir and then + 'nmake -f Makefile.vc6' in the src/ dir. + + IDE-style + ------------------------- + If you use VC++, Borland or similar compilers. Include all lib source + files in a static lib "project" (all .c and .h files that is). + (you should name it libcurl or similar) + + Make the sources in the src/ drawer be a "win32 console application" + project. Name it curl. + + With VC++, add 'wsock32.lib' to the link libs when you build curl! + Borland seems to do that itself magically. Of course you have to + make sure it links with the libcurl too! + + For VC++ 6, there's an included Makefile.vc6 that should be possible + to use out-of-the-box. + + Microsoft note: add /Zm200 to the compiler options, as the hugehelp.c + won't compile otherwise due to "too long puts string" or something + like that! + + + With SSL: + + MingW32 (GCC-2.95) style + ------------------------ + Run the 'mingw32.bat' file to get the proper environment variables + set, then run 'make -f Makefile.m32 SSL=1' in the lib/ dir and then + 'make -f Makefile.m32 SSL=1' in the src/ dir. + + If you have any problems linking libraries or finding header files, + be sure to look at the provided "Makefile.m32" files for the proper + paths, and adjust as necessary. + + Cygwin style + ------------ + + Haven't done, nor got any reports on how to do. It should although be + identical to the unix setup for the same purpose. See above. + + Microsoft command line style + ---------------------------- + Run the 'vcvars32.bat' file to get the proper environment variables + set, then run 'nmake -f Makefile.vc6 release-ssl' in the lib/ dir and + then 'nmake -f Makefile.vc6' in the src/ dir. + + Microsoft / Borland style + ------------------------- + If you have OpenSSL/SSLeay, and want curl to take advantage of it, + edit your project properties to use the SSL include path, link with + the SSL libs and define the USE_SSLEAY symbol. + + +OpenSSL/SSLeay +============== + + You'll find OpenSSL information at: + + http://www.openssl.org + + +MingW32/Cygwin +============== + + You'll find MingW32 and Cygwin information at: + + http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html + +OpenLDAP +======== + + You'll find OpenLDAP information at: + + http://www.openldap.org + + You need to install it with shared libraries, which is enabled when running + the ldap configure script with "--enable-shared". With my linux 2.0.36 + kernel I also had to disable using threads (with --without-threads), + because the configure script couldn't figure out my system.
install-sh+250 −0 added@@ -0,0 +1,250 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + true +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + else + instcmd=mkdir + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + true + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + true + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + true + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' +' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + true + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + true + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0
LEGAL+21 −0 added@@ -0,0 +1,21 @@ +Part of this software is distributed under the Mozilla Public License +version 1.0, which is part of this distribution (MPL-1.0.txt) and +available on-line at http://www.mozilla.org/MPL/ + +The terminology used here is described in the Mozilla Public License. + +In accordance with section "4. Inability to Comply Due to Statute or +Regulation" the following exemptions apply to this software: + + * The Initial Developer has the right, regardless of the citizenship + of any involved party, to choose the location for settling disputes + as refered to under section "11. Miscellaneous" of the Mozilla Public + License. + +Initial Developers of this software are: + + Daniel Stenberg <Daniel.Stenberg@sth.frontec.se> + Rafael Linden Sagula <sagula@inf.ufrgs.br> + +Curl is Copyright (C) 1996-1998 Daniel Stenberg and Rafael Linden Sagula + \ No newline at end of file
lib/arpa_telnet.h+319 −0 added@@ -0,0 +1,319 @@ +/* + * Copyright (c) 1983, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)telnet.h 8.2 (Berkeley) 12/15/93 + */ + +#ifndef _ARPA_TELNET_H +#define _ARPA_TELNET_H + +/* + * Definitions for the TELNET protocol. + */ +#define IAC 255 /* interpret as command: */ +#define DONT 254 /* you are not to use option */ +#define DO 253 /* please, you use option */ +#define WONT 252 /* I won't use option */ +#define WILL 251 /* I will use option */ +#define SB 250 /* interpret as subnegotiation */ +#define GA 249 /* you may reverse the line */ +#define EL 248 /* erase the current line */ +#define EC 247 /* erase the current character */ +#define AYT 246 /* are you there */ +#define AO 245 /* abort output--but let prog finish */ +#define IP 244 /* interrupt process--permanently */ +#define BREAK 243 /* break */ +#define DM 242 /* data mark--for connect. cleaning */ +#define NOP 241 /* nop */ +#define SE 240 /* end sub negotiation */ +#define EOR 239 /* end of record (transparent mode) */ +#define ABORT 238 /* Abort process */ +#define SUSP 237 /* Suspend process */ +#define xEOF 236 /* End of file: EOF is already used... */ + +#define SYNCH 242 /* for telfunc calls */ + +#ifdef TELCMDS +char *telcmds[] = { + "EOF", "SUSP", "ABORT", "EOR", + "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", + "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0, +}; +#else +extern char *telcmds[]; +#endif + +#define TELCMD_FIRST xEOF +#define TELCMD_LAST IAC +#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ + (unsigned int)(x) >= TELCMD_FIRST) +#define TELCMD(x) telcmds[(x)-TELCMD_FIRST] + +/* telnet options */ +#define TELOPT_BINARY 0 /* 8-bit data path */ +#define TELOPT_ECHO 1 /* echo */ +#define TELOPT_RCP 2 /* prepare to reconnect */ +#define TELOPT_SGA 3 /* suppress go ahead */ +#define TELOPT_NAMS 4 /* approximate message size */ +#define TELOPT_STATUS 5 /* give status */ +#define TELOPT_TM 6 /* timing mark */ +#define TELOPT_RCTE 7 /* remote controlled transmission and echo */ +#define TELOPT_NAOL 8 /* negotiate about output line width */ +#define TELOPT_NAOP 9 /* negotiate about output page size */ +#define TELOPT_NAOCRD 10 /* negotiate about CR disposition */ +#define TELOPT_NAOHTS 11 /* negotiate about horizontal tabstops */ +#define TELOPT_NAOHTD 12 /* negotiate about horizontal tab disposition */ +#define TELOPT_NAOFFD 13 /* negotiate about formfeed disposition */ +#define TELOPT_NAOVTS 14 /* negotiate about vertical tab stops */ +#define TELOPT_NAOVTD 15 /* negotiate about vertical tab disposition */ +#define TELOPT_NAOLFD 16 /* negotiate about output LF disposition */ +#define TELOPT_XASCII 17 /* extended ascic character set */ +#define TELOPT_LOGOUT 18 /* force logout */ +#define TELOPT_BM 19 /* byte macro */ +#define TELOPT_DET 20 /* data entry terminal */ +#define TELOPT_SUPDUP 21 /* supdup protocol */ +#define TELOPT_SUPDUPOUTPUT 22 /* supdup output */ +#define TELOPT_SNDLOC 23 /* send location */ +#define TELOPT_TTYPE 24 /* terminal type */ +#define TELOPT_EOR 25 /* end or record */ +#define TELOPT_TUID 26 /* TACACS user identification */ +#define TELOPT_OUTMRK 27 /* output marking */ +#define TELOPT_TTYLOC 28 /* terminal location number */ +#define TELOPT_3270REGIME 29 /* 3270 regime */ +#define TELOPT_X3PAD 30 /* X.3 PAD */ +#define TELOPT_NAWS 31 /* window size */ +#define TELOPT_TSPEED 32 /* terminal speed */ +#define TELOPT_LFLOW 33 /* remote flow control */ +#define TELOPT_LINEMODE 34 /* Linemode option */ +#define TELOPT_XDISPLOC 35 /* X Display Location */ +#define TELOPT_OLD_ENVIRON 36 /* Old - Environment variables */ +#define TELOPT_AUTHENTICATION 37/* Authenticate */ +#define TELOPT_ENCRYPT 38 /* Encryption option */ +#define TELOPT_NEW_ENVIRON 39 /* New - Environment variables */ +#define TELOPT_EXOPL 255 /* extended-options-list */ + + +#define NTELOPTS (1+TELOPT_NEW_ENVIRON) +#ifdef TELOPTS +char *telopts[NTELOPTS+1] = { + "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", + "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", + "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", + "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", + "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", + "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", + "TACACS UID", "OUTPUT MARKING", "TTYLOC", + "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", + "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", + "ENCRYPT", "NEW-ENVIRON", + 0, +}; +#define TELOPT_FIRST TELOPT_BINARY +#define TELOPT_LAST TELOPT_NEW_ENVIRON +#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) +#define TELOPT(x) telopts[(x)-TELOPT_FIRST] +#endif + +/* sub-option qualifiers */ +#define TELQUAL_IS 0 /* option is... */ +#define TELQUAL_SEND 1 /* send option */ +#define TELQUAL_INFO 2 /* ENVIRON: informational version of IS */ +#define TELQUAL_REPLY 2 /* AUTHENTICATION: client version of IS */ +#define TELQUAL_NAME 3 /* AUTHENTICATION: client version of IS */ + +#define LFLOW_OFF 0 /* Disable remote flow control */ +#define LFLOW_ON 1 /* Enable remote flow control */ +#define LFLOW_RESTART_ANY 2 /* Restart output on any char */ +#define LFLOW_RESTART_XON 3 /* Restart output only on XON */ + +/* + * LINEMODE suboptions + */ + +#define LM_MODE 1 +#define LM_FORWARDMASK 2 +#define LM_SLC 3 + +#define MODE_EDIT 0x01 +#define MODE_TRAPSIG 0x02 +#define MODE_ACK 0x04 +#define MODE_SOFT_TAB 0x08 +#define MODE_LIT_ECHO 0x10 + +#define MODE_MASK 0x1f + +/* Not part of protocol, but needed to simplify things... */ +#define MODE_FLOW 0x0100 +#define MODE_ECHO 0x0200 +#define MODE_INBIN 0x0400 +#define MODE_OUTBIN 0x0800 +#define MODE_FORCE 0x1000 + +#define SLC_SYNCH 1 +#define SLC_BRK 2 +#define SLC_IP 3 +#define SLC_AO 4 +#define SLC_AYT 5 +#define SLC_EOR 6 +#define SLC_ABORT 7 +#define SLC_EOF 8 +#define SLC_SUSP 9 +#define SLC_EC 10 +#define SLC_EL 11 +#define SLC_EW 12 +#define SLC_RP 13 +#define SLC_LNEXT 14 +#define SLC_XON 15 +#define SLC_XOFF 16 +#define SLC_FORW1 17 +#define SLC_FORW2 18 + +#define NSLC 18 + +/* + * For backwards compatability, we define SLC_NAMES to be the + * list of names if SLC_NAMES is not defined. + */ +#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ + "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ + "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0, +#ifdef SLC_NAMES +char *slc_names[] = { + SLC_NAMELIST +}; +#else +extern char *slc_names[]; +#define SLC_NAMES SLC_NAMELIST +#endif + +#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) +#define SLC_NAME(x) slc_names[x] + +#define SLC_NOSUPPORT 0 +#define SLC_CANTCHANGE 1 +#define SLC_VARIABLE 2 +#define SLC_DEFAULT 3 +#define SLC_LEVELBITS 0x03 + +#define SLC_FUNC 0 +#define SLC_FLAGS 1 +#define SLC_VALUE 2 + +#define SLC_ACK 0x80 +#define SLC_FLUSHIN 0x40 +#define SLC_FLUSHOUT 0x20 + +#define OLD_ENV_VAR 1 +#define OLD_ENV_VALUE 0 +#define NEW_ENV_VAR 0 +#define NEW_ENV_VALUE 1 +#define ENV_ESC 2 +#define ENV_USERVAR 3 + +/* + * AUTHENTICATION suboptions + */ + +/* + * Who is authenticating who ... + */ +#define AUTH_WHO_CLIENT 0 /* Client authenticating server */ +#define AUTH_WHO_SERVER 1 /* Server authenticating client */ +#define AUTH_WHO_MASK 1 + +/* + * amount of authentication done + */ +#define AUTH_HOW_ONE_WAY 0 +#define AUTH_HOW_MUTUAL 2 +#define AUTH_HOW_MASK 2 + +#define AUTHTYPE_NULL 0 +#define AUTHTYPE_KERBEROS_V4 1 +#define AUTHTYPE_KERBEROS_V5 2 +#define AUTHTYPE_SPX 3 +#define AUTHTYPE_MINK 4 +#define AUTHTYPE_CNT 5 + +#define AUTHTYPE_TEST 99 + +#ifdef AUTH_NAMES +char *authtype_names[] = { + "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0, +}; +#else +extern char *authtype_names[]; +#endif + +#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) +#define AUTHTYPE_NAME(x) authtype_names[x] + +/* + * ENCRYPTion suboptions + */ +#define ENCRYPT_IS 0 /* I pick encryption type ... */ +#define ENCRYPT_SUPPORT 1 /* I support encryption types ... */ +#define ENCRYPT_REPLY 2 /* Initial setup response */ +#define ENCRYPT_START 3 /* Am starting to send encrypted */ +#define ENCRYPT_END 4 /* Am ending encrypted */ +#define ENCRYPT_REQSTART 5 /* Request you start encrypting */ +#define ENCRYPT_REQEND 6 /* Request you send encrypting */ +#define ENCRYPT_ENC_KEYID 7 +#define ENCRYPT_DEC_KEYID 8 +#define ENCRYPT_CNT 9 + +#define ENCTYPE_ANY 0 +#define ENCTYPE_DES_CFB64 1 +#define ENCTYPE_DES_OFB64 2 +#define ENCTYPE_CNT 3 + +#ifdef ENCRYPT_NAMES +char *encrypt_names[] = { + "IS", "SUPPORT", "REPLY", "START", "END", + "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", + 0, +}; +char *enctype_names[] = { + "ANY", "DES_CFB64", "DES_OFB64", 0, +}; +#else +extern char *encrypt_names[]; +extern char *enctype_names[]; +#endif + + +#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) +#define ENCRYPT_NAME(x) encrypt_names[x] + +#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) +#define ENCTYPE_NAME(x) enctype_names[x] +#endif /* _ARPA_TELNET_H */
lib/base64.c+94 −0 added@@ -0,0 +1,94 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +#include <stdio.h> + +/* ---- Base64 Encoding --- */ +static char table64[]= + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + +void base64Encode(char *intext, char *output) +{ + unsigned char ibuf[3]; + unsigned char obuf[4]; + int i; + int inputparts; + + while(*intext) { + for (i = inputparts = 0; i < 3; i++) { + if(*intext) { + inputparts++; + ibuf[i] = *intext; + intext++; + } + else + ibuf[i] = 0; + } + + obuf [0] = (ibuf [0] & 0xFC) >> 2; + obuf [1] = ((ibuf [0] & 0x03) << 4) | ((ibuf [1] & 0xF0) >> 4); + obuf [2] = ((ibuf [1] & 0x0F) << 2) | ((ibuf [2] & 0xC0) >> 6); + obuf [3] = ibuf [2] & 0x3F; + + switch(inputparts) { + case 1: /* only one byte read */ + sprintf(output, "%c%c==", + table64[obuf[0]], + table64[obuf[1]]); + break; + case 2: /* two bytes read */ + sprintf(output, "%c%c%c=", + table64[obuf[0]], + table64[obuf[1]], + table64[obuf[2]]); + break; + default: + sprintf(output, "%c%c%c%c", + table64[obuf[0]], + table64[obuf[1]], + table64[obuf[2]], + table64[obuf[3]] ); + break; + } + output += 4; + } + *output=0; +} +/* ---- End of Base64 Encoding ---- */
lib/base64.h+44 −0 added@@ -0,0 +1,44 @@ +#ifndef __BASE64_H +#define __BASE64_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +void base64Encode(char *intext, char *output); +#endif
lib/cookie.c+457 −0 added@@ -0,0 +1,457 @@ + +/*** + + +RECEIVING COOKIE INFORMATION +============================ + +struct CookieInfo *cookie_init(char *file); + + Inits a cookie struct to store data in a local file. This is always + called before any cookies are set. + +int cookies_set(struct CookieInfo *cookie, char *cookie_line); + + The 'cookie_line' parameter is a full "Set-cookie:" line as + received from a server. + + The function need to replace previously stored lines that this new + line superceeds. + + It may remove lines that are expired. + + It should return an indication of success/error. + + +SENDING COOKIE INFORMATION +========================== + +struct Cookies *cookie_getlist(struct CookieInfo *cookie, + char *host, char *path, bool secure); + + For a given host and path, return a linked list of cookies that + the client should send to the server if used now. The secure + boolean informs the cookie if a secure connection is achieved or + not. + + It shall only return cookies that haven't expired. + + +Example set of cookies: + + Set-cookie: PRODUCTINFO=webxpress; domain=.fidelity.com; path=/; secure + Set-cookie: PERSONALIZE=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; + domain=.fidelity.com; path=/ftgw; secure + Set-cookie: FidHist=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; + domain=.fidelity.com; path=/; secure + Set-cookie: FidOrder=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; + domain=.fidelity.com; path=/; secure + Set-cookie: DisPend=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; + domain=.fidelity.com; path=/; secure + Set-cookie: FidDis=none;expires=Monday, 13-Jun-1988 03:04:55 GMT; + domain=.fidelity.com; path=/; secure + Set-cookie: + Session_Key@6791a9e0-901a-11d0-a1c8-9b012c88aa77=none;expires=Monday, + 13-Jun-1988 03:04:55 GMT; domain=.fidelity.com; path=/; secure +****/ + +#include <stdlib.h> +#include <string.h> +#include <ctype.h> + +#include "cookie.h" +#include "setup.h" +#include "getdate.h" + +/**************************************************************************** + * + * cookie_add() + * + * Add a single cookie line to the cookie keeping object. + * + ***************************************************************************/ + +struct Cookie *cookie_add(struct CookieInfo *c, + bool httpheader, /* TRUE if HTTP header-style line */ + char *lineptr) /* first non-space of the line */ +{ + struct Cookie *clist; + char what[MAX_COOKIE_LINE]; + char name[MAX_NAME]; + char *ptr; + char *semiptr; + struct Cookie *co; + time_t now = time(NULL); + bool replace_old = FALSE; + + /* First, alloc and init a new struct for it */ + co = (struct Cookie *)malloc(sizeof(struct Cookie)); + if(!co) + return NULL; /* bail out if we're this low on memory */ + + /* clear the whole struct first */ + memset(co, 0, sizeof(struct Cookie)); + + if(httpheader) { + /* This line was read off a HTTP-header */ + + semiptr=strchr(lineptr, ';'); /* first, find a semicolon */ + ptr = lineptr; + while(semiptr) { + *semiptr='\0'; /* zero terminate for a while */ + /* we have a <what>=<this> pair or a 'secure' word here */ + if(strchr(ptr, '=')) { + if(2 == sscanf(ptr, "%" MAX_NAME_TXT "[^=]=%" + MAX_COOKIE_LINE_TXT "[^\r\n]", + name, what)) { + /* this is a legal <what>=<this> pair */ + if(strequal("path", name)) { + co->path=strdup(what); + } + else if(strequal("domain", name)) { + co->domain=strdup(what); + } + else if(strequal("expires", name)) { + co->expirestr=strdup(what); + co->expires = get_date(what, &now); + } + else if(!co->name) { + co->name = strdup(name); + co->value = strdup(what); + } + else + ;/* this is the second (or more) name we don't know + about! */ + } + else { + /* this is an "illegal" <what>=<this> pair */ + } + } + else { + if(sscanf(ptr, "%" MAX_COOKIE_LINE_TXT "[^\r\n]", + what)) { + if(strequal("secure", what)) + co->secure = TRUE; + else + ; /* unsupported keyword without assign! */ + } + } + *semiptr=';'; /* put the semicolon back */ + ptr=semiptr+1; + while(ptr && *ptr && isspace((int)*ptr)) + ptr++; + semiptr=strchr(ptr, ';'); /* now, find the next semicolon */ + } + } + else { + /* This line is NOT a HTTP header style line, we do offer support for + reading the odd netscape cookies-file format here */ + char *firstptr; + int fields; + + if(lineptr[0]=='#') { + /* don't even try the comments */ + free(co); + return NULL; + } + /* strip off the possible end-of-line characters */ + if(ptr=strchr(lineptr, '\r')) + *ptr=0; /* clear it */ + if(ptr=strchr(lineptr, '\n')) + *ptr=0; /* clear it */ + + firstptr=strtok(lineptr, "\t"); /* first tokenize it on the TAB */ + + /* Here's a quick check to eliminate normal HTTP-headers from this */ + if(!firstptr || strchr(firstptr, ':')) { + free(co); + return NULL; + } + + /* Now loop through the fields and init the struct we already have + allocated */ + for(ptr=firstptr, fields=0; ptr; ptr=strtok(NULL, "\t"), fields++) { + switch(fields) { + case 0: + co->domain = strdup(ptr); + break; + case 1: + /* what _is_ this field for? */ + break; + case 2: + co->path = strdup(ptr); + break; + case 3: + co->secure = strequal(ptr, "TRUE"); + break; + case 4: + co->expires = atoi(ptr); + break; + case 5: + co->name = strdup(ptr); + break; + case 6: + co->value = strdup(ptr); + break; + } + } + + if(7 != fields) { + /* we did not find the sufficient number of fields to recognize this + as a valid line, abort and go home */ + + if(co->domain) + free(co->domain); + if(co->path) + free(co->path); + if(co->name) + free(co->name); + if(co->value) + free(co->value); + + free(co); + return NULL; + } + + } + + /* now, we have parsed the incoming line, we must now check if this + superceeds an already existing cookie, which it may if the previous have + the same domain and path as this */ + + clist = c->cookies; + replace_old = FALSE; + while(clist) { + if(strequal(clist->name, co->name)) { + /* the names are identical */ + + if(clist->domain && co->domain) { + if(strequal(clist->domain, co->domain)) + replace_old=TRUE; + } + else if(!clist->domain && !co->domain) + replace_old = TRUE; + + if(replace_old) { + /* the domains were identical */ + + if(clist->path && co->path) { + if(strequal(clist->path, co->path)) { + replace_old = TRUE; + } + else + replace_old = FALSE; + } + else if(!clist->path && !co->path) + replace_old = TRUE; + else + replace_old = FALSE; + + } + + if(replace_old) { + co->next = clist->next; /* get the next-pointer first */ + + /* then free all the old pointers */ + if(clist->name) + free(clist->name); + if(clist->value) + free(clist->value); + if(clist->domain) + free(clist->domain); + if(clist->path) + free(clist->path); + if(clist->expirestr) + free(clist->expirestr); + + *clist = *co; /* then store all the new data */ + } + + } + clist = clist->next; + } + + if(!replace_old) { + + /* first, point to our "next" */ + co->next = c->cookies; + /* then make ourselves first in the list */ + c->cookies = co; + } + return co; +} + +/***************************************************************************** + * + * cookie_init() + * + * Inits a cookie struct to read data from a local file. This is always + * called before any cookies are set. File may be NULL. + * + ****************************************************************************/ +struct CookieInfo *cookie_init(char *file) +{ + char line[MAX_COOKIE_LINE]; + struct CookieInfo *c; + FILE *fp; + + c = (struct CookieInfo *)malloc(sizeof(struct CookieInfo)); + if(!c) + return NULL; /* failed to get memory */ + memset(c, 0, sizeof(struct CookieInfo)); + c->filename = strdup(file?file:"none"); /* copy the name just in case */ + + fp = file?fopen(file, "r"):NULL; + if(fp) { + while(fgets(line, MAX_COOKIE_LINE, fp)) { + if(strnequal("Set-Cookie:", line, 11)) { + /* This is a cookie line, get it! */ + char *lineptr=&line[11]; + while(*lineptr && isspace((int)*lineptr)) + lineptr++; + + cookie_add(c, TRUE, lineptr); + } + else { + /* This might be a netscape cookie-file line, get it! */ + char *lineptr=line; + while(*lineptr && isspace((int)*lineptr)) + lineptr++; + + cookie_add(c, FALSE, lineptr); + } + } + fclose(fp); + } + + return c; +} + +/***************************************************************************** + * + * cookie_getlist() + * + * For a given host and path, return a linked list of cookies that the + * client should send to the server if used now. The secure boolean informs + * the cookie if a secure connection is achieved or not. + * + * It shall only return cookies that haven't expired. + * + ****************************************************************************/ + +struct Cookie *cookie_getlist(struct CookieInfo *c, + char *host, char *path, bool secure) +{ + struct Cookie *newco; + struct Cookie *co; + time_t now = time(NULL); + int hostlen=strlen(host); + int domlen; + + struct Cookie *mainco=NULL; + + if(!c || !c->cookies) + return NULL; /* no cookie struct or no cookies in the struct */ + + co = c->cookies; + + while(co) { + /* only process this cookie if it is not expired or had no expire + date AND that if the cookie requires we're secure we must only + continue if we are! */ + if( (co->expires<=0 || (co->expires> now)) && + (co->secure?secure:TRUE) ) { + + /* now check if the domain is correct */ + domlen=co->domain?strlen(co->domain):0; + if(!co->domain || + ((domlen<hostlen) && + strequal(host+(hostlen-domlen), co->domain)) ) { + /* the right part of the host matches the domain stuff in the + cookie data */ + + /* now check the left part of the path with the cookies path + requirement */ + if(!co->path || + strnequal(path, co->path, strlen(co->path))) { + + /* and now, we know this is a match and we should create an + entry for the return-linked-list */ + + newco = (struct Cookie *)malloc(sizeof(struct Cookie)); + if(newco) { + /* first, copy the whole source cookie: */ + memcpy(newco, co, sizeof(struct Cookie)); + + /* then modify our next */ + newco->next = mainco; + + /* point the main to us */ + mainco = newco; + } + } + } + } + co = co->next; + } + + return mainco; /* return the new list */ +} + + +/***************************************************************************** + * + * cookie_freelist() + * + * Free a list previously returned by cookie_getlist(); + * + ****************************************************************************/ + +void cookie_freelist(struct Cookie *co) +{ + struct Cookie *next; + if(co) { + while(co) { + next = co->next; + free(co); /* we only free the struct since the "members" are all + just copied! */ + co = next; + } + } +} + +/***************************************************************************** + * + * cookie_cleanup() + * + * Free a "cookie object" previous created with cookie_init(). + * + ****************************************************************************/ +void cookie_cleanup(struct CookieInfo *c) +{ + struct Cookie *co; + struct Cookie *next; + if(c) { + if(c->filename) + free(c->filename); + co = c->cookies; + + while(co) { + if(co->name) + free(co->name); + if(co->value) + free(co->value); + if(co->domain) + free(co->domain); + if(co->path) + free(co->path); + if(co->expirestr) + free(co->expirestr); + + next = co->next; + free(co); + co = next; + } + } +} +
lib/cookie.h+45 −0 added@@ -0,0 +1,45 @@ +#ifndef __COOKIE_H +#define __COOKIE_H + +#include <stdio.h> +#ifdef WIN32 +#include <time.h> +#else +#include <sys/time.h> +#endif + +#include <curl/curl.h> + +struct Cookie { + struct Cookie *next; /* next in the chain */ + char *name; /* <this> = value */ + char *value; /* name = <this> */ + char *path; /* path = <this> */ + char *domain; /* domain = <this> */ + time_t expires; /* expires = <this> */ + char *expirestr; /* the plain text version */ + bool secure; /* whether the 'secure' keyword was used */ +}; + +struct CookieInfo { + /* linked list of cookies we know of */ + struct Cookie *cookies; + + char *filename; /* file we read from/write to */ +}; + +/* This is the maximum line length we accept for a cookie line */ +#define MAX_COOKIE_LINE 2048 +#define MAX_COOKIE_LINE_TXT "2047" + +/* This is the maximum length of a cookie name we deal with: */ +#define MAX_NAME 256 +#define MAX_NAME_TXT "255" + +struct Cookie *cookie_add(struct CookieInfo *, bool, char *); +struct CookieInfo *cookie_init(char *); +struct Cookie *cookie_getlist(struct CookieInfo *, char *, char *, bool); +void cookie_freelist(struct Cookie *); +void cookie_cleanup(struct CookieInfo *); + +#endif
lib/dict.c+245 −0 added@@ -0,0 +1,245 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +/* -- WIN32 approved -- */ +#include <stdio.h> +#include <string.h> +#include <stdarg.h> +#include <stdlib.h> +#include <ctype.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include <errno.h> + +#include "setup.h" + +#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#include <winsock.h> +#include <time.h> +#include <io.h> +#else +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#include <netinet/in.h> +#include <sys/time.h> +#include <sys/resource.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <netdb.h> +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +#ifdef HAVE_NET_IF_H +#include <net/if.h> +#endif +#include <sys/ioctl.h> +#include <signal.h> + +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + + +#endif + +#include "urldata.h" +#include <curl/curl.h> +#include "download.h" +#include "sendf.h" + +#include "progress.h" + +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.h> + + +UrgError dict(struct UrlData *data, char *path, long *bytecount) +{ + int nth; + char *word; + char *ppath; + char *database = NULL; + char *strategy = NULL; + char *nthdef = NULL; /* This is not part of the protocol, but required + by RFC 2229 */ + UrgError result=URG_OK; + + if(data->conf & CONF_USERPWD) { + /* AUTH is missing */ + } + + if (strnequal(path, DICT_MATCH, sizeof(DICT_MATCH)-1) || + strnequal(path, DICT_MATCH2, sizeof(DICT_MATCH2)-1) || + strnequal(path, DICT_MATCH3, sizeof(DICT_MATCH3)-1)) { + + word = strchr(path, ':'); + if (word) { + word++; + database = strchr(word, ':'); + if (database) { + *database++ = (char)0; + strategy = strchr(database, ':'); + if (strategy) { + *strategy++ = (char)0; + nthdef = strchr(strategy, ':'); + if (nthdef) { + *nthdef++ = (char)0; + } + } + } + } + + if ((word == NULL) || (*word == (char)0)) { + failf(data, "lookup word is missing\n"); + } + if ((database == NULL) || (*database == (char)0)) { + database = "!"; + } + if ((strategy == NULL) || (*strategy == (char)0)) { + strategy = "."; + } + if ((nthdef == NULL) || (*nthdef == (char)0)) { + nth = 0; + } + else { + nth = atoi(nthdef); + } + + sendf(data->firstsocket, data, + "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n" + "MATCH " + "%s " /* database */ + "%s " /* strategy */ + "%s\n" /* word */ + "QUIT\n", + + database, + strategy, + word + ); + + result = Download(data, data->firstsocket, -1, FALSE, bytecount); + + if(result) + return result; + + } + else if (strnequal(path, DICT_DEFINE, sizeof(DICT_DEFINE)-1) || + strnequal(path, DICT_DEFINE2, sizeof(DICT_DEFINE2)-1) || + strnequal(path, DICT_DEFINE3, sizeof(DICT_DEFINE3)-1)) { + + word = strchr(path, ':'); + if (word) { + word++; + database = strchr(word, ':'); + if (database) { + *database++ = (char)0; + nthdef = strchr(database, ':'); + if (nthdef) { + *nthdef++ = (char)0; + } + } + } + + if ((word == NULL) || (*word == (char)0)) { + failf(data, "lookup word is missing\n"); + } + if ((database == NULL) || (*database == (char)0)) { + database = "!"; + } + if ((nthdef == NULL) || (*nthdef == (char)0)) { + nth = 0; + } + else { + nth = atoi(nthdef); + } + + sendf(data->firstsocket, data, + "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n" + "DEFINE " + "%s " /* database */ + "%s\n" /* word */ + "QUIT\n", + + database, + word + ); + + result = Download(data, data->firstsocket, -1, FALSE, bytecount); + + if(result) + return result; + + } + else { + + ppath = strchr(path, '/'); + if (ppath) { + int i; + + ppath++; + for (i = 0; (i < URL_MAX_LENGTH) && (ppath[i]); i++) { + if (ppath[i] == ':') + ppath[i] = ' '; + } + sendf(data->firstsocket, data, + "CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n" + "%s\n" + "QUIT\n", + ppath); + + result = Download(data, data->firstsocket, -1, FALSE, bytecount); + + if(result) + return result; + + } + } + + ProgressEnd(data); + return URG_OK; +}
lib/dict.h+45 −0 added@@ -0,0 +1,45 @@ +#ifndef __DICT_H +#define __DICT_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +UrgError dict(struct UrlData *data, char *path, long *bytecountp); + +#endif
lib/download.c+484 −0 added@@ -0,0 +1,484 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> + +#include "setup.h" + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + +#include "urldata.h" +#include <curl/curl.h> + +#ifdef __BEOS__ +#include <net/socket.h> +#endif + +#ifdef WIN32 +#if !defined( __GNUC__) || defined(__MINGW32__) +#include <winsock.h> +#endif +#include <time.h> /* for the time_t typedef! */ + +#if defined(__GNUC__) && defined(TIME_WITH_SYS_TIME) +#include <sys/time.h> +#endif + +#endif + +#include "progress.h" +#include "speedcheck.h" +#include "sendf.h" + +#ifdef USE_ZLIB +#include <zlib.h> +#endif + +#define MAX(x,y) ((x)>(y)?(x):(y)) + +/* --- download a stream from a socket --- */ + +/* This newly edited version of Download() was brought to us by the friendly + Mark Butler <butlerm@xmission.com>. Re-indented with the indent command. */ + +UrgError +Download (struct UrlData *data, + int sockfd, /* socket to read from */ + int size, /* -1 if unknown at this point */ + bool getheader, /* TRUE if header parsing is wanted */ + long *bytecountp /* return number of bytes read */ +) +{ + char *buf = data->buffer; + size_t nread; + int bytecount = 0; + long contentlength=0; + struct timeval start = tvnow(); + struct timeval now = start; + bool header = TRUE; + int headerline = 0; /* counts header lines to better track the first one */ + + char *hbufp; /* points at *end* of header line */ + int hbuflen = 0; + char *str; /* within buf */ + char *str_start; /* within buf */ + char *end_ptr; /* within buf */ + char *p; /* within headerbuff */ + bool content_range = FALSE; /* set TRUE if Content-Range: was found */ + int offset = 0; /* possible resume offset read from the + Content-Range: header */ + int code = 0; /* error code from the 'HTTP/1.? XXX' line */ +#ifdef USE_ZLIB + gzFile gzfile=NULL; +#endif + + /* for the low speed checks: */ + UrgError urg; + time_t timeofdoc=0; + long bodywrites=0; + + char newurl[URL_MAX_LENGTH]; /* buffer for Location: URL */ + + hbufp = data->headerbuff; + + myalarm (0); /* switch off the alarm-style timeout */ + + now = tvnow(); + start = now; + + if (!getheader) { + header = FALSE; + ProgressInit (data, size); + } + { + fd_set readfd; + fd_set keepfd; + struct timeval interval; + bool keepon = TRUE; + + /* timeout every X second + - makes a better progressmeter (i.e even when no data is read, the + meter can be updated and reflect reality) + - allows removal of the alarm() crap + - variable timeout is easier + */ + + FD_ZERO (&readfd); /* clear it */ + FD_SET (sockfd, &readfd); + + keepfd = readfd; +#ifdef USE_ZLIB + gzfile = gzdopen(sockfd, "rb"); +#endif + while (keepon) { + readfd = keepfd; /* set this every lap in the loop */ + interval.tv_sec = 2; + interval.tv_usec = 0; + + switch (select (sockfd + 1, &readfd, NULL, NULL, &interval)) { + case -1: /* error, stop reading */ + keepon = FALSE; + continue; + case 0: /* timeout */ + break; + default: /* read! */ +#ifdef USE_SSLEAY + if (data->use_ssl) { + nread = SSL_read (data->ssl, buf, BUFSIZE - 1); + } + else { +#endif +#ifdef USE_ZLIB + nread = gzread(gzfile, buf, BUFSIZE -1 ); +#else + nread = sread (sockfd, buf, BUFSIZE - 1); +#endif +#ifdef USE_SSLEAY + } +#endif /* USE_SSLEAY */ + + /* NULL terminate, allowing string ops to be used */ + if (0 < (signed int) nread) + buf[nread] = 0; + + /* if we receive 0 or less here, the server closed the connection and + we bail out from this! */ + else if (0 >= (signed int) nread) { + keepon = FALSE; + break; + } + + str = buf; /* Default buffer to use when we write the + buffer, it may be changed in the flow below + before the actual storing is done. */ + + /* Since this is a two-state thing, we check if we are parsing + headers at the moment or not. */ + + if (header) { + /* we are in parse-the-header-mode */ + + /* header line within buffer loop */ + do { + int hbufp_index; + + str_start = str; /* str_start is start of line within buf */ + + end_ptr = strchr (str_start, '\n'); + + if (!end_ptr) { + /* no more complete header lines within buffer */ + /* copy what is remaining into headerbuff */ + int str_length = (int)strlen(str); + + if (hbuflen + (int)str_length >= data->headersize) { + char *newbuff; + long newsize=MAX((hbuflen+str_length)*3/2, + data->headersize*2); + hbufp_index = hbufp - data->headerbuff; + newbuff = (char *)realloc(data->headerbuff, newsize); + if(!newbuff) { + failf (data, "Failed to alloc memory for big header!"); + return URG_READ_ERROR; + } + data->headersize=newsize; + data->headerbuff = newbuff; + hbufp = data->headerbuff + hbufp_index; + } + strcpy (hbufp, str); + hbufp += strlen (str); + hbuflen += strlen (str); + break; /* read more and try again */ + } + + str = end_ptr + 1; /* move just past new line */ + + if (hbuflen + (str - str_start) >= data->headersize) { + char *newbuff; + long newsize=MAX((hbuflen+(str-str_start))*3/2, + data->headersize*2); + hbufp_index = hbufp - data->headerbuff; + newbuff = (char *)realloc(data->headerbuff, newsize); + if(!newbuff) { + failf (data, "Failed to alloc memory for big header!"); + return URG_READ_ERROR; + } + data->headersize= newsize; + data->headerbuff = newbuff; + hbufp = data->headerbuff + hbufp_index; + } + + /* copy to end of line */ + strncpy (hbufp, str_start, str - str_start); + hbufp += str - str_start; + hbuflen += str - str_start; + *hbufp = 0; + + p = data->headerbuff; + + /* we now have a full line that p points to */ + if (('\n' == *p) || ('\r' == *p)) { + /* Zero-length line means end of header! */ + if (-1 != size) /* if known */ + size += bytecount; /* we append the already read size */ + + + if ('\r' == *p) + p++; /* pass the \r byte */ + if ('\n' == *p) + p++; /* pass the \n byte */ + + ProgressInit (data, size); /* init progress meter */ + header = FALSE; /* no more header to parse! */ + + /* now, only output this if the header AND body are requested: */ + if ((data->conf & (CONF_HEADER | CONF_NOBODY)) == CONF_HEADER) { + if((p - data->headerbuff) != + data->fwrite (data->headerbuff, 1, + p - data->headerbuff, data->out)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + } + if(data->writeheader) { + /* obviously, the header is requested to be written to + this file: */ + if((p - data->headerbuff) != + fwrite (data->headerbuff, 1, p - data->headerbuff, + data->writeheader)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + } + break; /* exit header line loop */ + } + + if (!headerline++) { + /* This is the first header, it MUST be the error code line + or else we consiser this to be the body right away! */ + if (sscanf (p, " HTTP/1.%*c %3d", &code)) { + /* 404 -> URL not found! */ + if ( + ( ((data->conf & CONF_FOLLOWLOCATION) && (code >= 400)) || + !(data->conf & CONF_FOLLOWLOCATION) && (code >= 300)) + && (data->conf & CONF_FAILONERROR)) { + /* If we have been told to fail hard on HTTP-errors, + here is the check for that: */ + /* serious error, go home! */ + failf (data, "The requested file was not found"); + return URG_HTTP_NOT_FOUND; + } + } + else { + header = FALSE; /* this is not a header line */ + break; + } + } + /* check for Content-Length: header lines to get size */ + if (strnequal("Content-Length", p, 14) && + sscanf (p+14, ": %ld", &contentlength)) + size = contentlength; + else if (strnequal("Content-Range", p, 13) && + sscanf (p+13, ": bytes %d-", &offset)) { + if (data->resume_from == offset) { + /* we asked for a resume and we got it */ + content_range = TRUE; + } + } + else if(data->cookies && + strnequal("Set-Cookie: ", p, 11)) { + cookie_add(data->cookies, TRUE, &p[12]); + } + else if(strnequal("Last-Modified:", p, strlen("Last-Modified:")) && + data->timecondition) { + time_t secs=time(NULL); + timeofdoc = get_date(p+strlen("Last-Modified:"), &secs); + } + else if ((code >= 300 && code < 400) && + (data->conf & CONF_FOLLOWLOCATION) && + strnequal("Location", p, 8) && + sscanf (p+8, ": %" URL_MAX_LENGTH_TXT "s", newurl)) { + /* this is the URL that the server advices us to get + instead */ + data->newurl = strdup (newurl); + } + + if (data->conf & CONF_HEADER) { + if(hbuflen != data->fwrite (p, 1, hbuflen, data->out)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + } + if(data->writeheader) { + /* the header is requested to be written to this file */ + if(hbuflen != fwrite (p, 1, hbuflen, data->writeheader)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + } + + /* reset hbufp pointer && hbuflen */ + hbufp = data->headerbuff; + hbuflen = 0; + } + while (*str); /* header line within buffer */ + + /* We might have reached the end of the header part here, but + there might be a non-header part left in the end of the read + buffer. */ + + if (!header) { + /* the next token and forward is not part of + the header! */ + + /* we subtract the remaining header size from the buffer */ + nread -= (str - buf); + } + + } /* end if header mode */ + + /* This is not an 'else if' since it may be a rest from the header + parsing, where the beginning of the buffer is headers and the end + is non-headers. */ + if (str && !header && (nread > 0)) { + + if(0 == bodywrites) { + /* These checks are only made the first time we are about to + write a chunk of the body */ + if(data->conf&CONF_HTTP) { + /* HTTP-only checks */ + if (data->resume_from && !content_range ) { + /* we wanted to resume a download, although the server doesn't + seem to support this */ + failf (data, "HTTP server doesn't seem to support byte ranges. Cannot resume."); + return URG_HTTP_RANGE_ERROR; + } + else if (data->newurl) { + /* abort after the headers if "follow Location" is set */ + infof (data, "Follow to new URL: %s\n", data->newurl); + return URG_OK; + } + else if(data->timecondition && !data->range) { + /* A time condition has been set AND no ranges have been + requested. This seems to be what chapter 13.3.4 of RFC 2616 + defines to be the correct action for a HTTP/1.1 client */ + if((timeofdoc > 0) && (data->timevalue > 0)) { + switch(data->timecondition) { + case TIMECOND_IFMODSINCE: + default: + if(timeofdoc < data->timevalue) { + infof(data, "The requested document is not new enough"); + return URG_OK; + } + break; + case TIMECOND_IFUNMODSINCE: + if(timeofdoc > data->timevalue) { + infof(data, "The requested document is not old enough"); + return URG_OK; + } + break; + } /* switch */ + } /* two valid time strings */ + } /* we have a time condition */ + } /* this is HTTP */ + } /* this is the first time we write a body part */ + bodywrites++; + + if(data->maxdownload && + (bytecount + nread > data->maxdownload)) { + nread = data->maxdownload - bytecount; + if(nread < 0 ) /* this should be unusual */ + nread = 0; + keepon = FALSE; /* we're done now! */ + } + + bytecount += nread; + + if (nread != data->fwrite (str, 1, nread, data->out)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + + } + break; + } + now = tvnow(); + if (!header) { + ProgressShow (data, bytecount, start, now, FALSE); + } + urg = speedcheck (data, now); + if (urg) + return urg; + + if (data->timeout && (tvdiff (now, start) > data->timeout)) { + failf (data, "Operation timed out with %d out of %d bytes received", + bytecount, size); + return URG_OPERATION_TIMEOUTED; + } +#ifdef MULTIDOC + if(contentlength && bytecount >= contentlength) { + /* we're done with this download, now stop it */ + break; + } +#endif + } + } + if(contentlength && (bytecount != contentlength)) { + failf(data, "transfer closed with %d bytes remaining", contentlength-bytecount); + return URG_PARTIAL_FILE; + } + ProgressShow (data, bytecount, start, now, TRUE); + + *bytecountp = bytecount; + +#ifdef USE_ZLIB + gzclose(gzfile); +#endif + return URG_OK; +} + +
lib/download.h+50 −0 added@@ -0,0 +1,50 @@ +#ifndef __DOWNLOAD_H +#define __DOWNLOAD_H +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +UrgError +Download (struct UrlData *data, + int sockfd, /* socket to read from */ + int size, /* -1 if unknown at this point */ + bool getheader, /* TRUE if header parsing is wanted */ + long *bytecountp /* return number of bytes read */ +); + +#endif
lib/escape.c+111 −0 added@@ -0,0 +1,111 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +/* Escape and unescape URL encoding in strings. The functions return a new + * allocated string or NULL if an error occurred. */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + +char *curl_escape(char *string) +{ + int alloc=strlen(string); + char *ns = malloc(alloc); + unsigned char in; + int newlen = alloc; + int index=0; + + while(*string) { + in = *string; + if(' ' == in) + ns[index++] = '+'; + else if(!(in >= 'a' && in <= 'z') && + !(in >= 'A' && in <= 'Z') && + !(in >= '0' && in <= '9')) { + /* encode it */ + newlen += 2; /* the size grows with two, since this'll become a %XX */ + if(newlen > alloc) { + alloc *= 2; + ns = realloc(ns, alloc); + if(!ns) + return NULL; + } + sprintf(&ns[index], "%%%02X", in); + index+=3; + } + else { + /* just copy this */ + ns[index++]=in; + } + string++; + } + ns[index]=0; /* terminate it */ + return ns; +} + +char *curl_unescape(char *string) +{ + int alloc = strlen(string); + char *ns = malloc(alloc); + unsigned char in; + int index=0; + int hex; + + + while(*string) { + in = *string; + if('+' == in) + in = ' '; + else if('%' == in) { + /* encoded part */ + if(sscanf(string+1, "%02X", &hex)) { + in = hex; + string+=2; + } + } + + ns[index++] = in; + string++; + } + ns[index]=0; /* terminate it */ + return ns; + +}
lib/escape.h+49 −0 added@@ -0,0 +1,49 @@ +#ifndef __ESCAPE_H +#define __ESCAPE_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +/* Escape and unescape URL encoding in strings. The functions return a new + * allocated string or NULL if an error occurred. */ + +char *curl_escape(char *string); +char *curl_unescape(char *string); + +#endif
lib/file.c+175 −0 added@@ -0,0 +1,175 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1999. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +/* -- WIN32 approved -- */ +#include <stdio.h> +#include <string.h> +#include <stdarg.h> +#include <stdlib.h> +#include <ctype.h> +#include <sys/types.h> +#include <sys/stat.h> + +#include <errno.h> + +#include "setup.h" + +#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#include <winsock.h> +#include <time.h> +#include <io.h> +#include <fcntl.h> +#else +#ifdef HAVE_SYS_SOCKET_H +#include <sys/socket.h> +#endif +#include <netinet/in.h> +#include <sys/time.h> +#include <sys/resource.h> +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <netdb.h> +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +#ifdef HAVE_NET_IF_H +#include <net/if.h> +#endif +#include <sys/ioctl.h> +#include <signal.h> + +#ifdef HAVE_SYS_PARAM_H +#include <sys/param.h> +#endif + +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif + + +#endif + +#include "urldata.h" +#include <curl/curl.h> +#include "progress.h" +#include "sendf.h" +#include "escape.h" + +#define _MPRINTF_REPLACE /* use our functions only */ +#include <curl/mprintf.h> + + +UrgError file(struct UrlData *data, char *path, long *bytecountp) +{ + /* This implementation ignores the host name in conformance with + RFC 1738. Only local files (reachable via the standard file system) + are supported. This means that files on remotely mounted directories + (via NFS, Samba, NT sharing) can be accessed through a file:// URL + */ + + struct stat statbuf; + size_t expected_size=-1; + size_t nread; + char *buf = data->buffer; + int bytecount = 0; + struct timeval start = tvnow(); + struct timeval now = start; + int fd; + char *actual_path = curl_unescape(path); + +#ifdef WIN32 + int i; + + /* change path separators from '/' to '\\' for Windows */ + for (i=0; actual_path[i] != '\0'; ++i) + if (actual_path[i] == '/') + actual_path[i] = '\\'; + + fd = open(actual_path, O_RDONLY | O_BINARY); /* no CR/LF translation! */ +#else + fd = open(actual_path, O_RDONLY); +#endif + free(actual_path); + + if(fd == -1) { + failf(data, "Couldn't open file %s", path); + return URG_FILE_COULDNT_READ_FILE; + } + if( -1 != fstat(fd, &statbuf)) { + /* we could stat it, then read out the size */ + expected_size = statbuf.st_size; + } + + /* The following is a shortcut implementation of file reading + this is both more efficient than the former call to download() and + it avoids problems with select() and recv() on file descriptors + in Winsock */ + ProgressInit (data, expected_size); + while (1) { + nread = read(fd, buf, BUFSIZE-1); + + if (0 <= nread) + buf[nread] = 0; + + if (nread <= 0) + break; + bytecount += nread; + /* NOTE: The following call to fwrite does CR/LF translation on + Windows systems if the target is stdout. Use -O or -o parameters + to prevent CR/LF translation (this then goes to a binary mode + file descriptor). */ + if(nread != data->fwrite (buf, 1, nread, data->out)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + now = tvnow(); + ProgressShow (data, bytecount, start, now, FALSE); + } + now = tvnow(); + ProgressShow (data, bytecount, start, now, TRUE); + + close(fd); + + return URG_OK; +}
lib/file.h+45 −0 added@@ -0,0 +1,45 @@ +#ifndef __FILE_H +#define __FILE_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +UrgError file(struct UrlData *data, char *path, long *bytecountp); + +#endif
lib/formdata+0 −0 addedlib/formdata.c+617 −0 added@@ -0,0 +1,617 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +/* + Debug the form generator stand-alone by compiling this source file with: + + gcc -DHAVE_CONFIG_H -I../ -g -D_FORM_DEBUG -o formdata -I../include formdata.c + + run the 'formdata' executable and make sure the output is ok! + + try './formdata "name=Daniel" "poo=noo" "foo=bar"' and similarly + + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <stdarg.h> + +#include <time.h> + +#include "setup.h" +#include <curl/curl.h> +#include "formdata.h" + +/* Length of the random boundary string. The risk of this being used + in binary data is very close to zero, 64^32 makes + 6277101735386680763835789423207666416102355444464034512896 + combinations... */ +#define BOUNDARY_LENGTH 32 + +/* What kind of Content-Type to use on un-specified files with unrecognized + extensions. */ +#define HTTPPOST_CONTENTTYPE_DEFAULT "text/plain" + +/* This is a silly duplicate of the function in main.c to enable this source + to compile stand-alone for better debugging */ +static void GetStr(char **string, + char *value) +{ + if(*string) + free(*string); + *string = strdup(value); +} + +/*************************************************************************** + * + * FormParse() + * + * Reads a 'name=value' paramter and builds the appropriate linked list. + * + * Specify files to upload with 'name=@filename'. Supports specified + * given Content-Type of the files. Such as ';type=<content-type>'. + * + * You may specify more than one file for a single name (field). Specify + * multiple files by writing it like: + * + * 'name=@filename,filename2,filename3' + * + * If you want content-types specified for each too, write them like: + * + * 'name=@filename;type=image/gif,filename2,filename3' + * + ***************************************************************************/ + +int curl_FormParse(char *input, + struct HttpPost **httppost, + struct HttpPost **last_post) +{ + return FormParse(input, httppost, last_post); +} + +#define FORM_FILE_SEPARATOR ',' +#define FORM_TYPE_SEPARATOR ';' + +int FormParse(char *input, + struct HttpPost **httppost, + struct HttpPost **last_post) +{ + /* nextarg MUST be a string in the format 'name=contents' and we'll + build a linked list with the info */ + char name[256]; + char contents[1024]=""; + char major[128]; + char minor[128]; + long flags = 0; + char *contp; + char *type = NULL; + char *prevtype = NULL; + char *sep; + char *sep2; + struct HttpPost *post; + struct HttpPost *subpost; /* a sub-node */ + unsigned int i; + + if(1 <= sscanf(input, "%255[^ =] = %1023[^\n]", name, contents)) { + /* the input was using the correct format */ + contp = contents; + + if('@' == contp[0]) { + /* we use the @-letter to indicate file name(s) */ + + flags = HTTPPOST_FILENAME; + contp++; + + post=NULL; + + do { + /* since this was a file, it may have a content-type specifier + at the end too */ + + sep=strchr(contp, FORM_TYPE_SEPARATOR); + sep2=strchr(contp, FORM_FILE_SEPARATOR); + + /* pick the closest */ + if(sep2 && (sep2 < sep)) { + sep = sep2; + + /* no type was specified! */ + } + if(sep) { + + /* if we got here on a comma, don't do much */ + if(FORM_FILE_SEPARATOR != *sep) + type = strstr(sep+1, "type="); + else + type=NULL; + + *sep=0; /* terminate file name at separator */ + + if(type) { + type += strlen("type="); + + if(2 != sscanf(type, "%127[^/]/%127[^,\n]", + major, minor)) { + fprintf(stderr, "Illegally formatted content-type field!\n"); + return 2; /* illegal content-type syntax! */ + } + /* now point beyond the content-type specifier */ + sep = type + strlen(major)+strlen(minor)+1; + + /* find the following comma */ + sep=strchr(sep, FORM_FILE_SEPARATOR); + } + } + else { + type=NULL; + sep=strchr(contp, FORM_FILE_SEPARATOR); + } + if(sep) { + /* the next file name starts here */ + *sep =0; + sep++; + } + if(!type) { + /* + * No type was specified, we scan through a few well-known + * extensions and pick the first we match! + */ + struct ContentType { + char *extension; + char *type; + }; + static struct ContentType ctts[]={ + {".gif", "image/gif"}, + {".jpg", "image/jpeg"}, + {".jpeg", "image/jpeg"}, + {".txt", "text/plain"}, + {".html", "text/plain"} + }; + + if(prevtype) + /* default to the previously set/used! */ + type = prevtype; + else + /* It seems RFC1867 defines no Content-Type to default to + text/plain so we don't actually need to set this: */ + type = HTTPPOST_CONTENTTYPE_DEFAULT; + + for(i=0; i<sizeof(ctts)/sizeof(ctts[0]); i++) { + if(strlen(contp) >= strlen(ctts[i].extension)) { + if(strequal(contp + + strlen(contp) - strlen(ctts[i].extension), + ctts[i].extension)) { + type = ctts[i].type; + break; + } + } + } + /* we have a type by now */ + } + + if(NULL == post) { + /* For the first file name, we allocate and initiate the main list + node */ + + post = (struct HttpPost *)malloc(sizeof(struct HttpPost)); + if(post) { + memset(post, 0, sizeof(struct HttpPost)); + GetStr(&post->name, name); /* get the name */ + GetStr(&post->contents, contp); /* get the contents */ + post->flags = flags; + if(type) { + GetStr(&post->contenttype, type); /* get type */ + prevtype=post->contenttype; /* point to the allocated string! */ + } + /* make the previous point to this */ + if(*last_post) + (*last_post)->next = post; + else + (*httppost) = post; + + (*last_post) = post; + } + + } + else { + /* we add a file name to the previously allocated node, known as + 'post' now */ + subpost =(struct HttpPost *)malloc(sizeof(struct HttpPost)); + if(subpost) { + memset(subpost, 0, sizeof(struct HttpPost)); + GetStr(&subpost->name, name); /* get the name */ + GetStr(&subpost->contents, contp); /* get the contents */ + subpost->flags = flags; + if(type) { + GetStr(&subpost->contenttype, type); /* get type */ + prevtype=subpost->contenttype; /* point to the allocated string! */ + } + /* now, point our 'more' to the original 'more' */ + subpost->more = post->more; + + /* then move the original 'more' to point to ourselves */ + post->more = subpost; + } + } + contp = sep; /* move the contents pointer to after the separator */ + } while(sep && *sep); /* loop if there's another file name */ + } + else { + post = (struct HttpPost *)malloc(sizeof(struct HttpPost)); + if(post) { + memset(post, 0, sizeof(struct HttpPost)); + GetStr(&post->name, name); /* get the name */ + GetStr(&post->contents, contp); /* get the contents */ + post->flags = 0; + + /* make the previous point to this */ + if(*last_post) + (*last_post)->next = post; + else + (*httppost) = post; + + (*last_post) = post; + } + + } + + } + else { + fprintf(stderr, "Illegally formatted input field!\n"); + return 1; + } + return 0; +} + +static int AddFormData(struct FormData **formp, + void *line, + long length) +{ + struct FormData *newform = (struct FormData *) + malloc(sizeof(struct FormData)); + newform->next = NULL; + + /* we make it easier for plain strings: */ + if(!length) + length = strlen((char *)line); + + newform->line = (char *)malloc(length+1); + memcpy(newform->line, line, length+1); + newform->length = length; + + if(*formp) { + (*formp)->next = newform; + *formp = newform; + } + else + *formp = newform; + + return length; +} + + +static int AddFormDataf(struct FormData **formp, + char *fmt, ...) +{ + char s[1024]; + va_list ap; + va_start(ap, fmt); + vsprintf(s, fmt, ap); + va_end(ap); + + return AddFormData(formp, s, 0); +} + + +char *MakeFormBoundary(void) +{ + char *retstring; + static int randomizer=0; /* this is just so that two boundaries within + the same form won't be identical */ + int i; + + static char table64[]= + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + + retstring = (char *)malloc(BOUNDARY_LENGTH); + + if(!retstring) + return NULL; /* failed */ + + srand(time(NULL)+randomizer++); /* seed */ + + strcpy(retstring, "curl"); /* bonus commercials 8*) */ + + for(i=4; i<(BOUNDARY_LENGTH-1); i++) { + retstring[i] = table64[rand()%64]; + } + retstring[BOUNDARY_LENGTH-1]=0; /* zero terminate */ + + return retstring; +} + + +void FormFree(struct FormData *form) +{ + struct FormData *next; + do { + next=form->next; /* the following form line */ + free(form->line); /* free the line */ + free(form); /* free the struct */ + + } while(form=next); /* continue */ +} + +struct FormData *getFormData(struct HttpPost *post, + int *sizep) +{ + struct FormData *form = NULL; + struct FormData *firstform; + + struct HttpPost *file; + + int size =0; + char *boundary; + char *fileboundary=NULL; + + if(!post) + return NULL; /* no input => no output! */ + + boundary = MakeFormBoundary(); + + /* Make the first line of the output */ + AddFormDataf(&form, + "Content-Type: multipart/form-data;" + " boundary=%s\r\n", + boundary); + /* we DO NOT count that line since that'll be part of the header! */ + + firstform = form; + + do { + + /* boundary */ + size += AddFormDataf(&form, "\r\n--%s\r\n", boundary); + + size += AddFormDataf(&form, + "Content-Disposition: form-data; name=\"%s\"", + post->name); + + if(post->more) { + /* If used, this is a link to more file names, we must then do + the magic to include several files with the same field name */ + + fileboundary = MakeFormBoundary(); + + size += AddFormDataf(&form, + "\r\nContent-Type: multipart/mixed," + " boundary=%s\r\n", + fileboundary); + } + + file = post; + + do { + if(post->more) { + /* if multiple-file */ + size += AddFormDataf(&form, + "\r\n--%s\r\nContent-Disposition: attachment; filename=\"%s\"", + fileboundary, file->contents); + } + else if(post->flags & HTTPPOST_FILENAME) { + size += AddFormDataf(&form, + "; filename=\"%s\"", + post->contents); + } + + if(file->contenttype) { + /* we have a specified type */ + size += AddFormDataf(&form, + "\r\nContent-Type: %s", + file->contenttype); + } + if(file->contenttype && + !strnequal("text/", file->contenttype, 5)) { + /* this is not a text content, mention our binary encoding */ + size += AddFormDataf(&form, + "\r\nContent-Transfer-Encoding: binary"); + } + + + size += AddFormDataf(&form, + "\r\n\r\n"); + + if(post->flags & HTTPPOST_FILENAME) { + /* we should include the contents from the specified file */ + FILE *fileread; + char buffer[1024]; + int nread; + + fileread = strequal("-", file->contents)?stdin: + /* binary read for win32 crap */ + fopen(file->contents, "rb"); + if(fileread) { + while((nread = fread(buffer, 1, 1024, fileread))) { + size += AddFormData(&form, + buffer, + nread); + } + if(fileread != stdin) + fclose(fileread); + } + else { + size += AddFormDataf(&form, "[File wasn't found by client]"); + } + } + else { + /* include the contents we got */ + size += AddFormDataf(&form, + post->contents); + } + } while((file = file->more)); /* for each specified file for this field */ + + if(post->more) { + /* this was a multiple-file inclusion, make a termination file + boundary: */ + size += AddFormDataf(&form, + "\r\n--%s--", + fileboundary); + free(fileboundary); + } + + } while((post=post->next)); /* for each field */ + + /* end-boundary for everything */ + size += AddFormDataf(&form, + "\r\n--%s--\r\n", + boundary); + + *sizep = size; + + free(boundary); + + return firstform; +} + +int FormInit(struct Form *form, struct FormData *formdata ) +{ + form->data = formdata; + form->sent = 0; + + if(!formdata) + return 1; /* error */ + + return 0; +} + +/* fread() emulation */ +int FormReader(char *buffer, + size_t size, + size_t nitems, + FILE *mydata) +{ + struct Form *form; + int wantedsize; + int gotsize; + + form=(struct Form *)mydata; + + wantedsize = size * nitems; + + if(!form->data) + return 0; /* nothing, error, empty */ + + do { + + if( (form->data->length - form->sent ) > wantedsize ) { + + memcpy(buffer, form->data->line + form->sent, wantedsize); + + form->sent += wantedsize; + + return wantedsize; + } + + memcpy(buffer, + form->data->line + form->sent, + gotsize = (form->data->length - form->sent) ); + + form->sent = 0; + + form->data = form->data->next; /* advance */ + + } while(!gotsize && form->data); + /* If we got an empty line and we have more data, we proceed to the next + line immediately to avoid returning zero before we've reached the end. + This is the bug reported November 22 1999 on curl 6.3. (Daniel) */ + + return gotsize; +} + + +#ifdef _FORM_DEBUG + +int main(int argc, char **argv) +{ +#if 0 + char *testargs[]={ + "name1 = data in number one", + "name2 = number two data", + "test = @upload" + }; +#endif + int i; + char *nextarg; + struct HttpPost *httppost=NULL; + struct HttpPost *last_post=NULL; + struct HttpPost *post; + int size; + int nread; + char buffer[4096]; + + struct FormData *form; + struct Form formread; + + for(i=1; i<argc; i++) { + + if( FormParse( argv[i], + &httppost, + &last_post)) { + fprintf(stderr, "Illegally formatted input field: '%s'!\n", + argv[i]); + return 1; + } + } + + form=getFormData(httppost, &size); + + FormInit(&formread, form); + + while(nread = FormReader(buffer, 1, sizeof(buffer), (FILE *)&formread)) { + fwrite(buffer, nread, 1, stderr); + } + + fprintf(stderr, "size: %d\n", size); + + return 0; +} + +#endif
lib/formdata.h+103 −0 added@@ -0,0 +1,103 @@ +#ifndef __FORMDATA_H +#define __FORMDATA_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * Contributor(s): + * Rafael Sagula <sagula@inf.ufrgs.br> + * Sampo Kellomaki <sampo@iki.fi> + * Linas Vepstas <linas@linas.org> + * Bjorn Reese <breese@imada.ou.dk> + * Johan Anderson <johan@homemail.com> + * Kjell Ericson <Kjell.Ericson@haxx.nu> + * Troy Engel <tengel@palladium.net> + * Ryan Nelson <ryan@inch.com> + * Bjorn Stenberg <Bjorn.Stenberg@haxx.nu> + * Angus Mackay <amackay@gus.ml.org> + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + * $Log$ + * Revision 1.1 1999-12-29 14:21:22 bagder + * Initial revision + * + * Revision 1.4 1999/09/06 06:59:40 dast + * Changed email info + * + * Revision 1.3 1999/08/13 07:34:47 dast + * Changed the URL in the header + * + * Revision 1.2 1999/07/30 12:59:47 dast + * FormFree() was added to properly cleanup after a form was posted. + * + * Revision 1.1.1.1 1999/03/11 22:23:34 dast + * Imported sources + * + ****************************************************************************/ +/* plain and simple linked list with lines to send */ +struct FormData { + struct FormData *next; + char *line; + long length; +}; + +struct Form { + struct FormData *data; /* current form line to send */ + int sent; /* number of bytes of the current line that has already + been sent in a previous invoke */ +}; + +int FormParse(char *string, + struct HttpPost **httppost, + struct HttpPost **last_post); + +int FormInit(struct Form *form, struct FormData *formdata ); + +struct FormData *getFormData(struct HttpPost *post, + int *size); + +/* fread() emulation */ +int FormReader(char *buffer, + size_t size, + size_t nitems, + FILE *mydata); + +char *MakeFormBoundary(void); + +void FormFree(struct FormData *); + +#endif
lib/ftp.c+1046 −0 added@@ -0,0 +1,1046 @@ +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ + +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <ctype.h> +#include <errno.h> + +#include "setup.h" + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#ifdef HAVE_SYS_SELECT_H +#include <sys/select.h> +#endif + +#if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__) +#include <winsock.h> +#else /* some kind of unix */ +#include <sys/socket.h> +#include <netinet/in.h> +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +#include <sys/utsname.h> +#include <netdb.h> +#endif + +#if defined(WIN32) && defined(__GNUC__) || defined(__MINGW32__) +#include <errno.h> +#endif + + +#include <curl/curl.h> +#include "urldata.h" +#include "sendf.h" + +#include "if2ip.h" +#include "hostip.h" +#include "progress.h" +#include "upload.h" +#include "download.h" + + +/* returns last node in linked list */ +static struct curl_slist *slist_get_last(struct curl_slist *list) +{ + struct curl_slist *item; + + /* if caller passed us a NULL, return now */ + if (!list) + return NULL; + + /* loop through to find the last item */ + item = list; + while (item->next) { + item = item->next; + } + return item; +} + +/* append a struct to the linked list. It always retunrs the address of the + * first record, so that you can sure this function as an initialization + * function as well as an append function. If you find this bothersome, + * then simply create a separate _init function and call it appropriately from + * within the proram. */ +struct curl_slist *curl_slist_append(struct curl_slist *list, char *data) +{ + struct curl_slist *last; + struct curl_slist *new_item; + + new_item = (struct curl_slist *) malloc(sizeof(struct curl_slist)); + if (new_item) { + new_item->next = NULL; + new_item->data = strdup(data); + } + else { + fprintf(stderr, "Cannot allocate memory for QUOTE list.\n"); + exit(-1); + } + + if (list) { + last = slist_get_last(list); + last->next = new_item; + return list; + } + + /* if this is the first item, then new_item *is* the list */ + return new_item; +} + +/* be nice and clean up resources */ +void curl_slist_free_all(struct curl_slist *list) +{ + struct curl_slist *next; + struct curl_slist *item; + + if (!list) + return; + + item = list; + do { + next = item->next; + + if (item->data) { + free(item->data); + } + free(item); + item = next; + } while (next); +} + + +static UrgError AllowServerConnect(struct UrlData *data, + int sock) +{ + fd_set rdset; + struct timeval dt; + + FD_ZERO(&rdset); + + FD_SET(sock, &rdset); + + /* we give the server 10 seconds to connect to us */ + dt.tv_sec = 10; + dt.tv_usec = 0; + + switch ( select(sock+1, &rdset, NULL, NULL, &dt)) { + case -1: /* error */ + /* let's die here */ + failf(data, "Error while waiting for server connect"); + return URG_FTP_PORT_FAILED; + case 0: /* timeout */ + /* let's die here */ + failf(data, "Timeout while waiting for server connect"); + return URG_FTP_PORT_FAILED; + default: + /* we have received data here */ + { + int s; + size_t size = sizeof(struct sockaddr_in); + struct sockaddr_in add; + + getsockname(sock, (struct sockaddr *) &add, (int *)&size); + s=accept(sock, (struct sockaddr *) &add, (int *)&size); + + if( -1 == s) { + /* DIE! */ + failf(data, "Error accept()ing server connect"); + return URG_FTP_PORT_FAILED; + } + infof(data, "Connection accepted from server\n"); + + data->secondarysocket = s; + } + break; + } + return URG_OK; +} + + +/* --- parse FTP server responses --- */ + +#define lastline(line) (isdigit((int)line[0]) && isdigit((int)line[1]) && \ + isdigit((int)line[2]) && (' ' == line[3])) + +static int GetLastResponse(int sockfd, char *buf, + struct UrlData *data) +{ + int nread; + int read_rc=1; + char *ptr; + do { + ptr=buf; + + /* get us a full line, terminated with a newline */ + for(nread=0; + (nread<BUFSIZE) && read_rc; + nread++, ptr++) { +#ifdef USE_SSLEAY + if (data->use_ssl) { + read_rc = SSL_read(data->ssl, ptr, 1); + } + else { +#endif + read_rc = sread(sockfd, ptr, 1); +#ifdef USE_SSLEAY + } +#endif /* USE_SSLEAY */ + if (*ptr == '\n') + break; + } + *ptr=0; /* zero terminate */ + + if(data->conf & CONF_VERBOSE) { + fputs("< ", data->err); + fwrite(buf, 1, nread, data->err); + fputs("\n", data->err); + } + } while(read_rc && + (nread<4 || !lastline(buf)) ); + return nread; +} + +/* -- who are we? -- */ +char *getmyhost(void) +{ + static char myhost[256]; +#if !defined(WIN32) && !defined(HAVE_UNAME) && !defined(HAVE_GETHOSTNAME) + /* We have no means of finding the local host name! */ + strcpy(myhost, "localhost"); +#endif +#if defined(WIN32) || !defined(HAVE_UNAME) + gethostname(myhost, 256); +#else + struct utsname ugnm; + + if (uname(&ugnm) < 0) + return "localhost"; + + (void) strncpy(myhost, ugnm.nodename, 255); + myhost[255] = '\0'; +#endif + return myhost; +} + +#if 0 +/* + * URLfix() + * + * This function returns a string converted FROM the input URL format to a + * format that is more likely usable for the remote server. That is, all + * special characters (found as %XX-codes) will be eascaped with \<letter>. + */ + +static char *URLfix(char *string) +{ + /* The length of the new string can't be longer than twice the original + string, if all letters are '+'... */ + int alloc = strlen(string)*2; + char *ns = malloc(alloc); + unsigned char in; + int index=0; + int hex; + + while(*string) { + in = *string; + switch(in) { + case '+': + ns[index++] = '\\'; + ns[index++] = ' '; + string++; + continue; + + case '%': + /* encoded part */ + if(sscanf(string+1, "%02X", &hex)) { + ns[index++] = '\\'; + ns[index++] = hex; + string+=3; + continue; + } + /* FALLTHROUGH */ + default: + ns[index++] = in; + string++; + } + } + ns[index]=0; /* terminate it */ + return ns; +} +#endif + +static +UrgError _ftp(struct UrlData *data, + long *bytecountp, + char *ftpuser, + char *ftppasswd, + char *ppath) +{ + /* this is FTP and no proxy */ + size_t nread; + UrgError result; + char *buf = data->buffer; /* this is our buffer */ + /* for the ftp PORT mode */ + int portsock=-1; + struct sockaddr_in serv_addr; + + struct curl_slist *qitem; /* QUOTE item */ + + /* The first thing we do is wait for the "220*" line: */ + nread = GetLastResponse(data->firstsocket, buf, data); + if(strncmp(buf, "220", 3)) { + failf(data, "This doesn't seem like a nice ftp-server response"); + return URG_FTP_WEIRD_SERVER_REPLY; + } + + /* send USER */ + sendf(data->firstsocket, data, "USER %s\r\n", ftpuser); + + /* wait for feedback */ + nread = GetLastResponse(data->firstsocket, buf, data); + + if(!strncmp(buf, "530", 3)) { + /* 530 User ... access denied + (the server denies to log the specified user) */ + failf(data, "Access denied: %s", &buf[4]); + return URG_FTP_ACCESS_DENIED; + } + else if(!strncmp(buf, "331", 3)) { + /* 331 Password required for ... + (the server requires to send the user's password too) */ + sendf(data->firstsocket, data, "PASS %s\r\n", ftppasswd); + nread = GetLastResponse(data->firstsocket, buf, data); + + if(!strncmp(buf, "530", 3)) { + /* 530 Login incorrect. + (the username and/or the password are incorrect) */ + failf(data, "the username and/or the password are incorrect"); + return URG_FTP_USER_PASSWORD_INCORRECT; + } + else if(!strncmp(buf, "230", 3)) { + /* 230 User ... logged in. + (user successfully logged in) */ + + infof(data, "We have successfully logged in\n"); + } + else { + failf(data, "Odd return code after PASS"); + return URG_FTP_WEIRD_PASS_REPLY; + } + } + else if(! strncmp(buf, "230", 3)) { + /* 230 User ... logged in. + (the user logged in without password) */ + infof(data, "We have successfully logged in\n"); + } + else { + failf(data, "Odd return code after USER"); + return URG_FTP_WEIRD_USER_REPLY; + } + + /* Send any QUOTE strings? */ + if(data->quote) { + qitem = data->quote; + /* Send all QUOTE strings in same order as on command-line */ + while (qitem) { + /* Send string */ + if (qitem->data) { + sendf(data->firstsocket, data, "%s\r\n", qitem->data); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if (buf[0] != '2') { + failf(data, "QUOT string not accepted: %s", + qitem->data); + return URG_FTP_QUOTE_ERROR; + } + } + qitem = qitem->next; + } + } + + /* If we have selected NOBODY, it means that we only want file information. + Which in FTP can't be much more than the file size! */ + if(data->conf & CONF_NOBODY) { + /* The SIZE command is _not_ RFC 959 specified, and therefor many servers + may not support it! It is however the only way we have to get a file's + size! */ + int filesize; + sendf(data->firstsocket, data, "SIZE %s\r\n", ppath); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "213", 3)) { + failf(data, "Couldn't get file size: %s", buf+4); + return URG_FTP_COULDNT_GET_SIZE; + } + /* get the size from the ascii string: */ + filesize = atoi(buf+4); + + sprintf(buf, "Content-Length: %d\n", filesize); + + if(strlen(buf) != data->fwrite(buf, 1, strlen(buf), data->out)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + if(data->writeheader) { + /* the header is requested to be written to this file */ + if(strlen(buf) != fwrite (buf, 1, strlen(buf), data->writeheader)) { + failf (data, "Failed writing output"); + return URG_WRITE_ERROR; + } + } + return URG_OK; + } + + /* We have chosen to use the PORT command */ + if(data->conf & CONF_FTPPORT) { + struct sockaddr_in sa; + struct hostent *h=NULL; + size_t size; + unsigned short porttouse; + + char *myhost=NULL; + + if(data->ftpport) { + myhost = if2ip(data->ftpport); + if(myhost) { + h = GetHost(data, myhost); + } + else { + if(strlen(data->ftpport)>1) + h = GetHost(data, data->ftpport); + if(h) + myhost=data->ftpport; + } + } + if(!myhost) { + myhost = getmyhost(); + h=GetHost(data, myhost); + } + infof(data, "We connect from %s\n", myhost); + + if ( h ) { + if( (portsock = socket(AF_INET, SOCK_STREAM, 0)) >= 0 ) { + memset((char *)&sa, 0, sizeof(sa)); + memcpy((char *)&sa.sin_addr, + h->h_addr, + h->h_length); + sa.sin_family = AF_INET; + sa.sin_addr.s_addr = INADDR_ANY; + sa.sin_port = 0; + size = sizeof(sa); + + if(bind(portsock, (struct sockaddr *)&sa, size) >= 0) { + /* we succeeded to bind */ + struct sockaddr_in add; + size = sizeof(add); + + if(getsockname(portsock, (struct sockaddr *) &add, + (int *)&size)<0) { + failf(data, "getsockname() failed"); + return URG_FTP_PORT_FAILED; + } + porttouse = ntohs(add.sin_port); + + if ( listen(portsock, 1) < 0 ) { + failf(data, "listen(2) failed on socket"); + return URG_FTP_PORT_FAILED; + } + } + else { + failf(data, "bind(2) failed on socket"); + return URG_FTP_PORT_FAILED; + } + } + else { + failf(data, "socket(2) failed (%s)"); + return URG_FTP_PORT_FAILED; + } + } + else { + failf(data, "could't find my own IP address (%s)", myhost); + return URG_FTP_PORT_FAILED; + } + { + struct in_addr in; + unsigned short ip[5]; + (void) memcpy(&in.s_addr, *h->h_addr_list, sizeof (in.s_addr)); + sscanf( inet_ntoa(in), "%hu.%hu.%hu.%hu", + &ip[0], &ip[1], &ip[2], &ip[3]); + sendf(data->firstsocket, data, "PORT %d,%d,%d,%d,%d,%d\n", + ip[0], ip[1], ip[2], ip[3], + porttouse >> 8, + porttouse & 255); + } + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "200", 3)) { + failf(data, "Server does not grok PORT, try without it!"); + return URG_FTP_PORT_FAILED; + } + } + else { /* we use the PASV command */ + + sendf(data->firstsocket, data, "PASV\r\n"); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "227", 3)) { + failf(data, "Odd return code after PASV"); + return URG_FTP_WEIRD_PASV_REPLY; + } + else { + int ip[4]; + int port[2]; + unsigned short newport; + char newhost[32]; + struct hostent *he; + char *str=buf; + + /* + * New 227-parser June 3rd 1999. + * It now scans for a sequence of six comma-separated numbers and + * will take them as IP+port indicators. + * + * Found reply-strings include: + * "227 Entering Passive Mode (127,0,0,1,4,51)" + * "227 Data transfer will passively listen to 127,0,0,1,4,51" + * "227 Entering passive mode. 127,0,0,1,4,51" + */ + + while(*str) { + if (6 == sscanf(str, "%d,%d,%d,%d,%d,%d", + &ip[0], &ip[1], &ip[2], &ip[3], + &port[0], &port[1])) + break; + str++; + } + if(!*str) { + failf(data, "Couldn't interpret this 227-reply: %s", buf); + return URG_FTP_WEIRD_227_FORMAT; + } + sprintf(newhost, "%d.%d.%d.%d", ip[0], ip[1], ip[2], ip[3]); + he = GetHost(data, newhost); + if(!he) { + failf(data, "Can't resolve new host %s", newhost); + return URG_FTP_CANT_GET_HOST; + } + + + newport = (port[0]<<8) + port[1]; + data->secondarysocket = socket(AF_INET, SOCK_STREAM, 0); + + memset((char *) &serv_addr, '\0', sizeof(serv_addr)); + memcpy((char *)&(serv_addr.sin_addr), he->h_addr, he->h_length); + serv_addr.sin_family = he->h_addrtype; + serv_addr.sin_port = htons(newport); + + if(data->conf & CONF_VERBOSE) { + struct in_addr in; +#if 1 + struct hostent * answer; + + unsigned long address; +#if defined(HAVE_INET_ADDR) || defined(WIN32) + address = inet_addr(newhost); + answer = gethostbyaddr((char *) &address, sizeof(address), + AF_INET); +#else + answer = NULL; +#endif + (void) memcpy(&in.s_addr, *he->h_addr_list, sizeof (in.s_addr)); + infof(data, "Connecting to %s (%s) port %u\n", + answer?answer->h_name:newhost, inet_ntoa(in), newport); +#else + (void) memcpy(&in.s_addr, *he->h_addr_list, sizeof (in.s_addr)); + infof(data, "Connecting to %s (%s) port %u\n", + he->h_name, inet_ntoa(in), newport); +#endif + } + + if (connect(data->secondarysocket, (struct sockaddr *) &serv_addr, + sizeof(serv_addr)) < 0) { + switch(errno) { +#ifdef ECONNREFUSED + /* this should be made nicer */ + case ECONNREFUSED: + failf(data, "Connection refused by ftp server"); + break; +#endif +#ifdef EINTR + case EINTR: + failf(data, "Connection timeouted to ftp server"); + break; +#endif + default: + failf(data, "Can't connect to ftp server"); + break; + } + return URG_FTP_CANT_RECONNECT; + } + } + + } + /* we have the (new) data connection ready */ + + if(data->conf & CONF_UPLOAD) { + + /* Set type to binary (unless specified ASCII) */ + sendf(data->firstsocket, data, "TYPE %s\r\n", + (data->conf&CONF_FTPASCII)?"A":"I"); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "200", 3)) { + failf(data, "Couldn't set %s mode", + (data->conf&CONF_FTPASCII)?"ASCII":"binary"); + return (data->conf&CONF_FTPASCII)? URG_FTP_COULDNT_SET_ASCII: + URG_FTP_COULDNT_SET_BINARY; + } + + if(data->resume_from) { + /* we're about to continue the uploading of a file */ + /* 1. get already existing file's size. We use the SIZE + command for this which may not exist in the server! + The SIZE command is not in RFC959. */ + + /* 2. This used to set REST. But since we can do append, we + don't another ftp command. We just skip the source file + offset and then we APPEND the rest on the file instead */ + + /* 3. pass file-size number of bytes in the source file */ + /* 4. lower the infilesize counter */ + /* => transfer as usual */ + + if(data->resume_from < 0 ) { + /* we could've got a specified offset from the command line, + but now we know we didn't */ + + sendf(data->firstsocket, data, "SIZE %s\r\n", ppath); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "213", 3)) { + failf(data, "Couldn't get file size: %s", buf+4); + return URG_FTP_COULDNT_GET_SIZE; + } + + /* get the size from the ascii string: */ + data->resume_from = atoi(buf+4); + } + + if(data->resume_from) { + /* do we still game? */ + int passed=0; +#if 0 + /* Set resume file transfer offset */ + infof(data, "Instructs server to resume from offset %d\n", + data->resume_from); + + sendf(data->firstsocket, data, "REST %d\r\n", data->resume_from); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "350", 3)) { + failf(data, "Couldn't use REST: %s", buf+4); + return URG_FTP_COULDNT_USE_REST; + } +#else + /* enable append instead */ + data->conf |= CONF_FTPAPPEND; +#endif + /* Now, let's read off the proper amount of bytes from the + input. If we knew it was a proper file we could've just + fseek()ed but we only have a stream here */ + do { + int readthisamountnow = (data->resume_from - passed); + int actuallyread; + + if(readthisamountnow > BUFSIZE) + readthisamountnow = BUFSIZE; + + actuallyread = + data->fread(data->buffer, 1, readthisamountnow, data->in); + + passed += actuallyread; + if(actuallyread != readthisamountnow) { + failf(data, "Could only read %d bytes from the input\n", + passed); + return URG_FTP_COULDNT_USE_REST; + } + } + while(passed != data->resume_from); + + /* now, decrease the size of the read */ + if(data->infilesize>0) { + data->infilesize -= data->resume_from; + + if(data->infilesize <= 0) { + infof(data, "File already completely uploaded\n"); + return URG_OK; + } + } + /* we've passed, proceed as normal */ + } + } + + /* Send everything on data->in to the socket */ + if(data->conf & CONF_FTPAPPEND) + /* we append onto the file instead of rewriting it */ + sendf(data->firstsocket, data, "APPE %s\r\n", ppath); + else + sendf(data->firstsocket, data, "STOR %s\r\n", ppath); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(atoi(buf)>=400) { + failf(data, "Failed FTP upload:%s", buf+3); + /* oops, we never close the sockets! */ + return URG_FTP_COULDNT_STOR_FILE; + } + + if(data->conf & CONF_FTPPORT) { + result = AllowServerConnect(data, portsock); + if( result ) + return result; + } + + *bytecountp=0; + + /* When we know we're uploading a specified file, we can get the file + size prior to the actual upload. */ + + ProgressInit(data, data->infilesize); + result = Upload(data, data->secondarysocket, bytecountp); + if(result) + return result; + + if((-1 != data->infilesize) && (data->infilesize != *bytecountp)) { + failf(data, "Wrote only partial file (%d out of %d bytes)", + *bytecountp, data->infilesize); + return URG_PARTIAL_FILE; + } + } + else { + /* Retrieve file or directory */ + bool dirlist=FALSE; + long downloadsize=-1; + + if(data->conf&CONF_RANGE && data->range) { + int from, to; + int totalsize=-1; + char *ptr; + char *ptr2; + + from=strtol(data->range, &ptr, 0); + while(ptr && *ptr && (isspace((int)*ptr) || (*ptr=='-'))) + ptr++; + to=strtol(ptr, &ptr2, 0); + if(ptr == ptr2) { + /* we didn't get any digit */ + to=-1; + } + if(-1 == to) { + /* X - */ + data->resume_from = from; + } + else if(from < 0) { + /* -Y */ + from = 0; + to = -from; + totalsize = to-from; + data->maxdownload = totalsize; + } + else { + /* X- */ + totalsize = to-from; + data->maxdownload = totalsize; + } + infof(data, "range-download from %d to %d, totally %d bytes\n", + from, to, totalsize); + } + + if(!ppath[0]) + /* make sure this becomes a valid name */ + ppath="./"; + + if((data->conf & CONF_FTPLISTONLY) || + ('/' == ppath[strlen(ppath)-1] )) { + /* The specified path ends with a slash, and therefore we think this + is a directory that is requested, use LIST. But before that we + need to set ASCII transfer mode. */ + dirlist = TRUE; + + /* Set type to ASCII */ + sendf(data->firstsocket, data, "TYPE A\r\n"); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "200", 3)) { + failf(data, "Couldn't set ascii mode"); + return URG_FTP_COULDNT_SET_ASCII; + } + + /* if this output is to be machine-parsed, the NLST command will be + better used since the LIST command output is not specified or + standard in any way */ + + sendf(data->firstsocket, data, "%s %s\r\n", + data->customrequest?data->customrequest: + (data->conf&CONF_FTPLISTONLY?"NLST":"LIST"), + ppath); + } + else { + /* Set type to binary (unless specified ASCII) */ + sendf(data->firstsocket, data, "TYPE %s\r\n", + (data->conf&CONF_FTPASCII)?"A":"I"); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "200", 3)) { + failf(data, "Couldn't set %s mode", + (data->conf&CONF_FTPASCII)?"ASCII":"binary"); + return (data->conf&CONF_FTPASCII)? URG_FTP_COULDNT_SET_ASCII: + URG_FTP_COULDNT_SET_BINARY; + } + + if(data->resume_from) { + + /* Daniel: (August 4, 1999) + * + * We start with trying to use the SIZE command to figure out the size + * of the file we're gonna get. If we can get the size, this is by far + * the best way to know if we're trying to resume beyond the EOF. */ + + sendf(data->firstsocket, data, "SIZE %s\r\n", ppath); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "213", 3)) { + infof(data, "server doesn't support SIZE: %s", buf+4); + /* We couldn't get the size and therefore we can't know if there + really is a part of the file left to get, although the server + will just close the connection when we start the connection so it + won't cause us any harm, just not make us exit as nicely. */ + } + else { + int foundsize=atoi(buf+4); + /* We got a file size report, so we check that there actually is a + part of the file left to get, or else we go home. */ + if(foundsize <= data->resume_from) { + failf(data, "Offset (%d) was beyond file size (%d)", + data->resume_from, foundsize); + return URG_FTP_BAD_DOWNLOAD_RESUME; + } + /* Now store the number of bytes we are expected to download */ + downloadsize = foundsize-data->resume_from; + } + + /* Set resume file transfer offset */ + infof(data, "Instructs server to resume from offset %d\n", + data->resume_from); + + sendf(data->firstsocket, data, "REST %d\r\n", data->resume_from); + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(strncmp(buf, "350", 3)) { + failf(data, "Couldn't use REST: %s", buf+4); + return URG_FTP_COULDNT_USE_REST; + } + } + + sendf(data->firstsocket, data, "RETR %s\r\n", ppath); + } + + nread = GetLastResponse(data->firstsocket, buf, data); + + if(!strncmp(buf, "150", 3) || !strncmp(buf, "125", 3)) { + + /* + A; + 150 Opening BINARY mode data connection for /etc/passwd (2241 + bytes). (ok, the file is being transfered) + + B: + 150 Opening ASCII mode data connection for /bin/ls + + C: + 150 ASCII data connection for /bin/ls (137.167.104.91,37445) (0 bytes). + + D: + 150 Opening ASCII mode data connection for /linux/fisk/kpanelrc (0.0.0.0,0) (545 bytes). + + E: + 125 Data connection already open; Transfer starting. */ + + int size=-1; /* default unknown size */ + + if(!dirlist && (-1 == downloadsize)) { + /* + * It seems directory listings either don't show the size or very + * often uses size 0 anyway. + * Example D above makes this parsing a little tricky + */ + char *bytes; + bytes=strstr(buf, " bytes"); + if(bytes--) { + int index=bytes-buf; + /* this is a hint there is size information in there! ;-) */ + while(--index) { + /* scan for the parenthesis and break there */ + if('(' == *bytes) + break; + /* if only skip digits, or else we're in deep trouble */ + if(!isdigit((int)*bytes)) { + bytes=NULL; + break; + } + /* one more estep backwards */ + bytes--; + } + /* only if we have nothing but digits: */ + if(bytes++) { + /* get the number! */ + size = atoi(bytes); + } + + } +#if 0 + if(2 != sscanf(buf, "%*[^(](%d bytes%c", &size, &paren)) + size=-1; +#endif + } + else if(downloadsize > -1) + size = downloadsize; + +#if 0 + if((size > -1) && (data->resume_from>0)) { + size -= data->resume_from; + if(size <= 0) { + failf(data, "Offset (%d) was beyond file size (%d)", + data->resume_from, data->resume_from+size); + return URG_PARTIAL_FILE; + } + } +#endif + + if(data->conf & CONF_FTPPORT) { + result = AllowServerConnect(data, portsock); + if( result ) + return result; + } + + infof(data, "Getting file with size: %d\n", size); + + /* FTP download: */ + result=Download(data, data->secondarysocket, size, FALSE, + bytecountp); + if(result) + return result; + + if((-1 != size) && (size != *bytecountp)) { + failf(data, "Received only partial file"); + return URG_PARTIAL_FILE; + } + else if(0 == *bytecountp) { + failf(data, "No data was received!"); + return URG_FTP_COULDNT_RETR_FILE; + } + } + else { + failf(data, "%s", buf+4); + return URG_FTP_COULDNT_RETR_FILE; + } + + } + /* end of transfer */ + ProgressEnd(data); + + /* shut down the socket to inform the server we're done */ + sclose(data->secondarysocket); + data->secondarysocket = -1; + + /* now let's see what the server says about the transfer we + just performed: */ + nread = GetLastResponse(data->firstsocket, buf, data); + + /* 226 Transfer complete */ + if(strncmp(buf, "226", 3)) { + failf(data, "%s", buf+4); + return URG_FTP_WRITE_ERROR; + } + + return URG_OK; +} + +/* -- deal with the ftp server! -- */ + +UrgError ftp(struct UrlData *data, + long *bytecountp, + char *ftpuser, + char *ftppasswd, + char *urlpath) +{ + char *realpath; + UrgError retcode; + +#if 0 + realpath = URLfix(urlpath); +#else + realpath = curl_unescape(urlpath); +#endif + if(realpath) { + retcode = _ftp(data, bytecountp, ftpuser, ftppasswd, realpath); + free(realpath); + } + else + /* then we try the original path */ + retcode = _ftp(data, bytecountp, ftpuser, ftppasswd, urlpath); + + return retcode; +} +
lib/ftp.h+52 −0 added@@ -0,0 +1,52 @@ +#ifndef __FTP_H +#define __FTP_H + +/***************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * The contents of this file are subject to the Mozilla Public License + * Version 1.0 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * + * The Original Code is Curl. + * + * The Initial Developer of the Original Code is Daniel Stenberg. + * + * Portions created by the Initial Developer are Copyright (C) 1998. + * All Rights Reserved. + * + * ------------------------------------------------------------ + * Main author: + * - Daniel Stenberg <Daniel.Stenberg@haxx.nu> + * + * http://curl.haxx.nu + * + * $Source$ + * $Revision$ + * $Date$ + * $Author$ + * $State$ + * $Locker$ + * + * ------------------------------------------------------------ + ****************************************************************************/ +UrgError ftp(struct UrlData *data, + long *bytecountp, + char *ftpuser, + char *ftppasswd, + char *ppath); + +struct curl_slist *curl_slist_append(struct curl_slist *list, char *data); +void curl_slist_free_all(struct curl_slist *list); + +#endif
lib/getdate.c+0 −0 addedlib/getdate.h+46 −0 addedlib/getdate.y+1051 −0 addedlib/getenv.c+95 −0 addedlib/getenv.h+71 −0 addedlib/getpass.c+185 −0 addedlib/getpass.h+1 −0 addedlib/hostip.c+111 −0 addedlib/hostip.h+46 −0 addedlib/http.c+381 −0 addedlib/http.h+45 −0 addedlib/if2ip.c+110 −0 addedlib/if2ip.h+50 −0 addedlib/ldap.c+226 −0 addedlib/ldap.h+45 −0 addedlib/Makefile+282 −0 added@@ -0,0 +1,282 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# $Id$ +# + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = .. +prefix = /usr/local +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/curl +pkglibdir = $(libdir)/curl +pkgincludedir = $(includedir)/curl + +top_builddir = .. + +ACLOCAL = aclocal +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = .././install-sh -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = sparc-sun-solaris2.6 +host_triplet = sparc-sun-solaris2.6 +CC = gcc +MAKEINFO = makeinfo +NROFF = /bin/nroff +PACKAGE = curl +PERL = /usr/local/bin/perl +RANLIB = ranlib +VERSION = 6.3.1 +YACC = bison -y + +AUTOMAKE_OPTIONS = foreign no-dependencies + +noinst_LIBRARIES = libcurl.a + +# Some flags needed when trying to cause warnings ;-) +# CFLAGS = -Wall -pedantic + +INCLUDES = -I$(top_srcdir)/include + +libcurl_a_SOURCES = arpa_telnet.h file.c getpass.h netrc.h timeval.c base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h progress.h upload.c cookie.c formdata.h http.c sendf.c upload.h cookie.h ftp.c http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h getdate.c if2ip.h speedcheck.h urldata.h download.c getdate.h ldap.c ssluse.c version.c download.h getenv.c ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h getpass.c netrc.c telnet.h + +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h ../src/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) + + +DEFS = -DHAVE_CONFIG_H -I. -I$(srcdir) -I.. -I../src +CPPFLAGS = -I/home/dast/include/openssl -I/home/dast/include +LDFLAGS = +LIBS = -lssl -lcrypto -ldl -lsocket -lnsl -L/home/dast/lib +libcurl_a_LIBADD = +libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \ +formdata.o upload.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \ +speedcheck.o getdate.o download.o ldap.o ssluse.o version.o getenv.o \ +escape.o mprintf.o telnet.o getpass.o netrc.o +AR = ar +CFLAGS = -g -O2 +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +SOURCES = $(libcurl_a_SOURCES) +OBJECTS = $(libcurl_a_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps lib/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstLIBRARIES: + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +distclean-noinstLIBRARIES: + +maintainer-clean-noinstLIBRARIES: + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES) + -rm -f libcurl.a + $(AR) cru libcurl.a $(libcurl_a_OBJECTS) $(libcurl_a_LIBADD) + $(RANLIB) libcurl.a + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = lib + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(LIBRARIES) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ + mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ + mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstLIBRARIES distclean-compile \ + distclean-tags distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ +clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule. +$(srcdir)/getdate.c: getdate.y + cd $(srcdir) && \ + $(YACC) $(YFLAGS) getdate.y; \ + mv -f y.tab.c getdate.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
lib/Makefile.am+31 −0 added@@ -0,0 +1,31 @@ +# +# $Id$ +# + +AUTOMAKE_OPTIONS = foreign no-dependencies + +noinst_LIBRARIES = libcurl.a + +# Some flags needed when trying to cause warnings ;-) +# CFLAGS = -Wall -pedantic + +INCLUDES = -I$(top_srcdir)/include + +libcurl_a_SOURCES = \ +arpa_telnet.h file.c getpass.h netrc.h timeval.c \ +base64.c file.h hostip.c progress.c timeval.h \ +base64.h formdata.c hostip.h progress.h upload.c \ +cookie.c formdata.h http.c sendf.c upload.h \ +cookie.h ftp.c http.h sendf.h url.c \ +dict.c ftp.h if2ip.c speedcheck.c url.h \ +dict.h getdate.c if2ip.h speedcheck.h urldata.h \ +download.c getdate.h ldap.c ssluse.c version.c \ +download.h getenv.c ldap.h ssluse.h \ +escape.c getenv.h mprintf.c telnet.c \ +escape.h getpass.c netrc.c telnet.h + +# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule. +$(srcdir)/getdate.c: getdate.y + cd $(srcdir) && \ + $(YACC) $(YFLAGS) getdate.y; \ + mv -f y.tab.c getdate.c
lib/Makefile.in+282 −0 added@@ -0,0 +1,282 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# $Id$ +# + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = .. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +CC = @CC@ +MAKEINFO = @MAKEINFO@ +NROFF = @NROFF@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ +YACC = @YACC@ + +AUTOMAKE_OPTIONS = foreign no-dependencies + +noinst_LIBRARIES = libcurl.a + +# Some flags needed when trying to cause warnings ;-) +# CFLAGS = -Wall -pedantic + +INCLUDES = -I$(top_srcdir)/include + +libcurl_a_SOURCES = arpa_telnet.h file.c getpass.h netrc.h timeval.c base64.c file.h hostip.c progress.c timeval.h base64.h formdata.c hostip.h progress.h upload.c cookie.c formdata.h http.c sendf.c upload.h cookie.h ftp.c http.h sendf.h url.c dict.c ftp.h if2ip.c speedcheck.c url.h dict.h getdate.c if2ip.h speedcheck.h urldata.h download.c getdate.h ldap.c ssluse.c version.c download.h getenv.c ldap.h ssluse.h escape.c getenv.h mprintf.c telnet.c escape.h getpass.c netrc.c telnet.h + +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = ../config.h ../src/config.h +CONFIG_CLEAN_FILES = +LIBRARIES = $(noinst_LIBRARIES) + + +DEFS = @DEFS@ -I. -I$(srcdir) -I.. -I../src +CPPFLAGS = @CPPFLAGS@ +LDFLAGS = @LDFLAGS@ +LIBS = @LIBS@ +libcurl_a_LIBADD = +libcurl_a_OBJECTS = file.o timeval.o base64.o hostip.o progress.o \ +formdata.o upload.o cookie.o http.o sendf.o ftp.o url.o dict.o if2ip.o \ +speedcheck.o getdate.o download.o ldap.o ssluse.o version.o getenv.o \ +escape.o mprintf.o telnet.o getpass.o netrc.o +AR = ar +CFLAGS = @CFLAGS@ +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = Makefile.am Makefile.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +SOURCES = $(libcurl_a_SOURCES) +OBJECTS = $(libcurl_a_OBJECTS) + +all: all-redirect +.SUFFIXES: +.SUFFIXES: .S .c .o .s +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps lib/Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + + +mostlyclean-noinstLIBRARIES: + +clean-noinstLIBRARIES: + -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) + +distclean-noinstLIBRARIES: + +maintainer-clean-noinstLIBRARIES: + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +mostlyclean-compile: + -rm -f *.o core *.core + +clean-compile: + +distclean-compile: + -rm -f *.tab.c + +maintainer-clean-compile: + +libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES) + -rm -f libcurl.a + $(AR) cru libcurl.a $(libcurl_a_OBJECTS) $(libcurl_a_LIBADD) + $(RANLIB) libcurl.a + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = lib + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +install-exec-am: +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: +uninstall: uninstall-am +all-am: Makefile $(LIBRARIES) +all-redirect: all-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-noinstLIBRARIES mostlyclean-compile \ + mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-am + +clean-am: clean-noinstLIBRARIES clean-compile clean-tags clean-generic \ + mostlyclean-am + +clean: clean-am + +distclean-am: distclean-noinstLIBRARIES distclean-compile \ + distclean-tags distclean-generic clean-am + +distclean: distclean-am + +maintainer-clean-am: maintainer-clean-noinstLIBRARIES \ + maintainer-clean-compile maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-am + +.PHONY: mostlyclean-noinstLIBRARIES distclean-noinstLIBRARIES \ +clean-noinstLIBRARIES maintainer-clean-noinstLIBRARIES \ +mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean-compile tags mostlyclean-tags distclean-tags \ +clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ +check-am installcheck-am installcheck install-exec-am install-exec \ +install-data-am install-data install-am install uninstall-am uninstall \ +all-redirect all-am all installdirs mostlyclean-generic \ +distclean-generic clean-generic maintainer-clean-generic clean \ +mostlyclean distclean maintainer-clean + + +# Say $(srcdir), so GNU make does not report an ambiguity with the .y.c rule. +$(srcdir)/getdate.c: getdate.y + cd $(srcdir) && \ + $(YACC) $(YFLAGS) getdate.y; \ + mv -f y.tab.c getdate.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
lib/Makefile.m32+67 −0 added@@ -0,0 +1,67 @@ +############################################################# +## Makefile for building libcurl.a with MingW32 (GCC-2.95) and +## optionally OpenSSL (0.9.4) +## Use: make -f Makefile.m32 +## +## Comments to: Troy Engel <tengel@sonic.net> or +## Joern Hartroth <hartroth@acm.org> + +CC = gcc +AR = ar +RANLIB = ranlib +OPENSSL_PATH = ../../openssl-0.9.4 + +######################################################## +## Nothing more to do below this line! + +INCLUDES = -I. -I.. -I../include +CFLAGS = -g -O2 +ifdef SSL + INCLUDES += -I"$(OPENSSL_PATH)/outinc" -I"$(OPENSSL_PATH)/outinc/openssl" + CFLAGS += -DUSE_SSLEAY +endif +COMPILE = $(CC) $(INCLUDES) $(CFLAGS) + +libcurl_a_LIBRARIES = libcurl.a + +libcurl_a_SOURCES = base64.c getenv.c if2ip.h progress.h upload.h \ +base64.h getenv.h mprintf.c setup.h url.c download.c getpass.c \ +mprintf.h ssluse.c url.h download.h hostip.c netrc.c ssluse.h \ +urldata.h formdata.c hostip.h netrc.h stdcheaders.h formdata.h \ +if2ip.c progress.c upload.c sendf.c sendf.h speedcheck.c speedcheck.h \ +ftp.c ftp.h getpass.c getpass.h version.c timeval.c timeval.h cookie.c \ +cookie.h escape.c escape.h getdate.c getdate.h dict.h dict.c http.c \ +http.h telnet.c telnet.h file.c file.h ldap.c ldap.h + +libcurl_a_OBJECTS = base64.o getenv.o mprintf.o url.o download.o \ +getpass.o ssluse.o hostip.o netrc.o formdata.o if2ip.o progress.o \ +upload.o sendf.o speedcheck.o ftp.o getpass.o version.o timeval.o \ +cookie.o escape.o getdate.o dict.o http.o telnet.o file.o ldap.o + +LIBRARIES = $(libcurl_a_LIBRARIES) +SOURCES = $(libcurl_a_SOURCES) +OBJECTS = $(libcurl_a_OBJECTS) + + +all: libcurl.a + +libcurl.a: $(libcurl_a_OBJECTS) $(libcurl_a_DEPENDENCIES) + -@erase libcurl.a + $(AR) cru libcurl.a $(libcurl_a_OBJECTS) + $(RANLIB) libcurl.a + +.c.o: + $(COMPILE) -c $< + +.s.o: + $(COMPILE) -c $< + +.S.o: + $(COMPILE) -c $< + +clean: + -@erase $(libcurl_a_OBJECTS) + +distrib: clean + -@erase $(libcurl_a_LIBRARIES) +
lib/Makefile.vc6+315 −0 added@@ -0,0 +1,315 @@ +############################################################# +## Makefile for building libcurl.lib with MSVC6 +## Use: nmake -f makefile.vc6 [release | release-ssl | debug] +## (default is release) +## +## Comments to: Troy Engel <tengel@sonic.net> + +PROGRAM_NAME = libcurl.lib +OPENSSL_PATH = ../../openssl-0.9.3a + +######################################################## +## Nothing more to do below this line! + +## Release +CCR = cl.exe /ML /O2 /D "NDEBUG" +LINKR = link.exe -lib + +## Debug +CCD = cl.exe /MLd /Gm /ZI /Od /D "_DEBUG" /GZ +LINKD = link.exe -lib + +## SSL Release +CCRS = cl.exe /ML /O2 /D "NDEBUG" /D "USE_SSLEAY" /I "$(OPENSSL_PATH)/inc32" /I "$(OPENSSL_PATH)/inc32/openssl" +LINKRS = link.exe -lib /LIBPATH:$(OPENSSL_PATH)/out32dll + +CFLAGS = /nologo /W3 /GX /D "WIN32" /D "_MBCS" /D "_LIB" /YX /FD /c +LFLAGS = /nologo /out:$(PROGRAM_NAME) +LINKLIBS = kernel32.lib wsock32.lib +LINKSLIBS = libeay32.lib ssleay32.lib RSAglue.lib + +RELEASE_OBJS= \ + base64r.obj \ + cookier.obj \ + downloadr.obj \ + escaper.obj \ + formdatar.obj \ + ftpr.obj \ + httpr.obj \ + dictr.obj \ + telnetr.obj \ + getdater.obj \ + getenvr.obj \ + getpassr.obj \ + hostipr.obj \ + if2ipr.obj \ + mprintfr.obj \ + netrcr.obj \ + progressr.obj \ + sendfr.obj \ + speedcheckr.obj \ + ssluser.obj \ + timevalr.obj \ + uploadr.obj \ + urlr.obj \ + filer.obj \ + versionr.obj + +DEBUG_OBJS= \ + base64d.obj \ + cookied.obj \ + downloadd.obj \ + escaped.obj \ + formdatad.obj \ + ftpd.obj \ + httpd.obj \ + dictd.obj \ + telnetd.obj \ + getdated.obj \ + getenvd.obj \ + getpassd.obj \ + hostipd.obj \ + if2ipd.obj \ + mprintfd.obj \ + netrcd.obj \ + progressd.obj \ + sendfd.obj \ + speedcheckd.obj \ + sslused.obj \ + timevald.obj \ + uploadd.obj \ + urld.obj \ + filed.obj \ + versiond.obj + +RELEASE_SSL_OBJS= \ + base64rs.obj \ + cookiers.obj \ + downloadrs.obj \ + escapers.obj \ + formdatars.obj \ + ftprs.obj \ + httprs.obj \ + dictrs.obj \ + telnetrs.obj \ + getdaters.obj \ + getenvrs.obj \ + getpassrs.obj \ + hostiprs.obj \ + if2iprs.obj \ + mprintfrs.obj \ + netrcrs.obj \ + progressrs.obj \ + sendfrs.obj \ + speedcheckrs.obj \ + sslusers.obj \ + timevalrs.obj \ + uploadrs.obj \ + urlrs.obj \ + filers.obj \ + versionrs.obj + +LINK_OBJS= \ + base64.obj \ + cookie.obj \ + download.obj \ + escape.obj \ + formdata.obj \ + ftp.obj \ + http.obj \ + dict.obj \ + telnet.obj \ + getdate.obj \ + getenv.obj \ + getpass.obj \ + hostip.obj \ + if2ip.obj \ + mprintf.obj \ + netrc.obj \ + progress.obj \ + sendf.obj \ + speedcheck.obj \ + ssluse.obj \ + timeval.obj \ + upload.obj \ + url.obj \ + file.obj \ + version.obj + +all : release + +release: $(RELEASE_OBJS) + $(LINKR) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS) + +debug: $(DEBUG_OBJS) + $(LINKD) $(LFLAGS) $(LINKLIBS) $(LINK_OBJS) + +release-ssl: $(RELEASE_SSL_OBJS) + $(LINKRS) $(LFLAGS) $(LINKLIBS) $(LINKSLIBS) $(LINK_OBJS) + + +## Release +base64r.obj: base64.c + $(CCR) $(CFLAGS) base64.c +cookier.obj: cookie.c + $(CCR) $(CFLAGS) cookie.c +downloadr.obj: download.c + $(CCR) $(CFLAGS) download.c +escaper.obj: escape.c + $(CCR) $(CFLAGS) escape.c +formdatar.obj: formdata.c + $(CCR) $(CFLAGS) formdata.c +ftpr.obj: ftp.c + $(CCR) $(CFLAGS) ftp.c +httpr.obj: http.c + $(CCR) $(CFLAGS) http.c +dictr.obj: dict.c + $(CCR) $(CFLAGS) dict.c +telnetr.obj: telnet.c + $(CCR) $(CFLAGS) telnet.c +getdater.obj: getdate.c + $(CCR) $(CFLAGS) getdate.c +getenvr.obj: getenv.c + $(CCR) $(CFLAGS) getenv.c +getpassr.obj: getpass.c + $(CCR) $(CFLAGS) getpass.c +hostipr.obj: hostip.c + $(CCR) $(CFLAGS) hostip.c +if2ipr.obj: if2ip.c + $(CCR) $(CFLAGS) if2ip.c +mprintfr.obj: mprintf.c + $(CCR) $(CFLAGS) mprintf.c +netrcr.obj: netrc.c + $(CCR) $(CFLAGS) netrc.c +progressr.obj: progress.c + $(CCR) $(CFLAGS) progress.c +sendfr.obj: sendf.c + $(CCR) $(CFLAGS) sendf.c +speedcheckr.obj: speedcheck.c + $(CCR) $(CFLAGS) speedcheck.c +ssluser.obj: ssluse.c + $(CCR) $(CFLAGS) ssluse.c +timevalr.obj: timeval.c + $(CCR) $(CFLAGS) timeval.c +uploadr.obj: upload.c + $(CCR) $(CFLAGS) upload.c +urlr.obj: url.c + $(CCR) $(CFLAGS) url.c +filer.obj: file.c + $(CCR) $(CFLAGS) file.c +versionr.obj: version.c + $(CCR) $(CFLAGS) version.c + +## Debug +base64d.obj: base64.c + $(CCD) $(CFLAGS) base64.c +cookied.obj: cookie.c + $(CCD) $(CFLAGS) cookie.c +downloadd.obj: download.c + $(CCD) $(CFLAGS) download.c +escaped.obj: escape.c + $(CCD) $(CFLAGS) escape.c +formdatad.obj: formdata.c + $(CCD) $(CFLAGS) formdata.c +ftpd.obj: ftp.c + $(CCD) $(CFLAGS) ftp.c +httpd.obj: http.c + $(CCD) $(CFLAGS) http.c +dictd.obj: dict.c + $(CCD) $(CFLAGS) dict.c +telnetd.obj: telnet.c + $(CCD) $(CFLAGS) telnet.c +getdated.obj: getdate.c + $(CCD) $(CFLAGS) getdate.c +getenvd.obj: getenv.c + $(CCD) $(CFLAGS) getenv.c +getpassd.obj: getpass.c + $(CCD) $(CFLAGS) getpass.c +hostipd.obj: hostip.c + $(CCD) $(CFLAGS) hostip.c +if2ipd.obj: if2ip.c + $(CCD) $(CFLAGS) if2ip.c +mprintfd.obj: mprintf.c + $(CCD) $(CFLAGS) mprintf.c +netrcd.obj: netrc.c + $(CCD) $(CFLAGS) netrc.c +progressd.obj: progress.c + $(CCD) $(CFLAGS) progress.c +sendfd.obj: sendf.c + $(CCD) $(CFLAGS) sendf.c +speedcheckd.obj: speedcheck.c + $(CCD) $(CFLAGS) speedcheck.c +sslused.obj: ssluse.c + $(CCD) $(CFLAGS) ssluse.c +timevald.obj: timeval.c + $(CCD) $(CFLAGS) timeval.c +uploadd.obj: upload.c + $(CCD) $(CFLAGS) upload.c +urld.obj: url.c + $(CCD) $(CFLAGS) url.c +filed.obj: file.c + $(CCD) $(CFLAGS) file.c +versiond.obj: version.c + $(CCD) $(CFLAGS) version.c + + +## Release SSL +base64rs.obj: base64.c + $(CCRS) $(CFLAGS) base64.c +cookiers.obj: cookie.c + $(CCRS) $(CFLAGS) cookie.c +downloadrs.obj: download.c + $(CCRS) $(CFLAGS) download.c +escapers.obj: escape.c + $(CCRS) $(CFLAGS) escape.c +formdatars.obj: formdata.c + $(CCRS) $(CFLAGS) formdata.c +ftprs.obj: ftp.c + $(CCRS) $(CFLAGS) ftp.c +httprs.obj: http.c + $(CCRS) $(CFLAGS) http.c +dictrs.obj: dict.c + $(CCRS) $(CFLAGS) dict.c +telnetrs.obj: telnet.c + $(CCRS) $(CFLAGS) telnet.c +getdaters.obj: getdate.c + $(CCRS) $(CFLAGS) getdate.c +getenvrs.obj: getenv.c + $(CCRS) $(CFLAGS) getenv.c +getpassrs.obj: getpass.c + $(CCRS) $(CFLAGS) getpass.c +hostiprs.obj: hostip.c + $(CCRS) $(CFLAGS) hostip.c +if2iprs.obj: if2ip.c + $(CCRS) $(CFLAGS) if2ip.c +mprintfrs.obj: mprintf.c + $(CCRS) $(CFLAGS) mprintf.c +netrcrs.obj: netrc.c + $(CCRS) $(CFLAGS) netrc.c +progressrs.obj: progress.c + $(CCRS) $(CFLAGS) progress.c +sendfrs.obj: sendf.c + $(CCRS) $(CFLAGS) sendf.c +speedcheckrs.obj: speedcheck.c + $(CCRS) $(CFLAGS) speedcheck.c +sslusers.obj: ssluse.c + $(CCRS) $(CFLAGS) ssluse.c +timevalrs.obj: timeval.c + $(CCRS) $(CFLAGS) timeval.c +uploadrs.obj: upload.c + $(CCRS) $(CFLAGS) upload.c +urlrs.obj: url.c + $(CCRS) $(CFLAGS) url.c +filers.obj: file.c + $(CCRS) $(CFLAGS) file.c +versionrs.obj: version.c + $(CCRS) $(CFLAGS) version.c + +clean: + -@erase *.obj + -@erase vc60.idb + -@erase vc60.pch + +distrib: clean + -@erase $(PROGRAM_NAME) +
lib/mprintf.c+1253 −0 addedlib/netrc.c+182 −0 addedlib/netrc.h+70 −0 addedlib/progress.c+221 −0 addedlib/progress.h+54 −0 addedlib/sendf.c+115 −0 addedlib/sendf.h+47 −0 addedlib/setup.h+169 −0 addedlib/speedcheck.c+81 −0 addedlib/speedcheck.h+50 −0 addedlib/ssluse.c+265 −0 addedlib/ssluse.h+46 −0 addedlib/sta01005+0 −0 addedlib/sta18057+0 −0 addedlib/telnet.c+937 −0 addedlib/telnet.h+45 −0 addedlib/timeval.c+93 −0 addedlib/timeval.h+64 −0 addedlib/upload.c+178 −0 addedlib/upload.h+46 −0 addedlib/url.c+1181 −0 addedlib/urldata.h+212 −0 addedlib/url.h+0 −0 addedlib/version.c+86 −0 addedMakefile+426 −0 added@@ -0,0 +1,426 @@ +# Generated automatically from Makefile.in by configure. +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# $Id$ +# + + +SHELL = /bin/sh + +srcdir = . +top_srcdir = . +prefix = /usr/local +exec_prefix = ${prefix} + +bindir = ${exec_prefix}/bin +sbindir = ${exec_prefix}/sbin +libexecdir = ${exec_prefix}/libexec +datadir = ${prefix}/share +sysconfdir = ${prefix}/etc +sharedstatedir = ${prefix}/com +localstatedir = ${prefix}/var +libdir = ${exec_prefix}/lib +infodir = ${prefix}/info +mandir = ${prefix}/man +includedir = ${prefix}/include +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/curl +pkglibdir = $(libdir)/curl +pkgincludedir = $(includedir)/curl + +top_builddir = . + +ACLOCAL = aclocal +AUTOCONF = autoconf +AUTOMAKE = automake +AUTOHEADER = autoheader + +INSTALL = ./install-sh -c +INSTALL_PROGRAM = ${INSTALL} $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_SCRIPT = ${INSTALL_PROGRAM} +transform = s,x,x, + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = sparc-sun-solaris2.6 +host_triplet = sparc-sun-solaris2.6 +CC = gcc +MAKEINFO = makeinfo +NROFF = /bin/nroff +PACKAGE = curl +PERL = /usr/local/bin/perl +RANLIB = ranlib +VERSION = 6.3.1 +YACC = bison -y + +AUTOMAKE_OPTIONS = foreign no-dependencies + +man_MANS = curl.1 + +EXTRA_DIST = $(man_MANS) + +SUBDIRS = lib src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h ./src/config.h +CONFIG_CLEAN_FILES = +man1dir = $(mandir)/man1 +MANS = $(man_MANS) +DIST_COMMON = README ./stamp-h1.in INSTALL Makefile.am Makefile.in TODO \ +acconfig.h aclocal.m4 config.guess config.h.in config.sub configure \ +configure.in install-sh missing mkinstalldirs src/config.h.in \ +src/stamp-h2.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h1 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h1.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h1.in; \ + $(MAKE) $(srcdir)/stamp-h1.in; \ + else :; fi +$(srcdir)/stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h1.in 2> /dev/null + +src/config.h: src/stamp-h2 + @if test ! -f $@; then \ + rm -f src/stamp-h2; \ + $(MAKE) src/stamp-h2; \ + else :; fi +src/stamp-h2: $(srcdir)/src/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=src/config.h \ + $(SHELL) ./config.status + @echo timestamp > src/stamp-h2 2> /dev/null +$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h2.in + @if test ! -f $@; then \ + rm -f $(srcdir)/src/stamp-h2.in; \ + $(MAKE) $(srcdir)/src/stamp-h2.in; \ + else :; fi +$(srcdir)/src/stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/src/stamp-h2.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h src/config.h + +maintainer-clean-hdr: + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + + + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-man +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-man +uninstall: uninstall-recursive +all-am: Makefile $(MANS) config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +install-man1 uninstall-man1 install-man uninstall-man \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
Makefile.am+13 −0 added@@ -0,0 +1,13 @@ +# +# $Id$ +# + +AUTOMAKE_OPTIONS = foreign no-dependencies + +man_MANS = curl.1 + +EXTRA_DIST = $(man_MANS) + +SUBDIRS = lib src + +
Makefile.dist+78 −0 added@@ -0,0 +1,78 @@ +############################################################################ +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# The contents of this file are subject to the Mozilla Public License +# Version 1.0 (the "License"); you may not use this file except in +# compliance with the License. You may obtain a copy of the License at +# http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +# License for the specific language governing rights and limitations +# under the License. +# +# The Original Code is Curl. +# +# The Initial Developer of the Original Code is Daniel Stenberg. +# +# Portions created by the Initial Developer are Copyright (C) 1999. +# All Rights Reserved. +# +# ------------------------------------------------------------ +# Main author: +# - Daniel Stenberg <Daniel.Stenberg@haxx.nu> +# +# http://curl.haxx.nu +# +# $Source$ +# $Revision$ +# $Date$ +# $Author$ +# $State$ +# $Locker$ +# +# ------------------------------------------------------------ +# +# In a normal unix-setup, this file will become overwritten. +# +############################################################################ + +all: + ./configure + make + +ssl: + ./configure --with-ssl + make + +mingw32: + cd lib; make -f Makefile.m32 + cd src; make -f Makefile.m32 + +mingw32-ssl: + cd lib; make -f Makefile.m32 SSL=1 + cd src; make -f Makefile.m32 SSL=1 + +vc: + cd lib; nmake -f Makefile.vc6 + cd src; nmake -f Makefile.vc6 + +cygwin: + ./configure + make + +cygwin-ssl: + ./configure --with-ssl + make + +unix: all + +unix-ssl: ssl + +linux: all + +linux-ssl: ssl
Makefile.in+426 −0 added@@ -0,0 +1,426 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# +# $Id$ +# + + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = . + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ + +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_alias = @host_alias@ +host_triplet = @host@ +CC = @CC@ +MAKEINFO = @MAKEINFO@ +NROFF = @NROFF@ +PACKAGE = @PACKAGE@ +PERL = @PERL@ +RANLIB = @RANLIB@ +VERSION = @VERSION@ +YACC = @YACC@ + +AUTOMAKE_OPTIONS = foreign no-dependencies + +man_MANS = curl.1 + +EXTRA_DIST = $(man_MANS) + +SUBDIRS = lib src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h ./src/config.h +CONFIG_CLEAN_FILES = +man1dir = $(mandir)/man1 +MANS = $(man_MANS) +DIST_COMMON = README ./stamp-h1.in INSTALL Makefile.am Makefile.in TODO \ +acconfig.h aclocal.m4 config.guess config.h.in config.sub configure \ +configure.in install-sh missing mkinstalldirs src/config.h.in \ +src/stamp-h2.in + + +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) + +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile + +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(ACLOCAL_M4): configure.in + cd $(srcdir) && $(ACLOCAL) + +config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +config.h: stamp-h1 + @if test ! -f $@; then \ + rm -f stamp-h1; \ + $(MAKE) stamp-h1; \ + else :; fi +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=config.h \ + $(SHELL) ./config.status + @echo timestamp > stamp-h1 2> /dev/null +$(srcdir)/config.h.in: $(srcdir)/stamp-h1.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h1.in; \ + $(MAKE) $(srcdir)/stamp-h1.in; \ + else :; fi +$(srcdir)/stamp-h1.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/stamp-h1.in 2> /dev/null + +src/config.h: src/stamp-h2 + @if test ! -f $@; then \ + rm -f src/stamp-h2; \ + $(MAKE) src/stamp-h2; \ + else :; fi +src/stamp-h2: $(srcdir)/src/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=src/config.h \ + $(SHELL) ./config.status + @echo timestamp > src/stamp-h2 2> /dev/null +$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h2.in + @if test ! -f $@; then \ + rm -f $(srcdir)/src/stamp-h2.in; \ + $(MAKE) $(srcdir)/src/stamp-h2.in; \ + else :; fi +$(srcdir)/src/stamp-h2.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/src/stamp-h2.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f config.h src/config.h + +maintainer-clean-hdr: + +install-man1: + $(mkinstalldirs) $(DESTDIR)$(man1dir) + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ + $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ + done + +uninstall-man1: + @list='$(man1_MANS)'; \ + l2='$(man_MANS)'; for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ + rm -f $(DESTDIR)$(man1dir)/$$inst; \ + done +install-man: $(MANS) + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-man1 +uninstall-man: + @$(NORMAL_UNINSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-man1 + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: install-man +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: uninstall-man +uninstall: uninstall-recursive +all-am: Makefile $(MANS) config.h +all-redirect: all-recursive-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ + maintainer-clean-generic distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +install-man1 uninstall-man1 install-man uninstall-man \ +install-data-recursive uninstall-data-recursive install-exec-recursive \ +uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ +all-recursive check-recursive installcheck-recursive info-recursive \ +dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ +install-exec-am install-exec install-data-am install-data install-am \ +install uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT:
maketgz+152 −0 addedmissing+188 −0 addedmkinstalldirs+40 −0 addedMPL-1.0.txt+360 −0 added@@ -0,0 +1,360 @@ + MOZILLA PUBLIC LICENSE + Version 1.0 + + ---------------- + +1. Definitions. + + 1.1. ``Contributor'' means each entity that creates or contributes to + the creation of Modifications. + + 1.2. ``Contributor Version'' means the combination of the Original + Code, prior Modifications used by a Contributor, and the Modifications + made by that particular Contributor. + + 1.3. ``Covered Code'' means the Original Code or Modifications or the + combination of the Original Code and Modifications, in each case + including portions thereof. + + 1.4. ``Electronic Distribution Mechanism'' means a mechanism generally + accepted in the software development community for the electronic + transfer of data. + + 1.5. ``Executable'' means Covered Code in any form other than Source + Code. + + 1.6. ``Initial Developer'' means the individual or entity identified as + the Initial Developer in the Source Code notice required by Exhibit A. + + 1.7. ``Larger Work'' means a work which combines Covered Code or + portions thereof with code not governed by the terms of this License. + + 1.8. ``License'' means this document. + + 1.9. ``Modifications'' means any addition to or deletion from the + substance or structure of either the Original Code or any previous + Modifications. When Covered Code is released as a series of files, a + Modification is: + + A. Any addition to or deletion from the contents of a file + containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or + previous Modifications. + + 1.10. ``Original Code'' means Source Code of computer software code + which is described in the Source Code notice required by Exhibit A as + Original Code, and which, at the time of its release under this License + is not already Covered Code governed by this License. + + 1.11. ``Source Code'' means the preferred form of the Covered Code for + making modifications to it, including all modules it contains, plus any + associated interface definition files, scripts used to control + compilation and installation of an Executable, or a list of source code + differential comparisons against either the Original Code or another + well known, available Covered Code of the Contributor's choice. The + Source Code can be in a compressed or archival form, provided the + appropriate decompression or de-archiving software is widely available + for no charge. + + 1.12. ``You'' means an individual or a legal entity exercising rights + under, and complying with all of the terms of, this License or a future + version of this License issued under Section 6.1. For legal entities, + ``You'' includes any entity which controls, is controlled by, or is + under common control with You. For purposes of this definition, + ``control'' means (a) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (b) ownership of fifty percent (50%) or more of the + outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + + (a) to use, reproduce, modify, display, perform, sublicense and + distribute the Original Code (or portions thereof) with or without + Modifications, or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by Initial + Developer, to make, have made, use and sell (``Utilize'') the + Original Code (or portions thereof), but solely to the extent that + any such patent is reasonably necessary to enable You to Utilize + the Original Code (or portions thereof) and not to any greater + extent that may be necessary to Utilize further Modifications or + combinations. + + 2.2. Contributor Grant. + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license, subject to third party intellectual property + claims: + + (a) to use, reproduce, modify, display, perform, sublicense and + distribute the Modifications created by such Contributor (or + portions thereof) either on an unmodified basis, with other + Modifications, as Covered Code or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by + Contributor, to Utilize the Contributor Version (or portions + thereof), but solely to the extent that any such patent is + reasonably necessary to enable You to Utilize the Contributor + Version (or portions thereof), and not to any greater extent that + may be necessary to Utilize further Modifications or combinations. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are + governed by the terms of this License, including without limitation + Section 2.2. The Source Code version of Covered Code may be distributed + only under the terms of this License or a future version of this + License released under Section 6.1, and You must include a copy of this + License with every copy of the Source Code You distribute. You may not + offer or impose any terms on any Source Code version that alters or + restricts the applicable version of this License or the recipients' + rights hereunder. However, You may include an additional document + offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be + made available in Source Code form under the terms of this License + either on the same media as an Executable version or via an accepted + Electronic Distribution Mechanism to anyone to whom you made an + Executable version available; and if made available via Electronic + Distribution Mechanism, must remain available for at least twelve (12) + months after the date it initially became available, or at least six + (6) months after a subsequent version of that particular Modification + has been made available to such recipients. You are responsible for + ensuring that the Source Code version remains available even if the + Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which you contribute to contain a + file documenting the changes You made to create that Covered Code and + the date of any change. You must include a prominent statement that the + Modification is derived, directly or indirectly, from Original Code + provided by the Initial Developer and including the name of the Initial + Developer in (a) the Source Code, and (b) in any notice in an + Executable version or related documentation in which You describe the + origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + + (a) Third Party Claims. + If You have knowledge that a party claims an intellectual property + right in particular functionality or code (or its utilization + under this License), you must include a text file with the source + code distribution titled ``LEGAL'' which describes the claim and + the party making the claim in sufficient detail that a recipient + will know whom to contact. If you obtain such knowledge after You + make Your Modification available as described in Section 3.2, You + shall promptly modify the LEGAL file in all copies You make + available thereafter and shall take other steps (such as notifying + appropriate mailing lists or newsgroups) reasonably calculated to + inform those who received the Covered Code that new knowledge has + been obtained. + + (b) Contributor APIs. + If Your Modification is an application programming interface and + You own or control patents which are reasonably necessary to + implement that API, you must also include this information in the + LEGAL file. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source + Code, and this License in any documentation for the Source Code, where + You describe recipients' rights relating to Covered Code. If You + created one or more Modification(s), You may add your name as a + Contributor to the notice described in Exhibit A. If it is not possible + to put such notice in a particular Source Code file due to its + structure, then you must include such notice in a location (such as a + relevant directory file) where a user would be likely to look for such + a notice. You may choose to offer, and to charge a fee for, warranty, + support, indemnity or liability obligations to one or more recipients + of Covered Code. However, You may do so only on Your own behalf, and + not on behalf of the Initial Developer or any Contributor. You must + make it absolutely clear than any such warranty, support, indemnity or + liability obligation is offered by You alone, and You hereby agree to + indemnify the Initial Developer and every Contributor for any liability + incurred by the Initial Developer or such Contributor as a result of + warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the + requirements of Section 3.1-3.5 have been met for that Covered Code, + and if You include a notice stating that the Source Code version of the + Covered Code is available under the terms of this License, including a + description of how and where You have fulfilled the obligations of + Section 3.2. The notice must be conspicuously included in any notice in + an Executable version, related documentation or collateral in which You + describe recipients' rights relating to the Covered Code. You may + distribute the Executable version of Covered Code under a license of + Your choice, which may contain terms different from this License, + provided that You are in compliance with the terms of this License and + that the license for the Executable version does not attempt to limit + or alter the recipient's rights in the Source Code version from the + rights set forth in this License. If You distribute the Executable + version under a different license You must make it absolutely clear + that any terms which differ from this License are offered by You alone, + not by the Initial Developer or any Contributor. You hereby agree to + indemnify the Initial Developer and every Contributor for any liability + incurred by the Initial Developer or such Contributor as a result of + any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code + not governed by the terms of this License and distribute the Larger + Work as a single product. In such a case, You must make sure the + requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Code due to statute + or regulation then You must: (a) comply with the terms of this License + to the maximum extent possible; and (b) describe the limitations and + the code they affect. Such description must be included in the LEGAL + file described in Section 3.4 and must be included with all + distributions of the Source Code. Except to the extent prohibited by + statute or regulation, such description must be sufficiently detailed + for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. + + This License applies to code to which the Initial Developer has + attached the notice in Exhibit A, and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation (``Netscape'') may publish revised + and/or new versions of the License from time to time. Each version will + be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the + License, You may always continue to use it under the terms of that + version. You may also choose to use such Covered Code under the terms + of any subsequent version of the License published by Netscape. No one + other than Netscape has the right to modify the terms applicable to + Covered Code created under this License. + + 6.3. Derivative Works. + If you create or use a modified version of this License (which you may + only do in order to apply it to code which is not already Covered Code + governed by this License), you must (a) rename Your license so that the + phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or + any confusingly similar phrase do not appear anywhere in your license + and (b) otherwise make it clear that your version of the license + contains terms which differ from the Mozilla Public License and + Netscape Public License. (Filling in the name of the Initial Developer, + Original Code or Contributor in the notice described in Exhibit A shall + not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. + + COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, + WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF + DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. + THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE + IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, + YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE + COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER + OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF + ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + This License and the rights granted hereunder will terminate + automatically if You fail to comply with terms herein and fail to cure + such breach within 30 days of becoming aware of the breach. All + sublicenses to the Covered Code which are properly granted shall + survive any termination of this License. Provisions which, by their + nature, must remain in effect beyond the termination of this License + shall survive. + +9. LIMITATION OF LIABILITY. + + UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT + (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL + DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, + OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER + PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF + GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND + ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE + BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF + LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY + RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW + PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE + EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT + EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + + The Covered Code is a ``commercial item,'' as that term is defined in + 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer + software'' and ``commercial computer software documentation,'' as such + terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 + C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), + all U.S. Government End Users acquire Covered Code with only those + rights set forth herein. + +11. MISCELLANEOUS. + + This License represents the complete agreement concerning subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. This License shall be governed by + California law provisions (except to the extent applicable law, if any, + provides otherwise), excluding its conflict-of-law provisions. With + respect to disputes in which at least one party is a citizen of, or an + entity chartered or registered to do business in, the United States of + America: (a) unless otherwise agreed in writing, all disputes relating + to this License (excepting any dispute relating to intellectual + property rights) shall be subject to final and binding arbitration, + with the losing party paying all costs of arbitration; (b) any + arbitration relating to this Agreement shall be held in Santa Clara + County, California, under the auspices of JAMS/EndDispute; and (c) any + litigation relating to this Agreement shall be subject to the + jurisdiction of the Federal Courts of the Northern District of + California, with venue lying in Santa Clara County, California, with + the losing party responsible for costs, including without limitation, + court costs and reasonable attorneys fees and expenses. The application + of the United Nations Convention on Contracts for the International + Sale of Goods is expressly excluded. Any law or regulation which + provides that the language of a contract shall be construed against the + drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. + + Except in cases where another Contributor has failed to comply with + Section 3.4, You are responsible for damages arising, directly or + indirectly, out of Your utilization of rights under this License, based + on the number of copies of Covered Code you made available, the + revenues you received from utilizing such rights, and other relevant + factors. You agree to work with affected parties to distribute + responsibility on an equitable basis. + +EXHIBIT A. + + ``The contents of this file are subject to the Mozilla Public License + Version 1.0 (the "License"); you may not use this file except in + compliance with the License. You may obtain a copy of the License at + http://www.mozilla.org/MPL/ + + Software distributed under the License is distributed on an "AS IS" + basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + License for the specific language governing rights and limitations + under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. + Portions created by ______________________ are Copyright (C) ______ + _______________________. All Rights Reserved. + + Contributor(s): ______________________________________.''
perl/checklinks.pl+336 −0 addedperl/checklinks.pl.in+336 −0 addedperl/formfind.pl+273 −0 addedperl/formfind.pl.in+273 −0 addedperl/getlinks.pl+261 −0 addedperl/getlinks.pl.in+261 −0 addedperl/README+33 −0 addedperl/recursiveftpget.pl+67 −0 addedperl/recursiveftpget.pl.in+67 −0 addedREADME+28 −0 added@@ -0,0 +1,28 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +README + + Curl is a command line tool for transfering data specified with URL + syntax. Find out how to use Curl by reading the curl.1 man page or the + README.curl document. Find out how to install Curl by reading the INSTALL + document. + + libcurl is a link-library that Curl is using to to its job. It is readily + available to be used by your software. Read the README.libcurl document to + find out how! + + You find answers to the most frequent questions we get in the FAQ document. + + Always try the Curl web site for the latest news: + + http://curl.haxx.nu + + The official download mirror sites are: + + Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/ + Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/ + China -- http://www.pshowing.com/curl/
README.curl+611 −0 added@@ -0,0 +1,611 @@ +LATEST VERSION + + You always find news about what's going on as well as the latest versions + from the curl web pages, located at: + + http://curl.haxx.nu + +SIMPLE USAGE + + Get the main page from netscape's web-server: + + curl http://www.netscape.com/ + + Get the root README file from funet's ftp-server: + + curl ftp://ftp.funet.fi/README + + Get a gopher document from funet's gopher server: + + curl gopher://gopher.funet.fi + + Get a web page from a server using port 8000: + + curl http://www.weirdserver.com:8000/ + + Get a list of the root directory of an FTP site: + + curl ftp://ftp.fts.frontec.se/ + + Get the definition of curl from a dictionary: + + curl dict://dict.org/m:curl + +DOWNLOAD TO A FILE + + Get a web page and store in a local file: + + curl -o thatpage.html http://www.netscape.com/ + + Get a web page and store in a local file, make the local file get the name + of the remote document (if no file name part is specified in the URL, this + will fail): + + curl -O http://www.netscape.com/index.html + +USING PASSWORDS + + FTP + + To ftp files using name+passwd, include them in the URL like: + + curl ftp://name:passwd@machine.domain:port/full/path/to/file + + or specify them with the -u flag like + + curl -u name:passwd ftp://machine.domain:port/full/path/to/file + + HTTP + + The HTTP URL doesn't support user and password in the URL string. Curl + does support that anyway to provide a ftp-style interface and thus you can + pick a file like: + + curl http://name:passwd@machine.domain/full/path/to/file + + or specify user and password separately like in + + curl -u name:passwd http://machine.domain/full/path/to/file + + NOTE! Since HTTP URLs don't support user and password, you can't use that + style when using Curl via a proxy. You _must_ use the -u style fetch + during such circumstances. + + HTTPS + + Probably most commonly used with private certificates, as explained below. + + GOPHER + + Curl features no password support for gopher. + +PROXY + + Get an ftp file using a proxy named my-proxy that uses port 888: + + curl -x my-proxy:888 ftp://ftp.leachsite.com/README + + Get a file from a HTTP server that requires user and password, using the + same proxy as above: + + curl -u user:passwd -x my-proxy:888 http://www.get.this/ + + Some proxies require special authentication. Specify by using -U as above: + + curl -U user:passwd -x my-proxy:888 http://www.get.this/ + + See also the environment variables Curl support that offer further proxy + control. + +RANGES + + With HTTP 1.1 byte-ranges were introduced. Using this, a client can request + to get only one or more subparts of a specified document. Curl supports + this with the -r flag. + + Get the first 100 bytes of a document: + + curl -r 0-99 http://www.get.this/ + + Get the last 500 bytes of a document: + + curl -r -500 http://www.get.this/ + + Curl also supports simple ranges for FTP files as well. Then you can only + specify start and stop position. + + Get the first 100 bytes of a document using FTP: + + curl -r 0-99 ftp://www.get.this/README + +UPLOADING + + FTP + + Upload all data on stdin to a specified ftp site: + + curl -t ftp://ftp.upload.com/myfile + + Upload data from a specified file, login with user and password: + + curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile + + Upload a local file to the remote site, and use the local file name remote + too: + + curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ + + NOTE: Curl is not currently supporing ftp upload through a proxy! The reason + for this is simply that proxies are seldomly configured to allow this and + that no author has supplied code that makes it possible! + + HTTP + + Upload all data on stdin to a specified http site: + + curl -t http://www.upload.com/myfile + + Note that the http server must've been configured to accept PUT before this + can be done successfully. + + For other ways to do http data upload, see the POST section below. + +VERBOSE / DEBUG + + If curl fails where it isn't supposed to, if the servers don't let you + in, if you can't understand the responses: use the -v flag to get VERBOSE + fetching. Curl will output lots of info and all data it sends and + receives in order to let the user see all client-server interaction. + + curl -v ftp://ftp.upload.com/ + +DETAILED INFORMATION + + Different protocols provide different ways of getting detailed information + about specific files/documents. To get curl to show detailed information + about a single file, you should use -I/--head option. It displays all + available info on a single file for HTTP and FTP. The HTTP information is a + lot more extensive. + + For HTTP, you can get the header information (the same as -I would show) + shown before the data by using -i/--include. Curl understands the + -D/--dump-header option when getting files from both FTP and HTTP, and it + will then store the headers in the specified file. + + Store the HTTP headers in a separate file: + + curl --dump-header headers.txt curl.haxx.nu + + Note that headers stored in a separate file can be very useful at a later + time if you want curl to use cookies sent by the server. More about that in + the cookies section. + +POST (HTTP) + + It's easy to post data using curl. This is done using the -d <data> + option. The post data must be urlencoded. + + Post a simple "name" and "phone" guestbook. + + curl -d "name=Rafael%20Sagula&phone=3320780" \ + http://www.where.com/guest.cgi + + While -d uses the application/x-www-form-urlencoded mime-type, generally + understood by CGI's and similar, curl also supports the more capable + multipart/form-data type. This latter type supports things like file upload. + + -F accepts parameters like -F "name=contents". If you want the contents to + be read from a file, use <@filename> as contents. When specifying a file, + you can also specify which content type the file is, by appending + ';type=<mime type>' to the file name. You can also post contents of several + files in one field. So that the field name 'coolfiles' can be sent three + files with different content types in a manner similar to: + + curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \ + http://www.post.com/postit.cgi + + If content-type is not specified, curl will try to guess from the extension + (it only knows a few), or use the previously specified type (from an earlier + file if several files are specified in a list) or finally using the default + type 'text/plain'. + + Emulate a fill-in form with -F. Let's say you fill in three fields in a + form. One field is a file name which to post, one field is your name and one + field is a file description. We want to post the file we have written named + "cooltext.txt". To let curl do the posting of this data instead of your + favourite browser, you have to check out the HTML of the form page to get to + know the names of the input fields. In our example, the input field names are + 'file', 'yourname' and 'filedescription'. + + curl -F "file=@cooltext.txt" -F "yourname=Daniel" \ + -F "filedescription=Cool text file with cool text inside" \ + http://www.post.com/postit.cgi + + So, to send two files in one post you can do it in two ways: + + 1. Send multiple files in a single "field" with a single field name: + + curl -F "pictures=@dog.gif,cat.gif" + + 2. Send two fields with two field names: + + curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" + +REFERER + + A HTTP request has the option to include information about which address + that referred to actual page, and curl allows the user to specify that + referrer to get specified on the command line. It is especially useful to + fool or trick stupid servers or CGI scripts that rely on that information + being available or contain certain data. + + curl -e www.coolsite.com http://www.showme.com/ + +USER AGENT + + A HTTP request has the option to include information about the browser + that generated the request. Curl allows it to be specified on the command + line. It is especially useful to fool or trick stupid servers or CGI + scripts that only accept certain browsers. + + Example: + + curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/ + + Other common strings: + 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95 + 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95 + 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2 + 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX + 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux + + Note that Internet Explorer tries hard to be compatible in every way: + 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95 + + Mozilla is not the only possible User-Agent name: + 'Konqueror/1.0' KDE File Manager desktop client + 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser + +COOKIES + + Cookies are generally used by web servers to keep state information at the + client's side. The server sets cookies by sending a response line in the + headers that looks like 'Set-Cookie: <data>' where the data part then + typically contains a set of NAME=VALUE pairs (separated by semicolons ';' + like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what + path the "cookie" should be used for (by specifying "path=value"), when the + cookie should expire ("expire=DATE"), for what domain to use it + ("domain=NAME") and if it should be used on secure connections only + ("secure"). + + If you've received a page from a server that contains a header like: + Set-Cookie: sessionid=boo123; path="/foo"; + + it means the server wants that first pair passed on when we get anything in + a path beginning with "/foo". + + Example, get a page that wants my name passed in a cookie: + + curl -b "name=Daniel" www.sillypage.com + + Curl also has the ability to use previously received cookies in following + sessions. If you get cookies from a server and store them in a file in a + manner similar to: + + curl --dump-header headers www.example.com + + ... you can then in a second connect to that (or another) site, use the + cookies from the 'headers' file like: + + curl -b headers www.example.com + + Note that by specifying -b you enable the "cookie awareness" and with -L + you can make curl follow a location: (which often is used in combination + with cookies). So that if a site sends cookies and a location, you can + use a non-existing file to trig the cookie awareness like: + + curl -L -b empty-file www.example.com + + The file to read cookies from must be formatted using plain HTTP headers OR + as netscape's cookie file. Curl will determine what kind it is based on the + file contents. + +PROGRESS METER + + The progress meter was introduced to better show a user that something + actually is happening. The different fields in the output have the following + meaning: + + % Received Total Speed Time left Total Curr.Speed + 13 524140 3841536 4296 0:12:52 0:14:54 292 + + From left-to-right: + - The first column, is the percentage of the file currently transfered. + - Received means the total number of bytes that has been transfered. + - Total is the total number of bytes expected to transfer. + - Speed is average speed in bytes per second for the whole transfer so far. + - Time left is the estimated time left for this transfer to finnish if the + current average speed will remain steady. + - Total is the estimated total transfer time. + - Curr.Speed is the average transfer speed the last 5 seconds (the first + 5 seconds of a transfer is based on less time of course.) + + NOTE: Much of the output is based on the fact that the size of the transfer + is known before it takes place. If it isn't, a much less fancy display will + be used. + +SPEED LIMIT + + Curl offers the user to set conditions regarding transfer speed that must + be met to let the transfer keep going. By using the switch -y and -Y you + can make curl abort transfers if the transfer speed doesn't exceed your + given lowest limit for a specified time. + + To let curl abandon downloading this page if its slower than 3000 bytes per + second for 1 minute, run: + + curl -y 3000 -Y 60 www.far-away-site.com + + This can very well be used in combination with the overall time limit, so + that the above operatioin must be completed in whole within 30 minutes: + + curl -m 1800 -y 3000 -Y 60 www.far-away-site.com + +CONFIG FILE + + Curl automatically tries to read the .curlrc file (or _curlrc file on win32 + systems) from the user's home dir on startup. The config file should be + made up with normal command line switches. Comments can be used within the + file. If the first letter on a line is a '#'-letter the rest of the line + is treated as a comment. + + Example, set default time out and proxy in a config file: + + # We want a 30 minute timeout: + -m 1800 + # ... and we use a proxy for all accesses: + -x proxy.our.domain.com:8080 + + White spaces ARE significant at the end of lines, but all white spaces + leading up to the first characters of each line are ignored. + + Prevent curl from reading the default file by using -q as the first command + line parameter, like: + + curl -q www.thatsite.com + + Force curl to get and display a local help page in case it is invoked + without URL by making a config file similar to: + + # default url to get + http://help.with.curl.com/curlhelp.html + + You can specify another config file to be read by using the -K/--config + flag. If you set config file name to "-" it'll read the config from stdin, + which can be handy if you want to hide options from being visible in process + tables etc: + + echo "-u user:passwd" | curl -K - http://that.secret.site.com + +EXTRA HEADERS + + When using curl in your own very special programs, you may end up needing + to pass on your own custom headers when getting a web page. You can do + this by using the -H flag. + + Example, send the header "X-you-and-me: yes" to the server when getting a + page: + + curl -H "X-you-and-me: yes" www.love.com + + This can also be useful in case you want curl to send a different text in + a header than it normally does. The -H header you specify then replaces the + header curl would normally send. + +FTP and PATH NAMES + + Do note that when getting files with the ftp:// URL, the given path is + relative the directory you enter. To get the file 'README' from your home + directory at your ftp site, do: + + curl ftp://user:passwd@my.site.com/README + + But if you want the README file from the root directory of that very same + site, you need to specify the absolute file name: + + curl ftp://user:passwd@my.site.com//README + + (I.e with an extra slash in front of the file name.) + +FTP and firewalls + + The FTP protocol requires one of the involved parties to open a second + connction as soon as data is about to get transfered. There are two ways to + do this. + + The default way for curl is to issue the PASV command which causes the + server to open another port and await another connection performed by the + client. This is good if the client is behind a firewall that don't allow + incoming connections. + + curl ftp.download.com + + If the server for example, is behind a firewall that don't allow connections + on other ports than 21 (or if it just doesn't support the PASV command), the + other way to do it is to use the PORT command and instruct the server to + connect to the client on the given (as parameters to the PORT command) IP + number and port. + + The -P flag to curl allows for different options. Your machine may have + several IP-addresses and/or network interfaces and curl allows you to select + which of them to use. Default address can also be used: + + curl -P - ftp.download.com + + Download with PORT but use the IP address of our 'le0' interface: + + curl -P le0 ftp.download.com + + Download with PORT but use 192.168.0.10 as our IP address to use: + + curl -P 192.168.0.10 ftp.download.com + +HTTPS + + Secure HTTP requires SSLeay to be installed and used when curl is built. If + that is done, curl is capable of retrieving and posting documents using the + HTTPS procotol. + + Example: + + curl https://www.secure-site.com + + Curl is also capable of using your personal certificates to get/post files + from sites that require valid certificates. The only drawback is that the + certificate needs to be in PEM-format. PEM is a standard and open format to + store certificates with, but it is not used by the most commonly used + browsers (Netscape and MSEI both use the so called PKCS#12 format). If you + want curl to use the certificates you use with your (favourite) browser, you + may need to download/compile a converter that can convert your browser's + formatted certificates to PEM formatted ones. Dr Stephen N. Henson has + written a patch for SSLeay that adds this functionality. You can get his + patch (that requires an SSLeay installation) from his site at: + http://www.drh-consultancy.demon.co.uk/ + + Example on how to automatically retrieve a document using a certificate with + a personal password: + + curl -E /path/to/cert.pem:password https://secure.site.com/ + + If you neglect to specify the password on the command line, you will be + prompted for the correct password before any data can be received. + + Many older SSL-servers have problems with SSLv3 or TLS, that newer versions + of OpenSSL etc is using, therefore it is sometimes useful to specify what + SSL-version curl should use. Use -3 or -2 to specify that exact SSL version + to use: + + curl -2 https://secure.site.com/ + + Otherwise, curl will first attempt to use v3 and then v2. + +RESUMING FILE TRANSFERS + + To continue a file transfer where it was previously aborted, curl supports + resume on http(s) downloads as well as ftp uploads and downloads. + + Continue downloading a document: + + curl -c -o file ftp://ftp.server.com/path/file + + Continue uploading a document(*1): + + curl -c -T file ftp://ftp.server.com/path/file + + Continue downloading a document from a web server(*2): + + curl -c -o file http://www.server.com/ + + (*1) = This requires that the ftp server supports the non-standard command + SIZE. If it doesn't, curl will say so. + + (*2) = This requires that the wb server supports at least HTTP/1.1. If it + doesn't, curl will say so. + +TIME CONDITIONS + + HTTP allows a client to specify a time condition for the document it + requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to + specify them with the -z/--time-cond flag. + + For example, you can easily make a download that only gets performed if the + remote file is newer than a local copy. It would be made like: + + curl -z local.html http://remote.server.com/remote.html + + Or you can download a file only if the local file is newer than the remote + one. Do this by prepending the date string with a '-', as in: + + curl -z -local.html http://remote.server.com/remote.html + + You can specify a "free text" date as condition. Tell curl to only download + the file if it was updated since yesterday: + + curl -z yesterday http://remote.server.com/remote.html + + Curl will then accept a wide range of date formats. You always make the date + check the other way around by prepending it with a dash '-'. + +DICT + + For fun try + + curl dict://dict.org/m:curl + curl dict://dict.org/d:heisenbug:jargon + curl dict://dict.org/d:daniel:web1913 + + Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define' + and 'lookup'. For example, + + curl dict://dict.org/find:curl + + Commands that break the URL description of the RFC (but not the DICT + protocol) are + + curl dict://dict.org/show:db + curl dict://dict.org/show:strat + + Authentication is still missing (but this is not required by the RFC) + +LDAP + + If you have installed the OpenLDAP library, curl can take advantage of it + and offer ldap:// support. + + LDAP is a complex thing and writing an LDAP query is not an easy task. I do + advice you to dig up the syntax description for that elsewhere, RFC 1959 if + no other place is better. + + To show you an example, this is now I can get all people from my local LDAP + server that has a certain sub-domain in their email address: + + curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se" + + If I want the same info in HTML format, I can get it by not using the -B + (enforce ASCII) flag. + +ENVIRONMENT VARIABLES + + Curl reads and understands the following environment variables: + + HTTP_PROXY, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY + + They should be set for protocol-specific proxies. General proxy should be + set with + + ALL_PROXY + + A comma-separated list of host names that shouldn't go through any proxy is + set in (only an asterisk, '*' matches all hosts) + + NO_PROXY + + If a tail substring of the domain-path for a host matches one of these + strings, transactions with that node will not be proxied. + + + The usage of the -x/--proxy flag overrides the environment variables. + +MAILING LIST + + We have an open mailing list to discuss curl, its development and things + relevant to this. + + To subscribe, mail curl-request@contactor.se with "subscribe <your email + address>" in the body. + + To post to the list, mail curl@contactor.se. + + To unsubcribe, mail curl-request@contactor.se with "unsubscribe <your + subscribed email address>" in the body. +
README.libcurl+108 −0 added@@ -0,0 +1,108 @@ + _ _ _ _ + | (_) |__ ___ _ _ _ __| | + | | | '_ \ / __| | | | '__| | + | | | |_) | (__| |_| | | | | + |_|_|_.__/ \___|\__,_|_| |_| + + + How To Use Libcurl In Your Program: + (by Ralph Beckmann <rabe@uni-paderborn.de>) + +NOTE: If you plan to use libcurl.a in Threads under Linux, do not use the old +gcc-2.7.x because the function 'gethostbyname' seems not to be thread-safe, +that is to say an unavoidable SEGMENTATION FAULT might occur. + + +1. a) In a C-Program: + #include "curl.h" + + b) In a C++-Program: + extern "C" { + #include "curl.h" + } + +2. char *url="http://www.domain.com"; + curl_urlget (URGTAG_URL, url, + URGTAG_FLAGS, CONF_NOPROGRESS, + URGTAG_ERRORBUFFER, errorBuffer, + URGTAG_WRITEFUNCTION, (size_t (*)(void *, int, int, FILE +*))handle_data, + URGTAG_TIMEOUT, 30, /* or anything You want */ + ... + URGTAG_DONE); + +3. size_t handle_data (const void *ptr, size_t size, size_t nitems, + FILE *stream) + { + (void)stream; /* stop complaining using g++ -Wall */ + if ((int)nitems <= 0) { + return (size_t)0; + } + fprintf(stdout, (char *)ptr); /* or do anything else with it */ + return nitems; + } + +4. Compile Your Program with -I$(CURL_DIR)/include + +5. Link Your Program together with $(CURL_DIR)/lib/libcurl.a + + Small Example of How To Use libcurl + +---------------------------------------------------------------------- +/* Full example that uses libcurl.a to fetch web pages. */ +/* curlthreads.c */ +/* - Test-Program by Ralph Beckmann for using curl in POSIX-Threads */ +/* Change *url1 and *url2 to textual long and slow non-FRAMESET websites! */ +/* + 1. Compile with gcc or g++ as $(CC): + $(CC) -c -Wall -pedantic curlthreads.c -I$(CURL_DIR)/include + + 2. Link with: + - Linux: + $(CC) -o curlthreads curlthreads.o $(CURL_DIR)/lib/libcurl.a -lpthread +-lm + - Solaris: + $(CC) -o curlthreads curlthreads.o $(CURL_DIR)/lib/libcurl.a -lpthread +-lm -lsocket -lnsl +*/ + +#include <pthread.h> +#include <stdio.h> +#ifdef __cplusplus +extern "C" { +#include "curl.h" +} +#else +#include "curl.h" +#endif + +size_t storedata (const void *ptr, size_t size, size_t nitems, FILE *stream) { + (void)ptr; (void)stream; /* just to stop g++ -Wall complaining */ + fprintf(stdout, "Thread #%i reads %i Bytes.\n", + (int)pthread_self(), (int)(nitems*size)); + return (nitems); +} + +void *urlfetcher(void *url) { + curl_urlget (URGTAG_URL, url, + URGTAG_FLAGS, CONF_NOPROGRESS | CONF_FAILONERROR, + URGTAG_WRITEFUNCTION, (size_t (*)(void *, int, int, FILE +*))storedata, + URGTAG_DONE); + return NULL; +} + +int main(void) { + char *url1="www.sun.com"; + char *url2="www.microsoft.com"; + + pthread_t thread_id1, thread_id2; + pthread_create(&thread_id1, NULL, urlfetcher, (void *)url1); + pthread_create(&thread_id2, NULL, urlfetcher, (void *)url2); + pthread_join(thread_id1, NULL); + pthread_join(thread_id2, NULL); + + fprintf(stdout, "Ready.\n"); + + return 0; +}
reconf+16 −0 addedRESOURCES+62 −0 added@@ -0,0 +1,62 @@ + _ _ ____ _ + Project ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + +This document has been introduced in order to let you find documents that +specify standards used by curl, software that extends curl and web pages with +"competing" utilities. + +Standards + + RFC 959 - Defines how FTP works + RFC 1738 - Uniform Resource Locators + RFC 1777 - defines the LDAP protocol + RFC 1808 - Relative Uniform Resource Locators + RFC 1867 - Form-based File Upload in HTML + + RFC 1950 - ZLIB Compressed Data Format Specification + RFC 1951 - DEFLATE Compressed Data Format Specification + RFC 1952 - gzip compression format + + RFC 1959 - LDAP URL syntax + RFC 2045-2049 - Everything you need to know about MIME! (needed for form + based upload) + RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616) + RFC 2109 - HTTP State Management Mechanism (cookie stuff) + - Also, read Netscape's specification at + http://www.netscape.com/newsref/std/cookie_spec.html + RFC 2183 - "The Content-Disposition Header Field" + RFC 2229 - "A Dictionary Server Protocol" + RFC 2231 - "MIME Parameter Value and Encoded Word Extensions: + Character Sets, Languages, and Continuations" + RFC 2388 - "Returning Values from Forms: multipart/form-data" + Use this as an addition to the 1867 + RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" + This one obsoletes 1738, but since 1738 is often mentioned I've left it + in this list. + RFC 2428 - "FTP Extensions for IPv6 and NATs" + This should be considered when introducing IPv6 awareness. + RFC 2616 - HTTP 1.1 + RFC 2617 - HTTP Authentication + +Compilers + + MingW32 - http://www.xraylith.wisc.edu/~khan/software/gnu-win32/index.html + +Software + + OpenSSL - http://www.openssl.org + OpenLDAP - http://www.openldap.org + zlib - http://www.cdrom.com/pub/infozip/zlib/ + +Competitors + + wget - ftp://prep.ai.mit.edu/pub/gnu/ + snarf - http://www.xach.com/snarf/ + lynx - http://lynx.browser.org/ (well at least when -dump is used) + swebget - http://www.uni-hildesheim.de/~smol0075/swebget/ + fetch - ? +
src/config.h+13 −0 addedsrc/config.h.in+12 −0 addedsrc/config-win32.h+12 −0 addedsrc/curl+0 −0 addedsrc/hugehelp.c+1049 −0 addedsrc/main.c+1154 −0 addedsrc/Makefile+334 −0 addedsrc/Makefile.am+27 −0 addedsrc/Makefile.in+334 −0 addedsrc/Makefile.m32+65 −0 addedsrc/Makefile.vc6+68 −0 addedsrc/mkhelp.pl+85 −0 addedsrc/setup.h+91 −0 addedsrc/stamp-h2+1 −0 addedsrc/stamp-h2.in+1 −0 addedsrc/urlglob.c+332 −0 addedsrc/urlglob.h+74 −0 addedsrc/version.h+3 −0 addedstamp-h+1 −0 addedstamp-h1+1 −0 addedstamp-h1.in+1 −0 addedstamp-h.in+1 −0 addedTODO+87 −0 added@@ -0,0 +1,87 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +TODO + + Ok, this is what I wanna do with Curl. Please tell me what you think, and + please don't hesitate to contribute and send me patches that improve this + product! (Yes, you may add things not mentioned here, these are just a + few teasers...) + + * rtsp:// support -- "Real Time Streaming Protocol" + + RFC 2326 + + * "Content-Encoding: compress/gzip/zlib" + + HTTP 1.1 clearly defines how to get and decode compressed documents. There + is the zlib that is pretty good at decompressing stuff. This work was + started in October 1999 but halted again since it proved more work than we + thought. It is still a good idea to implement though. + + * HTTP Pipelining/persistant connections + + - I'm gonna introduce HTTP "pipelining". Curl should be able + to request for several HTTP documents in one connect. It is the beginning + for supporing more advanced functions in the future, like web site + mirroring. This will require that the urlget() function supports several + documents from a single HTTP server, which it doesn't today. + + - When curl supports fetching several documents from the same + server using pipelining, I'd like to offer that function to the command + line. Anyone has a good idea how? The current way of specifying one URL + with the output sent to the stdout or a file gets in the way. Imagine a + syntax that supports "additional documents from the same server" in a way + similar to: + + curl <main URL> --more-doc <path> --more-doc <path> + + where --more-doc specifies another document on the same server. Where are + the output files gonna be put and how should they be named? Should each + "--more-doc" parameter require a local file name to store the result in? + Like "--more-file" as in: + + curl <URL> --more-doc <path> --more-file <file> + + * RFC2617 compliance, "Digest Access Authentication" + A valid test page seem to exist at: + http://hopf.math.nwu.edu/testpage/digest/ + And some friendly person's server source code is available at + http://hopf.math.nwu.edu/digestauth/index.html + + Then there's the Apache mod_digest source code too of course. + It seems as if Netscape doesn't support this, and not many servers + do. Although this is a lot better authentication method than the more + common "Basic". Basic sends the password in cleartext over the network, + this "Digest" method uses a challange-response protocol which increases + security quite a lot. + + * Different FTP Upload Through Web Proxy + I don't know any web proxies that allow CONNECT through on port 21, but + that would be the best way to do ftp upload. All we would need to do would + be to 'CONNECT <host>:<port> HTTP/1.0\r\n\r\n' and then do business as + usual. I least I think so. It would be fun if someone tried this... + + * Multiple Proxies? + Is there anyone that actually uses serial-proxies? I mean, send CONNECT to + the first proxy to connect to the second proxy to which you send CONNECT to + connect to the remote host (or even more iterations). Is there anyone + wanting curl to support it? (Not that it would be hard, just confusing...) + + * Other proxies + Ftp-kind proxy, Socks5, whatever kind of proxies are there? + + * IPv6 Awareness + Where ever it would fit. I am not that into v6 yet to fully grasp what we + would need to do, but letting the autoconf search for v6-versions of a few + functions and then use them instead is of course the first thing to do... + RFC 2428 "FTP Extensions for IPv6 and NATs" will be interesting. PORT + should be replaced with EPRT for IPv6, and EPSV instead of PASV. + + * An automatic RPM package maker + Please, write me a script that makes it. It'd make my day. + + * SSL for more protocols, like SSL-FTP...
Vulnerability mechanics
Root cause
"Missing integer overflow check in alloc_addbyter() when doubling the allocation size allows size_t wrap-around on 32-bit systems."
Attack vector
An attacker can trigger the double-free by causing `curl_maprintf()` to produce output large enough that the `size_t` multiplication `infop->alloc*2` wraps around to a small value (e.g., zero) [patch_id=2247607]. On 32-bit systems, after approximately 2 GB of formatted output, the wrap-around causes `realloc()` to allocate a tiny buffer while the internal length counter continues to grow, leading to a heap buffer overflow and subsequent double-free when the buffer is freed [ref_id=1]. The attacker does not need authentication; the bug is reachable through any libcurl API path that uses `curl_maprintf()` with attacker-controlled input.
Affected code
The vulnerable function is `alloc_addbyter()` in `lib/mprintf.c` [patch_id=2247607]. The function doubles the allocation size by computing `infop->alloc*2` without checking for integer wrap-around on 32-bit systems where `size_t` is 32 bits wide.
What the fix does
The patch in commit `8732ec40db652c53fa58cd13e` [patch_id=2247607] stores the doubled allocation size in a local variable `newsize` before calling `realloc()`. It then checks `if(newsize > infop->alloc)` to detect integer wrap-around; if the multiplication overflowed, `newsize` will be less than or equal to the original `alloc` value and `realloc()` is skipped, causing the function to return -1 (failure) instead of proceeding with a corrupted allocation size. The assignment `infop->alloc = newsize` is also moved after the check so that the stored allocation size is only updated when no overflow occurred.
Preconditions
- configThe target system must use 32-bit size_t (e.g., 32-bit platforms)
- inputThe attacker must be able to supply input that causes curl_maprintf() to produce a very large formatted string (approaching 2 GB)
- networkNo authentication required; the bug is reachable over the network if the application formats attacker-controlled data via curl_maprintf()
Generated on May 24, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.
References
9- access.redhat.com/errata/RHSA-2018:2486mitrevendor-advisoryx_refsource_REDHAT
- access.redhat.com/errata/RHSA-2018:3558mitrevendor-advisoryx_refsource_REDHAT
- security.gentoo.org/glsa/201701-47mitrevendor-advisoryx_refsource_GENTOO
- www.oracle.com/technetwork/security-advisory/cpuoct2018-4428296.htmlmitrex_refsource_CONFIRM
- www.securityfocus.com/bid/94098mitrevdb-entryx_refsource_BID
- www.securitytracker.com/id/1037192mitrevdb-entryx_refsource_SECTRACK
- bugzilla.redhat.com/show_bug.cgimitrex_refsource_CONFIRM
- curl.haxx.se/docs/adv_20161102D.htmlmitrex_refsource_CONFIRM
- www.tenable.com/security/tns-2016-21mitrex_refsource_CONFIRM
News mentions
0No linked articles in our index yet.