summaryrefslogtreecommitdiffstats
path: root/src/winmain.cpp
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2017-11-03 00:10:02 +0000
commitd2df0412f728dd5bb54537dfdfe7c35b34d40e0e (patch)
treee2703384779e83312c456399999997fcc289c5cf /src/winmain.cpp
parentMerge branch 'master' into powerpencil (diff)
parentchange assignment to equality (diff)
downloadinkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.tar.gz
inkscape-d2df0412f728dd5bb54537dfdfe7c35b34d40e0e.zip
Merge branch 'master' into powerpencil
Diffstat (limited to 'src/winmain.cpp')
-rw-r--r--src/winmain.cpp65
1 files changed, 0 insertions, 65 deletions
diff --git a/src/winmain.cpp b/src/winmain.cpp
deleted file mode 100644
index 5120e44e0..000000000
--- a/src/winmain.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <glib.h>
-
-#ifdef G_OS_WIN32
-#undef DATADIR
-
-#include <stdio.h>
-#include <io.h>
-#include <conio.h>
-
-#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501)
-# undef _WIN32_WINNT
-# define _WIN32_WINNT 0x0501
-#endif
-
-#include <windows.h>
-
-extern int main (int argc, char **argv);
-
-/* In case we build this as a windowed application */
-
-#ifdef __GNUC__
-# ifndef _stdcall
-# define _stdcall __attribute__((stdcall))
-# endif
-#endif
-
-int _stdcall
-WinMain (struct HINSTANCE__ */*hInstance*/,
- struct HINSTANCE__ */*hPrevInstance*/,
- char */*lpszCmdLine*/,
- int /*nCmdShow*/)
-{
- if (fileno (stdout) != -1 &&
- _get_osfhandle (fileno (stdout)) != -1)
- {
- /* stdout is fine, presumably redirected to a file or pipe */
- }
- else
- {
- typedef BOOL (* WINAPI AttachConsole_t) (DWORD);
-
- AttachConsole_t p_AttachConsole =
- (AttachConsole_t) GetProcAddress (GetModuleHandle ("kernel32.dll"), "AttachConsole");
-
- if (p_AttachConsole != NULL && p_AttachConsole (ATTACH_PARENT_PROCESS))
- {
- freopen ("CONOUT$", "w", stdout);
- dup2 (fileno (stdout), 1);
- freopen ("CONOUT$", "w", stderr);
- dup2 (fileno (stderr), 2);
-
- }
- }
-
- int ret;
- ret = main (__argc, __argv);
- return ret;
-}
-
-#endif