Porting libcurl to OS/400
Date: Wed, 13 Jun 2007 12:12:43 +0200
Hard job: this is an EBCDIC machine, without the regular development
environment, and mainly based on a database (not a filesystem)...
I have been able to compile libcurl in ASCII mode, via special build
files (shell scripts), and very few updates to C sources:
_ structure fields "fread", "fwrite" and "ioctl" have been renamed to
"fread_func", fwrite_func" and "ioctl_func" respectively to avoid a name
clash with the library procedures (OS/400 C ASCII wrapper redefines them
to the preprocessor)
_ A "#if" has been changed to "#ifdef'; restoring the initial intention.
_ C standard functions redefined for mprintf are now previously
"#undef"ined, to prevent double definition (this was the case with the C
_ The ILE/C400 compiler has been added to the current list to define
_ Conditional "HAVE_INT_INET_NTOA_R" has been introduced, because
"inet_ntoa_r" returns an int on OS/400.
_ New OS specific file os400sys.c features ASCII wrappers for functions
getaddrinfo() and getnameinfo(), that are not implemented in ASCII mode
_ config-os400.h defines the configuration for OS/400 and is now
conditionally included by "setup.h"
_ makefile-os400.sh is a tunable shell script to build everything for
OS/400... No make/autotools on OS/400!
Neither EBCDIC nor SSL support yet...
The entry point export list is taken from libcurl.imp, but this list
does not seem up to date.
Note to OS400 users: no way to put sources in an OS/400 DB, because some
source lines are too long: you have to compile from IFS.
Since I plan to carry on with porting this package, I may also put all
the OS/400-specific stuff in a separate new directory... Any preferences
- application/octet-stream attachment: curl-20070612CVS-os400.patch