Here is the first draft of the  mods
It passes the testSuite on Darwin 

E 
P.S. 
There are some more, I will keep researching



[enrico@enrico-imac ooRexx.svn.src]$svn diff
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt      (revision 11796)
+++ CMakeLists.txt      (working copy)
@@ -344,7 +344,20 @@
     set (ORX_SYSLIB_PTHREAD pthread)
 endif ()
 
+
 # Check header files and functions. These are all defined to the config.h file.
+check_include_file(alloca.h HAVE_ALLOCA_H)
+check_include_file(fnmatch.h HAVE_FNMATCH_H)
+check_include_file(sched.h HAVE_SCHED_H)
+check_include_file(sys/sched.h HAVE_SYS_SCHED_H)
+check_include_file(sys/time.h HAVE_SYS_TIME_H)
+check_include_file(time.h HAVE_TIME_H)
+check_include_file(utime.h HAVE_UTIME_H)
+check_include_file(wordexp.h HAVE_WORDEXP_H)
+
+check_function_exists(wordexp HAVE_WORDEXP)
+check_function_exists(euidaccess HAVE_EUIDACCESS)
+
 check_include_file(ctype.h HAVE_CTYPE_H)
 check_include_file(float.h HAVE_FLOAT_H)
 check_include_file(limits.h HAVE_LIMITS_H)
@@ -360,7 +373,6 @@
 check_include_file(stdio.h HAVE_STDIO_H)
 check_include_file(stdlib.h HAVE_STDLIB_H)
 check_include_file(string.h HAVE_STRING_H)
-check_include_file(time.h HAVE_TIME_H)
 check_function_exists(vprintf HAVE_VPRINTF)
 check_include_file(fcntl.h HAVE_FCNTL_H)
 check_function_exists(nanosleep HAVE_NANOSLEEP)
@@ -411,10 +423,10 @@
                            return 0;}"
                           HAVE_DLADDR)
   check_symbol_exists(_PC_CASE_SENSITIVE unistd.h HAVE_PC_CASE_SENSITIVE)
+
   check_symbol_exists(FNM_CASEFOLD fnmatch.h HAVE_FNM_CASEFOLD)
   check_symbol_exists(KDMKTONE linux/kd.h HAVE_KDMKTONE)
   check_include_file(pwd.h HAVE_PWD_H)
-  check_include_file(sched.h HAVE_SCHED_H)
   check_function_exists(sighold HAVE_SIGHOLD)
   check_function_exists(strdup HAVE_STRDUP)
   check_include_file(strings.h HAVE_STRINGS_H)
@@ -428,7 +440,6 @@
   check_include_file(sys/socket.h HAVE_SYS_SOCKET_H)
   check_include_file(sys/stat.h HAVE_SYS_STAT_H)
   check_include_file(sys/syscall.h HAVE_SYS_SYSCALL_H)
-  check_include_file(sys/time.h HAVE_SYS_TIME_H)
   check_include_file(sys/types.h HAVE_SYS_TYPES_H)
   check_include_file(sys/utsname.h HAVE_SYS_UTSNAME_H)
   check_include_file(sys/wait.h HAVE_SYS_WAIT_H)
Index: common/platform/unix/SysSemaphore.cpp
===================================================================
--- common/platform/unix/SysSemaphore.cpp       (revision 11796)
+++ common/platform/unix/SysSemaphore.cpp       (working copy)
@@ -50,16 +50,26 @@
 #include <pthread.h>
 #include <memory.h>
 #include <stdio.h>
-#include <sys/time.h>
-#ifdef AIX
-    #include <sys/sched.h>
-    #include <time.h>
+
+#if defined( HAVE_SYS_SCHED_H )
+# include <sys/sched.h>
 #endif
+#if defined( HAVE_SCHED_H )
+# include <sched.h>
+#endif
 
-#if defined(OPSYS_SUN) || defined(__HAIKU__)
-    #include <sched.h>
+#if defined( HAVE_SYS_TIME_H )
+# include <sys/time.h>
 #endif
 
+#if defined( HAVE_TIME_H )
+# include <time.h>
+#endif
+
+#if defined( HAVE_UTIME_H )
+#include <utime.h>
+#endif
+
 #include <errno.h>
 
 #include "SysSemaphore.hpp"
Index: config.h.in.cmake
===================================================================
--- config.h.in.cmake   (revision 11796)
+++ config.h.in.cmake   (working copy)
@@ -1,5 +1,37 @@
 /* config.h.in.  Generated from CMake.  */
 
