summaryrefslogtreecommitdiff
path: root/www/cgic/patches/patch-ae
blob: d548a8f53aac0e2f2c88b185e511e38bf70c640d (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.1.1.1 2004/07/20 21:44:29 jmmv Exp $

--- cgic.html.orig	Sun Jan 12 13:59:43 2003
+++ cgic.html
@@ -365,6 +365,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.