pkgsrc/www/cgic/patches/patch-ae

35 lines
1.5 KiB
Text
Raw Normal View History

$NetBSD: patch-ae,v 1.2 2006/01/06 22:46:51 adam Exp $
--- cgic.html.orig 2004-11-15 17:59:19.000000000 +0100
+++ cgic.html
@@ -378,6 +378,29 @@ cgic.c to your project?</strong>
If none of the above proves effective, please see the
section regarding <a href="#support">support</a>.
<h3><a name="howto">How to write a cgic application</a></h3>
+
+<strong><em>Important Note for NetBSD packages users from the package maintainer: </em>
+<p>
+This section does not work for users of cgic who have it installed via
+a NetBSD package. While mostly true, there are several very important
+differences which were created during the port to the NetBSD pkgsrc
+environment:
+
+<ul>
+<li> Linking is now done against libcgic instead of cgic.c itself. This
+ is done by adding a "-lcgic" and other command line options as needed
+ when linking.
+<li> The application must now provide its own main() function, which calls the
+ cgiInit() function before any of the other functions are called. This
+ function returns 0 upon success, and -1 upon failure. It also registers
+ a function, cgiFreeResources(), via atexit() to be called at exit time.
+</ul>
+
+While this removes the ability to compile cgic with DEBUG defined, it
+aligns the cgic library with the model followed by other libraries.
+</strong>
+<p>
+
<em>Note: </em> All cgic applications must be linked to the cgic.c module
itself. How to do this depends on your operating system; under Unix,
just use the provided Makefile as an example.