Skip to content

Commit

Permalink
Open XL implicit function declaration fixes
Browse files Browse the repository at this point in the history
Mostly a collection of missing function declaration fixes and
other commonly seen errors/warnings from Open XL compilation.

runtime/jcl/common/attach.c : missing int specifier
runtime/rasdump/dmpagent.c : missing assembly func declarations (waitpid())
runtime/rasdump/dmpsup.c : implicit function declarations (__cabend())
runtime/rasdump/javadump.cpp : undeclared identifier 'alloca'
runtime/redirector/redirector.c : implicit function declarations (dlerror())
runtime/port/zos390/protect_helpers.c: missing declaration for _MPROT/_MUNPROT

Signed-off-by: Gaurav Chaudhari <[email protected]>
  • Loading branch information
Deigue committed Oct 17, 2024
1 parent 30db706 commit fbe1f49
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/jcl/common/attach.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,13 @@ Java_openj9_internal_tools_attach_target_IPC_isUsingDefaultUid(JNIEnv *env, jcla
/* all offsets are byte offsets */
U_32* PSATOLD_ADDR = (U_32 *)(UDATA) 0x21c; /* z/OS Pointer to current TCB or zero if in SRB mode. Field fixed by architecture. */
U_32 tcbBase; /* base of the z/OS Task Control Block */
const TCBSENV_OFFSET = 0x154; /* offset of the TCBSENV field in the TCB. This field contains a pointer to the ACEE. */
U_32 aceeBaseAddr; /* Address of a control block field which contains a pointer to the base of the RACF Accessor Environment Element (ACEE) */
U_32 aceeBase; /* absolute address of the start of the ACEE */
U_32 aceeflg3Addr; /* address of the "Miscellaneous flags" byte of the ACEE */
U_8 aceeflg3Value; /* contents of the "Miscellaneous flags" byte of the ACEE */
const U_32 ACEEFLG3_OFFSET = 0x28; /* offset of flag 3 from the base of the ACEE */
const U_8 ACEE_DUID = 0X02; /* 1 if current thread is using the defaultUID */
const U_32 TCBSENV_OFFSET = 0x154; /* offset of the TCBSENV field in the TCB. This field contains a pointer to the ACEE. */

tcbBase = *PSATOLD_ADDR;
aceeBaseAddr = tcbBase+TCBSENV_OFFSET;
Expand Down
2 changes: 2 additions & 0 deletions runtime/port/zos390/protect_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
#include <sys/mman.h>
#include <errno.h>

extern intptr_t _MPROT(uintptr_t address, uintptr_t length);
extern intptr_t _MUNPROT(uintptr_t address, uintptr_t length);

/**
* @internal @file
Expand Down
1 change: 1 addition & 0 deletions runtime/rasdump/dmpagent.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#ifdef J9ZOS390
#include <spawn.h>
#include <errno.h>
#include <sys/wait.h>
#include "atoe.h"
#endif
#ifdef AIXPPC
Expand Down
1 change: 1 addition & 0 deletions runtime/rasdump/dmpsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ char* dumpDirectoryPrefix = NULL;
#if defined(J9ZOS390)
#if defined(J9VM_ENV_DATA64)
#include <__le_api.h>
#include <ctest.h>
#else
#include <leawi.h>
#include <ceeedcct.h>
Expand Down
2 changes: 0 additions & 2 deletions runtime/rasdump/javadump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
#include <malloc.h>
#elif defined(LINUX) || defined(AIXPPC)
#include <alloca.h>
#elif defined(J9ZOS390)
#include <stdlib.h>
#endif
#if defined(J9ZTPF)
#include <sys/mman.h>
Expand Down
1 change: 1 addition & 0 deletions runtime/redirector/redirector.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ typedef enum gc_policy{
#endif /* defined(AIXPPC) */

#if defined(J9ZOS390)
#include <dlfcn.h>
#include <dll.h>
#include "atoe.h"
#include <stdlib.h>
Expand Down

0 comments on commit fbe1f49

Please sign in to comment.