Skip to content

Commit

Permalink
Merge pull request #223 from ellert/format-issues
Browse files Browse the repository at this point in the history
64 bit time_t
  • Loading branch information
fscheiner authored Apr 11, 2024
2 parents e479e51 + 79b3f9b commit 7c6118c
Show file tree
Hide file tree
Showing 50 changed files with 304 additions and 188 deletions.
6 changes: 3 additions & 3 deletions gass/transfer/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gass_transfer],[9.4],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gass_transfer],[9.5],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand All @@ -25,6 +25,6 @@ AC_CONFIG_FILES(
globus-gass-transfer.pc
Makefile
library/Doxyfile
library/Makefile
version.h)
library/Makefile
version.h)
AC_OUTPUT
10 changes: 5 additions & 5 deletions gass/transfer/source/library/globus_gass_transfer_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ globus_l_gass_transfer_http_send(

/* send chunk header and footer as an iovec array */
sprintf((char *) new_proto->iov[0].iov_base,
"%lx%s",
(long) new_proto->user_buflen,
"%zx%s",
new_proto->user_buflen,
CRLF);
new_proto->iov[0].iov_len = strlen((char *) new_proto->iov[0].iov_base);

Expand Down Expand Up @@ -1728,7 +1728,7 @@ globus_l_gass_transfer_http_request_refer(
GLOBUS_L_HTML_HEADER);
offset += sprintf(referral_string + offset,
GLOBUS_L_CONTENT_LENGTH_HEADER,
(long) body_count);
body_count);
offset += sprintf(referral_string + offset,
CRLF);

Expand Down Expand Up @@ -1838,7 +1838,7 @@ globus_l_gass_transfer_http_request_deny(
GLOBUS_L_HTML_HEADER);
offset += sprintf(deny_string + offset,
GLOBUS_L_CONTENT_LENGTH_HEADER,
(long) body_count);
body_count);
offset += sprintf(deny_string + offset,
CRLF);

Expand Down Expand Up @@ -1941,7 +1941,7 @@ globus_l_gass_transfer_http_request_authorize(
{
offset += sprintf(authorize_string + offset,
GLOBUS_L_CONTENT_LENGTH_HEADER,
(long) length);
length);
}
offset += sprintf(authorize_string + offset,
CRLF);
Expand Down
2 changes: 1 addition & 1 deletion gass/transfer/source/library/globus_l_gass_transfer_http.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ static char * globus_l_gass_transfer_http_subject_name;

#define GLOBUS_L_DEFAULT_DENIAL_MESSAGE "Internal Server Error"

#define GLOBUS_L_CONTENT_LENGTH_HEADER "Content-Length: %ld" CRLF
#define GLOBUS_L_CONTENT_LENGTH_HEADER "Content-Length: %zu" CRLF
#define GLOBUS_L_CHUNKED_HEADER "Transfer-Encoding: chunked" CRLF
#define GLOBUS_L_BINARY_HEADER "Content-Type: " \
"application/octet-stream" CRLF
Expand Down
50 changes: 25 additions & 25 deletions gram/jobmanager/lrms/fork/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gram_job_manager_fork],[3.3],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gram_job_manager_fork],[3.4],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down Expand Up @@ -38,33 +38,33 @@ AC_ARG_WITH(softenv-dir,
AC_SUBST(SOFTENV_DIR)

AC_ARG_WITH(globus-state-dir,
AC_HELP_STRING(
[--with-globus-state-dir=PATH],
[Path to Globus state files]),
globusstatedir="$withval",
globusstatedir=$localstatedir)
AC_HELP_STRING(
[--with-globus-state-dir=PATH],
[Path to Globus state files]),
globusstatedir="$withval",
globusstatedir=$localstatedir)

# GRAM-333: SEG config in installer has variables that aren't resolved at
# runtime
globusstatedir="`eval echo $globusstatedir`"
AC_SUBST(globusstatedir)

AC_ARG_WITH(seg,
AC_HELP_STRING(
[--with-seg=yes|no],
[Enable GRAM configuration with the SEG module]),
SEG_ENABLED="$withval",
SEG_ENABLED="no")
AC_HELP_STRING(
[--with-seg=yes|no],
[Enable GRAM configuration with the SEG module]),
SEG_ENABLED="$withval",
SEG_ENABLED="no")
case "$SEG_ENABLED" in
yes)
SEG_CLAUSE="-seg-module fork"
;;
no)
SEG_CLAUSE=""
;;
*)
AC_MSG_ERROR([Invalid argument to --with-seg])
;;
yes)
SEG_CLAUSE="-seg-module fork"
;;
no)
SEG_CLAUSE=""
;;
*)
AC_MSG_ERROR([Invalid argument to --with-seg])
;;
esac

