Skip to content

Commit

Permalink
Use autoheader
Browse files Browse the repository at this point in the history
This commit adds a zncconfig.h to ZNC that is automatically generated by
configure. This is done because the -DPACKAGE_STRING=\"znc\ 0.097\" that
configure adds to CXXFLAGS breaks znc-buildmod.

This means that we have to include zncconfig.h as the very first header in every
C++ file that is compiled. This commit kinda cheats and instead adds this
include as the very first thing to all header files we have. This should
hopefully mean that modules don't have to include this.

Because Csocket includes defines.h too late, this commit causes znc to divert
from upstream Csocket once again. :(


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2250 726aef4b-f618-498e-8847-2d620e286838
  • Loading branch information
psychon committed Jan 7, 2011
1 parent 40a1bba commit 3ecbf13
Show file tree
Hide file tree
Showing 27 changed files with 194 additions and 42 deletions.
1 change: 1 addition & 0 deletions Buffer.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _BUFFER_H
#define _BUFFER_H

#include "zncconfig.h"
#include "ZNCString.h"
#include <deque>

Expand Down
1 change: 1 addition & 0 deletions Chan.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _CHAN_H
#define _CHAN_H

#include "zncconfig.h"
#include "FileUtils.h"
#include "Nick.h"
#include "ZNCString.h"
Expand Down
1 change: 1 addition & 0 deletions Client.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _CLIENT_H
#define _CLIENT_H

#include "zncconfig.h"
#include "Socket.h"
#include "Utils.h"
#include "main.h"
Expand Down
3 changes: 3 additions & 0 deletions Csocket.h
Expand Up @@ -34,6 +34,9 @@

#ifndef _HAS_CSOCKET_
#define _HAS_CSOCKET_

#include "zncconfig.h"

#include <stdio.h>
#include <unistd.h>
#include <sys/time.h>
Expand Down
1 change: 1 addition & 0 deletions DCCBounce.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _DCCBOUNCE_H
#define _DCCBOUNCE_H

#include "zncconfig.h"
#include "Socket.h"

class CUser;
Expand Down
1 change: 1 addition & 0 deletions DCCSock.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _DCCSOCK_H
#define _DCCSOCK_H

#include "zncconfig.h"
#include "FileUtils.h"

// Forward Declarations
Expand Down
1 change: 1 addition & 0 deletions FileUtils.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _FILEUTILS_H
#define _FILEUTILS_H

#include "zncconfig.h"
#include "Socket.h"
#include "ZNCString.h"
#include <dirent.h>
Expand Down
1 change: 1 addition & 0 deletions HTTPSock.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _HTTPSOCK_H
#define _HTTPSOCK_H

#include "zncconfig.h"
#include "Socket.h"

class CModule;
Expand Down
1 change: 1 addition & 0 deletions IRCSock.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _IRCSOCK_H
#define _IRCSOCK_H

#include "zncconfig.h"
#include "Socket.h"
#include "Nick.h"

Expand Down
1 change: 1 addition & 0 deletions Listener.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _LISTENER_H
#define _LISTENER_H

#include "zncconfig.h"
#include "znc.h"

// Forward Declarations
Expand Down
1 change: 1 addition & 0 deletions MD5.h
Expand Up @@ -3,6 +3,7 @@
#ifndef _MD5_H
#define _MD5_H

#include "zncconfig.h"
#include <string>
using std::string;

Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Expand Up @@ -15,7 +15,7 @@ includedir := @includedir@
sbindir := @sbindir@
localstatedir := @localstatedir@
CXX := @CXX@
CXXFLAGS := @DEFS@ @CPPFLAGS@ @CXXFLAGS@
CXXFLAGS := @DEFS@ @CPPFLAGS@ @CXXFLAGS@ -I.
LDFLAGS := @LDFLAGS@
LIBS := @LIBS@
LIBZNC := @LIBZNC@
Expand Down
1 change: 1 addition & 0 deletions Modules.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _MODULES_H
#define _MODULES_H

#include "zncconfig.h"
#include "WebModules.h"
#include "FileUtils.h"
#include "Utils.h"
Expand Down
1 change: 1 addition & 0 deletions Nick.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _NICK_H
#define _NICK_H

#include "zncconfig.h"
#include "ZNCString.h"
#include <set>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions SHA256.h
Expand Up @@ -37,6 +37,8 @@
#define SHA256_DIGEST_SIZE ( 256 / 8)
#define SHA256_BLOCK_SIZE ( 512 / 8)

#include "zncconfig.h"

// C99 defines stdint.h which defines a uint32_t and uint8_t type.
// But the other kids didn't want to play with poor little Solaris 9 and so he
// just defines these in inttypes.h which is also part of C99 and is supposed to
Expand Down
1 change: 1 addition & 0 deletions Server.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _SERVER_H
#define _SERVER_H

#include "zncconfig.h"
#include "ZNCString.h"

class CServer {
Expand Down
1 change: 1 addition & 0 deletions Socket.h
Expand Up @@ -9,6 +9,7 @@
#ifndef SOCKET_H
#define SOCKET_H

#include "zncconfig.h"
#include "Csocket.h"

class CModule;
Expand Down
1 change: 1 addition & 0 deletions Template.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _TEMPLATE_H
#define _TEMPLATE_H

#include "zncconfig.h"
#include "Utils.h"
#include <iostream>

Expand Down
1 change: 1 addition & 0 deletions User.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _USER_H
#define _USER_H

#include "zncconfig.h"
#include "Buffer.h"
#include "FileUtils.h"
#include "Modules.h"
Expand Down
1 change: 1 addition & 0 deletions Utils.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _UTILS_H
#define _UTILS_H

#include "zncconfig.h"
#include "ZNCString.h"
#include <assert.h>
#include <cstdio>
Expand Down
1 change: 1 addition & 0 deletions WebModules.h
Expand Up @@ -9,6 +9,7 @@
#ifndef _WEBMODULES_H
#define _WEBMODULES_H

#include "zncconfig.h"
#include "Client.h"
#include "Template.h"
#include "HTTPSock.h"
Expand Down
1 change: 1 addition & 0 deletions ZNCString.h
Expand Up @@ -9,6 +9,7 @@
#ifndef ZNCSTRING_H
#define ZNCSTRING_H

#include "zncconfig.h"
#include <map>
#include <set>
#include <string>
Expand Down

0 comments on commit 3ecbf13

Please sign in to comment.