summaryrefslogtreecommitdiff
path: root/www/cgic/patches/patch-ae
blob: 003ad48a4b39e8023b02d82c5938c2939f0e8804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
$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.