AC_SUBST(SEG_CLAUSE)
Expand All @@ -89,9 +89,9 @@ AC_SUBST(perlmoduledir)
AC_CONFIG_FILES(
globus-gram-job-manager-fork-uninstalled.pc
globus-gram-job-manager-fork.pc
Makefile
globus-fork.conf
starter/Makefile
seg/Makefile
version.h)
Makefile
globus-fork.conf
starter/Makefile
seg/Makefile
version.h)
AC_OUTPUT
7 changes: 5 additions & 2 deletions gram/jobmanager/lrms/fork/source/seg/seg_fork_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,7 @@ globus_l_fork_parse_events(
char * p;
int protocol_msg_type;
time_t stamp;
long long tmp_stamp;
char * jobid;
int job_state;
int exit_code;
Expand All @@ -711,9 +712,9 @@ globus_l_fork_parse_events(

exit_code = EXIT_CODE_UNASSIGNED;

rc = sscanf(p, "%d;%ld;%n%*[^;]%n;%d;%d",
rc = sscanf(p, "%d;%lld;%n%*[^;]%n;%d;%d",
&protocol_msg_type,
&stamp,
&tmp_stamp,
&jobid_start,
&jobid_end,
&job_state,
Expand All @@ -724,6 +725,8 @@ globus_l_fork_parse_events(
goto bad_line;
}

stamp = (time_t) tmp_stamp;

jobid = p + jobid_start;
*(p + jobid_end) = '\0';

Expand Down
4 changes: 2 additions & 2 deletions gram/jobmanager/lrms/fork/source/starter/fork_starter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,8 @@ globus_l_fork_log_state_change(
return;
}
fprintf(logfile,
"001;%lu;%s:%lu;%d;%d\n",
(unsigned long) now,
"001;%lld;%s:%lu;%d;%d\n",
(long long) now,
task->jobid_prefix,
(unsigned long) pid,
(int) job_state,
Expand Down
40 changes: 20 additions & 20 deletions gram/jobmanager/lrms/lsf/source/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gram_job_manager_lsf],[3.0],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gram_job_manager_lsf],[3.1],[https://github.com/gridcf/gct/issues])
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST([MAJOR_VERSION], [${PACKAGE_VERSION%%.*}])
AC_SUBST([MINOR_VERSION], [${PACKAGE_VERSION##*.}])
Expand Down Expand Up @@ -29,11 +29,11 @@ fi

AC_ARG_WITH([lsf-profile],
AC_HELP_STRING(
[--with-lsf-profile=FILE],
[--with-lsf-profile=FILE],
[Use LSF profile located at PATH ${LSF_ENVDIR:-/etc}/profile.lsf]),
[LSF_PROFILE=$withval],
[LSF_PROFILE="${LSF_ENVDIR:-/etc}/profile.lsf"
AC_MSG_WARN([Using default lsf profile of $LSF_PROFILE])])
[LSF_PROFILE=$withval],
[LSF_PROFILE="${LSF_ENVDIR:-/etc}/profile.lsf"
AC_MSG_WARN([Using default lsf profile of $LSF_PROFILE])])

AC_SUBST(LSF_PROFILE)

Expand Down Expand Up @@ -88,30 +88,30 @@ AC_ARG_WITH(log-path,
AC_SUBST(LSF_LOG_PATH)

AC_ARG_WITH(globus-state-dir,
AC_HELP_STRING(
[--with-globus-state-dir=PATH],
[Path to Globus state files]),
globusstatedir="$withval",
globusstatedir=$localstatedir)
AC_HELP_STRING(
[--with-globus-state-dir=PATH],
[Path to Globus state files]),
globusstatedir="$withval",
globusstatedir=$localstatedir)

# GRAM-333: SEG config in installer has variables that aren't resolved at
# runtime
globusstatedir="`eval echo $globusstatedir`"
AC_SUBST(globusstatedir)

AC_ARG_WITH(seg,
AC_HELP_STRING(
[--with-seg=yes|no],
[Enable GRAM configuration with the SEG module]),
SEG_ENABLED="$withval",
SEG_ENABLED="no")
AC_HELP_STRING(
[--with-seg=yes|no],
[Enable GRAM configuration with the SEG module]),
SEG_ENABLED="$withval",
SEG_ENABLED="no")
case "$SEG_ENABLED" in
yes|no)
yes|no)
:
;;
*)
AC_MSG_ERROR([Invalid argument to --with-seg])
;;
*)
AC_MSG_ERROR([Invalid argument to --with-seg])
;;
esac

AC_ARG_WITH([perlmoduledir],
Expand All @@ -137,5 +137,5 @@ AC_CONFIG_FILES(
globus-lsf.conf
Makefile
seg/Makefile
version.h)
version.h)
AC_OUTPUT
Loading

0 comments on commit 7c6118c

Please sign in to comment.