Skip to content

Commit

Permalink
Ignore umask and fix a netcdf compatability issue
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Wang <wangvsa@gmail.com>
  • Loading branch information
wangvsa committed Jan 6, 2025
1 parent 82c46b9 commit 19c5d06
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ option(RECORDER_ENABLE_FCNTL_TRACE "Enable tracing of fcntl()." ON)
option(RECORDER_INSTALL_TESTS "Enable installation of tests." OFF)


set(PNETCDF_INSTALL_PATH "/usr" CACHE STRING "Build Recorder with PnetCDF")


#mark_as_advanced(RECORDER_ENABLE_CUDA_TRACE)
#mark_as_advanced(RECORDER_ENABLE_FCNTL_TRACE)
Expand Down
7 changes: 5 additions & 2 deletions include/recorder-gotcha.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,12 @@
#ifdef NC_VERSION_MINOR

#if (NC_VERSION_MAJOR*10+NC_VERSION_MINOR) < 49
#define NC_memio int
#define NC_Dispatch int
#endif
#if (NC_VERSION_MAJOR*100+NC_VERSION_MINOR*10+NC_VERSION_PATCH) < 492
#define NC_memio int
#endif


#endif
#endif
Expand Down Expand Up @@ -245,7 +248,7 @@ GOTCHA_WRAP(dup, int, (int oldfd));
GOTCHA_WRAP(dup2, int, (int oldfd, int newfd));
GOTCHA_WRAP(pipe, int, (int pipefd[2]));
GOTCHA_WRAP(mkfifo, int, (const char *pathname, mode_t mode));
GOTCHA_WRAP(umask, mode_t, (mode_t mask));
//GOTCHA_WRAP(umask, mode_t, (mode_t mask));
GOTCHA_WRAP(fdopen, FILE*, (int fd, const char *mode));
GOTCHA_WRAP(fileno, int, (FILE *stream));
GOTCHA_WRAP(access, int, (const char *path, int amode));
Expand Down
2 changes: 1 addition & 1 deletion lib/recorder-gotcha.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ struct gotcha_binding_t posix_wrap_actions [] = {
GOTCHA_WRAP_ACTION(dup2),
GOTCHA_WRAP_ACTION(pipe),
GOTCHA_WRAP_ACTION(mkfifo),
GOTCHA_WRAP_ACTION(umask),
//GOTCHA_WRAP_ACTION(umask),
GOTCHA_WRAP_ACTION(fdopen),
GOTCHA_WRAP_ACTION(fileno),
GOTCHA_WRAP_ACTION(access),
Expand Down
2 changes: 2 additions & 0 deletions lib/recorder-posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,11 +670,13 @@ int WRAPPER_NAME(mkfifo)(const char *pathname, mode_t mode) {
char** args = assemble_args_list(2, _fname, itoa(mode));
RECORDER_INTERCEPTOR_EPILOGUE(2, args);
}
/*
mode_t WRAPPER_NAME(umask)(mode_t mask) {
RECORDER_INTERCEPTOR_PROLOGUE(mode_t, umask, (mask));
char** args = assemble_args_list(1, itoa(mask));
RECORDER_INTERCEPTOR_EPILOGUE(1, args);
}
*/

FILE* WRAPPER_NAME(fdopen)(int fd, const char *mode) {
GET_CHECK_FILENAME(fdopen, (fd, mode), &fd, ARG_TYPE_FD);
Expand Down

0 comments on commit 19c5d06

Please sign in to comment.