-#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(FCF_CLOSEBUTTON)
-/* struct missing in "os2emx.h" - luckily FCF_CLOSEBUTTON was added in the
- same version of os2emx.h as SPBCDATA type, so we can do the test above. */
- typedef struct _SPBCDATA {
- ULONG cbSize; /* Size of control block. */
- ULONG ulTextLimit; /* Entryfield text limit. */
- LONG lLowerLimit; /* Spin lower limit (numeric only). */
- LONG lUpperLimit; /* Spin upper limit (numeric only). */
- ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
- PVOID pHWXCtlData; /* Handwriting control data structure flag. */
- } SPBCDATA;
-
- typedef SPBCDATA *PSPBCDATA;
+
+#if defined(__WATCOMC__) && defined(__WXMOTIF__)
+ #include <os2def.h>
+ #define I_NEED_OS2_H
+ #include <X11/Xmd.h>
+
+ // include this header from here for many of the GUI related code
+ #if wxUSE_GUI
+ extern "C" {
+ #include <Xm/VendorSP.h>
+ }
+ #endif
+
+ // provide Unix-like pipe()
+ #include <types.h>
+ #include <tcpustd.h>
+ #include <sys/time.h>
+ // Use ::DosCreatePipe or ::DosCreateNPipe under OS/2
+ // for more see http://posix2.sourceforge.net/guide.html
+ inline int pipe( int WXUNUSED(filedes)[2] )
+ {
+ wxFAIL_MSG(wxT("Implement first"));
+ return -1;
+ }
+#endif
+
+#if defined (__EMX__) && !defined(USE_OS2_TOOLKIT_HEADERS) && !defined(HAVE_SPBCDATA)
+
+ typedef struct _SPBCDATA {
+ ULONG cbSize; /* Size of control block. */
+ ULONG ulTextLimit; /* Entryfield text limit. */
+ LONG lLowerLimit; /* Spin lower limit (numeric only). */
+ LONG lUpperLimit; /* Spin upper limit (numeric only). */
+ ULONG idMasterSpb; /* ID of the servant's master spinbutton. */
+ PVOID pHWXCtlData; /* Handwriting control data structure flag. */
+ } SPBCDATA;
+
+ typedef SPBCDATA *PSPBCDATA;
+