+/* Define to 1 if you have the <sys/sched.h> header file. */
+#cmakedefine HAVE_SYS_SCHED_H
+
+/* Define to 1 if you have the <sched.h> header file. */
+#cmakedefine HAVE_SCHED_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#cmakedefine HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#cmakedefine HAVE_TIME_H
+
+/* Define to 1 if you have the <utime.h> header file. */
+#cmakedefine HAVE_UTIME_H
+
+/* Define to 1 if you have the <alloca.h> header file. */
+#cmakedefine HAVE_ALLOCA_H
+
+/* Define to 1 if you have the <fnmatch.h> header file. */
+#cmakedefine HAVE_FNMATCH_H
+
+/* Define to 1 if you have the <wordexp.h> header file. */
+#cmakedefine HAVE_WORDEXP_H
+
+
+/* Define to 1 if you have the `wordexp' function. */
+#cmakedefine HAVE_WORDEXP
+
+/* Define to 1 if you have the `euidaccess' function. */
+#cmakedefine HAVE_EUIDACCESS
+
+
 /* Define to 1 if you have the <attr/xattr.h> header file. */
 #cmakedefine HAVE_ATTR_XATTR_H
 
@@ -97,7 +129,7 @@
 #cmakedefine HAVE_DLADDR
 
 /* Define to 1 if _PC_HAVE_CASE_SENSITIVE is a valid value */
-#cmakedefine HAVE_PC_HAVE_CASE_SENSITIVE
+#cmakedefine HAVE_PC_CASE_SENSITIVE
 
 /* Define to 1 if FNM_CASEFOLD is a valid value */
 #cmakedefine HAVE_FNM_CASEFOLD
@@ -108,9 +140,6 @@
 /* Define to 1 if you have the <pwd.h> header file. */
 #cmakedefine HAVE_PWD_H
 
-/* Define to 1 if you have the <sched.h> header file. */
-#cmakedefine HAVE_SCHED_H
-
 /* Define to 1 if you have the `setlocale' function. */
 #cmakedefine HAVE_SETLOCALE
 
@@ -171,8 +200,6 @@
 /* Define to 1 if you have the <sys/syscall.h> header file. */
 #cmakedefine HAVE_SYS_SYSCALL_H
 
-/* Define to 1 if you have the <sys/time.h> header file. */
-#cmakedefine HAVE_SYS_TIME_H
 
 /* Define to 1 if you have the <sys/types.h> header file. */
 #cmakedefine HAVE_SYS_TYPES_H
@@ -183,9 +210,6 @@
 /* Define to 1 if you have the <sys/wait.h> header file. */
 #cmakedefine HAVE_SYS_WAIT_H
 
-/* Define to 1 if you have the <time.h> header file. */
-#cmakedefine HAVE_TIME_H
-
 /* Define to 1 if union semun is defined in sys/sem.h */
 #cmakedefine HAVE_UNION_SEMUN
 
Index: extensions/platform/unix/rxunixsys/rxunixsys.cpp
===================================================================
--- extensions/platform/unix/rxunixsys/rxunixsys.cpp    (revision 11796)
+++ extensions/platform/unix/rxunixsys/rxunixsys.cpp    (working copy)
@@ -983,7 +983,7 @@
 }
 
 
-#if !defined (AIX) && !defined (__APPLE__)
+#ifdef HAVE_EUIDACCESS
 /**
  * Method:        SysEuidaccess
  *
@@ -1108,7 +1108,7 @@
  *
  * @return        Array of file names.
  */
-#if !defined(OPENBSD)
+#ifdef HAVE_WORDEXP
 RexxRoutine1(RexxObjectPtr,
              SysWordexp,
              CSTRING, inexp)
@@ -1594,7 +1594,7 @@
  *
  * @param salt    The salt: two characters for the default DES encryption,
  *                other salt lengths may be available depending on the Unix 
platform
- *                for other encryption algorithms (MD5, Blowfish, SHA-256, 
SHA-512) 
+ *                for other encryption algorithms (MD5, Blowfish, SHA-256, 
SHA-512)
  *
  * @return        Encrypted string.
  */
@@ -1766,14 +1766,18 @@
     REXX_TYPED_ROUTINE(SysGetgrgid, SysGetgrgid),
     REXX_TYPED_ROUTINE(SysStat, SysStat),
     REXX_TYPED_ROUTINE(SysAccess, SysAccess),
