mirror of
https://github.com/inspircd/inspircd.git
synced 2025-03-09 18:49:03 -04:00
Get rid of entrypoint, specify the main function name directly.
This commit is contained in:
parent
ed95dcf44a
commit
507887f001
@ -51,7 +51,6 @@
|
||||
#if defined _WIN32
|
||||
# include "inspircd_win32wrapper.h"
|
||||
#else
|
||||
# define ENTRYPOINT int main(int argc, char** argv)
|
||||
# define DllExport __attribute__ ((visibility ("default")))
|
||||
# define CoreExport __attribute__ ((visibility ("default")))
|
||||
# include <unistd.h>
|
||||
|
@ -524,8 +524,6 @@ public:
|
||||
ClientProtocol::RFCEvents& GetRFCEvents() { return rfcevents; }
|
||||
};
|
||||
|
||||
ENTRYPOINT;
|
||||
|
||||
inline void stdalgo::cull_delete::operator()(Cullable* item)
|
||||
{
|
||||
if (item)
|
||||
|
@ -718,13 +718,11 @@ void InspIRCd::SetSignal(int signal)
|
||||
s_signal = signal;
|
||||
}
|
||||
|
||||
/* On posix systems, the flow of the program starts right here, with
|
||||
* ENTRYPOINT being a #define that defines main(). On Windows, ENTRYPOINT
|
||||
* defines smain() and the real main() is in the service code under
|
||||
* win32service.cpp. This allows the service control manager to control
|
||||
* the process where we are running as a windows service.
|
||||
*/
|
||||
ENTRYPOINT
|
||||
#ifdef _WIN32
|
||||
int smain(int argc, char** argv)
|
||||
#else
|
||||
int main(int argc, char** argv)
|
||||
#endif
|
||||
{
|
||||
new InspIRCd(argc, argv);
|
||||
ServerInstance->Run();
|
||||
|
@ -66,9 +66,6 @@
|
||||
#define STDOUT_FILENO 1
|
||||
#define STDERR_FILENO 2
|
||||
|
||||
/* Redirect main() through a different method in win32service.cpp, to intercept service startup */
|
||||
#define ENTRYPOINT CoreExport int smain(int argc, char** argv)
|
||||
|
||||
/* Disable the deprecation warnings.. it spams :P */
|
||||
#define _CRT_SECURE_NO_DEPRECATE
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
|
@ -24,6 +24,9 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
/* Redirect main() through a different method in win32service.cpp, to intercept service startup */
|
||||
int smain(int argc, char** argv);
|
||||
|
||||
/* Hook for win32service.cpp to exit properly with the service specific error code */
|
||||
void SetServiceStopped(unsigned long dwStatus);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user