Programming and posix - April 2002

April 3, 2002
Solution Symposium
Page 18
hp e3000
programming
and posix
a cgi program - 1
Edit the source file:
shell/iX> cp hw.c hwcgi.c
shell/iX> vi hwcgi.c
#define _POSIX_SOURCE /* instead of -D */
#include <stdio.h>
main()
{
printf("Content-type: text/plain\n\n");
printf("hello world\n");
}
Compile and link the program:
shell/iX> gcc -o hwcgi hwcgi.c