/run
/bin
-/include/inspircd_config.h
-/include/inspircd_version.h
+/include/config.h
/src/modules/m_geoip.cpp
/src/modules/m_ldapauth.cpp
sub writefiles {
my($writeheader) = @_;
- # First File.. inspircd_config.h
+ # First File.. config.h
chomp(my $incos = `uname -n -s -r`);
chomp(my $version = `sh src/version.sh`);
chomp(my $revision2 = getrevision());
}
if ($writeheader == 1)
{
- print "Writing \e[1;32minspircd_config.h\e[0m\n";
- open(FILEHANDLE, ">include/inspircd_config.h.tmp");
+ print "Writing \e[1;32mconfig.h\e[0m\n";
+ open(FILEHANDLE, ">include/config.h.tmp");
print FILEHANDLE <<EOF;
/* Auto generated by configure, do not modify! */
#ifndef __CONFIGURATION_AUTO__
#define __CONFIGURATION_AUTO__
-/* this is for windows support. */
-#define CoreExport /**/
-#define DllExport /**/
+#define BRANCH "$branch"
+#define VERSION "$version"
+#define REVISION "$revision2"
+#define SYSTEM "$incos"
#define CONFIG_PATH "$config{CONFIG_DIR}"
#define DATA_PATH "$config{DATA_DIR}"
}
print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n";
close(FILEHANDLE);
-
- open(FILEHANDLE, ">include/inspircd_version.h.tmp");
- print FILEHANDLE <<EOF;
-#define BRANCH "$branch"
-#define VERSION "$version"
-#define REVISION "$revision2"
-#define SYSTEM "$incos"
-EOF
- close FILEHANDLE;
-
- for my $file (qw(include/inspircd_config.h include/inspircd_version.h)) {
- my $diff = 0;
- open my $fh1, $file or $diff = 1;
- open my $fh2, $file.'.tmp' or die "Can't read $file.tmp that we just wrote: $!";
- while (!$diff) {
- my $line1 = <$fh1>;
- my $line2 = <$fh2>;
- if (defined($line1) != defined($line2)) {
- $diff = 1;
- } elsif (!defined $line1) {
- last;
- } else {
- $diff = ($line1 ne $line2);
- }
- }
- if ($diff) {
- unlink $file;
- rename "$file.tmp", $file;
+
+ my $file = 'include/config.h';
+ my $diff = 0;
+ open my $fh1, $file or $diff = 1;
+ open my $fh2, $file.'.tmp' or die "Can't read $file.tmp that we just wrote: $!";
+ while (!$diff) {
+ my $line1 = <$fh1>;
+ my $line2 = <$fh2>;
+ if (defined($line1) != defined($line2)) {
+ $diff = 1;
+ } elsif (!defined $line1) {
+ last;
} else {
- unlink "$file.tmp";
+ $diff = ($line1 ne $line2);
}
}
+ if ($diff) {
+ unlink $file;
+ rename "$file.tmp", $file;
+ } else {
+ unlink "$file.tmp";
+ }
}
# Write all .in files.
#include <bitset>
#include <set>
#include <time.h>
-#include "inspircd_config.h"
-#include "inspircd_version.h"
+#include "config.h"
#include "typedefs.h"
#include "consolecolors.h"
#ifndef INSPSTRING_H
#define INSPSTRING_H
-// This (inspircd_config) is needed as inspstring doesn't pull in the central header
-#include "inspircd_config.h"
+// This (config) is needed as inspstring doesn't pull in the central header
+#include "config.h"
#include <cstring>
//#include <cstddef>
#include <vector>
#include <string>
#include <map>
-#include "inspircd_config.h"
+#include "config.h"
#include "socket.h"
#include "base.h"
#include <vector>
#include <string>
#include <map>
-#include "inspircd_config.h"
+#include "config.h"
#include "base.h"
class ThreadData;
#ifndef THREADENGINE_WIN32_H
#define THREADENGINE_WIN32_H
-#include "inspircd_config.h"
+#include "config.h"
#include "base.h"
class Thread;
while (<$in>) {
if (/^\s*#\s*include\s*"([^"]+)"/) {
my $inc = $1;
- next if $inc eq 'inspircd_version.h' && $f eq '../include/inspircd.h';
+ next if $inc eq 'config.h' && $f eq '../include/inspircd.h';
my $found = 0;
for my $loc ("$basedir/$inc", "../include/$inc") {
next unless -e $loc;
rm -f .config.cache
rm -f BSDmakefile
rm -f GNUmakefile
- rm -f include/inspircd_config.h
- rm -f include/inspircd_version.h
+ rm -f include/config.h
rm -f inspircd
-rm -f org.inspircd.plist
/* $Core */
#include "inspircd.h"
-#include "inspircd_version.h"
#include <signal.h>
#ifndef _WIN32
#include <signal.h>
#include "exitcodes.h"
#include "inspircd.h"
-#include "inspircd_version.h"
void InspIRCd::SignalHandler(int signal)
{
*/
-#include "inspircd.h"
-#include "exitcodes.h"
-
#ifndef SOCKETENGINE_POLL
#define SOCKETENGINE_POLL
#include <vector>
#include <string>
#include <map>
-#include "inspircd_config.h"
+#include "config.h"
#include "inspircd.h"
#include "socketengine.h"
#include <vector>
#include <string>
#include <map>
-#include "inspircd_config.h"
#include "inspircd.h"
#include "socketengine.h"
#include <port.h>
*/
-#include "inspircd_config.h"
-
#include "inspircd.h"
#include "socketengine.h"
endif(MSVC)
configure_file("${INSPIRCD_BASE}/win/inspircd.rc.cmake" "${INSPIRCD_BASE}/win/inspircd.rc")
-configure_file("${INSPIRCD_BASE}/win/inspircd_version.h.cmake" "${INSPIRCD_BASE}/win/inspircd_version.h")
-configure_file("${INSPIRCD_BASE}/win/inspircd_config.h.cmake" "${INSPIRCD_BASE}/win/inspircd_config.h")
+configure_file("${INSPIRCD_BASE}/win/config.h.cmake" "${INSPIRCD_BASE}/win/config.h")
add_executable(inspircd ${INSPIRCD_SOURCES} "${INSPIRCD_BASE}/win/inspircd.rc")
target_link_libraries(inspircd win32_memory)
--- /dev/null
+#ifndef INSPIRCD_CONFIG_H\r
+#define INSPIRCD_CONFIG_H\r
+\r
+#define BRANCH "@MAJOR_VERSION@.@MINOR_VERSION@"\r
+#define VERSION "@FULL_VERSION@"\r
+#define REVISION "0"\r
+#define SYSTEM "@CMAKE_SYSTEM@"\r
+\r
+#define CONFIG_PATH "@CONF_PATH@"\r
+#define MOD_PATH "@MODULE_PATH@"\r
+#define DATA_PATH "@DATA_PATH@"\r
+#define LOG_PATH "@LOG_PATH@"\r
+#define MAXBUF 514\r
+\r
+#include "inspircd_win32wrapper.h"\r
+#include "threadengines/threadengine_win32.h"\r
+\r
+#endif
\ No newline at end of file
+++ /dev/null
-#ifndef INSPIRCD_CONFIG_H\r
-#define INSPIRCD_CONFIG_H\r
-\r
-#define CONFIG_PATH "@CONF_PATH@"\r
-#define MOD_PATH "@MODULE_PATH@"\r
-#define DATA_PATH "@DATA_PATH@"\r
-#define LOG_PATH "@LOG_PATH@"\r
-#define MAXBUF 514\r
-\r
-#include "inspircd_win32wrapper.h"\r
-#include "threadengines/threadengine_win32.h"\r
-\r
-#endif
\ No newline at end of file
+++ /dev/null
-#define BRANCH "@MAJOR_VERSION@.@MINOR_VERSION@"\r
-#define VERSION "@FULL_VERSION@"\r
-#define REVISION "0"\r
-#define SYSTEM "@CMAKE_SYSTEM@"
\ No newline at end of file
*/
-#include "inspircd_config.h"
+#include "config.h"
#include "inspircd.h"
#include "exitcodes.h"
#include <windows.h>