diff --git a/c/bpxskt.c b/c/bpxskt.c index c7eace059..6956923f8 100644 --- a/c/bpxskt.c +++ b/c/bpxskt.c @@ -129,16 +129,17 @@ int setSocketTrace(int toWhat) { return was; } -void sleep(int seconds){ - int returnValue; - int *returnValuePtr; +unsigned int sleep(unsigned int seconds){ + unsigned int returnValue; + unsigned int *returnValuePtr; #ifndef _LP64 - returnValuePtr = (int*) (0x80000000 | ((int)&returnValue)); + returnValuePtr = (unsigned int*) (0x80000000 | ((int)&returnValue)); #else returnValuePtr = &returnValue; #endif BPXSLP(seconds,returnValuePtr); + return returnValue; } void bpxSleep(int seconds) diff --git a/c/crossmemory.c b/c/crossmemory.c index 5ad9c72ec..11bee3e89 100644 --- a/c/crossmemory.c +++ b/c/crossmemory.c @@ -3268,9 +3268,10 @@ static int handleModifyCommand(STCBase *base, CIB *cib, STCConsoleCommandType co return 0; } -static void sleep(int seconds){ +static unsigned int sleep(unsigned int seconds){ int waitValue = seconds * 100; __asm(" STIMER WAIT,BINTVL=%0\n" : : "m"(waitValue)); + return 0; } static int isEnvironmentReady() { diff --git a/c/mtlskt.c b/c/mtlskt.c index 59b11f029..431153cc8 100644 --- a/c/mtlskt.c +++ b/c/mtlskt.c @@ -127,9 +127,10 @@ static int socketTrace = 0; -void sleep(int seconds){ +unsigned int sleep(unsigned int seconds){ int waitValue = seconds * 100; __asm(" STIMER WAIT,BINTVL=%0\n" : : "m"(waitValue)); + return 0; } void bpxSleep(int seconds) diff --git a/c/zosfile.c b/c/zosfile.c index f3bc4e38b..33c529ca5 100644 --- a/c/zosfile.c +++ b/c/zosfile.c @@ -1642,14 +1642,14 @@ int fileSetLock(UnixFile *file, int *returnCode, int *reasonCode) { #endif int action = F_SET_LOCK; - F_LOCK flockdata; + BpxFLock flockdata; flockdata.l_type = F_WRITE_LOCK; flockdata.l_whence = F_SEEK_SET; flockdata.l_start = 0; flockdata.l_len = F_WHENCE_TO_END; flockdata.l_pid = 0; - F_LOCK *fnctl_ptr = &flockdata; + BpxFLock *fnctl_ptr = &flockdata; BPXFCT(&file->fd, &action, @@ -1677,14 +1677,14 @@ int fileGetLock(UnixFile *file, int *returnCode, int *reasonCode, int *isLocked) #endif int action = F_GET_LOCK; - F_LOCK flockdata; + BpxFLock flockdata; flockdata.l_type = F_WRITE_LOCK; flockdata.l_whence = F_SEEK_SET; flockdata.l_start = 0; flockdata.l_len = F_WHENCE_TO_END; flockdata.l_pid = 0; - F_LOCK *fnctl_ptr = &flockdata; + BpxFLock *fnctl_ptr = &flockdata; BPXFCT(&file->fd, &action, @@ -1716,14 +1716,14 @@ int fileUnlock(UnixFile *file, int *returnCode, int *reasonCode) { #endif int action = F_SET_LOCK; - F_LOCK flockdata; + BpxFLock flockdata; flockdata.l_type = F_UNLOCK; flockdata.l_whence = F_SEEK_SET; flockdata.l_start = 0; flockdata.l_len = F_WHENCE_TO_END; flockdata.l_pid = 0; - F_LOCK *fnctl_ptr = &flockdata; + BpxFLock *fnctl_ptr = &flockdata; BPXFCT(&file->fd, &action, diff --git a/h/bpxnet.h b/h/bpxnet.h index 0cb7f4a52..79c5a1e29 100644 --- a/h/bpxnet.h +++ b/h/bpxnet.h @@ -221,7 +221,7 @@ typedef struct hostent_tag{ /* sleep(int seconds) is standard in linux */ #if !defined(__ZOWE_OS_LINUX) && !defined(__ZOWE_OS_AIX) -void sleep(int secs); +unsigned int sleep(unsigned int); #endif /* Set socket tracing; returns prior value */ diff --git a/h/dataservice.h b/h/dataservice.h index ecbbdc2fc..671babe58 100644 --- a/h/dataservice.h +++ b/h/dataservice.h @@ -20,7 +20,7 @@ */ -typedef int ExternalAPI(void); +typedef int ExternalAPI(struct DataService_tag *,struct HttpServer_tag *); struct JsonObject_tag; struct HttpServer_tag; diff --git a/h/metalio.h b/h/metalio.h index 3b6f9bb8d..f05f72851 100644 --- a/h/metalio.h +++ b/h/metalio.h @@ -119,7 +119,7 @@ typedef struct WPLFlags_tag{ } WPLFlags; -typedef int ntFunction(void); +typedef int ntFunction(int *, ...); #define NT_CREATE 1 #define NT_RETRIEVE 2 diff --git a/h/unixfile.h b/h/unixfile.h index 5bdbc151b..a82d0972d 100644 --- a/h/unixfile.h +++ b/h/unixfile.h @@ -445,13 +445,13 @@ typedef struct F_CVT_tag { /* Length Values */ #define F_WHENCE_TO_END 0 /* Locked file is from whence to end of the file */ -typedef struct F_LOCK_TAG { +typedef struct BpxFLock_Tag { short l_type; short l_whence; int64 l_start; int64 l_len; unsigned int l_pid; -} F_LOCK; +} BpxFLock; int fileDisableConversion(UnixFile *file, int *returnCode, int *reasonCode); int fileSetLock(UnixFile *file, int *returnCode, int *reasonCode);