diff --git a/ChangeLog b/ChangeLog index 97ba858fbb..6805edeff8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Sat Apr 24 11:30:34 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen) + * app/plug_in.c (plug_in_open): Add OS/2 patches. Setting pipes + in binary mode. + * libgimp/gimpenv.c (gimp_data_directory): Set gimp_data_dir (OS/2). * libgimp/gimp.c (set_gimp_PLUG_IN_INFO): Set the PLUG_IN_INFO diff --git a/app/actions/plug-in-commands.c b/app/actions/plug-in-commands.c index 0f8a702408..872adb61cc 100644 --- a/app/actions/plug-in-commands.c +++ b/app/actions/plug-in-commands.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/gui/plug-in-commands.c b/app/gui/plug-in-commands.c index 0f8a702408..872adb61cc 100644 --- a/app/gui/plug-in-commands.c +++ b/app/gui/plug-in-commands.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/gui/plug-in-menus.c b/app/gui/plug-in-menus.c index 0f8a702408..872adb61cc 100644 --- a/app/gui/plug-in-menus.c +++ b/app/gui/plug-in-menus.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/menus/plug-in-menus.c b/app/menus/plug-in-menus.c index 0f8a702408..872adb61cc 100644 --- a/app/menus/plug-in-menus.c +++ b/app/menus/plug-in-menus.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimpplugin-message.c b/app/plug-in/gimpplugin-message.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimpplugin-message.c +++ b/app/plug-in/gimpplugin-message.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimpplugin-progress.c b/app/plug-in/gimpplugin-progress.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimpplugin-progress.c +++ b/app/plug-in/gimpplugin-progress.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimpplugin.c b/app/plug-in/gimpplugin.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimpplugin.c +++ b/app/plug-in/gimpplugin.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimppluginmanager-call.c b/app/plug-in/gimppluginmanager-call.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimppluginmanager-call.c +++ b/app/plug-in/gimppluginmanager-call.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimppluginmanager-run.c b/app/plug-in/gimppluginmanager-run.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimppluginmanager-run.c +++ b/app/plug-in/gimppluginmanager-run.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimppluginmanager.c b/app/plug-in/gimppluginmanager.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimppluginmanager.c +++ b/app/plug-in/gimppluginmanager.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/gimppluginshm.c b/app/plug-in/gimppluginshm.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/gimppluginshm.c +++ b/app/plug-in/gimppluginshm.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-def.c b/app/plug-in/plug-in-def.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-def.c +++ b/app/plug-in/plug-in-def.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-message.c b/app/plug-in/plug-in-message.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-message.c +++ b/app/plug-in/plug-in-message.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-params.c b/app/plug-in/plug-in-params.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-params.c +++ b/app/plug-in/plug-in-params.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-progress.c b/app/plug-in/plug-in-progress.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-progress.c +++ b/app/plug-in/plug-in-progress.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-run.c b/app/plug-in/plug-in-run.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-run.c +++ b/app/plug-in/plug-in-run.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in-shm.c b/app/plug-in/plug-in-shm.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in-shm.c +++ b/app/plug-in/plug-in-shm.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-in.c b/app/plug-in/plug-in.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-in.c +++ b/app/plug-in/plug-in.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug-in/plug-ins.c b/app/plug-in/plug-ins.c index 0f8a702408..872adb61cc 100644 --- a/app/plug-in/plug-ins.c +++ b/app/plug-in/plug-ins.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else diff --git a/app/plug_in.c b/app/plug_in.c index 0f8a702408..872adb61cc 100644 --- a/app/plug_in.c +++ b/app/plug_in.c @@ -58,6 +58,13 @@ #endif +#ifdef __EMX__ +#include +#include +#define _O_BINARY O_BINARY +#define _P_NOWAIT P_NOWAIT +#endif + #include "regex.h" #include "libgimp/parasite.h" #include "libgimp/parasiteP.h" /* ick */ @@ -1067,7 +1074,7 @@ plug_in_open (PlugIn *plug_in) return 0; } -#ifdef __CYGWIN32__ +#if defined(__CYGWIN32__) || defined(__EMX__) /* Set to binary mode */ setmode(my_read[0], _O_BINARY); setmode(my_write[0], _O_BINARY); @@ -1123,7 +1130,11 @@ plug_in_open (PlugIn *plug_in) * so that we can later use it to kill the filter if * necessary. */ -#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) +#ifdef __EMX__ + fcntl(my_read[0], F_SETFD, 1); + fcntl(my_write[1], F_SETFD, 1); +#endif +#if defined (__CYGWIN32__) || defined (NATIVE_WIN32) || defined(__EMX__) plug_in->pid = spawnv (_P_NOWAIT, plug_in->args[0], plug_in->args); if (plug_in->pid == -1) #else