Feature #1346 ยป 0037-Centralize-exchndl.dll-loading-to-executable.-ch-mod.patch
client/client_main.c | ||
---|---|---|
#include <fc_config.h>
|
||
#endif
|
||
#include "fc_prehdrs.h"
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h> /* LoadLibrary() */
|
||
#endif
|
||
#include <math.h>
|
||
#include <signal.h>
|
||
#include <stdarg.h>
|
||
#include <stdio.h>
|
||
#include <stdlib.h>
|
||
#include <time.h>
|
||
... | ... | |
#include "capstr.h"
|
||
#include "dataio.h"
|
||
#include "deprecations.h"
|
||
#include "executable.h"
|
||
#include "fcbacktrace.h"
|
||
#include "fc_cmdline.h"
|
||
#include "fciconv.h"
|
||
... | ... | |
int aii;
|
||
int uret;
|
||
/* Load Windows post-crash debugger */
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == NULL) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif /* FREECIV_DEBUG */
|
||
}
|
||
# endif /* FREECIV_NDEBUG */
|
||
#endif /* FREECIV_MSWINDOWS */
|
||
executable_init();
|
||
/* fc_interface_init_client() includes low level support like
|
||
* guaranteeing that fc_vsnprintf() will work after it,
|
meson.build | ||
---|---|---|
'utility/capability.c',
|
||
'utility/deprecations.c',
|
||
'utility/distribute.c',
|
||
'utility/executable.c',
|
||
'utility/fcbacktrace.c',
|
||
'utility/fc_cmdhelp.c',
|
||
'utility/fc_cmdline.c',
|
server/srv_entrypoint.c | ||
---|---|---|
#include "fc_prehdrs.h"
|
||
#include <stdio.h>
|
||
#include <stdlib.h>
|
||
#include <string.h>
|
||
... | ... | |
#include <signal.h>
|
||
#endif
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h>
|
||
#endif
|
||
/* utility */
|
||
#include "deprecations.h"
|
||
#include "executable.h"
|
||
#include "fc_cmdline.h"
|
||
#include "fciconv.h"
|
||
#include "fcintl.h"
|
||
... | ... | |
bool showvers = FALSE;
|
||
char *option = NULL;
|
||
/* Load Windows post-crash debugger */
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == NULL) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif /* FREECIV_DEBUG */
|
||
}
|
||
# endif /* FREECIV_NDEBUG */
|
||
#endif /* FREECIV_MSWINDOWS */
|
||
executable_init();
|
||
setup_interrupt_handlers();
|
||
/* Initialize server */
|
tools/manual/fc_manual.c | ||
---|---|---|
#include <signal.h>
|
||
#endif
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h>
|
||
#endif
|
||
/* utility */
|
||
#include "capability.h"
|
||
#include "executable.h"
|
||
#include "fc_cmdline.h"
|
||
#include "fciconv.h"
|
||
#include "fcintl.h"
|
||
... | ... | |
int retval = EXIT_SUCCESS;
|
||
struct tag_types *tag_info = &html_tags;
|
||
/* Load Windows post-crash debugger */
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == NULL) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif /* FREECIV_DEBUG */
|
||
}
|
||
# endif /* FREECIV_NDEBUG */
|
||
#endif /* FREECIV_MSWINDOWS */
|
||
executable_init();
|
||
/* Initialize the fc_interface functions needed to generate the help
|
||
* text.
|
tools/ruledit/ruledit.cpp | ||
---|---|---|
#include <fc_config.h>
|
||
#endif
|
||
#include "fc_prehdrs.h"
|
||
// ANSI
|
||
#include <stdlib.h>
|
||
#include <signal.h>
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h>
|
||
#endif
|
||
// utility
|
||
#include "executable.h"
|
||
#include "fc_cmdline.h"
|
||
#include "fciconv.h"
|
||
#include "fcintl.h"
|
||
... | ... | |
int ui_options;
|
||
int exit_status = EXIT_SUCCESS;
|
||
// Load Windows post-crash debugger
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == nullptr) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif // FREECIV_DEBUG
|
||
}
|
||
# endif // FREECIV_NDEBUG
|
||
#endif // FREECIV_MSWINDOWS
|
||
executable_init();
|
||
/* Initialize the fc_interface functions needed to understand rules.
|
||
* fc_interface_init_tool() includes low level support like
|
tools/ruleup.c | ||
---|---|---|
#include <signal.h>
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h>
|
||
#endif
|
||
/* utility */
|
||
#include "executable.h"
|
||
#include "fc_cmdline.h"
|
||
#include "fciconv.h"
|
||
#include "registry.h"
|
||
... | ... | |
enum log_level loglevel = LOG_NORMAL;
|
||
int exit_status = EXIT_SUCCESS;
|
||
/* Load Windows post-crash debugger */
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == NULL) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif /* FREECIV_DEBUG */
|
||
}
|
||
# endif /* FREECIV_NDEBUG */
|
||
#endif /* FREECIV_MSWINDOWS */
|
||
executable_init();
|
||
/* Initialize the fc_interface functions needed to understand rules.
|
||
* fc_interface_init_tool() includes low level support like
|
utility/Makefile.am | ||
---|---|---|
deprecations.h \
|
||
distribute.c \
|
||
distribute.h \
|
||
executable.c \
|
||
executable.h \
|
||
fc_cmdhelp.c \
|
||
fc_cmdhelp.h \
|
||
fc_cmdline.c \
|
utility/executable.c | ||
---|---|---|
/***********************************************************************
|
||
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
|
||
This program is free software; you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation; either version 2, or (at your option)
|
||
any later version.
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
***********************************************************************/
|
||
#ifdef HAVE_CONFIG_H
|
||
#include <fc_config.h>
|
||
#endif /* HAVE_CONFIG_H */
|
||
#include "fc_prehdrs.h"
|
||
#ifdef FREECIV_MSWINDOWS
|
||
#include <windows.h>
|
||
#endif
|
||
#include <stdio.h>
|
||
/* utility */
|
||
#include "support.h"
|
||
#include "executable.h"
|
||
/********************************************************************//**
|
||
Common part of executable initialization
|
||
************************************************************************/
|
||
void executable_init(void)
|
||
{
|
||
/* Load Windows post-crash debugger */
|
||
#ifdef FREECIV_MSWINDOWS
|
||
# ifndef FREECIV_NDEBUG
|
||
if (LoadLibrary("exchndl.dll") == nullptr) {
|
||
# ifdef FREECIV_DEBUG
|
||
fprintf(stderr, "exchndl.dll could not be loaded, no crash debugger\n");
|
||
# endif /* FREECIV_DEBUG */
|
||
}
|
||
# endif /* FREECIV_NDEBUG */
|
||
#endif /* FREECIV_MSWINDOWS */
|
||
}
|
utility/executable.h | ||
---|---|---|
/***********************************************************************
|
||
Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
|
||
This program is free software; you can redistribute it and/or modify
|
||
it under the terms of the GNU General Public License as published by
|
||
the Free Software Foundation; either version 2, or (at your option)
|
||
any later version.
|
||
This program is distributed in the hope that it will be useful,
|
||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
GNU General Public License for more details.
|
||
***********************************************************************/
|
||
#ifndef FC__EXECUTABLE_H
|
||
#define FC__EXECUTABLE_H
|
||
#ifdef __cplusplus
|
||
extern "C" {
|
||
#endif /* __cplusplus */
|
||
void executable_init(void);
|
||
#ifdef __cplusplus
|
||
}
|
||
#endif /* __cplusplus */
|
||
#endif /* FC__EXECUTABLE_H */
|