-#if !defined (AIX) && !defined (__APPLE__)
+
+#ifdef HAVE_EUIDACCESS
     REXX_TYPED_ROUTINE(SysEuidaccess, SysEuidaccess),
 #endif
+
     REXX_TYPED_ROUTINE(SysGetservbyname, SysGetservbyname),
     REXX_TYPED_ROUTINE(SysGetservbyport, SysGetservbyport),
-#if !defined(OPENBSD)    
+
+#ifdef HAVE_WORDEXP
     REXX_TYPED_ROUTINE(SysWordexp, SysWordexp),
-#endif    
+#endif
+
 #ifdef HAVE_XATTR_H
     REXX_TYPED_ROUTINE(SysSetxattr, SysSetxattr),
     REXX_TYPED_ROUTINE(SysGetxattr, SysGetxattr),
@@ -1780,6 +1784,7 @@
     REXX_TYPED_ROUTINE(SysListxattr, SysListxattr),
     REXX_TYPED_ROUTINE(SysRemovexattr, SysRemovexattr),
 #endif
+
     REXX_TYPED_ROUTINE(SysGetsizeofptr, SysGetsizeofptr),
     REXX_TYPED_ROUTINE(SysGethostname, SysGethostname),
     REXX_TYPED_ROUTINE(SysChmod, SysChmod),
Index: extensions/platform/unix/rxunixsys/rxunixsys.h
===================================================================
--- extensions/platform/unix/rxunixsys/rxunixsys.h      (revision 11796)
+++ extensions/platform/unix/rxunixsys/rxunixsys.h      (working copy)
@@ -57,14 +57,25 @@
 #include <unistd.h>
 #include <pwd.h>
 #include <grp.h>
-#include <time.h>
+
+#if defined( HAVE_SYS_TIME_H )
+# include <sys/time.h>
+#endif
+
+#if defined( HAVE_TIME_H )
+# include <time.h>
+#endif
+
 #include <netdb.h>
-#if !defined(OPENBSD)
+
+#ifdef HAVE_WORDEXP_H
 #include <wordexp.h>
 #endif
-#if !defined(AIX) && !defined(OPENBSD)
+
+#ifdef HAVE_ALLOCA_H
 #include <alloca.h>
 #endif
+
 #include <pthread.h>
 #include <errno.h>
 #include <dirent.h>
@@ -91,6 +102,6 @@
 /* Global variables                                                           
*/
 
/*----------------------------------------------------------------------------*/
 
- 
+
 #endif /* ORXUNIXAPI_H */
- 
+
Index: interpreter/platform/unix/SysActivity.hpp
===================================================================
--- interpreter/platform/unix/SysActivity.hpp   (revision 11796)
+++ interpreter/platform/unix/SysActivity.hpp   (working copy)
@@ -59,17 +59,22 @@
 #if defined( HAVE_SYS_SCHED_H )
 # include <sys/sched.h>
 #endif
+#if defined( HAVE_SCHED_H )
+# include <sched.h>
+#endif
 
+#if defined( HAVE_SYS_TIME_H )
+# include <sys/time.h>
+#endif
+
 #if defined( HAVE_TIME_H )
 # include <time.h>
 #endif
 
-#if defined( HAVE_SCHED_H )
-# include <sched.h>
+#if defined( HAVE_UTIME_H )
+#include <utime.h>
 #endif
 
-#include <utime.h>
-
 class Activity;
 
 class SysActivity
Index: interpreter/platform/unix/SysFileSystem.cpp
===================================================================
--- interpreter/platform/unix/SysFileSystem.cpp (revision 11796)
+++ interpreter/platform/unix/SysFileSystem.cpp (working copy)
@@ -56,10 +56,19 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
+
+#if defined( HAVE_UTIME_H )
 #include <utime.h>
+#endif
+
 #include <pwd.h>
 #include <errno.h>
+
+#if defined( HAVE_FNMATCH_H )
 #include <fnmatch.h>
+#endif
+
+
 #include "SysFileSystem.hpp"
 #include "Utilities.hpp"
 #include "ActivityManager.hpp"
[enrico@enrico-imac ooRexx.svn.src]$















> On 20 Feb 2019, at 20:14, Erich Steinböck <erich.steinbo...@gmail.com> wrote:
> 
> As soon I find all the things to fix 
>  I will email  the svn diff report with some suggested modifications
> Sounds great - waiting for the patch
> 

_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to