Skip to content

Commit

Permalink
Move event-config.h to include/event2
Browse files Browse the repository at this point in the history
This change means that all required include files are in event2, and
all files not in event2/* are optional.
  • Loading branch information
nmathewson committed Aug 7, 2010
1 parent 5fa30d2 commit ec347b9
Show file tree
Hide file tree
Showing 86 changed files with 100 additions and 97 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ libevent.pc
/missing
/stamp-h1

/include/event2/event-config.h

/sample/dns-example
/sample/event-test
/sample/hello-world
Expand Down
20 changes: 10 additions & 10 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,11 @@ if SIGNAL_SUPPORT
SYS_SRC += signal.c
endif

BUILT_SOURCES = event-config.h
BUILT_SOURCES = ./include/event2/event-config.h

event-config.h: config.h
echo '/* event-config.h' > $@
./include/event2/event-config.h: config.h
@MKDIR_P@ ./include/event2
echo '/* event2/event-config.h' > $@
echo ' *' >> $@
echo ' * This file was generated by autoconf when libevent was built, and post-' >> $@
echo ' * processed by Libevent so that its macros would have a uniform prefix.' >> $@
Expand All @@ -147,8 +148,8 @@ event-config.h: config.h
echo ' *' >> $@
echo ' * Do not rely on macros in this file existing in later versions.'>> $@
echo ' */' >> $@
echo '#ifndef _EVENT_CONFIG_H_' >> $@
echo '#define _EVENT_CONFIG_H_' >> $@
echo '#ifndef _EVENT2_EVENT_CONFIG_H_' >> $@
echo '#define _EVENT2_EVENT_CONFIG_H_' >> $@

sed -e 's/#define /#define _EVENT_/' \
-e 's/#undef /#undef _EVENT_/' \
Expand Down Expand Up @@ -201,20 +202,19 @@ noinst_HEADERS = util-internal.h mm-internal.h ipv6-internal.h \
minheap-internal.h log-internal.h evsignal-internal.h evmap-internal.h \
changelist-internal.h iocp-internal.h \
ratelim-internal.h \
WIN32-Code/event-config.h \
WIN32-Code/event2/event-config.h \
WIN32-Code/tree.h \
compat/sys/queue.h

include_HEADERS = event.h evhttp.h evdns.h evrpc.h evutil.h

nodist_include_HEADERS = event-config.h

INCLUDES = -I$(srcdir)/compat -I$(srcdir)/include $(SYS_INCLUDES)
INCLUDES = -I$(srcdir)/compat -I$(srcdir)/include -I./include $(SYS_INCLUDES)

verify: check

doxygen: FORCE
doxygen $(srcdir)/Doxyfile
FORCE:

DISTCLEANFILES = *~ event-config.h libevent.pc
DISTCLEANFILES = *~ libevent.pc ./include/event2/event-config.h

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* event-config.h
/* event2/event-config.h
*
* This file was generated by autoconf when libevent was built, and post-
* processed by Libevent so that its macros would have a uniform prefix.
Expand Down
4 changes: 2 additions & 2 deletions buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#ifdef WIN32
#include <winsock2.h>
Expand Down Expand Up @@ -82,7 +82,7 @@
#include "event2/bufferevent_compat.h"
#include "event2/bufferevent_struct.h"
#include "event2/thread.h"
#include "event-config.h"
#include "event2/event-config.h"
#include "log-internal.h"
#include "mm-internal.h"
#include "util-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion buffer_iocp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include "event2/buffer_compat.h"
#include "event2/util.h"
#include "event2/thread.h"
#include "event-config.h"
#include "event2/event-config.h"
#include "util-internal.h"
#include "evthread-internal.h"
#include "evbuffer-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion bufferevent-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extern "C" {
#endif

#include "event-config.h"
#include "event2/event-config.h"
#include "evutil.h"
#include "defer-internal.h"
#include "evthread-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion bufferevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include <sys/types.h>

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include <sys/types.h>

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_openssl.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <sys/types.h>

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_pair.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <winsock2.h>
#endif

#include "event-config.h"
#include "event2/event-config.h"

#include "event2/util.h"
#include "event2/buffer.h"
Expand Down
2 changes: 1 addition & 1 deletion bufferevent_sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

#include <sys/types.h>

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TIME_H
#include <sys/time.h>
Expand Down
1 change: 1 addition & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dnl Checks for programs.
AC_PROG_CC
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MKDIR_P

AC_PROG_GCC_TRADITIONAL

Expand Down
2 changes: 1 addition & 1 deletion defer-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extern "C" {
#endif

#include "event-config.h"
#include "event2/event-config.h"
#include <sys/queue.h>

struct deferred_cb;
Expand Down
2 changes: 1 addition & 1 deletion devpoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#include <sys/types.h>
#include <sys/resource.h>
Expand Down
2 changes: 1 addition & 1 deletion epoll.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#include <stdint.h>
#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion evbuffer-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
extern "C" {
#endif

#include "event-config.h"
#include "event2/event-config.h"
#include "event2/util.h"
#include "util-internal.h"
#include "defer-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion evdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*/

