#ifndef BOOT_STRAPPING
// pull in the version specified for this build.
-///hmmm: on hold! #include <__build_version.h>
+ #include <__build_version.h>
+//why was this include "on hold"?
#else
// plug in a fake version for our bootstrapping process.
#define __build_FILE_VERSION "108.420.1024.10008"
#endif
-#ifdef _MSC_VER
- #include <direct.h>
+#ifdef __WIN32__
+// #include <direct.h>
#include <winver.h>
#endif
bool version_checker::loaded(const astring &library_file_name)
{
-#ifdef __WIN32__
+//#ifdef __WIN32__
+#if defined(__WIN32__)
return bool(get_handle(library_file_name) != 0);
#else
//temp code.
void *version_checker::get_handle(const astring &library_file_name)
{
-#ifdef __WIN32__
+//#ifdef __WIN32__
+#if defined(__WIN32__)
return GetModuleHandle(to_unicode_temp(library_file_name));
#else
- if (library_file_name.t()) return NIL; else return NIL;
+ if (library_file_name.t()) return NULL_POINTER; else return NULL_POINTER;
#endif
}
astring version_checker::module_name(const void *module_handle)
{
-#ifdef __UNIX__
+#if defined(__UNIX__)
+//|| defined(__GNU_WINDOWS__)
if (module_handle) {}
return application_configuration::application_name();
#elif defined(__WIN32__)
+//#elif defined(__WIN32__)
flexichar low_buff[MAX_ABS_PATH + 1];
GetModuleFileName((HMODULE)module_handle, low_buff, MAX_ABS_PATH - 1);
astring buff = from_unicode_temp(low_buff);
// determine the required size of the version info buffer.
int required_size;
-#ifdef __WIN32__
- un_long module_handle; // filled with the dll or exe handle.
+#if defined(__WIN32__)
+//#ifdef __WIN32__
+ DWORD module_handle; // filled with the dll or exe handle.
required_size = GetFileVersionInfoSize(to_unicode_temp(filename), &module_handle);
#else
required_size = 0 && filename.t();
// read the version info into our buffer.
bool success = false;
-#ifdef __WIN32__
+#if defined(__WIN32__)
+//#ifdef __WIN32__
success = GetFileVersionInfo(to_unicode_temp(filename), module_handle,
required_size, to_fill.access());
#else
{
high = 0;
low = 0;
-#ifdef __WIN32__
+#if defined(__WIN32__)
+//#ifdef __WIN32__
// determine the language that the version's written in.
basis::un_int data_size;
void *pointer_to_language_structure;
version version_checker::retrieve_version(const astring &filename)
{
-#ifdef UNIX
+//#ifdef UNIX
+#if defined(__UNIX__)
+// || defined(__GNU_WINDOWS__)
// totally bogus stand-in; this just returns the version we were built with
// rather than the version that's actually tagged on the file.
#endif
- byte_array version_info_found(0, NIL);
+ byte_array version_info_found(0, NULL_POINTER);
if (!retrieve_version_info(filename, version_info_found))
return version(0, 0, 0, 0);
version_record &to_fill)
{
to_fill = version_record();
- byte_array version_info_found(0, NIL);
+ byte_array version_info_found(0, NULL_POINTER);
if (!retrieve_version_info(filename, version_info_found))
return false;
// the various version pieces are retrieved...
+//#ifdef __WIN32__
#ifdef __WIN32__
basis::un_int data_size;
void *data_pointer;
to_show += astring("]. ");
to_show += *_version_complaint;
-#ifdef __UNIX__
+//#ifdef __UNIX__
+#if defined(__UNIX__)
+//|| defined(__GNU_WINDOWS__)
continuable_error("version checking", "failure", to_show.s());
#elif defined(__WIN32__)
MessageBox(0, to_unicode_temp(to_show),