libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 16d0362f4f0ca069d4c5d7409ff402efbbd1d7b9
parent efc8c3cc538f6172246e89998ac22a1e655f7df1
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 10 Jan 2007 03:48:35 +0000

stuff

Diffstat:
Mconfigure.ac | 20++++++++++++++++++--
Mdoc/Makefile.am | 2+-
Adoc/libmicrohttpd.3 | 28++++++++++++++++++++++++++++
Asrc/Makefile.am | 1+
Asrc/daemon/Makefile.am | 28++++++++++++++++++++++++++++
Asrc/daemon/daemon.c | 29+++++++++++++++++++++++++++++
Msrc/include/microhttpd.h | 5++---
7 files changed, 107 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac @@ -37,6 +37,7 @@ AC_PROG_MAKE_SET AC_CANONICAL_HOST AM_PROG_LIBTOOL +# set GCC options CFLAGS="-Wall -Werror $CFLAGS" # use '-fno-strict-aliasing', but only if the compiler can take it if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; @@ -100,7 +101,15 @@ AC_SUBST(PTHREAD_CPPFLAGS) AC_CHECK_MEMBER(pthread_t.p, AC_DEFINE(HAVE_NEW_PTHREAD_T, 1, [Define if you have a post 11/2004 pthread library]), , [#include <pthread.h>]) -# large file support + +# libcurl (required for testing) +SAVE_LIBS=$LIBS +LIBCURL_CHECK_CONFIG(,,curl=1,curl=0) +AM_CONDITIONAL(HAVE_CURL, test x$curl = x1) +$LIBS=$SAVE_LIBS + + +# large file support (> 4 GB) AC_SYS_LARGEFILE AC_FUNC_FSEEKO @@ -113,5 +122,12 @@ AC_SUBST(EXT_LIBS) AC_CONFIG_FILES([ Makefile doc/Makefile -src/Makefile]) +src/Makefile +src/include/Makefile +src/daemon/Makefile]) AC_OUTPUT + +if test "$curl" != 1 +then + AC_MSG_NOTICE([WARNING: libcurl not found, testcases cannot be built.]) +fi diff --git a/doc/Makefile.am b/doc/Makefile.am @@ -1,2 +1,2 @@ -man_MANS = extract.1 libextractor.3 +man_MANS = libmicrohttpd.3 EXTRA_DIST = $(man_MANS) diff --git a/doc/libmicrohttpd.3 b/doc/libmicrohttpd.3 @@ -0,0 +1,28 @@ +.TH LIBMICROHTTPD 3 "Jan 12, 2007" +.SH NAME +libmicrohttpd \- description 0.0.0 +.SH SYNOPSIS + +\fB#include <microhttpd.h> + +Insert API here. + +.SH DESCRIPTION +.P +Insert API description here. + +.P +.SH "SEE ALSO" +fixme(1) + +.SH LEGAL NOTICE +libmicrohttpd is released under the GPL. + +.SH BUGS +None, of course. + +.SH AUTHORS +libmicrohttpd was originally designed by Christian Grothoff <christian@grothoff.org> and Chris GauthierDickey <chrisg@cs.du.edu>. + +.SH AVAILABILITY +You can obtain the latest version from http://gnunet.org/libmicrohttpd/. diff --git a/src/Makefile.am b/src/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = include daemon . diff --git a/src/daemon/Makefile.am b/src/daemon/Makefile.am @@ -0,0 +1,27 @@ +SUBDIRS = . + +INCLUDES = -I$(top_srcdir)/src/include + +lib_LTLIBRARIES = \ + libmicrohttpd.la + +libmicrohttpd_la_LDFLAGS = \ + -export-dynamic -version-info 0:0:0 +# libmicrohttpd_la_LIBADD = \ +# -lm +libmicrohttpd_la_SOURCES = \ + daemon.c + +# No curl, not testcases +if HAVE_CURL + +check_PROGRAMS = \ + testdaemon + +test_daemon_SOURCES = \ + testdaemon.c +test_daemon_LDADD = \ + $(top_builddir)/src/daemon/libmicrohttpd.la \ + @LIBCURL@ + +endif +\ No newline at end of file diff --git a/src/daemon/daemon.c b/src/daemon/daemon.c @@ -0,0 +1,29 @@ +/* + This file is part of libmicrohttpd + (C) 2007 YOUR NAME HERE + + libmicrohttpd is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + libmicrohttpd is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with libmicrohttpd; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +/** + * @file daemon.c + * @brief FIXME + * @author FIXME + */ + +#include "config.h" +#include "microhttpd.h" + diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h @@ -1,6 +1,6 @@ /* This file is part of libmicrohttpd - (C) 2006 Christian Grothoff (and other contributing authors) + (C) 2006, 2007 Christian Grothoff (and other contributing authors) libmicrohttpd is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published @@ -31,8 +31,7 @@ * thread-safe.<p> * * TODO: - * - Is it ok to treat POST data and GET-URI arguments (a=4&b=5) equally, - * or do we need an extra pair of methods? + * - proper API for file uploads via HTTP * - We probably need a significantly more extensive API for * proper SSL support (set local certificate, etc.) */