#include <sys/types.h>
#include "event-config.h"
#include "event2/event-config.h"

#ifndef _FORTIFY_SOURCE
#define _FORTIFY_SOURCE 3
Expand Down
2 changes: 1 addition & 1 deletion event-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
extern "C" {
#endif

#include "event-config.h"
#include "event2/event-config.h"
#include <sys/queue.h>
#include "event2/event_struct.h"
#include "minheap-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion event.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#ifdef WIN32
#include <winsock2.h>
Expand Down
2 changes: 1 addition & 1 deletion event.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
extern "C" {
#endif

#include <event-config.h>
#include <event2/event-config.h>
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion event_rpcgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ def BodyPreamble(self, name, header_file):
pre += ( '#include <stdlib.h>\n'
'#include <string.h>\n'
'#include <assert.h>\n'
'#include <event-config.h>\n'
'#include <event2/event-config.h>\n'
'#include <event2/event.h>\n'
'#include <event2/buffer.h>\n'
'#include <event2/tag.h>\n\n'
Expand Down
2 changes: 1 addition & 1 deletion event_tagging.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion evmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#ifdef WIN32
#include <winsock2.h>
Expand Down
2 changes: 1 addition & 1 deletion evport.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
* As in the select(2) implementation, signals are handled by evsignal.
*/

#include "event-config.h"
#include "event2/event-config.h"

#include <sys/time.h>
#include <sys/queue.h>
Expand Down
2 changes: 1 addition & 1 deletion evrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#ifdef WIN32
#define WIN32_LEAN_AND_MEAN
Expand Down
2 changes: 1 addition & 1 deletion evthread-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extern "C" {
#endif

#include <event2/thread.h>
#include "event-config.h"
#include "event2/event-config.h"
#include "util-internal.h"

struct event_base;
Expand Down
2 changes: 1 addition & 1 deletion evthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#ifndef _EVENT_DISABLE_THREAD_SUPPORT

Expand Down
2 changes: 1 addition & 1 deletion evthread_pthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

/* With glibc we need to define this to get PTHREAD_MUTEX_RECURSIVE. */
#define _GNU_SOURCE
Expand Down
2 changes: 1 addition & 1 deletion evthread_win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "event-config.h"
#include "event2/event-config.h"

#ifdef WIN32
#include <winsock2.h>
Expand Down
2 changes: 1 addition & 1 deletion evutil.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#define _GNU_SOURCE

Expand Down
2 changes: 1 addition & 1 deletion evutil_rand.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
* so that other people can rip it out and use it for whatever.
*/

#include "event-config.h"
#include "event2/event-config.h"

#include "util-internal.h"
#include "evthread-internal.h"
Expand Down
2 changes: 1 addition & 1 deletion http.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include "event-config.h"
#include "event2/event-config.h"

#ifdef _EVENT_HAVE_SYS_PARAM_H
#include <sys/param.h>
Expand Down
2 changes: 1 addition & 1 deletion include/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ EVENT2_EXPORT = \

EXTRA_SRC = $(EVENT2_EXPORT)

nobase_include_HEADERS = $(EVENT2_EXPORT)
nobase_include_HEADERS = $(EVENT2_EXPORT) ./event2/event-config.h

2 changes: 1 addition & 1 deletion include/event2/buffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
extern "C" {
#endif

#include <event-config.h>
#include <event2/event-config.h>
#include <stdarg.h>
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
Expand Down
2 changes: 1 addition & 1 deletion include/event2/bufferevent.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
extern "C" {
#endif

#include <event-config.h>
#include <event2/event-config.h>
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/event2/bufferevent_ssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
OpenSSL support for bufferevents.
*/

#include <event-config.h>
#include <event2/event-config.h>
#include <event2/bufferevent.h>
#include <event2/util.h>

Expand Down
2 changes: 1 addition & 1 deletion include/event2/bufferevent_struct.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
extern "C" {
#endif

#include <event-config.h>
#include <event2/event-config.h>
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/event2/dns_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
extern "C" {
#endif

#include <event-config.h>
#include <event2/event-config.h>
#ifdef _EVENT_HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
Expand Down
Loading

0 comments on commit ec347b9

Please sign in to comment.