X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=nucleus%2Flibrary%2Fprocesses%2Flaunch_process.cpp;h=db5822a82c9e82f9b707f20b294a8b6896d9534a;hb=de0da7f2f7958d4ba652ff2ef5c79991700141ac;hp=bb8d7ada002cb60c7028d862f37ae772f8388ac5;hpb=3ea085ec301ed1399dfa1e9f3a240312dc95410b;p=feisty_meow.git diff --git a/nucleus/library/processes/launch_process.cpp b/nucleus/library/processes/launch_process.cpp index bb8d7ada..db5822a8 100644 --- a/nucleus/library/processes/launch_process.cpp +++ b/nucleus/library/processes/launch_process.cpp @@ -22,17 +22,18 @@ #include #include -#ifdef __UNIX__ +//#ifndef _MSC_VER #include #include #include #include -#endif -#ifdef __WIN32__ +/* + * #else #include #include #include #endif +*/ //#define DEBUG_LAUNCH_PROCESS // uncomment for noisier debugging info. @@ -60,20 +61,22 @@ int_set __our_kids() { return __hidden_kids; } -#ifdef __WIN32__ +/* +#ifdef _MSC_VER bool launch_process::event_poll(MSG &message) { message.hwnd = 0; message.message = 0; message.wParam = 0; message.lParam = 0; - if (!PeekMessage(&message, NIL, 0, 0, PM_REMOVE)) + if (!PeekMessage(&message, NULL_POINTER, 0, 0, PM_REMOVE)) return false; TranslateMessage(&message); DispatchMessage(&message); return true; } #endif +*/ #define SUPPORT_SHELL_EXECUTE // if this is not commented out, then the ShellExecute version of launch_ @@ -87,7 +90,7 @@ bool launch_process::event_poll(MSG &message) //const int MAXIMUM_COMMAND_LINE = 32 * KILOBYTE; // maximum command line that we'll deal with here. -#ifdef __UNIX__ +//#ifndef _MSC_VER void launch_process::exiting_child_signal_handler(int sig_num) { FUNCDEF("exiting_child_signal_handler"); @@ -112,7 +115,7 @@ void launch_process::exiting_child_signal_handler(int sig_num) } } } -#endif +//#endif //hmmm: this doesn't seem to account for quoting properly at all? char_star_array launch_process::break_line(astring &app, const astring ¶meters) @@ -147,7 +150,7 @@ char_star_array launch_process::break_line(astring &app, const astring ¶mete .stuff(to_return[to_return.last()], len); } // add the sentinel to the list of strings. - to_return += NIL; + to_return += NULL_POINTER; #ifdef DEBUG_LAUNCH_PROCESS for (int q = 0; to_return[q]; q++) { LOG(a_sprintf("%d: %s\n", q, to_return[q])); @@ -172,7 +175,7 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com app_name.insert(0, "\""); if (app_name[app_name.end()] != '"') app_name += "\""; -#ifdef __UNIX__ +//#if defined(__UNIX__) || defined(__GNU_WINDOWS__) // unix / linux implementation. if (flag & RETURN_IMMEDIATELY) { // they want to get back right away. @@ -230,7 +233,8 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com // assume they want to wait. return system((app_name + " " + command_line).s()); } -#elif defined(__WIN32__) +/* +#elif defined(_MSC_VER) //checking on whether we have admin rights for the launch. //if (IsUserAnAdmin()) { @@ -294,8 +298,8 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com // } } astring parms = app_name + " " + command_line; - bool success = CreateProcess(NIL, to_unicode_temp(parms), NIL, NIL, false, - create_flag, NIL, NIL, &startup_info, &process_info); + bool success = CreateProcess(NULL_POINTER, to_unicode_temp(parms), NULL_POINTER, NULL_POINTER, false, + create_flag, NULL_POINTER, NULL_POINTER, &startup_info, &process_info); if (!success) return critical_events::system_error(); // success then, merge back into stream. @@ -338,6 +342,7 @@ basis::un_int launch_process::run(const astring &app_name_in, const astring &com #else #pragma error("hmmm: launch_process: no implementation for this OS.") #endif +*/ return 0; }