Download Latest Version tpc-c-ifmx.tar.gz (392.7 kB)
Email in envelope

Get an email when there's a new version of IIUG Software Repository

Name Modified Size InfoDownloads / Week
Parent folder
i4glcgi-1.00 2020-05-11
i4glcgi.examples-1.00 2019-03-17
i4glcgi.pdf 2020-05-11 109.8 kB
README 2020-05-11 3.1 kB
Totals: 4 Items   112.9 kB 0
Notes on the I4GL CGI Library
-----------------------------

This distribution of the I4GL CGI interface code was collected from the
Informix web site (http://www.informix.com) on 18th March 1996.  The
software it contains appears to date from August 1995, judging from the
timestamps and version control information.  At that time (March 1996),
Informix distributed the source code for the I4GL CGI product -- this is
that version.

Subsequently (either later in 1996 or early 1997), Informix released a
binary-only version of this code, with bug fixes and Informix licencing
incorporated into it, but only for a limited selection of platforms.  Apart
from this README file, the software in this archive file is exactly as it
was in August 1995.

Be aware that the build process is not smooth on all platforms.  If you
are lucky, it will be easy.  If you are unlucky, it will not be easy.
For example, running on Solaris 2.6, it is not possible to simply type:
    make
and have the compile work.

A sequence which seems to do the job respectably is:

    # Generate the p-code and c-code makefiles (respectively)
    make -f makefile cgi_rds.mak lib4glcgi.mak

    # P-code (I4GL-RDS)
    make -f cgi_rds.mak rds debug

    # C-code (I4GL)
    make -f lib4glcgi.mak lib

Do not run 'make -f makefile'; the default target creates cgi_rds.mak and
lib4glcgi.mak and then tries to create the cgiufiles target.

Do not use either of the *.mak files without any target; the default target
is cgiufiles and it does some odd linking of source code.  Do not use
either of the *.mak files with the target all; it will compile, install and
cleanup the code.  Do not use either of the *.mak files with the install
target until you have managed to work out what they do -- good luck; I gave
up after 30 seconds of looking.

Even with this sequence, you can run into problems because the code uses a
weird mixture of ANSI C function declarations (prototypes) and K&R C
function definitions and declarations (non-prototypes), and some compilers
(eg GCC 2.8.1) object to the mismatches.

For example, the declaration of putenv() in cgiusr.h at line 170 is "int
putenv();" but the definition in cgisetenv.c at line 510 is "int
putenv(newval) char *newval;", and GCC 2.8.1 objects to this (not entirely
legitimately, but...).

$ make -f cgi_rds.mak rds
...
Compiling:  cgisetenv.c
cgisetenv.c: In function `putenv':
cgisetenv.c:510: argument `newval' doesn't match prototype
cgiusr.h:171: prototype declaration
*** Error code 1
make: Fatal error: Command failed for target `cgisetenv.o'
$

The patch file (patch.file) contains a set of unified diffs (accepted by
GNU Patch 2.5, the current version since August 1997; it will should work
with any version of patch from 2.1 onwards).  To apply the patch, use:

    patch -p0 < patch.file

Note that there are various (minor) coding problems which are not addressed
by this patch.  These include inline declarations for malloc() and friends.
However, with the patch applied, the code does compile on Solaris 2.6 under
GCC 2.8.1.

--

Notes prepared by Jonathan Leffler (jleffler@informix.com)
Last updated: 1998-08-26
Source: README, updated 2020-05-11