Windows: define AFS_IHANDLE_PIO_ENV for ihandle pio 70/12270/4
authorMichael Meffie <mmeffie@sinenomine.net>
Mon, 25 Apr 2016 15:19:10 +0000 (11:19 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 25 May 2018 14:04:50 +0000 (10:04 -0400)
commit759f29cfdfabed4dc5c1b96a0b2b79a3f83c08e3
tree6fdeb3dee0e59c34f7b03431f7dc7210dde8a732
parent343234d221ae8388f55748f5c494a42d5d69bfa0
Windows: define AFS_IHANDLE_PIO_ENV for ihandle pio

Support for positional i/o in the ihandle package was added to the
windows platform in commit 50b6a116a1c412d0e6d7442d13d6e92c9dbb35ee
using native windows functions.  That commit also defined HAVE_PIO in
the windows version of the afsconfig.h file. Unfortunately, that
definition of HAVE_PIO is not limited to the ihandle package.

Remove the project-wide HAVE_PIO definition from the windows afsconfig.h
file and define the new AFS_IHANDLE_PIO_ENV symbol when position i/o
support is available in the ihandle package.

Build the fallback ih_pread and ih_pwrite functions (which use lseek)
only when positional i/o is not available in the ihandle package for the
current platform.

Use AFS_IHANDLE_PIO_ENV instead of HAVE_PIO in ih_open() to determine
when it is is safe to share ihandles among threads.

Change-Id: I39b078177bc5a2f1daf8a8f8e6bfb1c76e6dfaf7
Reviewed-on: https://gerrit.openafs.org/12270
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/config/afsconfig-windows.h
src/vol/ihandle.c
src/vol/ihandle.h