-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #108 from whcox603/VMS_x86
Add support for OpenVMS on X86-64
- Loading branch information
Showing
7 changed files
with
51 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
CMakeLists.txt.user | ||
.DS_Store | ||
.DS_Store | ||
platforms/vms-general/alpha/ | ||
platforms/vms-general/ia64/ | ||
platforms/vms-general/x86_64/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
$! | ||
$! Copyright 2011, Richard Levitte <[email protected]> | ||
$! Copyright 2014, John Malmberg <[email protected]> | ||
$! Copyright 2016-2018, Alexander Saprykin <[email protected]> | ||
$! Copyright 2016-2024, Alexander Saprykin <[email protected]> | ||
$! Copyright 2023, William H. Cox <[email protected]> | ||
$! | ||
$! Permission to use, copy, modify, and/or distribute this software for any | ||
$! purpose with or without fee is hereby granted, provided that the above | ||
|
@@ -92,7 +93,7 @@ $! | |
$! Define the architecture-specific destination directory name | ||
$! ----------------------------------------------------------- | ||
$! | ||
$ if (f$getsyi("HW_MODEL") .lt. 1024) | ||
$ if (f$getsyi("ARCH_TYPE") .eq. 1) | ||
$ then | ||
$ 'vo_c' "%PLIBSYS-F-NOTSUP, VAX platform is not supported, sorry :(" | ||
$ goto common_exit | ||
|
@@ -109,7 +110,7 @@ $ min_ver_patch = f$element(1, ".", version_patch) | |
$ min_ver = f$element(0, "-", min_ver_patch) | ||
$ patch = f$element(1, "-", min_ver_patch) | ||
$! | ||
$ if maj_ver .lts. "8" .or. min_ver .lts. "4" | ||
$ if (maj_ver .lts. "8") .or. (maj_ver .eqs. "8" .and. min_ver .lts. "4") | ||
$ then | ||
$ 'vo_c' "%PLIBSYS-F-NOTSUP, only OpenVMS 8.4 and above are supported, sorry :(" | ||
$ goto common_exit | ||
|
@@ -189,7 +190,7 @@ $ test_list_val = f$element(1, "=", arg_val) - "(" - ")" | |
$ test_list_val = f$edit(test_list_val, "COLLAPSE") | ||
$ test_list_counter = 0 | ||
$ | ||
$ test_list_loop: | ||
$ test_list_loop: | ||
$ next_test_val = f$element (test_list_counter, ",", test_list_val) | ||
$ if next_test_val .nes. "" .and. next_test_val .nes. "," | ||
$ then | ||
|
@@ -515,6 +516,15 @@ $ then | |
$ cxx_params = cxx_params + "/DEBUG/NOOPTIMIZE/LIST/SHOW=ALL" | ||
$ endif | ||
$! | ||
$! OpenVMS 9.x on x86 uses LINK command instead of CXXLINK | ||
$! | ||
$ if f$getsyi("ARCH_TYPE") .eq. 4 | ||
$ then | ||
$ link_cmd := "link" | ||
$ else | ||
$ link_cmd := "cxxlink" | ||
$ endif | ||
$! | ||
$ test_loop: | ||
$ next_test = f$element (test_counter, " ", plibsys_tests) | ||
$ if next_test .nes. "" .and. next_test .nes. " " | ||
|
@@ -524,7 +534,7 @@ $ 'vo_c' "[CXX ] ''next_test'.cpp" | |
$ cxx [---.tests]'next_test'.cpp 'cxx_params' | ||
$! | ||
$ 'vo_c' "[CXXLINK] ''next_test'.obj" | ||
$ cxxlink 'next_test'.obj,'objdir'plibsys_link.opt/OPTION /THREADS_ENABLE | ||
$ 'link_cmd' 'next_test'.obj,'objdir'plibsys_link.opt/OPTION /THREADS_ENABLE | ||
$! | ||
$ if f$search("CXX_REPOSITORY.DIR") .nes. "" | ||
$ then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (C) 2017-2023 Alexander Saprykin <[email protected]> | ||
* Copyright (C) 2017-2024 Alexander Saprykin <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
|
@@ -221,7 +221,7 @@ | |
# define P_CC_CLANG | ||
#elif defined(__HP_cc) || defined(__HP_aCC) | ||
# define P_CC_HP | ||
#elif defined (__DECC) || defined(__DECCXX) | ||
#elif defined (__DECC) || defined(__DECCXX) || defined(__VMS) | ||
# define P_CC_DEC | ||
#elif (defined(__sgi) || defined(sgi)) && \ | ||
(defined(_COMPILER_VERSION) || defined(_SGI_COMPILER_VERSION)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* The MIT License | ||
* | ||
* Copyright (C) 2014-2023 Alexander Saprykin <[email protected]> | ||
* Copyright (C) 2014-2024 Alexander Saprykin <[email protected]> | ||
* | ||
* Permission is hereby granted, free of charge, to any person obtaining | ||
* a copy of this software and associated documentation files (the | ||
|
@@ -60,8 +60,15 @@ P_TEST_CASE_BEGIN (ptypes_general_test) | |
P_TEST_CHECK (sizeof (puintptr) == PLIBSYS_SIZEOF_VOID_P); | ||
P_TEST_CHECK (sizeof (psize) == PLIBSYS_SIZEOF_SIZE_T); | ||
P_TEST_CHECK (sizeof (pssize) == PLIBSYS_SIZEOF_SIZE_T); | ||
#if !defined(P_OS_VMS) || !defined(P_CPU_X86_64) | ||
P_TEST_CHECK (sizeof (plong) == PLIBSYS_SIZEOF_LONG); | ||
P_TEST_CHECK (sizeof (pulong) == PLIBSYS_SIZEOF_LONG); | ||
#else | ||
/* OpenVMS on x86 has C++ compiler with size of long different from | ||
* defined in C compiler */ | ||
P_TEST_CHECK (sizeof (plong) == 8); | ||
P_TEST_CHECK (sizeof (pulong) == 8); | ||
#endif | ||
P_TEST_CHECK (sizeof (poffset) == 8); | ||
|
||
p_libsys_shutdown (); | ||
|
@@ -113,21 +120,25 @@ P_TEST_CASE_BEGIN (ptypes_min_max_test) | |
P_TEST_CHECK (P_MAXSSIZE == P_MAXINT64); | ||
P_TEST_CHECK (P_MAXSIZE == P_MAXUINT64); | ||
|
||
#if !defined(P_OS_VMS) || !defined(P_CPU_X86_64) | ||
if (PLIBSYS_SIZEOF_LONG == 8) { | ||
P_TEST_CHECK (P_MINSSIZE == P_MINLONG); | ||
P_TEST_CHECK (P_MAXSSIZE == P_MAXLONG); | ||
P_TEST_CHECK (P_MAXSIZE == P_MAXULONG); | ||
} | ||
#endif | ||
} else { | ||
P_TEST_CHECK (P_MINSSIZE == P_MININT32); | ||
P_TEST_CHECK (P_MAXSSIZE == P_MAXINT32); | ||
P_TEST_CHECK (P_MAXSIZE == P_MAXUINT32); | ||
|
||
#if !defined(P_OS_VMS) || !defined(P_CPU_X86_64) | ||
if (PLIBSYS_SIZEOF_LONG == 4) { | ||
P_TEST_CHECK (P_MINSSIZE == P_MINLONG); | ||
P_TEST_CHECK (P_MAXSSIZE == P_MAXLONG); | ||
P_TEST_CHECK (P_MAXSIZE == P_MAXULONG); | ||
} | ||
#endif | ||
} | ||
|
||
p_libsys_shutdown (); | ||
|
@@ -259,6 +270,7 @@ P_TEST_CASE_BEGIN (ptypes_host_network_test) | |
P_TEST_CHECK (PUINT_TO_LE (puint_val) == (puint) 0x00040000); | ||
P_TEST_CHECK (PUINT_FROM_LE (puint_val) == (puint) 0x00040000); | ||
|
||
#if !defined(P_OS_VMS) || !defined(P_CPU_X86_64) | ||
if (PLIBSYS_SIZEOF_LONG == 8) { | ||
plong plong_val = PLONG_TO_BE (0xFFFFFFFFFFFFF800LL); | ||
P_TEST_CHECK (plong_val == (plong) 0x00F8FFFFFFFFFFFFLL); | ||
|
@@ -284,6 +296,7 @@ P_TEST_CASE_BEGIN (ptypes_host_network_test) | |
P_TEST_CHECK (PULONG_TO_LE (pulong_val) == (pulong) 0x00080000); | ||
P_TEST_CHECK (PULONG_FROM_LE (pulong_val) == (pulong) 0x00080000); | ||
} | ||
#endif | ||
|
||
if (PLIBSYS_SIZEOF_SIZE_T == 8) { | ||
psize psize_val = PSIZE_TO_BE (0x0000000000001000ULL); | ||
|
@@ -367,6 +380,7 @@ P_TEST_CASE_BEGIN (ptypes_host_network_test) | |
P_TEST_CHECK (PUINT_TO_BE (puint_val) == (puint) 0x00040000); | ||
P_TEST_CHECK (PUINT_FROM_BE (puint_val) == (puint) 0x00040000); | ||
|
||
#if !defined(P_OS_VMS) || !defined(P_CPU_X86_64) | ||
if (PLIBSYS_SIZEOF_LONG == 8) { | ||
plong plong_val = PLONG_TO_LE (0xFFFFFFFFFFFFF800LL); | ||
P_TEST_CHECK (plong_val == (plong) 0x00F8FFFFFFFFFFFFLL); | ||
|
@@ -392,6 +406,7 @@ P_TEST_CASE_BEGIN (ptypes_host_network_test) | |
P_TEST_CHECK (PULONG_TO_BE (pulong_val) == (pulong) 0x00080000); | ||
P_TEST_CHECK (PULONG_FROM_BE (pulong_val) == (pulong) 0x00080000); | ||
} | ||
#endif | ||
|
||
if (PLIBSYS_SIZEOF_SIZE_T == 8) { | ||
psize psize_val = PSIZE_TO_LE (0x0000000000001000ULL); | ||
|