diff --git a/build.linux64x64/newspeak.cog.spur/plugins.int b/build.linux64x64/newspeak.cog.spur/plugins.int index b2fcd89e39..ca45448d1a 100644 --- a/build.linux64x64/newspeak.cog.spur/plugins.int +++ b/build.linux64x64/newspeak.cog.spur/plugins.int @@ -11,7 +11,7 @@ FileCopyPlugin \ FilePlugin \ FloatArrayPlugin \ FloatMathPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ JPEGReadWriter2Plugin \ JPEGReaderPlugin \ diff --git a/build.linux64x64/newspeak.sista.spur/plugins.int b/build.linux64x64/newspeak.sista.spur/plugins.int index b2fcd89e39..ca45448d1a 100644 --- a/build.linux64x64/newspeak.sista.spur/plugins.int +++ b/build.linux64x64/newspeak.sista.spur/plugins.int @@ -11,7 +11,7 @@ FileCopyPlugin \ FilePlugin \ FloatArrayPlugin \ FloatMathPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ JPEGReadWriter2Plugin \ JPEGReaderPlugin \ diff --git a/build.linux64x64/newspeak.stack.spur/plugins.int b/build.linux64x64/newspeak.stack.spur/plugins.int index b2fcd89e39..ca45448d1a 100644 --- a/build.linux64x64/newspeak.stack.spur/plugins.int +++ b/build.linux64x64/newspeak.stack.spur/plugins.int @@ -11,7 +11,7 @@ FileCopyPlugin \ FilePlugin \ FloatArrayPlugin \ FloatMathPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ JPEGReadWriter2Plugin \ JPEGReaderPlugin \ diff --git a/build.linux64x64/nsnac.cog.spur/plugins.int b/build.linux64x64/nsnac.cog.spur/plugins.int index b2fcd89e39..ca45448d1a 100644 --- a/build.linux64x64/nsnac.cog.spur/plugins.int +++ b/build.linux64x64/nsnac.cog.spur/plugins.int @@ -11,7 +11,7 @@ FileCopyPlugin \ FilePlugin \ FloatArrayPlugin \ FloatMathPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ JPEGReadWriter2Plugin \ JPEGReaderPlugin \ diff --git a/build.linux64x64/squeak.cog.spur.immutability/plugins.int b/build.linux64x64/squeak.cog.spur.immutability/plugins.int index 71695ab244..cfba6f7474 100644 --- a/build.linux64x64/squeak.cog.spur.immutability/plugins.int +++ b/build.linux64x64/squeak.cog.spur.immutability/plugins.int @@ -7,7 +7,7 @@ B2DPlugin \ BitBltPlugin \ BMPReadWriterPlugin \ CroquetPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ DropPlugin \ DSAPrims \ diff --git a/build.linux64x64/squeak.cog.spur/plugins.int b/build.linux64x64/squeak.cog.spur/plugins.int index 71695ab244..cfba6f7474 100644 --- a/build.linux64x64/squeak.cog.spur/plugins.int +++ b/build.linux64x64/squeak.cog.spur/plugins.int @@ -7,7 +7,7 @@ B2DPlugin \ BitBltPlugin \ BMPReadWriterPlugin \ CroquetPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ DropPlugin \ DSAPrims \ diff --git a/build.linux64x64/squeak.stack.spur/plugins.int b/build.linux64x64/squeak.stack.spur/plugins.int index 71695ab244..cfba6f7474 100644 --- a/build.linux64x64/squeak.stack.spur/plugins.int +++ b/build.linux64x64/squeak.stack.spur/plugins.int @@ -7,7 +7,7 @@ B2DPlugin \ BitBltPlugin \ BMPReadWriterPlugin \ CroquetPlugin \ -# HostWindowPlugin \ +HostWindowPlugin \ ZipPlugin \ DropPlugin \ DSAPrims \ diff --git a/deploy/pack-vm.sh b/deploy/pack-vm.sh index 7b52ecba95..3f8a6862cf 100755 --- a/deploy/pack-vm.sh +++ b/deploy/pack-vm.sh @@ -41,7 +41,7 @@ pushd "${PRODUCTS_DIR}" if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then counter=0 for dir in */; do - if [[ "${dir}" == *"ht/" ]]; then + if [[ "${ARCH}" == *"ARM"* || "${dir}" == *"ht/" ]]; then name="${IDENTIFIER}" else name="${IDENTIFIER_ITIMER}" diff --git a/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c b/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c index 6a5c22aeee..a708a65497 100755 --- a/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c +++ b/platforms/Cross/plugins/FilePlugin/sqFilePluginBasicPrims.c @@ -773,6 +773,7 @@ sqInt sqFileTruncate(SQFile *f, squeakFileOffsetType offset) { if (!sqFileValid(f)) return interpreterProxy->success(false); + fflush(getFile(f)); if (sqFTruncate(getFile(f), offset)) return interpreterProxy->success(false); return 1; diff --git a/platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c b/platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c index a9a9c1ec63..85f743a4e8 100644 --- a/platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c +++ b/platforms/unix/plugins/HostWindowPlugin/sqUnixHostWindowPlugin.c @@ -37,10 +37,10 @@ static struct SqDisplay *dpy= 0; #define noDisplay ( (!dpy && !(dpy= ioGetDisplayModule())) || (dpy->version < 0x10002) ) -/* closeWindow: arg is int windowIndex. Fail (return 0) if anything goes wrong +/* closeWindow: arg is sqInt windowIndex. Fail (return 0) if anything goes wrong * - typically the windowIndex invalid or similar */ -int closeWindow(int index) +sqInt closeWindow(sqInt index) { if (noDisplay) return 0; @@ -49,14 +49,14 @@ int closeWindow(int index) } -/* createWindow: takes int width, height and origin x/y plus a char* list of - * as yet undefined attributes. Returns an int window index or 0 for failure +/* createWindow: takes sqInt width, height and origin x/y plus a char* list of + * as yet undefined attributes. Returns an sqInt window index or 0 for failure * Failure may occur because of an inability to add the window, too many * windows already extant (platform dependant), the specified size being * unreasonable etc. */ -int createWindowWidthheightoriginXyattrlength( - int w, int h, int x, int y, char *list, int attributeListLength) +sqInt createWindowWidthheightoriginXyattrlength( + sqInt w, sqInt h, sqInt x, sqInt y, char *list, sqInt attributeListLength) { if (noDisplay) return 0; @@ -65,7 +65,7 @@ int createWindowWidthheightoriginXyattrlength( } -/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the int windowIndex +/* ioShowDisplayOnWindow: similar to ioShowDisplay but adds the sqInt windowIndex * Return true if ok, false if not, but not currently checked */ sqInt ioShowDisplayOnWindow( @@ -82,13 +82,13 @@ sqInt ioShowDisplayOnWindow( } -/* ioSizeOfWindow: arg is int windowIndex. Return the size of the specified +/* ioSizeOfWindow: arg is sqInt windowIndex. Return the size of the specified * window in (width<<16 || height) format like ioScreenSize. * Return -1 for failure - typically invalid windowIndex * -1 is chosen since itwould correspond to a window size of 64k@64k which * I hope is unlikely for some time to come */ -int ioSizeOfWindow(int windowIndex) +sqInt ioSizeOfWindow(sqInt windowIndex) { if (noDisplay) return -1; @@ -97,11 +97,11 @@ int ioSizeOfWindow(int windowIndex) } -/* ioSizeOfWindowSetxy: args are int windowIndex, int w & h for the +/* ioSizeOfWindowSetxy: args are sqInt windowIndex, sqInt w & h for the * width / height to make the window. Return the actual size the OS * produced in (width<<16 || height) format or -1 for failure as above. */ -int ioSizeOfWindowSetxy(int windowIndex, int w, int h) +sqInt ioSizeOfWindowSetxy(sqInt windowIndex, sqInt w, sqInt h) { if (noDisplay) return -1; @@ -110,11 +110,11 @@ int ioSizeOfWindowSetxy(int windowIndex, int w, int h) } -/* ioPositionOfWindow: arg is int windowIndex. Return the pos of the specified +/* ioPositionOfWindow: arg is sqInt windowIndex. Return the pos of the specified * window in (left<<16 || top) format like ioScreenSize. * Return -1 (as above) for failure - typically invalid windowIndex */ -int ioPositionOfWindow(int windowIndex) +sqInt ioPositionOfWindow(sqInt windowIndex) { if (noDisplay) return -1; @@ -123,11 +123,11 @@ int ioPositionOfWindow(int windowIndex) } -/* ioPositionOfWindowSetxy: args are int windowIndex, int x & y for the +/* ioPositionOfWindowSetxy: args are sqInt windowIndex, sqInt x & y for the * origin x/y for the window. Return the actual origin the OS * produced in (left<<16 || top) format or -1 for failure, as above */ -int ioPositionOfWindowSetxy(int windowIndex, int x, int y) +sqInt ioPositionOfWindowSetxy(sqInt windowIndex, sqInt x, sqInt y) { if (noDisplay) return -1; @@ -136,11 +136,11 @@ int ioPositionOfWindowSetxy(int windowIndex, int x, int y) } -/* ioSetTitleOfWindow: args are int windowIndex, char* newTitle and - * int size of new title. Fail with -1 if windowIndex is invalid, string is too +/* ioSetTitleOfWindow: args are sqInt windowIndex, char* newTitle and + * sqInt size of new title. Fail with -1 if windowIndex is invalid, string is too * long for platform etc. Leave previous title in place on failure */ -int ioSetTitleOfWindow(int windowIndex, char *newTitle, int sizeOfTitle) +sqInt ioSetTitleOfWindow(sqInt windowIndex, char *newTitle, sqInt sizeOfTitle) { if (noDisplay) return -1; @@ -149,8 +149,8 @@ int ioSetTitleOfWindow(int windowIndex, char *newTitle, int sizeOfTitle) } -/* ioSetIconOfWindow: args are int windowIndex, char* iconPath and - * int size of new logo path. If one of the function is failing, the logo is not set. +/* ioSetIconOfWindow: args are sqInt windowIndex, char* iconPath and + * sqInt size of new logo path. If one of the function is failing, the logo is not set. */ sqInt ioSetIconOfWindow(sqInt windowIndex, char * iconPath, sqInt sizeOfPath) { //Not implemented @@ -161,7 +161,7 @@ sqInt ioSetIconOfWindow(sqInt windowIndex, char * iconPath, sqInt sizeOfPath) { * Close all the windows that appear to be open. * No useful return value since we're getting out of Dodge anyway. */ -int ioCloseAllWindows(void) +sqInt ioCloseAllWindows(void) { if (noDisplay) return 0; diff --git a/platforms/unix/plugins/SqueakSSL/openssl_overlay.h b/platforms/unix/plugins/SqueakSSL/openssl_overlay.h index 9b9e8c405d..d693c26a45 100644 --- a/platforms/unix/plugins/SqueakSSL/openssl_overlay.h +++ b/platforms/unix/plugins/SqueakSSL/openssl_overlay.h @@ -108,7 +108,7 @@ #define sqo_X509_check_ip_asc NULL_FUNC #define sqo_X509_check_host NULL_FUNC #endif - + #if OPENSSL_VERSION_NUMBER >= 0x10100000L #define sqo_SSL_CTX_set_options SSL_CTX_set_options #define sqo_BIO_test_flags BIO_test_flags @@ -121,7 +121,7 @@ #define sqo_OPENSSL_sk_pop_free OPENSSL_sk_pop_free #define sqo_TLS_method TLS_method -#define sqo_ASN1_STRING_get0_data ASN1_STRING_get0_data +#define sqo_ASN1_STRING_get0_data ASN1_STRING_get0_data #define sqo_ASN1_STRING_data NULL_FUNC #define sqo_sk_new_null NULL_FUNC @@ -137,8 +137,7 @@ #elif OPENSSL_VERSION_NUMBER < 0x10100000L - -#define sqo_SSL_CTX_set_options NULL_FUNC +// do not #define sqo_SSL_CTX_set_options, is already #define sqo_BIO_test_flags NULL_FUNC #define sqo_OPENSSL_init_ssl NULL_FUNC #define sqo_OPENSSL_sk_new_null NULL_FUNC @@ -188,28 +187,6 @@ #if OPENSSL_VERSION_NUMBER < 0x10100000L # define OPENSSL_STACK _STACK -# define sqo_OPENSSL_sk_num sqo_sk_num -# define sqo_OPENSSL_sk_value sqo_sk_value -# define sqo_OPENSSL_sk_set sqo_sk_set -# define sqo_OPENSSL_sk_new sqo_sk_new -# define sqo_OPENSSL_sk_new_null sqo_sk_new_null -# define sqo_OPENSSL_sk_free sqo_sk_free -# define sqo_OPENSSL_sk_pop_free sqo_sk_pop_free -# define sqo_OPENSSL_sk_deep_copy sqo_sk_deep_copy -# define sqo_OPENSSL_sk_insert sqo_sk_insert -# define sqo_OPENSSL_sk_delete sqo_sk_delete -# define sqo_OPENSSL_sk_delete_ptr sqo_sk_delete_ptr -# define sqo_OPENSSL_sk_find sqo_sk_find -# define sqo_OPENSSL_sk_find_ex sqo_sk_find_ex -# define sqo_OPENSSL_sk_push sqo_sk_push -# define sqo_OPENSSL_sk_unshift sqo_sk_unshift -# define sqo_OPENSSL_sk_shift sqo_sk_shift -# define sqo_OPENSSL_sk_pop sqo_sk_pop -# define sqo_OPENSSL_sk_zero sqo_sk_zero -# define sqo_OPENSSL_sk_set_cmp_func sqo_sk_set_cmp_func -# define sqo_OPENSSL_sk_dup sqo_sk_dup -# define sqo_OPENSSL_sk_sort sqo_sk_sort -# define sqo_OPENSSL_sk_is_sorted sqo_sk_is_sorted # define sk_GENERAL_NAME_freefunc void(*)(void*) # define OPENSSL_INIT_SETTINGS struct ossl_init_settings_st OPENSSL_INIT_SETTINGS; @@ -376,9 +353,9 @@ OPENSSL_INIT_SETTINGS; #if !defined(SQO_DL_FLAGS) # if !defined(__OpenBSD__) -# define SQO_DL_FLAGS RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE +# define SQO_DL_FLAGS (RTLD_NOW | RTLD_GLOBAL | RTLD_NODELETE) # else -# define SQO_DL_FLAGS RTLD_NOW | RTLD_GLOBAL +# define SQO_DL_FLAGS (RTLD_NOW | RTLD_GLOBAL) # endif #endif /* !defined(SQO_DL_FLAGS) */ @@ -422,7 +399,7 @@ void SQO_DESTRUCTOR fini(void) /* * It may be the case that the libs we try to load are not exactly named as we like - * So we + * So we * * enumerate all plausible library paths * * enumerate all libs there matching our name * * and report back the _names_ (NOT the full paths, we want dlopen to @@ -458,7 +435,7 @@ static bool _sqo_insert_dynamic_lib_dir(char* dir) } return found; } - + static int _sqo_find_lib_dirs(struct dl_phdr_info *info, size_t size, void *data) @@ -502,7 +479,7 @@ static size_t _sqo_lib_paths(size_t const n, char (*libs[n])) DEBUG_PRINT("Library path %zu at %s\n", num_libs, L); \ if (libs != NULL) libs[num_libs] = strdup(L); \ num_libs++; \ - } while (0) + } while (0) /* * Add all paths on the LD_LIBRARY_PATH */ @@ -513,7 +490,7 @@ static size_t _sqo_lib_paths(size_t const n, char (*libs[n])) for (char* in_llp = ld_library_path; *in_llp != '\0'; in_llp++) { if (*in_llp == ':' || *in_llp == ';') { num_libs++; - } + } } } else { char* current = NULL, *tofree, *path; @@ -548,7 +525,7 @@ static size_t _sqo_lib_paths(size_t const n, char (*libs[n])) _SQO_ADD_LIB("/usr/lib64"); _SQO_ADD_LIB("/usr/local/lib64"); #endif - + return num_libs; #undef _SQO_ADD_LIB @@ -573,7 +550,7 @@ static int _sqo_strverscmp(const char* a, const char* b) while (*left && *right && !isdigit(*left) && !isdigit(*right) && *left == *right) { left++; - right++; + right++; } if (!isdigit(*left) && !isdigit(*right)) { break; @@ -584,7 +561,7 @@ static int _sqo_strverscmp(const char* a, const char* b) return lnum - rnum; } } - return *left - *right; + return *left - *right; } #endif /* defined(__linux__) */ @@ -615,19 +592,19 @@ void* _sqo_dlopen_any(const char* name, int mode) dir_idx < num_dirs && libname_count < _SQO_MAX_LIBNAMES; dir_idx++ ) { - char* possible_files = NULL; + char* possible_files = NULL; int written = asprintf(&possible_files, "%s/%s.*", dirs[dir_idx], name); if (written <= 0) { continue; } - glob_t g = {0}; + glob_t g = {0}; if (0 == glob(possible_files, GLOB_NOSORT, NULL, &g)) { if (g.gl_pathc > 0) { for (size_t i = 0; i < g.gl_pathc; i++) { char* fullfile = basename(g.gl_pathv[i]); if (strnlen(fullfile, PATH_MAX) > name_len) { libnames[libname_count] = strndup(fullfile, PATH_MAX); - libname_count++; + libname_count++; } } } @@ -652,7 +629,8 @@ void* _sqo_dlopen_any(const char* name, int mode) * Zeroth, if name is NULL, go straight to dlopen. * First, try the version most closely matching our compiletime version. * Second, try the non-versioned bare name. - * Third, enumerate all plausible paths and try the names found in numeric order. + * Third, enumerate all plausible paths and try the names found + * in numeric order. */ void* _sqo_dlopen(const char* name, int mode) { @@ -682,7 +660,7 @@ void* _sqo_dlopen(const char* name, int mode) return _sqo_dlopen_any(name, mode); } - + /* * Macro that lookups a symbol in a library and does immediately * return the address when found. @@ -705,7 +683,7 @@ void* _sqo_dlopen(const char* name, int mode) #define SQO_FIND_SYM(sym, name, where, dlname) \ do { \ if (!dlhandle_ ## where) { \ - DEBUG_PRINT("Loading %s\n", dlname); \ + DEBUG_PRINT("Loading %s\n",(dlname)?(dlname):"self"); \ dlhandle_ ## where = _sqo_dlopen(dlname, SQO_DL_FLAGS); \ } \ if (dlhandle_ ## where) { \ @@ -743,8 +721,8 @@ static inline void* _sqo_find(const char* name) * * */ -#define SQO_DECL___(ret, name, ...) ret (*sqo_ ## name)(__VA_ARGS__); -#define SQO_DECL_IF(ret, name, ...) ret (*sqo_ ## name)(__VA_ARGS__); +#define SQO_DECL___(ret, name, ...) ret (*sqo_ ## name)(__VA_ARGS__) = NULL; +#define SQO_DECL_IF(ret, name, ...) ret (*sqo_ ## name)(__VA_ARGS__) = NULL; #define SQO_DECL_NO(ret, name, ...) /**/ /* THIS LINE IS VITAL */ @@ -782,7 +760,7 @@ static ossl_inline int sqo_BIO_should_retry(BIO* b){ #if OPENSSL_VERSION_NUMBER < 0x10100000L #define sqo_SSL_CTX_set_options(ctx,op) sqo_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL) - + #define sqo_SKM_sk_num(type, st) sqo_sk_num(CHECKED_STACK_OF(type, st)) #define sqo_SKM_sk_value(type, st,i) ((type *)sqo_sk_value(CHECKED_STACK_OF(type, st), i)) #define sqo_SKM_sk_free(type, st) sqo_sk_free(CHECKED_STACK_OF(type, st)) @@ -845,7 +823,7 @@ static ossl_inline void #define sqo_SSL_ERROR_WANT_X509_LOOKUP 4 #endif - + /* * Function that makes sure that all sqo_ prefixed OpenSSL names are * actually available. @@ -873,7 +851,7 @@ bool loadLibrary(void) if (!(sqo_ ## name = (ret (*)(__VA_ARGS__)) _sqo_find(#name))) \ return false; #define SQO_DECL_IF(ret, name, ...) \ - sqo_ ## name =(ret (*)(__VA_ARGS__)) _sqo_find(#name); + sqo_ ## name = (ret (*)(__VA_ARGS__)) _sqo_find(#name); #define SQO_DECL_NO(ret, name, ...) /**/ /* THIS LINE IS VITAL */ @@ -887,7 +865,7 @@ bool loadLibrary(void) #if !defined(SQSSL_OPENSSL_LINKED) && !defined(__MACH__) _sqo_dynamic_lib_dirs_reset(); #endif - + #endif /* defined(SQSSL_OPENSSL_LINKED) */ @@ -906,6 +884,8 @@ bool loadLibrary(void) } #undef SQO_DECLARATIONS + + /* !defined(SQ_OPENSSL_OVERLAY_H) */ #endif /* EOF */ diff --git a/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc b/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc index baf703725c..3e89d1cff4 100644 --- a/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc +++ b/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc @@ -112,7 +112,7 @@ enum sqMatchResult sqVerifyNameInner(sqSSL* ssl, X509* cert, const void* serverN break; } } - sqo_sk_GENERAL_NAME_pop_free(sANs, (sk_GENERAL_NAME_freefunc)sqo_OPENSSL_sk_free); + sqo_sk_GENERAL_NAME_pop_free(sANs, (sk_GENERAL_NAME_freefunc)sqo_sk_free); } return matchFound; }