blob: 98cfcb952fed184e3ca779dae0ca84525e0a24b8 [file] [log] [blame] [raw]
#include "version.h"
#include "build-version.h"
#include <unistd.h>
static const char version[] = "Native C Library for Windows NT\n"
"Version " VERSION " (" PKGVERSION ")\n"
"Copyright 2007-2015 PC GO Ld.\n\n"
"This is free software published under GNU GPL 2;\nsee the source code for more details.\n"
"There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\nPARTICULAR PURPOSE.\n\n"
"Compiled by GCC " __VERSION__ ", on " BUILD_DATE "\n";
int __stdcall DllMainCRTStartup(void *dll, unsigned long int reason, void *reserved) {
//printf("DllMainCRTStartup(%p, %lu, %p)\n", dll, reason, reserved);
if(dll == (void *)0x7ffdf000) {
// Didn't work on Windows XP SP2 or later
write(STDOUT_FILENO, version, sizeof version - 1);
_exit(0);
return 0;
}
return 1;
}