summaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/Config.cs363
-rw-r--r--src/win32/anope_windows.h12
-rw-r--r--src/win32/dir/dir.cpp7
-rw-r--r--src/win32/dir/dir.h7
-rw-r--r--src/win32/dl/dl.cpp5
-rw-r--r--src/win32/dl/dl.h5
-rw-r--r--src/win32/pipe/pipe.cpp8
-rw-r--r--src/win32/pipe/pipe.h5
-rw-r--r--src/win32/pthread/pthread.cpp119
-rw-r--r--src/win32/pthread/pthread.h35
-rw-r--r--src/win32/resource.h10
-rw-r--r--src/win32/sigaction/sigaction.cpp17
-rw-r--r--src/win32/sigaction/sigaction.h28
-rw-r--r--src/win32/socket.cpp7
-rw-r--r--src/win32/socket.h5
-rw-r--r--src/win32/win32.rc.cmake2
-rw-r--r--src/win32/windows.cpp12
17 files changed, 60 insertions, 587 deletions
diff --git a/src/win32/Config.cs b/src/win32/Config.cs
deleted file mode 100644
index d7c9661ec..000000000
--- a/src/win32/Config.cs
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Config.cs - Windows Configuration
- *
- * (C) 2003-2016 Anope Team
- * Contact us at team@anope.org
- *
- * This program is free but copyrighted software; see the file COPYING for
- * details.
- *
- * Based on the original code of Epona by Lara.
- * Based on the original code of Services by Andy Church.
- *
- * Written by Scott <stealtharcher.scott@gmail.com>
- * Written by Adam <Adam@anope.org>
- * Cleaned up by Naram Qashat <cyberbotx@anope.org>
- *
- * Compile with: csc /out:../../Config.exe /win32icon:anope-icon.ico Config.cs
- */
-
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.IO;
-using System.Reflection;
-
-namespace Config
-{
- class Config
- {
- static string ExecutablePath, InstallDirectory, ExtraIncludeDirs, ExtraLibDirs, ExtraArguments;
- static bool UseNMake = true, BuildDebug = false;
-
- static bool CheckResponse(string InstallerResponse)
- {
- if (string.Compare(InstallerResponse, "yes", true) == 0 || string.Compare(InstallerResponse, "y", true) == 0)
- return true;
- return false;
- }
-
- static bool LoadCache()
- {
- try
- {
- string[] cache = File.ReadAllLines(string.Format(@"{0}\config.cache", ExecutablePath));
- if (cache.Length > 0)
- Console.WriteLine("Using defaults from config.cache");
- foreach (string line in cache)
- {
- int e = line.IndexOf('=');
- string name = line.Substring(0, e);
- string value = line.Substring(e + 1);
-
- if (name == "INSTDIR")
- InstallDirectory = value;
- else if (name == "DEBUG")
- BuildDebug = CheckResponse(value);
- else if (name == "USENMAKE")
- UseNMake = CheckResponse(value);
- else if (name == "EXTRAINCLUDE")
- ExtraIncludeDirs = value;
- else if (name == "EXTRALIBS")
- ExtraLibDirs = value;
- else if (name == "EXTRAARGS")
- ExtraArguments = value;
- }
-
- return true;
- }
- catch (Exception)
- {
- }
-
- return false;
- }
-
- static void SaveCache()
- {
- using (TextWriter tw = new StreamWriter(string.Format(@"{0}\config.cache", ExecutablePath)))
- {
- tw.WriteLine("INSTDIR={0}", InstallDirectory);
- tw.WriteLine("DEBUG={0}", BuildDebug ? "yes" : "no");
- tw.WriteLine("USENMAKE={0}", UseNMake ? "yes" : "no");
- tw.WriteLine("EXTRAINCLUDE={0}", ExtraIncludeDirs);
- tw.WriteLine("EXTRALIBS={0}", ExtraLibDirs);
- tw.WriteLine("EXTRAARGS={0}", ExtraArguments);
- }
- }
-
- static string HandleCache(int i)
- {
- switch (i)
- {
- case 0:
- Console.Write("[{0}] ", InstallDirectory);
- return InstallDirectory;
- case 1:
- Console.Write("[{0}] ", UseNMake ? "yes" : "no");
- return UseNMake ? "yes" : "no";
- case 2:
- Console.Write("[{0}] ", BuildDebug ? "yes" : "no");
- return BuildDebug ? "yes" : "no";
- case 3:
- Console.Write("[{0}] ", ExtraIncludeDirs);
- return ExtraIncludeDirs;
- case 4:
- Console.Write("[{0}] ", ExtraLibDirs);
- return ExtraLibDirs;
- case 5:
- Console.Write("[{0}] ", ExtraArguments);
- return ExtraArguments;
- default:
- break;
- }
-
- return null;
- }
-
- static string FindAnopeVersion()
- {
- if (!File.Exists(string.Format(@"{0}\src\version.sh", ExecutablePath)))
- return "Unknown";
-
- Dictionary<string, string> versions = new Dictionary<string, string>();
- string[] versionfile = File.ReadAllLines(string.Format(@"{0}\src\version.sh", ExecutablePath));
- foreach (string line in versionfile)
- if (line.StartsWith("VERSION_"))
- {
- string key = line.Split('_')[1].Split('=')[0];
- if (!versions.ContainsKey(key))
- versions.Add(key, line.Split('=')[1].Replace("\"", "").Replace("\'", ""));
- }
-
- try
- {
- if (versions.ContainsKey("BUILD"))
- return string.Format("{0}.{1}.{2}.{3}{4}", versions["MAJOR"], versions["MINOR"], versions["PATCH"], versions["BUILD"], versions["EXTRA"]);
- else
- return string.Format("{0}.{1}.{2}{3}", versions["MAJOR"], versions["MINOR"], versions["PATCH"], versions["EXTRA"]);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.Message);
- return "Unknown";
- }
- }
-
- static void RunCMake(string cMake)
- {
- Console.WriteLine("cmake {0}", cMake);
- try
- {
- ProcessStartInfo processStartInfo = new ProcessStartInfo("cmake")
- {
- RedirectStandardError = true,
- RedirectStandardOutput = true,
- UseShellExecute = false,
- Arguments = cMake
- };
- Process pCMake = Process.Start(processStartInfo);
- StreamReader stdout = pCMake.StandardOutput, stderr = pCMake.StandardError;
- string stdoutr, stderrr;
- List<string> errors = new List<string>();
- while (!pCMake.HasExited)
- {
- if ((stdoutr = stdout.ReadLine()) != null)
- Console.WriteLine(stdoutr);
- if ((stderrr = stderr.ReadLine()) != null)
- errors.Add(stderrr);
- }
- foreach (string error in errors)
- Console.WriteLine(error);
- Console.WriteLine();
- if (pCMake.ExitCode == 0)
- {
- if (UseNMake)
- Console.WriteLine("To compile Anope, run 'nmake'. To install, run 'nmake install'");
- else
- Console.WriteLine("To compile Anope, open Anope.sln and build the solution. To install, do a build on the INSTALL project");
- }
- else
- Console.WriteLine("There was an error attempting to run CMake! Check the above error message, and contact the Anope team if you are unsure how to proceed.");
- }
- catch (Exception e)
- {
- Console.WriteLine();
- Console.WriteLine(DateTime.UtcNow + " UTC: " + e.Message);
- Console.WriteLine("There was an error attempting to run CMake! Check the above error message, and contact the Anope team if you are unsure how to proceed.");
- }
- }
-
- static int Main(string[] args)
- {
- bool IgnoreCache = false, NoIntro = false, DoQuick = false;
-
- if (args.Length > 0)
- {
- if (args[0] == "--help")
- {
- Console.WriteLine("Config utility for Anope");
- Console.WriteLine("------------------------");
- Console.WriteLine("Syntax: .\\Config.exe [options]");
- Console.WriteLine("-nocache Ignore settings saved in config.cache");
- Console.WriteLine("-nointro Skip intro (disclaimer, etc)");
- Console.WriteLine("-quick or -q Skip questions, go straight to cmake");
- return 0;
- }
- else if (args[0] == "-nocache")
- IgnoreCache = true;
- else if (args[0] == "-nointro")
- NoIntro = true;
- else if (args[0] == "-quick" || args[0] == "-q")
- DoQuick = true;
- }
-
- ExecutablePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
-
- string AnopeVersion = FindAnopeVersion();
-
- if (!NoIntro && File.Exists(string.Format(@"{0}\.BANNER", ExecutablePath)))
- Console.WriteLine(File.ReadAllText(string.Format(@"{0}\.BANNER", ExecutablePath)).Replace("CURVER", AnopeVersion).Replace("For more options type SOURCE_DIR/Config --help", ""));
-
- Console.WriteLine("Press Enter to begin");
- Console.WriteLine();
- Console.ReadKey();
-
- bool UseCache = false;
-
- if (DoQuick || !IgnoreCache)
- {
- UseCache = LoadCache();
- if (DoQuick && !UseCache)
- {
- Console.WriteLine("Can't find cache file (config.cache), aborting...");
- return 1;
- }
- }
-
- if (!DoQuick)
- {
- List<string> InstallerQuestions = new List<string>()
- {
- "Where do you want Anope to be installed?",
- "Would you like to build using NMake instead of using Visual Studio?\r\nNOTE: If you decide to use NMake, you must be in an environment where\r\nNMake can function, such as the Visual Studio command line. If you say\r\nyes to this while not in an environment that can run NMake, it can\r\ncause the CMake configuration to enter an endless loop. [y/n]",
- "Would you like to build a debug version of Anope? [y/n]",
- "Are there any extra include directories you wish to use?\nYou may only need to do this if CMake is unable to locate missing dependencies without hints.\nSeparate directories with semicolons and use slashes (aka /) instead of backslashes (aka \\).\nIf you need no extra include directories, enter NONE in all caps.",
- "Are there any extra library directories you wish to use?\nYou may only need to do this if CMake is unable to locate missing dependencies without hints.\nSeparate directories with semicolons and use slashes (aka /) instead of backslashes (aka \\).\nIf you need no extra library directories, enter NONE in all caps.",
- "Are there any extra arguments you wish to pass to CMake?\nIf you need no extra arguments to CMake, enter NONE in all caps."
- };
-
- for (int i = 0; i < InstallerQuestions.Count; ++i)
- {
- Console.WriteLine(InstallerQuestions[i]);
- string CacheResponse = null;
- if (UseCache)
- CacheResponse = HandleCache(i);
- string InstallerResponse = Console.ReadLine();
- Console.WriteLine();
-
- if (!string.IsNullOrWhiteSpace(CacheResponse) && string.IsNullOrWhiteSpace(InstallerResponse))
- InstallerResponse = CacheResponse;
-
- // Question 4+ are optional
- if (i < 3 && string.IsNullOrWhiteSpace(InstallerResponse))
- {
- Console.WriteLine("Invalid option");
- --i;
- continue;
- }
-
- switch (i)
- {
- case 0:
- if (!Directory.Exists(InstallerResponse))
- {
- Console.WriteLine("Directory does not exist! Creating directory.");
- Console.WriteLine();
- try
- {
- Directory.CreateDirectory(InstallerResponse);
- InstallDirectory = InstallerResponse;
- }
- catch (Exception e)
- {
- Console.WriteLine("Unable to create directory: " + e.Message);
- --i;
- }
- }
- else if (File.Exists(InstallerResponse + @"\include\services.h"))
- {
- Console.WriteLine("You cannot use the Anope source directory as the target directory!");
- --i;
- }
- else
- InstallDirectory = InstallerResponse;
- break;
- case 1:
- UseNMake = CheckResponse(InstallerResponse);
- if (UseNMake)
- ++i;
- break;
- case 2:
- BuildDebug = CheckResponse(InstallerResponse);
- break;
- case 3:
- if (InstallerResponse == "NONE")
- ExtraIncludeDirs = null;
- else
- ExtraIncludeDirs = InstallerResponse;
- break;
- case 4:
- if (InstallerResponse == "NONE")
- ExtraLibDirs = null;
- else
- ExtraLibDirs = InstallerResponse;
- break;
- case 5:
- if (InstallerResponse == "NONE")
- ExtraArguments = null;
- else
- ExtraArguments = InstallerResponse;
- break;
- default:
- break;
- }
- }
- }
-
- Console.WriteLine("Anope will be compiled with the following options:");
- Console.WriteLine("Install directory: {0}", InstallDirectory);
- Console.WriteLine("Use NMake: {0}", UseNMake ? "Yes" : "No");
- Console.WriteLine("Build debug: {0}", BuildDebug ? "Yes" : "No");
- Console.WriteLine("Anope Version: {0}", AnopeVersion);
- Console.WriteLine("Extra Include Directories: {0}", ExtraIncludeDirs);
- Console.WriteLine("Extra Library Directories: {0}", ExtraLibDirs);
- Console.WriteLine("Extra Arguments: {0}", ExtraArguments);
- Console.WriteLine("Press Enter to continue...");
- Console.ReadKey();
-
- SaveCache();
-
- if (!string.IsNullOrWhiteSpace(ExtraIncludeDirs))
- ExtraIncludeDirs = string.Format("-DEXTRA_INCLUDE:STRING={0} ", ExtraIncludeDirs);
- else
- ExtraIncludeDirs = "";
- if (!string.IsNullOrWhiteSpace(ExtraLibDirs))
- ExtraLibDirs = string.Format("-DEXTRA_LIBS:STRING={0} ", ExtraLibDirs);
- else
- ExtraLibDirs = "";
- if (!string.IsNullOrWhiteSpace(ExtraArguments))
- ExtraArguments += " ";
- else
- ExtraArguments = "";
-
- InstallDirectory = "-DINSTDIR:STRING=\"" + InstallDirectory.Replace('\\', '/') + "\" ";
- string NMake = UseNMake ? "-G\"NMake Makefiles\" " : "";
- string Debug = BuildDebug ? "-DCMAKE_BUILD_TYPE:STRING=DEBUG " : "-DCMAKE_BUILD_TYPE:STRING=RELEASE ";
- string cMake = InstallDirectory + NMake + Debug + ExtraIncludeDirs + ExtraLibDirs + ExtraArguments + "\"" + ExecutablePath.Replace('\\', '/') + "\"";
- RunCMake(cMake);
-
- return 0;
- }
- }
-}
diff --git a/src/win32/anope_windows.h b/src/win32/anope_windows.h
index 14c83b4d4..061934752 100644
--- a/src/win32/anope_windows.h
+++ b/src/win32/anope_windows.h
@@ -1,7 +1,7 @@
/* POSIX emulation layer for Windows.
*
- * (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
- * (C) 2008-2016 Anope Team <team@anope.org>
+ * Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
+ * Copyright (C) 2008-2014 Anope Team <info@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -42,6 +42,13 @@
/* VS2008 hates having this define before its own */
#define vsnprintf _vsnprintf
+#define popen _popen
+#define pclose _pclose
+
+#define PATH_MAX MAX_PATH
+
+#define sleep(x) Sleep(x * 1000)
+
#define anope_close windows_close
#define stat _stat
@@ -56,7 +63,6 @@
#include "dir/dir.h"
#include "dl/dl.h"
#include "pipe/pipe.h"
-#include "pthread/pthread.h"
#include "sigaction/sigaction.h"
typedef int ssize_t;
diff --git a/src/win32/dir/dir.cpp b/src/win32/dir/dir.cpp
index d660c9694..16809bd9c 100644
--- a/src/win32/dir/dir.cpp
+++ b/src/win32/dir/dir.cpp
@@ -1,14 +1,13 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
#include "dir.h"
#include <stdio.h>
-
+
DIR *opendir(const char *path)
{
char real_path[MAX_PATH];
diff --git a/src/win32/dir/dir.h b/src/win32/dir/dir.h
index a6c9a055f..4d1433658 100644
--- a/src/win32/dir/dir.h
+++ b/src/win32/dir/dir.h
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -21,7 +20,7 @@ struct DIR
WIN32_FIND_DATA data;
bool read_first;
};
-
+
DIR *opendir(const char *);
dirent *readdir(DIR *);
int closedir(DIR *);
diff --git a/src/win32/dl/dl.cpp b/src/win32/dl/dl.cpp
index bdcbe636c..5b19d7441 100644
--- a/src/win32/dl/dl.cpp
+++ b/src/win32/dl/dl.cpp
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
diff --git a/src/win32/dl/dl.h b/src/win32/dl/dl.h
index 81c115fef..02a2f1d3d 100644
--- a/src/win32/dl/dl.h
+++ b/src/win32/dl/dl.h
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
diff --git a/src/win32/pipe/pipe.cpp b/src/win32/pipe/pipe.cpp
index 70690ab2b..676909b9a 100644
--- a/src/win32/pipe/pipe.cpp
+++ b/src/win32/pipe/pipe.cpp
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -56,6 +55,7 @@ int pipe(int fds[2])
fds[0] = cfd;
fds[1] = afd;
-
+
return 0;
}
+
diff --git a/src/win32/pipe/pipe.h b/src/win32/pipe/pipe.h
index d77d0706b..8e67bafc7 100644
--- a/src/win32/pipe/pipe.h
+++ b/src/win32/pipe/pipe.h
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
diff --git a/src/win32/pthread/pthread.cpp b/src/win32/pthread/pthread.cpp
deleted file mode 100644
index 36b8cd54d..000000000
--- a/src/win32/pthread/pthread.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/* POSIX emulation layer for Windows.
- *
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- */
-
-#include "pthread.h"
-
-struct ThreadInfo
-{
- void *(*entry)(void *);
- void *param;
-};
-
-static DWORD WINAPI entry_point(void *parameter)
-{
- ThreadInfo *ti = static_cast<ThreadInfo *>(parameter);
- ti->entry(ti->param);
- delete ti;
- return 0;
-}
-
-int pthread_attr_init(pthread_attr_t *)
-{
- /* No need for this */
- return 0;
-}
-
-int pthread_attr_setdetachstate(pthread_attr_t *, int)
-{
- /* No need for this */
- return 0;
-}
-
-int pthread_create(pthread_t *thread, const pthread_attr_t *, void *(*entry)(void *), void *param)
-{
- ThreadInfo *ti = new ThreadInfo;
- ti->entry = entry;
- ti->param = param;
-
- *thread = CreateThread(NULL, 0, entry_point, ti, 0, NULL);
- if (!*thread)
- {
- delete ti;
- return -1;
- }
-
- return 0;
-}
-
-int pthread_join(pthread_t thread, void **)
-{
- if (WaitForSingleObject(thread, INFINITE) == WAIT_FAILED)
- return -1;
- CloseHandle(thread);
- return 0;
-}
-
-void pthread_exit(int i)
-{
- ExitThread(i);
-}
-
-int pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *)
-{
- InitializeCriticalSection(mutex);
- return 0;
-}
-
-int pthread_mutex_destroy(pthread_mutex_t *mutex)
-{
- DeleteCriticalSection(mutex);
- return 0;
-}
-
-int pthread_mutex_lock(pthread_mutex_t *mutex)
-{
- EnterCriticalSection(mutex);
- return 0;
-}
-
-int pthread_mutex_trylock(pthread_mutex_t *mutex)
-{
- return !TryEnterCriticalSection(mutex);
-}
-
-int pthread_mutex_unlock(pthread_mutex_t *mutex)
-{
- LeaveCriticalSection(mutex);
- return 0;
-}
-
-int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *)
-{
- *cond = CreateEvent(NULL, false, false, NULL);
- if (*cond == NULL)
- return -1;
- return 0;
-}
-
-int pthread_cond_destroy(pthread_cond_t *cond)
-{
- return !CloseHandle(*cond);
-}
-
-int pthread_cond_signal(pthread_cond_t *cond)
-{
- return !PulseEvent(*cond);
-}
-
-int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
-{
- LeaveCriticalSection(mutex);
- WaitForSingleObject(*cond, INFINITE);
- EnterCriticalSection(mutex);
- return 0;
-}
diff --git a/src/win32/pthread/pthread.h b/src/win32/pthread/pthread.h
deleted file mode 100644
index 18909a17d..000000000
--- a/src/win32/pthread/pthread.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* POSIX emulation layer for Windows.
- *
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- */
-
-#include <Windows.h>
-
-typedef HANDLE pthread_t;
-typedef CRITICAL_SECTION pthread_mutex_t;
-typedef HANDLE pthread_cond_t;
-typedef int pthread_attr_t;
-typedef void pthread_mutexattr_t;
-typedef void pthread_condattr_t;
-
-#define PTHREAD_CREATE_JOINABLE 0
-
-extern int pthread_attr_init(pthread_attr_t *);
-extern int pthread_attr_setdetachstate(pthread_attr_t *, int);
-extern int pthread_create(pthread_t *, const pthread_attr_t *, void *(*)(void *), void *);
-extern int pthread_join(pthread_t, void **);
-extern void pthread_exit(int);
-
-extern int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *);
-extern int pthread_mutex_destroy(pthread_mutex_t *);
-extern int pthread_mutex_lock(pthread_mutex_t *);
-extern int pthread_mutex_trylock(pthread_mutex_t *);
-extern int pthread_mutex_unlock(pthread_mutex_t *);
-
-extern int pthread_cond_init(pthread_cond_t *, const pthread_condattr_t *);
-extern int pthread_cond_destroy(pthread_cond_t *);
-extern int pthread_cond_signal(pthread_cond_t *);
-extern int pthread_cond_wait(pthread_cond_t *, pthread_mutex_t *);
diff --git a/src/win32/resource.h b/src/win32/resource.h
index 0fb755b56..e4fa54b70 100644
--- a/src/win32/resource.h
+++ b/src/win32/resource.h
@@ -1,11 +1,3 @@
-/*
- *
- * (C) 2005-2016 Anope Team
- * Contact us at team@anope.org
- *
- * Please read COPYING and README for further details.
- */
-
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Win32GUI.rc
@@ -16,7 +8,7 @@
// Next default values for new objects
-//
+//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NO_MFC 1
diff --git a/src/win32/sigaction/sigaction.cpp b/src/win32/sigaction/sigaction.cpp
index 17faaf2fb..51615cf39 100644
--- a/src/win32/sigaction/sigaction.cpp
+++ b/src/win32/sigaction/sigaction.cpp
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -9,12 +8,12 @@
* Based on the original code of Services by Andy Church.
*/
-#include <windows.h>
-#include "sigaction.h"
-#include <signal.h>
+ #include <windows.h>
+ #include "sigaction.h"
+ #include <signal.h>
-int sigaction(int sig, struct sigaction *action, struct sigaction *old)
-{
+ int sigaction(int sig, struct sigaction *action, struct sigaction *old)
+ {
if (sig == -1)
return 0;
if (old == NULL)
@@ -28,4 +27,4 @@ int sigaction(int sig, struct sigaction *action, struct sigaction *old)
return -1;
}
return 0;
-}
+ }
diff --git a/src/win32/sigaction/sigaction.h b/src/win32/sigaction/sigaction.h
index c517ba16d..9e74eeffa 100644
--- a/src/win32/sigaction/sigaction.h
+++ b/src/win32/sigaction/sigaction.h
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -9,20 +8,21 @@
* Based on the original code of Services by Andy Church.
*/
-#define sigemptyset(x) memset((x), 0, sizeof(*(x)))
+ #define sigemptyset(x) memset((x), 0, sizeof(*(x)))
-#ifndef SIGHUP
-# define SIGHUP -1
-#endif
-#ifndef SIGPIPE
-# define SIGPIPE -1
-#endif
+ #ifndef SIGHUP
+ # define SIGHUP -1
+ #endif
+ #ifndef SIGPIPE
+ # define SIGPIPE -1
+ #endif
-struct sigaction
-{
+ struct sigaction
+ {
void (*sa_handler)(int);
int sa_flags;
int sa_mask;
-};
+ };
+
+ extern int sigaction(int, struct sigaction *, struct sigaction *);
-extern int sigaction(int, struct sigaction *, struct sigaction *);
diff --git a/src/win32/socket.cpp b/src/win32/socket.cpp
index 489192679..7f6ef4df1 100644
--- a/src/win32/socket.cpp
+++ b/src/win32/socket.cpp
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
@@ -86,7 +85,7 @@ int windows_inet_pton(int af, const char *src, void *dst)
}
return 1;
}
-
+
return 0;
}
diff --git a/src/win32/socket.h b/src/win32/socket.h
index a8064589e..d587618a9 100644
--- a/src/win32/socket.h
+++ b/src/win32/socket.h
@@ -1,7 +1,6 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2016 Anope Team
- * Contact us at team@anope.org
+ * Copyright (C) 2008-2014 Anope Team <team@anope.org>
*
* Please read COPYING and README for further details.
*/
diff --git a/src/win32/win32.rc.cmake b/src/win32/win32.rc.cmake
index 1e86c7e0d..4cca9d89d 100644
--- a/src/win32/win32.rc.cmake
+++ b/src/win32/win32.rc.cmake
@@ -54,7 +54,7 @@ BEGIN
VALUE "FileDescription", "Anope IRC Services"
VALUE "FileVersion", "@VERSION_FULL@"
VALUE "InternalName", "Anope"
- VALUE "LegalCopyright", "Copyright (C) 2003-2016 Anope Team"
+ VALUE "LegalCopyright", "Copyright (C) 2003-2014 Anope Team"
VALUE "OriginalFilename", "anope.exe"
VALUE "ProductName", "Anope"
VALUE "ProductVersion", "@VERSION_DOTTED@"
diff --git a/src/win32/windows.cpp b/src/win32/windows.cpp
index ac6801cba..f5bbde2f8 100644
--- a/src/win32/windows.cpp
+++ b/src/win32/windows.cpp
@@ -1,7 +1,7 @@
-/* POSIX emulation layer for Windows.
+ /* POSIX emulation layer for Windows.
*
- * (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
- * (C) 2008-2016 Anope Team <team@anope.org>
+ * Copyright (C) 2008-2011 Robin Burchell <w00t@inspircd.org>
+ * Copyright (C) 2008-2014 Anope Team <info@anope.org>
*
* Please read COPYING and README for further details.
*
@@ -73,10 +73,10 @@ int gettimeofday(timeval *tv, void *)
{
SYSTEMTIME st;
GetSystemTime(&st);
-
+
tv->tv_sec = Anope::CurTime;
tv->tv_usec = st.wMilliseconds;
-
+
return 0;
}
@@ -248,7 +248,7 @@ int mkstemp(char *input)
errno = EEXIST;
return -1;
}
-
+
int fd = open(input, O_WRONLY | O_CREAT, S_IREAD | S_IWRITE);
return fd;
}