aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2014-12-30 17:43:43 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2014-12-30 17:43:43 +0000
commit28a9dd72d6c5297f8a1442e23b80c165ba0b8486 (patch)
tree884f4e8f053d22228e96152cd3e7a3d05d30e494
parentb9d3507d55b42f80615e79ee268f875bc9b56a41 (diff)
downloadsg3_utils-28a9dd72d6c5297f8a1442e23b80c165ba0b8486.tar.gz
introduce uintptr_t in place of unsigned long, w7 64 bit requirement
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@625 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog2
-rw-r--r--src/sg_dd.c4
-rw-r--r--src/sg_raw.c5
-rw-r--r--src/sg_rbuf.c4
-rw-r--r--src/sg_read.c4
-rw-r--r--src/sgm_dd.c6
-rw-r--r--src/sgp_dd.c4
7 files changed, 15 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index f7a96021..fd3a7b41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
-Changelog for sg3_utils-1.41 [20141225] [svn: r624]
+Changelog for sg3_utils-1.41 [20141230] [svn: r625]
- sg_zone: new utility for open, close and finish
zone commands introduced in zbc-r02
- sg_rep_zones and sg_reset_wp: change opcodes as
diff --git a/src/sg_dd.c b/src/sg_dd.c
index 53478900..eab69987 100644
--- a/src/sg_dd.c
+++ b/src/sg_dd.c
@@ -59,7 +59,7 @@
#include "sg_io_linux.h"
#include "sg_unaligned.h"
-static const char * version_str = "5.81 20141224";
+static const char * version_str = "5.82 20141226";
#define ME "sg_dd: "
@@ -1869,7 +1869,7 @@ main(int argc, char * argv[])
fprintf(stderr, "Not enough user memory for raw\n");
return SG_LIB_CAT_OTHER;
}
- wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
+ wrkPos = (unsigned char *)(((uintptr_t)wrkBuff + psz - 1) &
(~(psz - 1)));
#endif
} else {
diff --git a/src/sg_raw.c b/src/sg_raw.c
index 2580b080..90d4fc50 100644
--- a/src/sg_raw.c
+++ b/src/sg_raw.c
@@ -20,6 +20,7 @@
#include <stdio.h>
#include <string.h>
#include <getopt.h>
+#include <inttypes.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -27,7 +28,7 @@
#include "sg_lib.h"
#include "sg_pt.h"
-#define SG_RAW_VERSION "0.4.11 (2014-10-18)"
+#define SG_RAW_VERSION "0.4.12 (2014-12-27)"
#ifdef SG_LIB_WIN32
#ifndef HAVE_SYSCONF
@@ -300,7 +301,7 @@ my_memalign(int length, unsigned char ** wrkBuffp)
return NULL;
} else if (wrkBuffp)
*wrkBuffp = wrkBuff;
- return (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
+ return (unsigned char *)(((uintptr_t)wrkBuff + psz - 1) &
(~(psz - 1)));
}
#endif
diff --git a/src/sg_rbuf.c b/src/sg_rbuf.c
index 3ab94c4b..7c246fdc 100644
--- a/src/sg_rbuf.c
+++ b/src/sg_rbuf.c
@@ -53,7 +53,7 @@
#endif
-static const char * version_str = "4.91 20140425";
+static const char * version_str = "4.92 20141227";
static struct option long_options[] = {
{"buffer", required_argument, 0, 'b'},
@@ -514,7 +514,7 @@ main(int argc, char * argv[])
}
/* perhaps use posix_memalign() instead */
if (op->do_dio) /* align to page boundary */
- rbBuff= (unsigned char *)(((unsigned long)rawp + psz - 1) &
+ rbBuff= (unsigned char *)(((uintptr_t)rawp + psz - 1) &
(~(psz - 1)));
else
rbBuff = (unsigned char *)rawp;
diff --git a/src/sg_read.c b/src/sg_read.c
index 0f102864..3fc0526c 100644
--- a/src/sg_read.c
+++ b/src/sg_read.c
@@ -48,7 +48,7 @@
#include "sg_io_linux.h"
-static const char * version_str = "1.21 20140516";
+static const char * version_str = "1.22 20141227";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
@@ -659,7 +659,7 @@ int main(int argc, char * argv[])
return SG_LIB_CAT_OTHER;
}
/* perhaps use posix_memalign() instead */
- wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
+ wrkPos = (unsigned char *)(((uintptr_t)wrkBuff + psz - 1) &
(~(psz - 1)));
} else if (do_mmap) {
wrkPos = (unsigned char *)mmap(NULL, bs * bpt,
diff --git a/src/sgm_dd.c b/src/sgm_dd.c
index 49e3b107..0f2f107c 100644
--- a/src/sgm_dd.c
+++ b/src/sgm_dd.c
@@ -65,9 +65,9 @@
/* #define SG_WANT_SHARED_MMAP_IO 1 */
#ifdef SG_WANT_SHARED_MMAP_IO
-static const char * version_str = "1.39 20140516 shared_mmap";
+static const char * version_str = "1.40 20141226 shared_mmap";
#else
-static const char * version_str = "1.39 20140516";
+static const char * version_str = "1.40 20141226";
#endif
#define DEF_BLOCK_SIZE 512
@@ -1296,7 +1296,7 @@ main(int argc, char * argv[])
return SG_LIB_FILE_ERROR;
}
/* perhaps use posix_memalign() instead */
- wrkPos = (unsigned char *)(((unsigned long)wrkBuff + psz - 1) &
+ wrkPos = (unsigned char *)(((uintptr_t)wrkBuff + psz - 1) &
(~(psz - 1)));
}
else {
diff --git a/src/sgp_dd.c b/src/sgp_dd.c
index 40b7350c..3dad4b49 100644
--- a/src/sgp_dd.c
+++ b/src/sgp_dd.c
@@ -56,7 +56,7 @@
#include "sg_io_linux.h"
-static const char * version_str = "5.47 20140516";
+static const char * version_str = "5.48 20141226";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
@@ -541,7 +541,7 @@ read_write_thread(void * v_clp)
#endif
if (NULL == (rep->alloc_bp = (unsigned char *)malloc(sz + psz)))
err_exit(ENOMEM, "out of memory creating user buffers\n");
- rep->buffp = (unsigned char *)(((unsigned long)rep->alloc_bp + psz - 1) &
+ rep->buffp = (unsigned char *)(((uintptr_t)rep->alloc_bp + psz - 1) &
(~(psz - 1)));
/* Follow clp members are constant during lifetime of thread */
rep->bs = clp->bs;