Skip to content

Commit

Permalink
Handle 64 bit time_t on 32 bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ellert committed Mar 16, 2024
1 parent 1127f41 commit 4445ba7
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 18 deletions.
4 changes: 2 additions & 2 deletions gridftp/client/source/globus_ftp_client_perf_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ perf_plugin_response_cb(
char * buffer;
char * tmp_ptr;
int count;
long time_stamp_int;
time_t time_stamp_int;
char time_stamp_tenth;
int stripe_ndx;
int num_stripes;
Expand Down Expand Up @@ -301,7 +301,7 @@ perf_plugin_data_cb(
{
perf_plugin_info_t * ps;
globus_abstime_t timebuf;
long secs;
time_t secs;
long usecs;
double time_now;

Expand Down
2 changes: 1 addition & 1 deletion gridftp/client/source/globus_ftp_client_perf_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ typedef void (*globus_ftp_client_perf_plugin_begin_cb_t)(
typedef void (*globus_ftp_client_perf_plugin_marker_cb_t)(
void * user_specific,
globus_ftp_client_handle_t * handle,
long time_stamp_int,
time_t time_stamp_int,
char time_stamp_tenth,
int stripe_ndx,
int num_stripes,
Expand Down
4 changes: 2 additions & 2 deletions gridftp/client/source/globus_ftp_client_throughput_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ throughput_plugin_begin_cb(
{
throughput_plugin_info_t * info;
globus_abstime_t timebuf;
long secs;
time_t secs;
long usecs;
globus_ftp_client_restart_marker_t marker;
globus_off_t total_bytes;
Expand Down Expand Up @@ -157,7 +157,7 @@ void
throughput_plugin_marker_cb(
void * user_specific,
globus_ftp_client_handle_t * handle,
long time_stamp_int,
time_t time_stamp_int,
char time_stamp_tenth,
int stripe_ndx,
int num_stripes,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@ static
void perf_plugin_marker_cb(
void * user_specific,
globus_ftp_client_handle_t * handle,
long time_stamp_int,
time_t time_stamp_int,
char time_stamp_tenth,
int stripe_ndx,
int num_stripes,
globus_off_t nbytes)
{
globus_libc_fprintf(stderr, "perf_plugin_marker_cb\n");
globus_libc_fprintf(stderr, "time_stamp %ld.%d\n", time_stamp_int, time_stamp_tenth);
globus_libc_fprintf(stderr, "time_stamp %lld.%d\n", (long long) time_stamp_int, time_stamp_tenth);
globus_libc_fprintf(stderr, "stripe_ndx %d\n", stripe_ndx);
globus_libc_fprintf(stderr, "num_stripes %d\n", num_stripes);
globus_libc_fprintf(stderr, "nbytes %" GLOBUS_OFF_T_FORMAT "\n", nbytes);
Expand Down
4 changes: 2 additions & 2 deletions gridftp/server-lib/src/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gridftp_server_control],[9.3],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gridftp_server_control],[9.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 All @@ -21,6 +21,6 @@ AC_CONFIG_FILES(
globus-gridftp-server-control.pc
globus-gridftp-server-control-uninstalled.pc
Makefile
version.h
version.h
test/Makefile)
AC_OUTPUT
4 changes: 2 additions & 2 deletions gridftp/server-lib/src/globus_gridftp_server_control_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,12 @@ globus_l_gsc_send_perf(
gettimeofday(&now, NULL);
msg = globus_common_create_string(
"112-Perf Marker\r\n"
" Timestamp: %ld.%01ld\r\n"
" Timestamp: %lld.%01ld\r\n"
" Stripe Index: %d\r\n"
" Stripe Bytes Transferred: %"GLOBUS_OFF_T_FORMAT"\r\n"
" Total Stripe Count: %d\r\n"
"112 End.\r\n",
now.tv_sec, now.tv_usec / 100000,
(long long) now.tv_sec, now.tv_usec / 100000,
stripe_ndx,
nbytes,
stripe_count);
Expand Down
2 changes: 1 addition & 1 deletion gridftp/server/src/configure.ac
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ([2.60])

AC_INIT([globus_gridftp_server],[13.26],[https://github.com/gridcf/gct/issues])
AC_INIT([globus_gridftp_server],[13.27],[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
8 changes: 4 additions & 4 deletions gridftp/server/src/globus_i_gfs_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,11 +1061,11 @@ globus_l_gfs_data_command_cb(
gettimeofday(&now, NULL);
msg = globus_common_create_string(
"%d-Status Marker\r\n"
" Timestamp: %ld.%01ld\r\n"
" Timestamp: %lld.%01ld\r\n"
" Bytes Processed: %s\r\n"
"%d End.\r\n",
reply->code,
now.tv_sec, now.tv_usec / 100000,
(long long) now.tv_sec, now.tv_usec / 100000,
reply->info.command.checksum,
reply->code);
globus_i_gsc_cmd_intermediate_reply(op, msg);
Expand Down Expand Up @@ -1098,12 +1098,12 @@ globus_l_gfs_data_command_cb(
case 112:
msg = globus_common_create_string(
"112-Perf Marker\r\n"
" Timestamp: %ld.%01ld\r\n"
" Timestamp: %lld.%01ld\r\n"
" Stripe Index: 0\r\n"
" Stripe Bytes Transferred: %s\r\n"
" Total Stripe Count: 1\r\n"
"112 End.\r\n",
now.tv_sec, now.tv_usec / 100000,
(long long) now.tv_sec, now.tv_usec / 100000,
reply->info.command.checksum);
break;
default:
Expand Down
1 change: 1 addition & 0 deletions packaging/debian/globus-ftp-client/debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
globus-ftp-client (9.9-1+gct.@distro@) @distro@; urgency=medium

* Fix format warnings on 32 bit systems
* Handle 64 bit time_t on 32 bit systems

-- Mattias Ellert <[email protected]> Fri, 01 Mar 2024 11:13:14 +0100

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
globus-gridftp-server-control (9.4-1+gct.@distro@) @distro@; urgency=medium

* Handle 64 bit time_t on 32 bit systems

-- Mattias Ellert <[email protected]> Sat, 16 Mar 2024 03:38:32 +0100

globus-gridftp-server-control (9.3-1+gct.@distro@) @distro@; urgency=medium

* Fix some compiler warnings
Expand Down
6 changes: 6 additions & 0 deletions packaging/debian/globus-gridftp-server/debian/changelog.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
globus-gridftp-server (13.27-1+gct.@distro@) @distro@; urgency=medium

* Handle 64 bit time_t on 32 bit systems

-- Mattias Ellert <[email protected]> Sat, 16 Mar 2024 03:39:44 +0100

globus-gridftp-server (13.26-1+gct.@distro@) @distro@; urgency=medium

* Correct spelling error found by lintian
Expand Down
1 change: 1 addition & 0 deletions packaging/fedora/globus-ftp-client.spec
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ GLOBUS_HOSTNAME=localhost make %{?_smp_mflags} check VERBOSE=1
%changelog
* Fri Mar 01 2024 Mattias Ellert <[email protected]> - 9.9-1
- Fix format warnings on 32 bit systems
- Handle 64 bit time_t on 32 bit systems

* Wed Mar 09 2022 Mattias Ellert <[email protected]> - 9.8-1
- Fix some compiler and doxygen warnings
Expand Down
5 changes: 4 additions & 1 deletion packaging/fedora/globus-gridftp-server-control.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Name: globus-gridftp-server-control
%global soname 0
%global _name %(echo %{name} | tr - _)
Version: 9.3
Version: 9.4
Release: 1%{?dist}
Summary: Grid Community Toolkit - Globus GridFTP Server Library

Expand Down Expand Up @@ -112,6 +112,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Sat Mar 16 2024 Mattias Ellert <[email protected]> - 9.4-1
- Handle 64 bit time_t on 32 bit systems

* Thu Mar 10 2022 Mattias Ellert <[email protected]> - 9.3-1
- Fix some compiler warnings

Expand Down
5 changes: 4 additions & 1 deletion packaging/fedora/globus-gridftp-server.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Name: globus-gridftp-server
%global soname 6
%global _name %(echo %{name} | tr - _)
Version: 13.26
Version: 13.27
Release: 1%{?dist}
Summary: Grid Community Toolkit - Globus GridFTP Server

Expand Down Expand Up @@ -223,6 +223,9 @@ fi
%{_libdir}/pkgconfig/%{name}.pc

%changelog
* Sat Mar 16 2024 Mattias Ellert <[email protected]> - 13.27-1
- Handle 64 bit time_t on 32 bit systems

* Fri Mar 08 2024 Mattias Ellert <[email protected]> - 13.26-1
- Correct spelling error found by lintian

Expand Down

0 comments on commit 4445ba7

Please sign in to comment.