From 0e095c6d14a3833b36919cb47b42c729a3c7ea59 Mon Sep 17 00:00:00 2001 From: cengizk Date: Tue, 10 Jun 2014 06:04:09 -0400 Subject: [PATCH] Updated pvfs2-osd version to 2.8.8 --- ChangeLog | 261 +- Makefile.in | 334 +- PVFS2-GLOBAL-TODO.txt | 193 - cert-utils/pvfs2-grid-proxy-init.sh | 22 - config.save | 1856 +- configure | 33468 +++++++++------- configure.in => configure.ac | 449 +- doc/.cvsignore | 3 - doc/coding/developer-guidelines.tex | 0 doc/pvfs2-quickstart.tex | 0 doc/pvfs2-status.tex | 0 doc/zones/pvfs2.conf | 44 + doc/zones/pvfs2tab | 1 + errors | 830 + examples/heartbeat/Filesystem-qla-monitor | 836 - examples/heartbeat/PVFS2-notify | 261 - .../apc-switched-pdu-hybrid-control.pl | 138 - .../apc-switched-pdu-hybrid-monitor.pl | 116 - .../apc-switched-pdu-hybrid-outlet-status.pl | 124 - .../apc-switched-pdu-ssh-control.exp | 217 - .../apc-switched-pdu-ssh-monitor.exp | 65 - examples/heartbeat/baytech-mgmt-control.exp | 119 - examples/heartbeat/baytech-mgmt-monitor.exp | 59 - examples/heartbeat/pvfs2-stonith-plugin | 91 - examples/heartbeat/qla-monitor.pl | 97 - examples/pvfs2-server.rc.in | 0 include/pvfs2-hint.h | 2 +- include/pvfs2-sysint.h | 17 +- include/pvfs2-usrint.h | 16 +- include/pvfs2-util.h | 5 +- include/pvfs2.h | 2 +- include/windows/memleaks.h | 19 + include/windows/pvfs2-config.h | 506 + include/windows/pvfs2.h | 36 + maint/TEMPLATE_COPYRIGHT_HEADER.txt | 0 maint/TEMPLATE_FORMAT_TRAILER.txt | 0 maint/build/mpich2-build.py | 0 maint/build/pvfs2-build-tests.sh | 0 maint/build/pvfs2-build.sh | 44 +- maint/build/pvfs2-buildandrun.sh | 0 maint/build/pvfs2-extract-make-msgs.pl | 0 maint/config/bdb.m4 | 60 +- maint/config/config.guess | 0 maint/config/config.sub | 0 maint/config/install-sh | 0 maint/config/kernel.m4 | 667 +- maint/config/missing | 0 maint/config/openssl.m4 | 4 +- maint/config/rt.m4 | 23 + maint/make-dist.sh | 0 projects/OrangeFS/OrangeFS.sln | 354 + projects/OrangeFS/bmi/bmi-vs2012.vcxproj | 196 + projects/OrangeFS/bmi/bmi.vcxproj | 185 + projects/OrangeFS/bmi/bmi.vcxproj.filters | 60 + .../OrangeFS/bmi_misc/bmi_misc-vs2012.vcxproj | 191 + projects/OrangeFS/bmi_misc/bmi_misc.vcxproj | 180 + .../bmi_misc/bmi_misc.vcxproj.filters | 42 + .../bmi_wintcp/bmi_wintcp-vs2012.vcxproj | 191 + .../OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj | 180 + .../bmi_wintcp/bmi_wintcp.vcxproj.filters | 45 + .../client-library - VS2012.vcxproj | 160 + .../client-library/client-library.vcxproj | 155 + .../client-library.vcxproj.filters | 27 + .../client-service-vs2012.vcxproj | 243 + .../client-service/client-service.vcxproj | 237 + .../client-service.vcxproj.filters | 74 + .../description/description-vs2012.vcxproj | 197 + .../OrangeFS/description/description.vcxproj | 186 + .../description/description.vcxproj.filters | 63 + projects/OrangeFS/dev/dev-vs2012.vcxproj | 186 + projects/OrangeFS/dev/dev.vcxproj | 175 + projects/OrangeFS/dev/dev.vcxproj.filters | 30 + .../driver-bw-multi/driver-bw-multi.vcxproj | 140 + .../driver-bw-multi.vcxproj.filters | 45 + projects/OrangeFS/eventlog32.reg | Bin 0 -> 1056 bytes projects/OrangeFS/eventlog64.reg | Bin 0 -> 974 bytes projects/OrangeFS/flow/flow-vs2012.vcxproj | 189 + projects/OrangeFS/flow/flow.vcxproj | 178 + projects/OrangeFS/flow/flow.vcxproj.filters | 39 + .../gen-locks-test/gen-locks-test.vcxproj | 145 + .../gen-locks/gen-locks-vs2012.vcxproj | 181 + projects/OrangeFS/gen-locks/gen-locks.vcxproj | 174 + .../gen-locks/gen-locks.vcxproj.filters | 27 + .../OrangeFS/gossip/gossip-vs2012.vcxproj | 185 + projects/OrangeFS/gossip/gossip.vcxproj | 174 + .../OrangeFS/gossip/gossip.vcxproj.filters | 27 + .../id-generator/id-generator-vs2012.vcxproj | 185 + .../id-generator/id-generator.vcxproj | 174 + .../id-generator/id-generator.vcxproj.filters | 27 + projects/OrangeFS/job/job-vs2012.vcxproj | 191 + projects/OrangeFS/job/job.vcxproj | 180 + projects/OrangeFS/job/job.vcxproj.filters | 45 + projects/OrangeFS/misc/misc-vs2012.vcxproj | 285 + projects/OrangeFS/misc/misc.vcxproj | 274 + projects/OrangeFS/misc/misc.vcxproj.filters | 152 + .../OrangeFS/orangefs-app/OrangeFS_LOGO.png | Bin 0 -> 2036 bytes projects/OrangeFS/orangefs-app/file_icon.xpm | 36 + .../OrangeFS/orangefs-app/folder_icon.xpm | 159 + .../orangefs-app - VS2012.vcxproj | 182 + .../orangefs-app - VS2012.vcxproj.filters | 66 + .../orangefs-app - VS2012.vcxproj.user | 3 + projects/OrangeFS/pingpong/pingpong.vcxproj | 134 + .../pingpong/pingpong.vcxproj.filters | 27 + projects/OrangeFS/proto/proto-vs2012.vcxproj | 189 + projects/OrangeFS/proto/proto.vcxproj | 178 + projects/OrangeFS/proto/proto.vcxproj.filters | 39 + projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj | 76 + .../pvfs2-ls/pvfs2-ls.vcxproj.filters | 22 + .../request-scheduler-vs2012.vcxproj | 185 + .../request-scheduler.vcxproj | 174 + .../request-scheduler.vcxproj.filters | 27 + .../sysint-client-vs2012.vcxproj | 396 + .../sysint-client/sysint-client.vcxproj | 385 + .../sysint-client.vcxproj.filters | 293 + .../test-bmi-client/test-bmi-client.vcxproj | 146 + .../test-bmi-client.vcxproj.filters | 33 + .../test-bmi-server/test-bmi-server.vcxproj | 146 + .../test-bmi-server.vcxproj.filters | 33 + .../OrangeFS/test-client/test-client.vcxproj | 134 + .../test-client/test-client.vcxproj.filters | 27 + .../test-job-client/test-job-client.vcxproj | 76 + .../test-job-client.vcxproj.filters | 22 + .../test-job-server/test-job-server.vcxproj | 76 + .../test-job-server.vcxproj.filters | 22 + projects/TestOrangeFS/TestOrangeFS.sln | 240 + .../client-test/client-test.vcxproj | 141 + .../client-test/client-test.vcxproj.filters | 84 + .../posix-test/posix-test.vcxproj | 72 + .../posix-test/posix-test.vcxproj.filters | 22 + projects/pvfscommon/pvfscommon.sln | 20 + .../pvfscommon/statecomp/statecomp.vcxproj | 107 + .../statecomp/statecomp.vcxproj.filters | 47 + pvfs2-config.h.in | 174 +- src/apps/admin/module.mk.in | 6 +- src/apps/admin/pvfs2-change-fsid.c | 0 src/apps/admin/pvfs2-check-config.c | 0 src/apps/admin/pvfs2-check-server.c | 0 src/apps/admin/pvfs2-chmod.c | 4 +- src/apps/admin/pvfs2-chown.c | 0 src/apps/admin/pvfs2-cp.c | 15 +- src/apps/admin/pvfs2-drop-caches.c | 0 src/apps/admin/pvfs2-event-mon-example.c | 0 src/apps/admin/pvfs2-fs-dump.c | 0 src/apps/admin/pvfs2-fsck.c | 0 src/apps/admin/pvfs2-fsck.h | 0 src/apps/admin/pvfs2-genconfig | 277 +- src/apps/admin/pvfs2-get-uid.c | 0 src/apps/admin/pvfs2-ln.c | 0 src/apps/admin/pvfs2-ls.c | 13 +- src/apps/admin/pvfs2-lsplus.c | 862 - src/apps/admin/pvfs2-migrate-collection.c | 0 src/apps/admin/pvfs2-mkdir.c | 3 +- src/apps/admin/pvfs2-mkspace.c | 0 src/apps/admin/pvfs2-perf-mon-example.c | 0 src/apps/admin/pvfs2-perf-mon-snmp.c | 0 src/apps/admin/pvfs2-perror.c | 0 src/apps/admin/pvfs2-ping.c | 6 + src/apps/admin/pvfs2-remove-object.c | 0 src/apps/admin/pvfs2-rm.c | 0 src/apps/admin/pvfs2-set-debugmask.c | 0 src/apps/admin/pvfs2-set-eventmask.c | 0 src/apps/admin/pvfs2-set-mode.c | 74 +- src/apps/admin/pvfs2-set-sync.c | 0 src/apps/admin/pvfs2-showcoll.c | 0 src/apps/admin/pvfs2-start-all | 146 + src/apps/admin/pvfs2-stat.c | 0 src/apps/admin/pvfs2-statfs.c | 0 src/apps/admin/pvfs2-stop-all | 100 + src/apps/admin/pvfs2-touch.c | 35 +- src/apps/admin/pvfs2-validate.c | 9 + src/apps/admin/pvfs2-viewdist.c | 0 src/apps/admin/pvfs2-write.c | 653 + src/apps/admin/pvfs2-xattr.c | 0 src/apps/devel/module.mk.in | 3 +- src/apps/devel/pvfs2-db-display.c | 88 +- src/apps/devel/pvfs2-remove-prealloc.c | 521 + src/apps/fuse/pvfs2fuse.c | 8 +- src/apps/kernel/linux/pvfs2-client-core.c | 18 - .../00000062/7ffffffffffffffe.bstream | 1 + .../meta/40ec61b1/collection_attributes.db | Bin 0 -> 8192 bytes .../meta/40ec61b1/dataspace_attributes.db | Bin 0 -> 8192 bytes src/apps/storage/meta/40ec61b1/keyval.db | Bin 0 -> 8192 bytes src/apps/storage/meta/collections.db | Bin 0 -> 8192 bytes src/apps/storage/meta/storage_attributes.db | Bin 0 -> 8192 bytes src/apps/ucache/shmem_util.c | 75 - src/apps/ucache/shmem_util.h | 20 - src/apps/ucache/ucached.c | 22 +- src/apps/ucache/ucached_cmd.c | 23 +- src/apps/ucache/ucached_common.c | 16 - src/apps/ucache/watch_daemons | 1 - src/apps/ucache/watch_ipcs | 1 - src/apps/ucache/watch_log | 1 - src/apps/user/checkset_shmall_shmmax.linux | 231 + src/apps/user/ucache.conf | 6 + src/client/cp-library/orangefs-client.c | 1022 + src/client/cp-library/orangefs-client.h | 352 + src/client/jni/README | 63 + src/client/jni/lib/NOTICE.txt | 6 + .../jni/lib/commons-logging-1.1.1.LICENSE.txt | 202 + src/client/jni/lib/commons-logging-1.1.1.jar | Bin 0 -> 60841 bytes .../jni/lib/commons-logging-api-1.1.1.jar | Bin 0 -> 52313 bytes src/client/jni/libPVFS2JNI_common.h | 69 + src/client/jni/libPVFS2POSIXJNI.c | 1576 + src/client/jni/libPVFS2STDIOJNI.c | 1579 + src/client/jni/module.mk.in | 46 + .../hadoop/fs/ofs/OrangeFileSystem.java | 516 + .../fs/ofs/OrangeFileSystemFSInputStream.java | 132 + .../jni/org/orangefs/usrint/Dirent.java | 55 + .../jni/org/orangefs/usrint/Orange.java | 28 + .../usrint/OrangeFileSystemInputChannel.java | 158 + .../usrint/OrangeFileSystemInputStream.java | 157 + .../usrint/OrangeFileSystemOutputChannel.java | 132 + .../usrint/OrangeFileSystemOutputStream.java | 164 + .../org/orangefs/usrint/PVFS2POSIXJNI.java | 209 + .../orangefs/usrint/PVFS2POSIXJNIFlags.java | 95 + .../org/orangefs/usrint/PVFS2STDIOJNI.java | 194 + .../orangefs/usrint/PVFS2STDIOJNIFlags.java | 63 + src/client/jni/org/orangefs/usrint/Stat.java | 57 + .../jni/org/orangefs/usrint/Statfs.java | 61 + .../jni/org/orangefs/usrint/Statvfs.java | 61 + src/client/sysint/acache.c | 9 +- src/client/sysint/client-state-machine.h | 16 +- src/client/sysint/error-details.c | 1 + src/client/sysint/finalize.c | 19 + src/client/sysint/fs-add.sm | 20 +- src/client/sysint/getparent.c | 1 + src/client/sysint/initialize.c | 6 +- src/client/sysint/mgmt-misc.c | 1 + src/client/sysint/ncache.c | 8 +- src/client/sysint/osd.c | 12 +- src/client/sysint/osd.h | 2 +- src/client/sysint/osdsm.sm | 3 - src/client/sysint/remove.sm | 10 +- src/client/sysint/server-get-config.sm | 113 +- src/client/sysint/sys-create.sm | 86 +- src/client/sysint/sys-dist.c | 1 + src/client/sysint/sys-getattr.sm | 20 +- src/client/sysint/sys-io.sm | 30 +- src/client/sysint/sys-lookup.sm | 457 +- src/client/sysint/sys-mkdir.sm | 27 +- src/client/sysint/sys-osd-dir.sm | 16 - src/client/sysint/sys-osd-io.sm | 175 +- src/client/sysint/sys-readdir.sm | 64 +- src/client/sysint/sys-readdirplus.sm | 546 +- src/client/usrint/Makefile | 21 - src/client/usrint/README_UCACHE | 252 + src/client/usrint/error.c | 132 + src/client/usrint/error.h | 57 + src/client/usrint/fts.c | 1150 + src/client/usrint/fts.h | 146 + src/client/usrint/glob.c | 1762 + src/client/usrint/glob.h | 182 + src/client/usrint/iocommon.c | 1818 +- src/client/usrint/iocommon.h | 46 +- src/client/usrint/locks.h | 62 + src/client/usrint/mmap.c | 14 +- src/client/usrint/module.mk.in | 21 +- src/client/usrint/openfile-util.c | 2484 +- src/client/usrint/openfile-util.h | 40 +- src/client/usrint/posix-ops.h | 33 +- src/client/usrint/posix-pvfs.c | 841 +- src/client/usrint/posix-pvfs.h | 33 +- src/client/usrint/posix.c | 680 +- src/client/usrint/pvfs-path.c | 665 + src/client/usrint/pvfs-path.h | 159 + src/client/usrint/pvfs-qualify-path.c | 144 + src/client/usrint/selinux.c | 114 + src/client/usrint/stdio-ops.h | 32 +- src/client/usrint/stdio-pvfs.h | 26 - src/client/usrint/stdio.c | 1183 +- src/client/usrint/ucache.c | 146 +- src/client/usrint/ucache.h | 35 +- src/client/usrint/usrint.h | 324 +- src/client/windows/client-gui/dirListener.cpp | 325 + src/client/windows/client-gui/dirListener.h | 110 + .../windows/client-gui/filelisthandler.cpp | 227 + .../windows/client-gui/filelisthandler.h | 46 + src/client/windows/client-gui/localConfig.cpp | 75 + src/client/windows/client-gui/localConfig.h | 40 + src/client/windows/client-gui/main-app.cpp | 789 + src/client/windows/client-gui/main-app.h | 198 + src/client/windows/client-gui/memLeaks.h | 8 + src/client/windows/client-gui/metadata.cpp | 330 + src/client/windows/client-gui/metadata.h | 64 + src/client/windows/client-gui/syncDialog.cpp | 276 + src/client/windows/client-gui/syncDialog.h | 28 + src/client/windows/client-gui/utils.cpp | 135 + src/client/windows/client-gui/utils.h | 28 + .../windows/client-service/MSG00001.bin | Bin 0 -> 32 bytes src/client/windows/client-service/cert.c | 497 + src/client/windows/client-service/cert.h | 28 + .../windows/client-service/client-service.h | 57 + src/client/windows/client-service/config.c | 663 + src/client/windows/client-service/config.h | 20 + .../windows/client-service/dokan-interface.c | 2366 ++ src/client/windows/client-service/fs.c | 920 + src/client/windows/client-service/fs.h | 111 + .../windows/client-service/ldap-support.c | 247 + .../windows/client-service/ldap-support.h | 24 + .../windows/client-service/messages.aps | Bin 0 -> 572 bytes src/client/windows/client-service/messages.h | 46 + src/client/windows/client-service/messages.mc | 7 + src/client/windows/client-service/messages.rc | 2 + .../windows/client-service/service-main.c | 859 + .../windows/client-service/user-cache.c | 167 + .../windows/client-service/user-cache.h | 41 + src/client/windows/client-test/Makefile | 39 + src/client/windows/client-test/client-test.c | 324 + src/client/windows/client-test/create.c | 381 + src/client/windows/client-test/create.h | 17 + src/client/windows/client-test/file-ops.c | 409 + src/client/windows/client-test/file-ops.h | 21 + src/client/windows/client-test/find.c | 223 + src/client/windows/client-test/find.h | 16 + src/client/windows/client-test/info.c | 153 + src/client/windows/client-test/info.h | 12 + src/client/windows/client-test/open.c | 116 + src/client/windows/client-test/open.h | 11 + src/client/windows/client-test/test-io.c | 534 + src/client/windows/client-test/test-io.h | 13 + src/client/windows/client-test/test-list.h | 56 + src/client/windows/client-test/test-support.c | 198 + src/client/windows/client-test/test-support.h | 78 + src/client/windows/client-test/test-test.c | 16 + src/client/windows/client-test/thread.c | 70 + src/client/windows/client-test/thread.h | 24 + src/client/windows/client-test/timer.c | 58 + src/client/windows/client-test/timer.h | 15 + src/common/avahi/avahi.c | 232 - src/common/avahi/avahi.h | 37 - src/common/avahi/test_avahi_client.c | 35 - src/common/dotconf/dotconf.c | 37 +- src/common/gen-locks/gen-locks.c | 95 +- src/common/gen-locks/gen-locks.h | 77 +- src/common/gen-locks/gen-win-locks.c | 0 src/common/gossip/gossip.c | 37 +- src/common/gossip/gossip.h | 5 + src/common/id-generator/id-generator.c | 1 + src/common/llist/llist.c | 109 +- src/common/llist/llist.h | 0 src/common/mgmt/pint-mgmt.c | 2 +- src/common/mgmt/pint-op.c | 1 + src/common/mgmt/pint-queue.c | 1 + src/common/mgmt/pint-worker-blocking.c | 1 + src/common/mgmt/pint-worker-none.c | 1 + src/common/mgmt/pint-worker-pool.c | 1 + src/common/mgmt/pint-worker-threaded-queues.c | 58 + src/common/misc/digest.c | 3 +- src/common/misc/errno-mapping.c | 7 +- src/common/misc/extent-utils.c | 2 + src/common/misc/extent-utils.h | 1 + src/common/misc/fsck-utils.c | 2 + src/common/misc/fsck-utils.h | 2 +- src/common/misc/mkspace.c | 356 +- src/common/misc/mkspace.h | 1 + src/common/misc/mmap-ra-cache.c | 3 +- src/common/misc/mmap-ra-cache.h | 1 + src/common/misc/module.mk.in | 6 +- src/common/misc/msgpairarray.h | 1 + src/common/misc/msgpairarray.sm | 3 +- src/common/misc/pint-cached-config.c | 513 +- src/common/misc/pint-cached-config.h | 17 +- src/common/misc/pint-clean-malloc.h | 30 + src/common/misc/pint-eattr.c | 3 +- src/common/misc/pint-eattr.h | 1 + src/common/misc/pint-event.c | 3 +- src/common/misc/pint-event.h | 1 + src/common/misc/pint-hint.c | 20 +- src/common/misc/pint-hint.h | 3 +- src/common/misc/pint-malloc.c | 583 + src/common/misc/pint-malloc.h | 197 + src/common/misc/pint-mem.c | 5 + src/common/misc/pint-perf-counter.c | 2 +- src/common/misc/pint-perf-counter.h | 1 + src/common/misc/pint-uid-mgmt.c | 18 + src/common/misc/pint-uid-mgmt.h | 1 + src/common/misc/pint-util.c | 1 + src/common/misc/pint-util.h | 2 +- src/common/misc/pvfs2-debug.c | 1 + src/common/misc/pvfs2-hint.c | 8 + src/common/misc/pvfs2-internal.h | 68 + src/common/misc/pvfs2-util.c | 212 +- src/common/misc/pvfs2-win-util.c | 3 +- src/common/misc/realpath.c | 8 +- src/common/misc/server-config-mgr.c | 47 +- src/common/misc/server-config-mgr.h | 1 + src/common/misc/server-config.c | 720 +- src/common/misc/server-config.h | 9 +- src/common/misc/state-machine-fns.c | 1 + src/common/misc/state-machine.h | 1 + src/common/misc/str-utils.c | 118 +- src/common/misc/str-utils.h | 11 +- src/common/misc/tcache.c | 7 + src/common/misc/tcache.h | 1 + src/common/misc/xattr-utils.h | 2 +- src/common/quickhash/quickhash.h | 1 + src/common/statecomp/codegen.c | 2 + src/common/statecomp/module.mk.in | 2 +- src/common/statecomp/statecomp.c | 3 + src/common/windows/wincommon.h | 3 + src/io/bmi/bmi-byteswap.h | 6 +- src/io/bmi/bmi-method-callback.h | 1 + src/io/bmi/bmi-method-support.c | 143 +- src/io/bmi/bmi-method-support.h | 1 + src/io/bmi/bmi-types.h | 6 +- src/io/bmi/bmi.c | 1225 +- src/io/bmi/bmi.h | 1 + src/io/bmi/bmi_gm/bmi-gm-addr-list.c | 1 + src/io/bmi/bmi_gm/bmi-gm-bufferpool.c | 1 + src/io/bmi/bmi_gm/bmi-gm.c | 1 + src/io/bmi/bmi_ib/ib.c | 705 +- src/io/bmi/bmi_ib/ib.h | 19 +- src/io/bmi/bmi_ib/mem.c | 61 +- src/io/bmi/bmi_ib/openib.c | 402 +- src/io/bmi/bmi_ib/util.c | 89 +- src/io/bmi/bmi_ib/vapi.c | 8 + src/io/bmi/bmi_mx/mx.c | 11 +- src/io/bmi/bmi_tcp/bmi-tcp-addressing.h | 3 +- src/io/bmi/bmi_tcp/bmi-tcp.c | 355 +- src/io/bmi/bmi_tcp/socket-collection-epoll.c | 2 + src/io/bmi/bmi_tcp/socket-collection-epoll.h | 42 +- src/io/bmi/bmi_tcp/socket-collection.c | 1 + src/io/bmi/bmi_tcp/sockio.c | 2 +- src/io/bmi/bmi_tcp/sockio.h | 0 src/io/bmi/op-list.c | 1 + src/io/bmi/op-list.h | 1 + src/io/bmi/reference-list.c | 12 +- src/io/bmi/reference-list.h | 1 + src/io/buffer/cache.c | 1 + src/io/buffer/internal.h | 15 +- src/io/buffer/ncac-buf-job.c | 1 + src/io/buffer/ncac-init.c | 1 + src/io/buffer/ncac-interface.c | 1 + src/io/buffer/radix.c | 1 + src/io/buffer/state.c | 1 + src/io/description/dist-basic.c | 1 + src/io/description/dist-varstrip-parser.c | 1 + src/io/description/dist-varstrip-parser.h | 1 + src/io/description/dist-varstrip.c | 1 + src/io/description/pint-dist-utils.c | 1 + src/io/description/pint-dist-utils.h | 1 + src/io/description/pint-distribution.c | 1 + src/io/description/pint-distribution.h | 1 + src/io/description/pint-request-encode.h | 2 + src/io/description/pint-request.c | 3 +- src/io/description/pint-request.h | 1 + src/io/description/pvfs-request.c | 1 + src/io/dev/pint-dev.c | 13 +- src/io/dev/pint-dev.h | 1 + src/io/flow/flow-queue.c | 1 + src/io/flow/flow-queue.h | 1 + src/io/flow/flow-ref.c | 1 + src/io/flow/flow-ref.h | 1 + src/io/flow/flow.c | 1 + src/io/flow/flow.h | 2 + .../flowproto-dump-offsets.c | 1 + src/io/flow/flowproto-support.h | 1 + .../flowproto-template/flowproto-template.c | 1 + src/io/job/job-desc-queue.c | 1 + src/io/job/job-desc-queue.h | 1 + src/io/job/job-time-mgr.h | 1 + src/io/job/job.c | 56 +- src/io/job/job.h | 2 + src/io/job/thread-mgr.c | 6 +- src/io/job/thread-mgr.h | 1 + src/io/trove/pvfs2-storage.h | 1 + src/io/trove/trove-dbpf/dbpf-alt-aio.c | 1 + src/io/trove/trove-dbpf/dbpf-alt-aio.h | 3 +- src/io/trove/trove-dbpf/dbpf-attr-cache.h | 1 + src/io/trove/trove-dbpf/dbpf-bstream-direct.c | 24 +- src/io/trove/trove-dbpf/dbpf-bstream-direct.h | 1 + src/io/trove/trove-dbpf/dbpf-bstream.h | 2 + src/io/trove/trove-dbpf/dbpf-context.h | 2 + src/io/trove/trove-dbpf/dbpf-dspace.c | 22 +- src/io/trove/trove-dbpf/dbpf-keyval-pcache.h | 2 + src/io/trove/trove-dbpf/dbpf-op-queue.c | 1 + src/io/trove/trove-dbpf/dbpf-op-queue.h | 2 + src/io/trove/trove-dbpf/dbpf-op.c | 1 + src/io/trove/trove-dbpf/dbpf-op.h | 2 + src/io/trove/trove-dbpf/dbpf-open-cache.h | 2 + src/io/trove/trove-dbpf/dbpf-sync.c | 1 + src/io/trove/trove-dbpf/dbpf-sync.h | 1 + src/io/trove/trove-dbpf/dbpf-thread.h | 2 + src/io/trove/trove-dbpf/dbpf.h | 2 + src/io/trove/trove-handle-mgmt/avltree.c | 1 + .../trove-handle-mgmt/trove-extentlist.h | 2 + src/io/trove/trove-handle-mgmt/trove-ledger.h | 2 + src/io/trove/trove-internal.h | 1 + src/io/trove/trove-types.h | 1 + src/io/trove/trove.h | 3 +- src/kernel/linux-2.6/.pvfs-request.o.d | 0 src/kernel/linux-2.6/Makefile.in | 6 +- src/kernel/linux-2.6/Module.symvers | 0 src/kernel/linux-2.6/acl.c | 276 +- src/kernel/linux-2.6/dcache.c | 113 +- src/kernel/linux-2.6/devpvfs2-req.c | 9 +- src/kernel/linux-2.6/dir.c | 34 +- src/kernel/linux-2.6/downcall.h | 4 - src/kernel/linux-2.6/file.c | 91 +- src/kernel/linux-2.6/inode.c | 38 +- src/kernel/linux-2.6/modules.order | 1 - src/kernel/linux-2.6/namei.c | 141 +- src/kernel/linux-2.6/osd.c | 176 - src/kernel/linux-2.6/osd.h | 24 - src/kernel/linux-2.6/pvfs2-bufmap.c | 80 +- src/kernel/linux-2.6/pvfs2-cache.c | 5 +- src/kernel/linux-2.6/pvfs2-kernel.h | 275 +- src/kernel/linux-2.6/pvfs2-mod.c | 19 +- src/kernel/linux-2.6/pvfs2-utils.c | 121 +- src/kernel/linux-2.6/super.c | 286 +- src/kernel/linux-2.6/waitqueue.c | 18 +- src/proto/PINT-reqproto-encode.c | 8 +- src/proto/pvfs2-attr.h | 1 + src/proto/pvfs2-req-proto.h | 16 +- src/server/check.c | 1 + src/server/create.sm | 7 +- src/server/event-mon.sm | 1 + src/server/final-response.sm | 1 + src/server/get-attr.sm | 9 +- src/server/get-config.sm | 1 + src/server/get-eattr.sm | 1 + src/server/iterate-handles.sm | 1 + src/server/job-timer.sm | 1 + src/server/list-eattr.sm | 1 + src/server/mgmt-get-uid.sm | 1 + src/server/mkdir.sm | 1 - src/server/noop.sm | 1 + src/server/perf-mon.sm | 1 + src/server/perf-update.sm | 1 + src/server/precreate-pool-refiller.sm | 1 + src/server/prelude.sm | 1 + src/server/proto-error.sm | 1 + src/server/pvfs2-server-req.c | 1 + src/server/pvfs2-server.c | 6 + src/server/set-eattr.sm | 2 +- src/server/small-io.sm | 1 + src/server/statfs.sm | 1 + src/server/truncate.sm | 1 + src/server/unexpected.sm | 1 + test/.cvsignore | 2 - test/automated/SUBMIT.pbs.template | 0 test/automated/bonnie++.sh | 8 +- .../hadoop-tests.d/conf/core-site.xml | 28 + .../hadoop-tests.d/conf/mapred-site.xml | 22 + test/automated/kmod_ctrl.sh | 0 test/automated/mpiio-tests.d/functions | 0 test/automated/mpiio-tests.d/heidelberg-IO | 4 +- test/automated/mpiio-tests.d/ior-mpiio | 4 +- test/automated/mpiio-tests.d/ior-mpiio-2 | 4 +- test/automated/mpiio-tests.d/ior-mpiio-3 | 4 +- test/automated/mpiio-tests.d/mpi-io-test | 4 +- test/automated/mpiio-tests.d/noncontig | 4 +- test/automated/mpiio-tests.d/romio-async | 4 +- test/automated/mpiio-tests.d/romio-coll_test | 4 +- test/automated/mpiio-tests.d/romio-error | 4 +- test/automated/mpiio-tests.d/romio-excl | 4 +- test/automated/mpiio-tests.d/romio-file_info | 4 +- .../mpiio-tests.d/romio-noncontig_coll2 | 4 +- test/automated/mpiio-tests.d/romio-psimple | 4 +- test/automated/mpiio-tests.d/romio-simple | 4 +- test/automated/mpiio-tests.d/romio-split_coll | 4 +- test/automated/mpiio-tests.d/romio-status | 4 +- .../mpiio-tests.d/stadler-file-view-test | 4 +- test/automated/pvfs2tests.py | 0 test/automated/run-cron-adenine.sh | 0 test/automated/run-cron-heroin.sh | 0 test/automated/run-test-adenine.sh | 0 test/automated/simple.sh | 0 test/automated/single-node-kernel-test.sh | 0 test/automated/start_pvfs2.sh | 21 + test/automated/sysint-tests.d/cp | 0 test/automated/sysint-tests.d/misc | 0 test/automated/sysint-tests.d/mkdir-sysint | 0 test/automated/sysint-tests.d/ping | 0 test/automated/sysint-tests.d/symlink-sysint | 0 test/automated/sysint-tests.d/zerofill | 0 test/automated/tacl_xattr.sh | 0 test/automated/testfunctions.sh | 418 + test/automated/testscrpt-mpi.sh | 0 test/automated/testscrpt.sh | 446 +- test/automated/tinder-pvfs2-status | 0 test/automated/tinder-pvfs2-status.orig | 68 + test/automated/usrint-tests.d/append | 3 + test/automated/usrint-tests.d/append2 | 3 + test/automated/usrint-tests.d/bonnie | 6 + test/automated/usrint-tests.d/dbench | 67 + test/automated/usrint-tests.d/dbench.patch | 43 + test/automated/usrint-tests.d/fdtree | 3 + test/automated/usrint-tests.d/fstest | 6 + test/automated/usrint-tests.d/fstest.c | 337 + test/automated/usrint-tests.d/fsx | 9 + test/automated/usrint-tests.d/fsx.c | 1070 + test/automated/usrint-tests.d/iozone | 21 + test/automated/usrint-tests.d/iozone.patch | 1058 + test/automated/usrint-tests.d/ltp | 114 + .../ltp-20080630-accept4-wrapper.patch | 21 + .../ltp-20080630-hackbench-limits.patch | 11 + .../ltp-20080630-zoo-path.patch | 53 + .../ltp-20120903-zoo-path.patch | 57 + .../ltp-full-20081130-no-signalfd.patch | 14 + .../ltp-full-20081130-unzip.patch | 61 + .../usrint-tests.d/ltp-pvfs-testcases | 325 + test/automated/usrint-tests.d/mkdir-vfs | 6 + test/automated/usrint-tests.d/mpi-env.log | 40 + .../usrint-tests.d/shell-scripts/append.sh | 16 + .../usrint-tests.d/shell-scripts/append2.sh | 20 + .../usrint-tests.d/shell-scripts/tail.sh | 13 + test/automated/usrint-tests.d/shelltest | 3 + test/automated/usrint-tests.d/symlink-vfs | 6 + test/automated/usrint-tests.d/tail | 3 + test/automated/usrint-tests.d/vfs-cp | 6 + test/automated/vfs-tests.d/append | 0 test/automated/vfs-tests.d/append2 | 0 test/automated/vfs-tests.d/bonnie | 4 +- test/automated/vfs-tests.d/dbench | 13 +- test/automated/vfs-tests.d/fdtree | 0 test/automated/vfs-tests.d/fstest | 0 test/automated/vfs-tests.d/fsx | 0 test/automated/vfs-tests.d/iozone | 0 test/automated/vfs-tests.d/ltp | 42 +- .../vfs-tests.d/ltp-20120903-zoo-path.patch | 57 + test/automated/vfs-tests.d/ltp-pvfs-testcases | 4 +- test/automated/vfs-tests.d/mkdir-vfs | 0 test/automated/vfs-tests.d/shelltest | 0 test/automated/vfs-tests.d/symlink-vfs | 0 test/automated/vfs-tests.d/tail | 0 test/automated/vfs-tests.d/vfs-cp | 0 test/ci/jenkins-build.sh | 0 test/ci/jenkins-doc.sh | 0 test/common/gen-locks/condvar1.c | 0 test/common/gen-locks/condvar2_1.c | 0 test/common/gen-locks/condvar3.c | 0 test/common/gen-locks/condvar3_1.c | 0 test/common/gen-locks/condvar3_2.c | 0 test/common/gen-locks/test-null-lock.c | 61 - test/common/gen-locks/test-pthread-lock.c | 61 - test/common/pav/pav_check | 0 test/common/pav/pav_clean | 0 test/common/pav/pav_create | 0 test/common/pav/pav_dist | 0 test/common/pav/pav_info | 0 test/common/pav/pav_init | 0 test/common/pav/pav_start | 0 test/common/pav/pav_stop | 0 test/common/pav/pav_tester | 0 test/common/pav/pav_uninit | 0 test/configure | 8743 ++-- test/correctness/pts/run-server | 0 test/io/bmi/test-handler.sh | 0 test/io/bmi/test-lat-tcp.pl | 0 test/io/bmi/test-manymanybig-tcp.pl | 0 test/io/bmi/test-manyonesmall-tcp.pl | 0 test/io/bmi/test-manyonesmaller-tcp.pl | 0 test/io/bmi/test-onemanysmall-tcp.pl | 0 test/io/bmi/test-onemanysmaller-tcp.pl | 0 test/io/bmi/test-smaller.sh | 0 test/io/dev/build_mod.sh | 0 test/io/job/test-job-client.c | 0 test/io/job/test-job-server.c | 0 test/io/job/trove-job-io.c | 385 - test/kernel/linux-2.6/pvfs2-shell-test.sh | 2 +- test/maint/config.guess | 0 test/maint/config.sub | 0 test/maint/install-sh | 0 test/maint/missing | 0 test/maint/mpi-depend.sh.in | 0 test/perfbase/perfbase-web-input | 0 test/perfbase/run-perfbase-tests | 0 test/posix/getdents.c | 0 test/posix/openg-test | 0 test/posix/rdwr.sh | 0 test/posix/rdwrx.sh | 0 test/posix/readdir.sh | 0 test/posix/stat.sh | 0 test/prepare | 0 test/run-nightly | 0 test/run-nightly-setup | 36 +- test/scripts/checklogs.pl | 191 + test/scripts/cpi.sh | 168 + test/scripts/instancefunctions.sh | 94 + test/scripts/prepare-cloud.sh | 117 + test/scripts/run-test.sh | 19 + test/scripts/runalltests | 243 + test/scripts/update-cloud.sh | 66 + test/shared/test-common.c | 91 +- 685 files changed, 81249 insertions(+), 30021 deletions(-) delete mode 100644 PVFS2-GLOBAL-TODO.txt delete mode 100644 cert-utils/pvfs2-grid-proxy-init.sh rename configure.in => configure.ac (78%) delete mode 100644 doc/.cvsignore mode change 100644 => 100755 doc/coding/developer-guidelines.tex mode change 100644 => 100755 doc/pvfs2-quickstart.tex mode change 100644 => 100755 doc/pvfs2-status.tex create mode 100644 doc/zones/pvfs2.conf create mode 100644 doc/zones/pvfs2tab create mode 100644 errors delete mode 100644 examples/heartbeat/Filesystem-qla-monitor delete mode 100644 examples/heartbeat/PVFS2-notify delete mode 100644 examples/heartbeat/apc-switched-pdu-hybrid-control.pl delete mode 100644 examples/heartbeat/apc-switched-pdu-hybrid-monitor.pl delete mode 100644 examples/heartbeat/apc-switched-pdu-hybrid-outlet-status.pl delete mode 100644 examples/heartbeat/apc-switched-pdu-ssh-control.exp delete mode 100644 examples/heartbeat/apc-switched-pdu-ssh-monitor.exp delete mode 100644 examples/heartbeat/baytech-mgmt-control.exp delete mode 100644 examples/heartbeat/baytech-mgmt-monitor.exp delete mode 100644 examples/heartbeat/pvfs2-stonith-plugin delete mode 100644 examples/heartbeat/qla-monitor.pl mode change 100644 => 100755 examples/pvfs2-server.rc.in create mode 100644 include/windows/memleaks.h create mode 100644 include/windows/pvfs2-config.h create mode 100644 include/windows/pvfs2.h mode change 100755 => 100644 maint/TEMPLATE_COPYRIGHT_HEADER.txt mode change 100755 => 100644 maint/TEMPLATE_FORMAT_TRAILER.txt mode change 100644 => 100755 maint/build/mpich2-build.py mode change 100644 => 100755 maint/build/pvfs2-build-tests.sh mode change 100644 => 100755 maint/build/pvfs2-build.sh mode change 100644 => 100755 maint/build/pvfs2-buildandrun.sh mode change 100644 => 100755 maint/build/pvfs2-extract-make-msgs.pl mode change 100644 => 100755 maint/config/config.guess mode change 100644 => 100755 maint/config/config.sub mode change 100644 => 100755 maint/config/install-sh mode change 100644 => 100755 maint/config/missing mode change 100755 => 100644 maint/make-dist.sh create mode 100755 projects/OrangeFS/OrangeFS.sln create mode 100644 projects/OrangeFS/bmi/bmi-vs2012.vcxproj create mode 100755 projects/OrangeFS/bmi/bmi.vcxproj create mode 100755 projects/OrangeFS/bmi/bmi.vcxproj.filters create mode 100644 projects/OrangeFS/bmi_misc/bmi_misc-vs2012.vcxproj create mode 100755 projects/OrangeFS/bmi_misc/bmi_misc.vcxproj create mode 100755 projects/OrangeFS/bmi_misc/bmi_misc.vcxproj.filters create mode 100644 projects/OrangeFS/bmi_wintcp/bmi_wintcp-vs2012.vcxproj create mode 100755 projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj create mode 100755 projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj.filters create mode 100644 projects/OrangeFS/client-library/client-library - VS2012.vcxproj create mode 100644 projects/OrangeFS/client-library/client-library.vcxproj create mode 100644 projects/OrangeFS/client-library/client-library.vcxproj.filters create mode 100644 projects/OrangeFS/client-service/client-service-vs2012.vcxproj create mode 100755 projects/OrangeFS/client-service/client-service.vcxproj create mode 100755 projects/OrangeFS/client-service/client-service.vcxproj.filters create mode 100644 projects/OrangeFS/description/description-vs2012.vcxproj create mode 100755 projects/OrangeFS/description/description.vcxproj create mode 100755 projects/OrangeFS/description/description.vcxproj.filters create mode 100644 projects/OrangeFS/dev/dev-vs2012.vcxproj create mode 100755 projects/OrangeFS/dev/dev.vcxproj create mode 100755 projects/OrangeFS/dev/dev.vcxproj.filters create mode 100755 projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj create mode 100755 projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj.filters create mode 100755 projects/OrangeFS/eventlog32.reg create mode 100755 projects/OrangeFS/eventlog64.reg create mode 100644 projects/OrangeFS/flow/flow-vs2012.vcxproj create mode 100755 projects/OrangeFS/flow/flow.vcxproj create mode 100755 projects/OrangeFS/flow/flow.vcxproj.filters create mode 100755 projects/OrangeFS/gen-locks-test/gen-locks-test.vcxproj create mode 100644 projects/OrangeFS/gen-locks/gen-locks-vs2012.vcxproj create mode 100755 projects/OrangeFS/gen-locks/gen-locks.vcxproj create mode 100755 projects/OrangeFS/gen-locks/gen-locks.vcxproj.filters create mode 100644 projects/OrangeFS/gossip/gossip-vs2012.vcxproj create mode 100755 projects/OrangeFS/gossip/gossip.vcxproj create mode 100755 projects/OrangeFS/gossip/gossip.vcxproj.filters create mode 100644 projects/OrangeFS/id-generator/id-generator-vs2012.vcxproj create mode 100755 projects/OrangeFS/id-generator/id-generator.vcxproj create mode 100755 projects/OrangeFS/id-generator/id-generator.vcxproj.filters create mode 100644 projects/OrangeFS/job/job-vs2012.vcxproj create mode 100755 projects/OrangeFS/job/job.vcxproj create mode 100755 projects/OrangeFS/job/job.vcxproj.filters create mode 100644 projects/OrangeFS/misc/misc-vs2012.vcxproj create mode 100755 projects/OrangeFS/misc/misc.vcxproj create mode 100755 projects/OrangeFS/misc/misc.vcxproj.filters create mode 100644 projects/OrangeFS/orangefs-app/OrangeFS_LOGO.png create mode 100644 projects/OrangeFS/orangefs-app/file_icon.xpm create mode 100644 projects/OrangeFS/orangefs-app/folder_icon.xpm create mode 100644 projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj create mode 100644 projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.filters create mode 100644 projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.user create mode 100755 projects/OrangeFS/pingpong/pingpong.vcxproj create mode 100755 projects/OrangeFS/pingpong/pingpong.vcxproj.filters create mode 100644 projects/OrangeFS/proto/proto-vs2012.vcxproj create mode 100755 projects/OrangeFS/proto/proto.vcxproj create mode 100755 projects/OrangeFS/proto/proto.vcxproj.filters create mode 100755 projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj create mode 100755 projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj.filters create mode 100644 projects/OrangeFS/request-scheduler/request-scheduler-vs2012.vcxproj create mode 100755 projects/OrangeFS/request-scheduler/request-scheduler.vcxproj create mode 100755 projects/OrangeFS/request-scheduler/request-scheduler.vcxproj.filters create mode 100644 projects/OrangeFS/sysint-client/sysint-client-vs2012.vcxproj create mode 100755 projects/OrangeFS/sysint-client/sysint-client.vcxproj create mode 100755 projects/OrangeFS/sysint-client/sysint-client.vcxproj.filters create mode 100755 projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj create mode 100755 projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj.filters create mode 100755 projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj create mode 100755 projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj.filters create mode 100755 projects/OrangeFS/test-client/test-client.vcxproj create mode 100755 projects/OrangeFS/test-client/test-client.vcxproj.filters create mode 100755 projects/OrangeFS/test-job-client/test-job-client.vcxproj create mode 100755 projects/OrangeFS/test-job-client/test-job-client.vcxproj.filters create mode 100755 projects/OrangeFS/test-job-server/test-job-server.vcxproj create mode 100755 projects/OrangeFS/test-job-server/test-job-server.vcxproj.filters create mode 100755 projects/TestOrangeFS/TestOrangeFS.sln create mode 100755 projects/TestOrangeFS/client-test/client-test.vcxproj create mode 100755 projects/TestOrangeFS/client-test/client-test.vcxproj.filters create mode 100755 projects/TestOrangeFS/posix-test/posix-test.vcxproj create mode 100755 projects/TestOrangeFS/posix-test/posix-test.vcxproj.filters create mode 100755 projects/pvfscommon/pvfscommon.sln create mode 100755 projects/pvfscommon/statecomp/statecomp.vcxproj create mode 100755 projects/pvfscommon/statecomp/statecomp.vcxproj.filters mode change 100755 => 100644 src/apps/admin/module.mk.in mode change 100755 => 100644 src/apps/admin/pvfs2-change-fsid.c mode change 100755 => 100644 src/apps/admin/pvfs2-check-config.c mode change 100755 => 100644 src/apps/admin/pvfs2-check-server.c mode change 100755 => 100644 src/apps/admin/pvfs2-chmod.c mode change 100755 => 100644 src/apps/admin/pvfs2-chown.c mode change 100755 => 100644 src/apps/admin/pvfs2-cp.c mode change 100755 => 100644 src/apps/admin/pvfs2-drop-caches.c mode change 100755 => 100644 src/apps/admin/pvfs2-event-mon-example.c mode change 100755 => 100644 src/apps/admin/pvfs2-fs-dump.c mode change 100755 => 100644 src/apps/admin/pvfs2-fsck.c mode change 100755 => 100644 src/apps/admin/pvfs2-fsck.h mode change 100755 => 100644 src/apps/admin/pvfs2-get-uid.c mode change 100755 => 100644 src/apps/admin/pvfs2-ln.c mode change 100755 => 100644 src/apps/admin/pvfs2-ls.c delete mode 100755 src/apps/admin/pvfs2-lsplus.c mode change 100755 => 100644 src/apps/admin/pvfs2-migrate-collection.c mode change 100755 => 100644 src/apps/admin/pvfs2-mkdir.c mode change 100755 => 100644 src/apps/admin/pvfs2-mkspace.c mode change 100755 => 100644 src/apps/admin/pvfs2-perf-mon-example.c mode change 100755 => 100644 src/apps/admin/pvfs2-perf-mon-snmp.c mode change 100755 => 100644 src/apps/admin/pvfs2-perror.c mode change 100755 => 100644 src/apps/admin/pvfs2-ping.c mode change 100755 => 100644 src/apps/admin/pvfs2-remove-object.c mode change 100755 => 100644 src/apps/admin/pvfs2-rm.c mode change 100755 => 100644 src/apps/admin/pvfs2-set-debugmask.c mode change 100755 => 100644 src/apps/admin/pvfs2-set-eventmask.c mode change 100755 => 100644 src/apps/admin/pvfs2-set-mode.c mode change 100755 => 100644 src/apps/admin/pvfs2-set-sync.c mode change 100755 => 100644 src/apps/admin/pvfs2-showcoll.c create mode 100755 src/apps/admin/pvfs2-start-all mode change 100755 => 100644 src/apps/admin/pvfs2-stat.c mode change 100755 => 100644 src/apps/admin/pvfs2-statfs.c create mode 100755 src/apps/admin/pvfs2-stop-all mode change 100755 => 100644 src/apps/admin/pvfs2-touch.c mode change 100755 => 100644 src/apps/admin/pvfs2-viewdist.c create mode 100644 src/apps/admin/pvfs2-write.c mode change 100755 => 100644 src/apps/admin/pvfs2-xattr.c create mode 100644 src/apps/devel/pvfs2-remove-prealloc.c create mode 100644 src/apps/storage/data/40ec61b1/bstreams/00000062/7ffffffffffffffe.bstream create mode 100644 src/apps/storage/meta/40ec61b1/collection_attributes.db create mode 100644 src/apps/storage/meta/40ec61b1/dataspace_attributes.db create mode 100644 src/apps/storage/meta/40ec61b1/keyval.db create mode 100644 src/apps/storage/meta/collections.db create mode 100644 src/apps/storage/meta/storage_attributes.db delete mode 100644 src/apps/ucache/shmem_util.c delete mode 100644 src/apps/ucache/shmem_util.h delete mode 100644 src/apps/ucache/ucached_common.c delete mode 100644 src/apps/ucache/watch_daemons delete mode 100644 src/apps/ucache/watch_ipcs delete mode 100644 src/apps/ucache/watch_log create mode 100755 src/apps/user/checkset_shmall_shmmax.linux create mode 100644 src/apps/user/ucache.conf create mode 100644 src/client/cp-library/orangefs-client.c create mode 100644 src/client/cp-library/orangefs-client.h create mode 100644 src/client/jni/README create mode 100644 src/client/jni/lib/NOTICE.txt create mode 100644 src/client/jni/lib/commons-logging-1.1.1.LICENSE.txt create mode 100644 src/client/jni/lib/commons-logging-1.1.1.jar create mode 100644 src/client/jni/lib/commons-logging-api-1.1.1.jar create mode 100644 src/client/jni/libPVFS2JNI_common.h create mode 100644 src/client/jni/libPVFS2POSIXJNI.c create mode 100644 src/client/jni/libPVFS2STDIOJNI.c create mode 100644 src/client/jni/module.mk.in create mode 100644 src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystem.java create mode 100644 src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystemFSInputStream.java create mode 100644 src/client/jni/org/orangefs/usrint/Dirent.java create mode 100644 src/client/jni/org/orangefs/usrint/Orange.java create mode 100644 src/client/jni/org/orangefs/usrint/OrangeFileSystemInputChannel.java create mode 100644 src/client/jni/org/orangefs/usrint/OrangeFileSystemInputStream.java create mode 100644 src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputChannel.java create mode 100644 src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputStream.java create mode 100644 src/client/jni/org/orangefs/usrint/PVFS2POSIXJNI.java create mode 100644 src/client/jni/org/orangefs/usrint/PVFS2POSIXJNIFlags.java create mode 100644 src/client/jni/org/orangefs/usrint/PVFS2STDIOJNI.java create mode 100644 src/client/jni/org/orangefs/usrint/PVFS2STDIOJNIFlags.java create mode 100644 src/client/jni/org/orangefs/usrint/Stat.java create mode 100644 src/client/jni/org/orangefs/usrint/Statfs.java create mode 100644 src/client/jni/org/orangefs/usrint/Statvfs.java delete mode 100644 src/client/usrint/Makefile create mode 100644 src/client/usrint/README_UCACHE create mode 100644 src/client/usrint/error.c create mode 100644 src/client/usrint/error.h create mode 100644 src/client/usrint/fts.c create mode 100644 src/client/usrint/fts.h create mode 100644 src/client/usrint/glob.c create mode 100644 src/client/usrint/glob.h create mode 100644 src/client/usrint/locks.h create mode 100644 src/client/usrint/pvfs-path.c create mode 100644 src/client/usrint/pvfs-path.h create mode 100644 src/client/usrint/pvfs-qualify-path.c create mode 100644 src/client/usrint/selinux.c create mode 100644 src/client/windows/client-gui/dirListener.cpp create mode 100644 src/client/windows/client-gui/dirListener.h create mode 100644 src/client/windows/client-gui/filelisthandler.cpp create mode 100644 src/client/windows/client-gui/filelisthandler.h create mode 100644 src/client/windows/client-gui/localConfig.cpp create mode 100644 src/client/windows/client-gui/localConfig.h create mode 100644 src/client/windows/client-gui/main-app.cpp create mode 100644 src/client/windows/client-gui/main-app.h create mode 100644 src/client/windows/client-gui/memLeaks.h create mode 100644 src/client/windows/client-gui/metadata.cpp create mode 100644 src/client/windows/client-gui/metadata.h create mode 100644 src/client/windows/client-gui/syncDialog.cpp create mode 100644 src/client/windows/client-gui/syncDialog.h create mode 100644 src/client/windows/client-gui/utils.cpp create mode 100644 src/client/windows/client-gui/utils.h create mode 100644 src/client/windows/client-service/MSG00001.bin create mode 100755 src/client/windows/client-service/cert.c create mode 100755 src/client/windows/client-service/cert.h create mode 100755 src/client/windows/client-service/client-service.h create mode 100755 src/client/windows/client-service/config.c create mode 100755 src/client/windows/client-service/config.h create mode 100755 src/client/windows/client-service/dokan-interface.c create mode 100755 src/client/windows/client-service/fs.c create mode 100755 src/client/windows/client-service/fs.h create mode 100755 src/client/windows/client-service/ldap-support.c create mode 100755 src/client/windows/client-service/ldap-support.h create mode 100755 src/client/windows/client-service/messages.aps create mode 100644 src/client/windows/client-service/messages.h create mode 100755 src/client/windows/client-service/messages.mc create mode 100644 src/client/windows/client-service/messages.rc create mode 100755 src/client/windows/client-service/service-main.c create mode 100755 src/client/windows/client-service/user-cache.c create mode 100755 src/client/windows/client-service/user-cache.h create mode 100755 src/client/windows/client-test/Makefile create mode 100755 src/client/windows/client-test/client-test.c create mode 100755 src/client/windows/client-test/create.c create mode 100755 src/client/windows/client-test/create.h create mode 100755 src/client/windows/client-test/file-ops.c create mode 100755 src/client/windows/client-test/file-ops.h create mode 100755 src/client/windows/client-test/find.c create mode 100755 src/client/windows/client-test/find.h create mode 100755 src/client/windows/client-test/info.c create mode 100755 src/client/windows/client-test/info.h create mode 100755 src/client/windows/client-test/open.c create mode 100755 src/client/windows/client-test/open.h create mode 100755 src/client/windows/client-test/test-io.c create mode 100755 src/client/windows/client-test/test-io.h create mode 100755 src/client/windows/client-test/test-list.h create mode 100755 src/client/windows/client-test/test-support.c create mode 100755 src/client/windows/client-test/test-support.h create mode 100755 src/client/windows/client-test/test-test.c create mode 100755 src/client/windows/client-test/thread.c create mode 100755 src/client/windows/client-test/thread.h create mode 100755 src/client/windows/client-test/timer.c create mode 100755 src/client/windows/client-test/timer.h delete mode 100644 src/common/avahi/avahi.c delete mode 100644 src/common/avahi/avahi.h delete mode 100644 src/common/avahi/test_avahi_client.c mode change 100644 => 100755 src/common/gen-locks/gen-win-locks.c mode change 100644 => 100755 src/common/llist/llist.c mode change 100644 => 100755 src/common/llist/llist.h create mode 100644 src/common/misc/pint-clean-malloc.h create mode 100644 src/common/misc/pint-malloc.c create mode 100644 src/common/misc/pint-malloc.h mode change 100644 => 100755 src/common/windows/wincommon.h mode change 100644 => 100755 src/io/bmi/bmi_tcp/sockio.c mode change 100644 => 100755 src/io/bmi/bmi_tcp/sockio.h mode change 100644 => 100755 src/io/bmi/reference-list.c delete mode 100644 src/kernel/linux-2.6/.pvfs-request.o.d delete mode 100644 src/kernel/linux-2.6/Module.symvers delete mode 100644 src/kernel/linux-2.6/modules.order delete mode 100644 src/kernel/linux-2.6/osd.c delete mode 100644 src/kernel/linux-2.6/osd.h delete mode 100644 test/.cvsignore mode change 100644 => 100755 test/automated/SUBMIT.pbs.template mode change 100644 => 100755 test/automated/bonnie++.sh create mode 100644 test/automated/hadoop-tests.d/conf/core-site.xml create mode 100644 test/automated/hadoop-tests.d/conf/mapred-site.xml mode change 100644 => 100755 test/automated/kmod_ctrl.sh mode change 100644 => 100755 test/automated/mpiio-tests.d/functions mode change 100644 => 100755 test/automated/mpiio-tests.d/heidelberg-IO mode change 100644 => 100755 test/automated/mpiio-tests.d/ior-mpiio mode change 100644 => 100755 test/automated/mpiio-tests.d/ior-mpiio-2 mode change 100644 => 100755 test/automated/mpiio-tests.d/ior-mpiio-3 mode change 100644 => 100755 test/automated/mpiio-tests.d/mpi-io-test mode change 100644 => 100755 test/automated/mpiio-tests.d/noncontig mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-async mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-coll_test mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-error mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-excl mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-file_info mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-noncontig_coll2 mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-psimple mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-simple mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-split_coll mode change 100644 => 100755 test/automated/mpiio-tests.d/romio-status mode change 100644 => 100755 test/automated/mpiio-tests.d/stadler-file-view-test mode change 100644 => 100755 test/automated/pvfs2tests.py mode change 100644 => 100755 test/automated/run-cron-adenine.sh mode change 100644 => 100755 test/automated/run-cron-heroin.sh mode change 100644 => 100755 test/automated/run-test-adenine.sh mode change 100644 => 100755 test/automated/simple.sh mode change 100644 => 100755 test/automated/single-node-kernel-test.sh create mode 100755 test/automated/start_pvfs2.sh mode change 100644 => 100755 test/automated/sysint-tests.d/cp mode change 100644 => 100755 test/automated/sysint-tests.d/misc mode change 100644 => 100755 test/automated/sysint-tests.d/mkdir-sysint mode change 100644 => 100755 test/automated/sysint-tests.d/ping mode change 100644 => 100755 test/automated/sysint-tests.d/symlink-sysint mode change 100644 => 100755 test/automated/sysint-tests.d/zerofill mode change 100644 => 100755 test/automated/tacl_xattr.sh create mode 100755 test/automated/testfunctions.sh mode change 100644 => 100755 test/automated/testscrpt-mpi.sh mode change 100644 => 100755 test/automated/testscrpt.sh mode change 100644 => 100755 test/automated/tinder-pvfs2-status create mode 100755 test/automated/tinder-pvfs2-status.orig create mode 100755 test/automated/usrint-tests.d/append create mode 100755 test/automated/usrint-tests.d/append2 create mode 100755 test/automated/usrint-tests.d/bonnie create mode 100755 test/automated/usrint-tests.d/dbench create mode 100644 test/automated/usrint-tests.d/dbench.patch create mode 100755 test/automated/usrint-tests.d/fdtree create mode 100755 test/automated/usrint-tests.d/fstest create mode 100644 test/automated/usrint-tests.d/fstest.c create mode 100755 test/automated/usrint-tests.d/fsx create mode 100644 test/automated/usrint-tests.d/fsx.c create mode 100755 test/automated/usrint-tests.d/iozone create mode 100644 test/automated/usrint-tests.d/iozone.patch create mode 100755 test/automated/usrint-tests.d/ltp create mode 100644 test/automated/usrint-tests.d/ltp-20080630-accept4-wrapper.patch create mode 100644 test/automated/usrint-tests.d/ltp-20080630-hackbench-limits.patch create mode 100644 test/automated/usrint-tests.d/ltp-20080630-zoo-path.patch create mode 100644 test/automated/usrint-tests.d/ltp-20120903-zoo-path.patch create mode 100644 test/automated/usrint-tests.d/ltp-full-20081130-no-signalfd.patch create mode 100644 test/automated/usrint-tests.d/ltp-full-20081130-unzip.patch create mode 100644 test/automated/usrint-tests.d/ltp-pvfs-testcases create mode 100755 test/automated/usrint-tests.d/mkdir-vfs create mode 100644 test/automated/usrint-tests.d/mpi-env.log create mode 100755 test/automated/usrint-tests.d/shell-scripts/append.sh create mode 100755 test/automated/usrint-tests.d/shell-scripts/append2.sh create mode 100755 test/automated/usrint-tests.d/shell-scripts/tail.sh create mode 100755 test/automated/usrint-tests.d/shelltest create mode 100755 test/automated/usrint-tests.d/symlink-vfs create mode 100755 test/automated/usrint-tests.d/tail create mode 100755 test/automated/usrint-tests.d/vfs-cp mode change 100644 => 100755 test/automated/vfs-tests.d/append mode change 100644 => 100755 test/automated/vfs-tests.d/append2 mode change 100644 => 100755 test/automated/vfs-tests.d/bonnie mode change 100644 => 100755 test/automated/vfs-tests.d/dbench mode change 100644 => 100755 test/automated/vfs-tests.d/fdtree mode change 100644 => 100755 test/automated/vfs-tests.d/fstest mode change 100644 => 100755 test/automated/vfs-tests.d/fsx mode change 100644 => 100755 test/automated/vfs-tests.d/iozone mode change 100644 => 100755 test/automated/vfs-tests.d/ltp create mode 100644 test/automated/vfs-tests.d/ltp-20120903-zoo-path.patch mode change 100644 => 100755 test/automated/vfs-tests.d/mkdir-vfs mode change 100644 => 100755 test/automated/vfs-tests.d/shelltest mode change 100644 => 100755 test/automated/vfs-tests.d/symlink-vfs mode change 100644 => 100755 test/automated/vfs-tests.d/tail mode change 100644 => 100755 test/automated/vfs-tests.d/vfs-cp mode change 100644 => 100755 test/ci/jenkins-build.sh mode change 100644 => 100755 test/ci/jenkins-doc.sh mode change 100644 => 100755 test/common/gen-locks/condvar1.c mode change 100644 => 100755 test/common/gen-locks/condvar2_1.c mode change 100644 => 100755 test/common/gen-locks/condvar3.c mode change 100644 => 100755 test/common/gen-locks/condvar3_1.c mode change 100644 => 100755 test/common/gen-locks/condvar3_2.c delete mode 100644 test/common/gen-locks/test-null-lock.c delete mode 100644 test/common/gen-locks/test-pthread-lock.c mode change 100644 => 100755 test/common/pav/pav_check mode change 100644 => 100755 test/common/pav/pav_clean mode change 100644 => 100755 test/common/pav/pav_create mode change 100644 => 100755 test/common/pav/pav_dist mode change 100644 => 100755 test/common/pav/pav_info mode change 100644 => 100755 test/common/pav/pav_init mode change 100644 => 100755 test/common/pav/pav_start mode change 100644 => 100755 test/common/pav/pav_stop mode change 100644 => 100755 test/common/pav/pav_tester mode change 100644 => 100755 test/common/pav/pav_uninit mode change 100644 => 100755 test/configure mode change 100644 => 100755 test/correctness/pts/run-server mode change 100644 => 100755 test/io/bmi/test-handler.sh mode change 100644 => 100755 test/io/bmi/test-lat-tcp.pl mode change 100644 => 100755 test/io/bmi/test-manymanybig-tcp.pl mode change 100644 => 100755 test/io/bmi/test-manyonesmall-tcp.pl mode change 100644 => 100755 test/io/bmi/test-manyonesmaller-tcp.pl mode change 100644 => 100755 test/io/bmi/test-onemanysmall-tcp.pl mode change 100644 => 100755 test/io/bmi/test-onemanysmaller-tcp.pl mode change 100644 => 100755 test/io/bmi/test-smaller.sh mode change 100644 => 100755 test/io/dev/build_mod.sh mode change 100644 => 100755 test/io/job/test-job-client.c mode change 100644 => 100755 test/io/job/test-job-server.c delete mode 100644 test/io/job/trove-job-io.c mode change 100644 => 100755 test/maint/config.guess mode change 100644 => 100755 test/maint/config.sub mode change 100644 => 100755 test/maint/install-sh mode change 100644 => 100755 test/maint/missing mode change 100644 => 100755 test/maint/mpi-depend.sh.in mode change 100644 => 100755 test/perfbase/perfbase-web-input mode change 100644 => 100755 test/perfbase/run-perfbase-tests mode change 100644 => 100755 test/posix/getdents.c mode change 100644 => 100755 test/posix/openg-test mode change 100644 => 100755 test/posix/rdwr.sh mode change 100644 => 100755 test/posix/rdwrx.sh mode change 100644 => 100755 test/posix/readdir.sh mode change 100644 => 100755 test/posix/stat.sh mode change 100644 => 100755 test/prepare mode change 100644 => 100755 test/run-nightly mode change 100644 => 100755 test/run-nightly-setup create mode 100755 test/scripts/checklogs.pl create mode 100755 test/scripts/cpi.sh create mode 100755 test/scripts/instancefunctions.sh create mode 100644 test/scripts/prepare-cloud.sh create mode 100755 test/scripts/run-test.sh create mode 100755 test/scripts/runalltests create mode 100644 test/scripts/update-cloud.sh diff --git a/ChangeLog b/ChangeLog index 8b164f1..be1267e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,7 +2,266 @@ OrangeFS Release ChangeLog ----------------------- -orangefs-2.8.6 +orangefs-2.8.8 (Subversion Tag v.2.8.8) +http://www.orangefs.org/svn/orangefs/tags/v.2.8.8 + +Up to Subversion Rev 10730 + +* - JNI Layer: +* - Removed classes that are no longer used. +* - Minor bug fixes. +* - USRINT libraries: +* - Files created with a zero mode can now be truncated. +* - /dev/shm areas are automatically deleted. +* - Kernel Module: +* - Linux dcache entries are automatically revalidated to prevent stale handles. +* - If interrupt occurs while issuing a pvfs2-getattr, EAGAIN is returned +* - instead of marking the inode bad. +* - Admin Apps: +* - pvfs2-write: allows users to run I/O tests without reading from local +* - disk. +* - Admin Scripts: +* - pvfs2-start-all and pvfs2-stop-all: +* - Starts and stops servers. +* - Located in the sbin install directory +* - +* - Updated kernel module to work with kernel versions up to 3.11 +* - Updated pvfs2-touch to respect umask +* - Improved multi-fabric BMI support +* - Fixed problem with FUSE readdir code. + + +Up to Subversion Rev 10349 + +* - Fixed bug in iocommon_open where the variable directory +* was used instead of the argument path before calling iocommon_expand_path +* - Fixed bug in closedir where the fd was never getting closed thus +* leaving lots of fd's open in some cases +* - Fixed bug in is_pvfs_path where argument path was referenced without +* a dereference (not sure how that ever worked) +* - BMI_add_to_socket_collection and related macros were not checking +* for errors from epoll_ctl, some are expected but errno was not reset +* leaving to issues later on + +* - Made FUSE compile on MAC OSX 10.7.5 +* - Corrected a deadlock issue where the client-core was trying to get a +* "write" semaphore at the same time the kernel was holding a "read" +* semaphore while sleeping. +* - Set PVFS2_DEFAULT_SLOT_TIMEOUT_SECS from 1800 to 900, which means that +* when all the shared memory slots are busy, the process will sleep for +* 15 minutes (instead of 30 minutes) or until a slot becomes available. +* - Made pvfs2-genconfig default the log file location to +* /var/log/orangefs-server.log. +* - In the OrangeFS extension to Hadoop's abstract FileSystem class, +* corrected scenario where an exception was being throw as a result of +* mkdirs failure. This error was thrown when client A checks to see if +* a parent directory exists, but client B successfully creates the parent +* directory prior to client A executing mkdirs. If mkdirs returns false, +* then client A should check to see if the directory actually had been +* created before throwing an exception. +* - Allow mmap() calls with MAP_SHARED +* - Fixed several Infiniband-related issues: +* - Fixed per connection memory leak. +* - Replaced asserts with error checking. +* - Changed error*() calls to not exit. All calls to error*() now do +* error handeling. +* - Lowered QP timeout from 5 minutes to 17 seconds. +* - Fixed problem in rewinddir +* - Improved how we expose directory entries to Hadoop using +* java/util/ArrayList +* - patched a problem in iocommon_lseek where dirs over 1024 entries can +* cause a problem - also avoided a slow loop when we can. +* - Corrected bug related to recursive_delete when using Hadoop +* - Added flags to javah javac and jar commands to limit the ammount of +* heap memory reserved for jvm. Before, running 'make' with the option +* '-j9' was causing multiple jvms to each acquire 1/4 of the machine's +* ram by default. Since 9 jvms cannot each obtain 1/4 of a machine's +* memory, errors were thrown. Setting a reasonable maximum heap reserved +* for jvm fixes this. 256MB works well for now. +* - Added warnings for meta/data stored on a root device +* - fix selinux issues within usrint +* - Added shared descriptor tables, that work with fork and exec, and added +* some flags to the link line to improve interposition. +* - Corrected issue with JNI layer and gcc not working well without -O0 +* option. +* - Significant improvements to JNI layer and Hadoop extensions. +* - added enable option to build libofs-s.so with -Bsymbolic to force +* programs to call it and not another version of the libc routines. +* - added an instance of each of two structs of pointers to methods for +* system calls and library calls respectively so that external code can +* force a call to our code. +* - fixed bug in rename to return 0 if try to rename something to itself +* - reworked IO locking to use the NPTL stuff +* - added missing read of two funcs to stdio_ops +* - changed variable named shmctl to shmctrl to avoid a name conflict +* - fixed a problem in userint.h where a define was mis-named +* - added error.c and error.h from glibc so they link with usrlib + +Rev 10182 + +* Reworked usrint initialization to support fork/exec effectively, +* particularly for shells (like bash). File descriptors were moved to +* a Posix shared memory object so that they can be passed from parent +* to child in a fork and from one program to the next in an exec. Fork +* creates a new shm object and copies the parent's into it. Exec takes +* over the previous program's object but must modify internal pointers. +* program loading OFS usrint for the first time creates and initializes +* a new object. File descriptor status structs can be shared from +* parent to child on a fork. Shared synchronization is used to manage +* access to these objects. Management of free space in the shared +* objects is done in unshared user space memory using fairly simple +* free lists. +* +* Added features to gen_locks to initialize recursive and shared mutexes +* and shared conds for use in the new usrint features. + +* - Incorporated patch to fix a memory corruption issue +* - Fixed client initialization issue resulting from an uninitalized +* ibv_wc struct. +* - Added a thread for the TCP accept processing for the IB connection +* information exchange. +* - Fixed the RTS_DONE missing errors +* - Updates to JNI layer. Now using NIO OutputChannel for buffered output. +* - Added distribution options to pvfs2-genconfig. +* - Added pvfs2-start-all.sh convenience scripts that allow an administrator +* (with password-less ssh configured) to start or stop the pvfs2-server +* on nodes listed in the pvfs2 configuration file. +* Run with -h or --help to see available options. +* - added cross platform client library, windows client GUI app, and +* VS 2012 projects +* - Corrected bugs in the OrangeFS extension of Hadoop's abstract +* FileSystem class. There were issues with mkdir and delete. +* - Changed the way reserved range params are interpreted in pvfs2-genconfig +* - OrangeFS client JNI require --enable-jni and --with-jdk at configure +* time. OrangeFS extensions to Hadoop classes require --enable-jni, +* --with-jdk=, --enable-hadoop, and +* --with-hadoop=. After the 'make install' step of +* OrangeFS installation: run 'make jni' and 'make jni_install' to build +* and install the client JNI. If building Hadoop extensions as well, then +* just run 'make hadoop' and 'make hadoop_install'. +* - Changed default log file names to use "orangefs". +* - Added --disable-opt option to ./configure to disable compiler optimization +* - Updated Hadoop/JNI Makefile to reflect latest stable version of Hadoop (1.1.2) and OrangeFS installation path described in new documentation (/opt/orangefs). Also corrected a bug where function dup3 was being defined twice. + +Rev 10075 + +* Added support for glob in usrint +* +* Fixed several bugs that involved using an uncleared buffer that becomes +* corrupted. +* +* Added a malloc and associated functions wrapper that uses #defines to +* replace malloc with PINT-malloc(). PINT-malloc() uses glibc malloc() (and not +* a client program's replacement for malloc) to do memory management. Inserts +* a magic number before each allocated buffer that is check on free to prevent +* a number of common malloc related bugs. Zeros newly allocarted buffer. +* Zeros buffer being freed. Can be adapted for other uses as well. Includes +* malloc debugging calls (currently controlled distinctly from gossip but +* will be integrated into gossip). Configure options can turn off some or +* all of these features. Also incAudes a set of functions clean-malloc() that +* calls to the default version of malloc(). This makes pint-mem.c obsolete. +* +* Began migrating to a new initialization mechanism that uses a feature of +* GCC __attrubute__((constructor)) that causes a routine to run before main. +* This should enable us to remove the many calls to init routines currently in +* the usrint code. May not work on other compilers, but there may be an +* older alternative. Worst case we replace the many calls with macros. A +* similar destructor attribute exists for shutdown +* +* Reworked implementation of stdin, stdout, stderr so that we can use them +* effectively with freopen and OrangeFS files. Reworked freopen to support +* this. Can still be disabled with configure. +* +* Made some changes to handling of locks in streams. + +* - Added OrangeFS Direct Client JNI layer and Hadoop related extensions. +* See 'src/client/jni/README' for more information. +* - subtle bug when storing directory paths was getting garbage that later +* come back to hurt if just the right conditions existed. Went over all +* code that worked on pd->s->dpath to ensure everything wil be clean. +* - changed nocache hint to cache hint and moved from create to open +* - fixed problem with stat by clearing buffer before the sys call +* - Minor changes to PINT_string_rm_extra_slashes_rts. +* - added glob.c to libofs in case anyone needs it +* - changed st_blocks to be size/512 as it should be leaving st_blksize alone +* - Improved the output of pvfs2-ls when using the recursive option: 'R'. +* Extra slashes were appearing. Wrote a function to strip multiple slashes +* and optionally remove the final trailing slash. +* - fixed problems found by Jim Kusnier +* iocommon_getdents clear buffer before reading dirents +* iocommon_getdents uses strncpy rather than memcpy +* iocommon_getdents always returns unknown d_type +* iocommon_open reworked so it is much easier to understand and less +* error prone +* reworked calls to expand_path so they get called when they should +* tweeked PVFS_sys_lookup to return propoer error codes +* fixed fcntl dup command to work correctly (not like dup2) +* - fixed error code when xattr is not supported +* - fixed some CPP code determining size of a pointer +* - Modified the include directive for fuse from to . +* pkg-config will correctly identify where the include directory is +* located for fuse. (pkg-config --cflags fuse). + + + + +orangefs-2.8.7 (Subversion Tag v2.8.7) + +Revs 9399 thru 9763 + +* WARNINGS: +* - The pvfs kernel module is NOT compatible with linux kernel versions +* 3.4 and higher. Work is currently underway. +* - A known linux kernel bug causing kernel panics when a PVFS +* filesystem is unmounted was found in RHEL releases 2.6.18-308.1.1 thru +* 2.6.18-308.20.1. The OrangeFS team recommends using 2.6.18-308 (RHEL 5.8) or +* 2.6.32-71 (RHEL 6,0) and up. This kernel bug affects other +* filesystems as well. + +* Corrected issues with the readdirplus operations effecting the dokan +interface for Windows. + +* Corrected memory overwrite that resulted from using both readdir and +readdirplus members of a union whenever the readdir state machine was called +from the readdirplus state machine. + +* Starting in linux kernels 3.4, d_make_root is used instead of d_alloc_root. +Configure changes were added to account for this change in the kernel module. + +* Fixed a bug in pvfs_readdir associated with the usrint library. + +* Modified kernel module to accommodate the RCU walk initiated by the system +in pvfs2_d_validate. This fixes a deadlock occurring in kernel versions +2.6.38 and later. + +* Fixed bug in usrint library where a dir is opened and the fd is passed to +fchdir but the path is missing. + +* Added support for fts interface in usrint library. + +* Fixed errors with invalid objects in the kernel module. + +* Performance improvements for Windows Client. + +* Defects corrected for ucache system. + +* Changes to Makefile: +* - Using glibtool instead of glib on MAC-Darwin OS when making libpvfs2.a +* - Ensure that sbin dir is creatd before moving ucache system into it. +* - Added lib/libpvfs2.so as a dependency when making libofs.so to allow +* make with the -j option to operate correctly. +* - Renamed liborange to liborangefs. + +* New Feature: added human readable times to pvfs2-db-display. + +* New Feature: when setting the mode (admin or normal) of a filesystem +using pvfs2-set-mode, you can now do so for individual servers. Prior +to this change, the mode was set for all the servers within a particular +filesystem. + + + +orangefs-2.8.6 (Rev v2.8.6) * New Feature: users can now specify at configure time how they want the * kernel module to handle the file pointer when an error occurs. The diff --git a/Makefile.in b/Makefile.in index bebdd0d..cc263cb 100644 --- a/Makefile.in +++ b/Makefile.in @@ -84,14 +84,16 @@ BUILD_PORTALS = @BUILD_PORTALS@ BUILD_ZOID = @BUILD_ZOID@ BUILD_VIS = @BUILD_VIS@ BUILD_KARMA = @BUILD_KARMA@ -BUILD_USRINT = @BUILD_USRINT@ BUILD_UCACHE = @BUILD_UCACHE@ +BUILD_JNI = @BUILD_JNI@ +BUILD_HADOOP = @BUILD_HADOOP@ BUILD_FUSE = @BUILD_FUSE@ BUILD_SERVER = @BUILD_SERVER@ BUILD_TAU = @BUILD_TAU@ BUILD_KERNEL = @BUILD_KERNEL@ ENABLE_SECURITY = @ENABLE_SECURITY@ NEEDS_LIBRT = @NEEDS_LIBRT@ +LIB_NEEDS_LIBRT = @LIB_NEEDS_LIBRT@ TARGET_OS_DARWIN = @TARGET_OS_DARWIN@ TARGET_OS_LINUX = @TARGET_OS_LINUX@ GNUC = @GNUC@ @@ -119,11 +121,14 @@ endif # build which client libs build_shared = @build_shared@ build_static = @build_static@ +build_threaded = @build_threaded@ +build_usrint = @build_usrint@ +build_symbolic = @build_symbolic@ # Eliminate all default suffixes. We want explicit control. .SUFFIXES: -# PHONEY targets are targets that do not result in the generation +# PHONY targets are targets that do not result in the generation # of a file that has the same name as the target. Listing them # here keeps make from accidentally doing too much work (see GNU # make manual). @@ -186,7 +191,7 @@ CC = @CC@ LD = @CC@ BUILD_CC = @BUILD_CC@ BUILD_LD = @BUILD_CC@ -BUILD_CFLAGS = @BUILD_CFLAGS@ +BUILD_CFLAGS = -I$(srcdir)/src/common/misc -I$(srcdir) @BUILD_CFLAGS@ BUILD_LDFLAGS = @BUILD_LDFLAGS@ # make sure the srcdir include gets included first CFLAGS = -I$(srcdir)/include @CFLAGS@ @CPPFLAGS@ @@ -197,11 +202,24 @@ SERVER_LDFLAGS += @SERVER_LDFLAGS@ DB_CFLAGS = @DB_CFLAGS@ LDSHARED = $(CC) -shared -L@BUILD_ABSOLUTE_TOP@/lib PICFLAGS = -fPIC -LIBS += -lpvfs2 @LIBS@ -LIBS_THREADED += -lpvfs2-threaded @LIBS@ +# Libraries - rt libs tend to depend on other libs so they go first +LIBS += -lpvfs2 +ifdef LIB_NEEDS_LIBRT + LIBS += -lrt +endif +LIBS += @LIBS@ @THREAD_LIB@ +LIBS_THREADED += -lpvfs2-threaded +ifdef LIB_NEEDS_LIBRT + LIBS_THREADED += -lrt +endif +LIBS_THREADED += @LIBS@ @THREAD_LIB@ # need to include external dependency libs when building shared libraries -DEPLIBS := @LIBS@ +ifdef LIB_NEEDS_LIBRT + DEPLIBS += -lrt +endif +DEPLIBS += @LIBS@ @THREAD_LIB@ ULIBDEPLIBS := -lpvfs2 +# Misc defines MMAP_RA_CACHE = @MMAP_RA_CACHE@ RESET_FILE_POS = @RESET_FILE_POS@ TRUSTED_CONNECTIONS = @TRUSTED_CONNECTIONS@ @@ -246,6 +264,7 @@ ifneq (,$(STRICT_CFLAGS)) GCC_CFLAGS += -Wundef -Wpointer-arith GCC_CFLAGS += -Wnested-externs GCC_CFLAGS += -Wredundant-decls + GCC_CFLAGS += -Wno-address -Wno-attributes # These are very noisy, and probably too strict. #GCC_CFLAGS += -W -Wno-unused -Wno-sign-compare #GCC_CFLAGS += -Wcast-qual @@ -343,7 +362,7 @@ ifdef NEEDS_LIBRT endif # must be after -lrt because -lrt may use -lpthread -SERVERLIBS += -lpthread +SERVERLIBS += -lpthread # you can optionally disable thread safety support in the client # though it's not recommended unless *required*. @@ -351,9 +370,11 @@ SERVERLIBS += -lpthread # run ./configure --help for information on how to do this cleanly. LIBCFLAGS=@LIBCFLAGS@ -D__PVFS2_CLIENT__ LIBTHREADEDCFLAGS=-D__GEN_POSIX_LOCKING__ -D__PVFS2_JOB_THREADED__ -D__PVFS2_CLIENT__ -LIBS += @THREAD_LIB@ -DEPLIBS += @THREAD_LIB@ -LIBS_THREADED += @THREAD_LIB@ + +# Moved up to where libs are set +# LIBS += @THREAD_LIB@ +# DEPLIBS += @THREAD_LIB@ +# LIBS_THREADED += @THREAD_LIB@ ################################################################ # build BMI TCP? @@ -460,6 +481,69 @@ ifdef INTELC CFLAGS += $(INTEL_CFLAGS) endif +################################################################# +# PVFS2 JNI Layer Flags and Variables +# +# NOTES: +# Due to depencies: +# First, javac compiles the PVFS2 JNI Layer ".java" files. +# Second, javah generates headers included by the ".c" files of JNI layer. +# Since via src/client/jni/module.mk.in, +# ".c" files are added to ULIBSRC, which is used to build libofs, +# the PVFS2 JNI layer src is compiled. +# +# Dependencies are specified later in the Makefile for the correct order +# of operations to take place. +# +# JAVA_HOME is set via --with-jdk= during the configure step +# of PVFS2 build. +# +# The JDK's include directory must be added to CFLAGS. +# +# --enable-jni and --with-jdk= must be specified during the +# configure step to enable the jni layer to be built and +# so JAVA_HOME can be set to the desired JDK. +# +# --enable-shared must be specified during the configure step so that +# shared libraries will be built +# +ifdef BUILD_JNI +JAVA_HOME := @JAVA_HOME@ +CFLAGS += -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux +JAVAC := $(JAVA_HOME)/bin/javac -J-Xmx256m +JAVAH := $(JAVA_HOME)/bin/javah -J-Xmx256m +JAR := $(JAVA_HOME)/bin/jar -J-Xmx256m +JNI_DIR := $(srcdir)/src/client/jni +ORGDIR := $(JNI_DIR)/org/orangefs/usrint +ORGDOT := org.orangefs.usrint +COMMONS_LOGGING_JAR := `ls $(JNI_DIR)/lib/commons-logging-api-*.jar` +OFS_JNI_JAR := $(JNI_DIR)/lib/ofs_jni.jar +JNIPOSIXHEADER := $(JNI_DIR)/org_orangefs_usrint_PVFS2POSIXJNI.h +JNISTDIOHEADER := $(JNI_DIR)/org_orangefs_usrint_PVFS2STDIOJNI.h +endif + +################################################################# +# Hadoop Layer Variables +# +# NOTES: +# This installation process will change after OrangeFS related Hadoop code is +# commited to the Apache Hadoop Project. +# +# +# +# +ifdef BUILD_HADOOP +# Directory Containing PVFS2/Hadoop related .java files +HADOOP_ORGDIR := $(JNI_DIR)/org/orangefs/hadoop/fs/ofs +# Path to Hadoop Directory containing hadoop-core-*.jar +HADOOP_PREFIX := @HADOOP_PREFIX@ +# Path to Hadoop's core Jar +HADOOP_CORE_JAR := `ls $(HADOOP_PREFIX)/hadoop-core-*.jar` +# Path to our temp PVFS jar file +# (eventually will be a part of hadoop-core-*.jar) +OFS_HADOOP_JAR := $(JNI_DIR)/lib/ofs_hadoop.jar +endif + ################################################################# # Starter variables @@ -509,6 +593,16 @@ MISCSRC := SMCGEN := # DEVELSRC is source for development related tools DEVELSRC := +# JNIPOSIXJAVA represents posix.c related JAVA files +JNIPOSIXJAVA := +# JNISTDIOJAVA represents stdio.c related JAVA files +JNISTDIOJAVA := +# JNISTREAMSCHANNELSJAVA represents Java Streams and Channels built on top of +# JNIPOSIXJAVA and JNISTDIOJAVA +JNISTREAMSCHANNELSJAVA := +# HADOOPJAVA represents OrangeFS/Hadoop related Java files +# TODO: commit src to Apache Hadoop +HADOOPJAVA := ################################################################ # Top level (default) targets @@ -523,8 +617,14 @@ SERVER := src/server/pvfs2-server endif # LIBRARIES is a list of the pvfs2 client libraries that will be installed -LIBRARIES_STATIC := lib/libpvfs2.a lib/liborange.a -LIBRARIES_SHARED := lib/libpvfs2.so lib/liborange.so +ifdef TARGET_OS_DARWIN +LIBRARIES_STATIC := lib/libpvfs2.a +LIBRARIES_LIBTOOL := lib/liborangefs.la +else +LIBRARIES_STATIC := lib/libpvfs2.a lib/liborangefs.a +endif + +LIBRARIES_SHARED := lib/libpvfs2.so lib/liborangefs.so LIBRARIES_THREADED_STATIC := lib/libpvfs2-threaded.a LIBRARIES_THREADED_SHARED := lib/libpvfs2-threaded.so @@ -534,11 +634,12 @@ LIBRARIES_SHARED += lib/libbmi.so BMILIBRARIES := lib/libbmi.a lib/libbmi.so endif -ifdef BUILD_USRINT -LIBRARIES_STATIC += lib/libofs.a lib/liborangeposix.a -LIBRARIES_SHARED += lib/libofs.so lib/liborangeposix.so -LIBRARIES_THREADED_STATIC += lib/libofs-threaded.a -LIBRARIES_THREADED_SHARED += lib/libofs-threaded.so +ifeq ($(build_usrint),yes) +LIBRARIES_STATIC += lib/libofs.a lib/liborangefsposix.a +LIBRARIES_SHARED += lib/libofs.so lib/liborangefsposix.so +# ifeq ($(build_symbolic),yes) +# LIBRARIES_SHARED += lib/libofs-s.so +# endif endif ifneq ($(build_static),yes) @@ -551,6 +652,12 @@ LIBRARIES_SHARED := LIBRARIES_THREADED_SHARED := endif +ifneq ($(build_threaded),yes) +LIBRARIES_THREADED_SHARED := +LIBRARIES_THREADED_STATIC := +endif + + LIBRARIES_THREADED := $(LIBRARIES_THREADED_STATIC) $(LIBRARIES_THREADED_SHARED) LIBRARIES := $(LIBRARIES_SHARED) $(LIBRARIES_STATIC) $(LIBRARIES_THREADED) @@ -711,13 +818,23 @@ DEVELTOOLS := $(patsubst %.c,%, $(filter %.c, $(DEVELSRC))) # DEVELDEPENDS is a list of dependency files for development programs DEVELDEPENDS := $(patsubst %.c,%.d, $(filter %.c,$(DEVELSRC))) +# JNIPOSIXCLS is a list of posix.c related JNI compiled classes +JNIPOSIXCLS := $(patsubst %.java,%.class, $(filter %.java, $(JNIPOSIXJAVA))) +# JNISTDIOCLS is a list of stdio.c related JNI compiled classes +JNISTDIOCLS := $(patsubst %.java,%.class, $(filter %.java, $(JNISTDIOJAVA))) +# JNISTREAMSCHANNELSCLS is a list of compiled classes representing Java +# Input and Ouput Streams and Channels. +JNISTREAMSCHANNELSCLS := $(patsubst %.java,%.class, $(filter %.java, $(JNISTREAMSCHANNELSJAVA))) +# HADOOPCLS is a list of compiled classes representing PVFS2/Hadoop related classes. +HADOOPCLS := $(patsubst %.java,%.class, $(filter %.java, $(HADOOPJAVA))) + # DEPENDS is a global list of all of our dependency files. # NOTE: sort is just a trick to remove duplicates; the order # doesn't matter at all. ifdef BUILD_BMI_ONLY DEPENDS := $(sort $(LIBBMIDEPENDS)) else -DEPENDS := $(sort $(LIBDEPENDS) $(SERVERDEPENDS) \ +DEPENDS := $(sort $(LIBDEPENDS) $(ULIBDEPENDS) $(SERVERDEPENDS) \ $(SERVERBINDEPENDS) $(MISCDEPENDS) $(USERDEPENDS) \ $(ADMINDEPENDS) $(ADMINDEPENDS_SERVER) $(KERNAPPDEPENDS) \ $(VISDEPENDS) $(VISMISCDEPENDS) $(KARMADEPENDS) \ @@ -849,40 +966,41 @@ lib/libofs.a: $(ULIBOBJS) $(E)$(INSTALL) -d lib $(E)ar rcs $@ $(ULIBOBJS) -# rule for building the _multithreaded_ ofs library -lib/libofs-threaded.a: $(ULIBTHREADEDOBJS) - $(Q) " RANLIBTHREADED $@" - $(E)$(INSTALL) -d lib - $(E)ar rcs $@ $(ULIBTHREADEDOBJS) - # rule for building the shared ofs library -lib/libofs.so: $(ULIBPICOBJS) +lib/libofs.so: $(ULIBPICOBJS) lib/libpvfs2.so $(Q) " LDSO $@" $(E)$(INSTALL) -d lib - $(E)$(LDSHARED) -Wl,-soname,libofs.so -o $@ $(ULIBPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) + $(E)$(LDSHARED) -Wl,-soname,libofs.so,-z,interpose,-Bsymbolic -o $@ $(ULIBPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) -# rule for building the shared ofs _multithreaded_ library -lib/libofs-threaded.so: $(ULIBTHREADEDPICOBJS) - $(Q) " LDSO $@" - $(E)$(INSTALL) -d lib - $(E)$(LDSHARED) -Wl,-soname,libofs-threaded.so -o $@ $(ULIBTHREADEDPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) +# ifeq ($(build_symbolic),yes) +# rule for building the shared ofs library +# lib/libofs-s.so: $(ULIBPICOBJS) lib/libpvfs2.so +# $(Q) " LDSO $@" +# $(E)$(INSTALL) -d lib +# $(E)$(LDSHARED) -Wl,-soname,libofs-s.so,-Bsymbolic -o $@ $(ULIBPICOBJS) $(ULIBDEPLIBS) $(DEPLIBS) +# endif # rules for building virtual libraries -lib/liborange.a: lib/libpvfs2.a +lib/liborangefs.a: lib/libpvfs2.a + $(Q) " VLIB $@" + $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborangefs.a + +lib/liborangefs.la: lib/libpvfs2.a $(Q) " VLIB $@" - $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborange.a + $(E)glibtool --mode=link --tag=CC gcc -o lib/libpvfs2.la $^ -lcrypto -lssl -static + mv lib/libpvfs2.la $@ -lib/liborange.so: lib/libpvfs2.so +lib/liborangefs.so: lib/libpvfs2.so $(Q) " VLIB $@" - $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborange.so + $(E)printf "GROUP ( $(LIBS) )\n" > lib/liborangefs.so -lib/liborangeposix.a: lib/libpvfs2.a +lib/liborangefsposix.a: lib/libpvfs2.a $(Q) " VLIB $@" - $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangeposix.a + $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangefsposix.a -lib/liborangeposix.so: lib/libpvfs2.so +lib/liborangefsposix.so: lib/libpvfs2.so $(Q) " VLIB $@" - $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangeposix.so + $(E)printf "GROUP ( -lofs $(LIBS) )\n" > lib/liborangefsposix.so # rule for building the pvfs2 server library lib/libpvfs2-server.a: $(SERVEROBJS) @@ -907,9 +1025,57 @@ $(VISS): %: %.o $(VISMISCOBJS) $(LIBRARIES) # rule for building development tools and its objects. don't know why db isn't # already in libs. -$(DEVELTOOLS): $(DEVELOBJS) $(LIBRARIES) - $(Q) " LD $@" - $(E)$(LD) -o $@ $(LDFLAGS) $(DEVELOBJS) $(LIBS) -ldb $(call modldflags,$<) +$(DEVELTOOLS): %: %.o + $(Q) " LD $@" + $(E)$(LD) -o $@ $< $(LDFLAGS) $(LIBS) -ldb + +ifdef BUILD_HADOOP +$(HADOOPCLS): $(HADOOPJAVA) $(OFS_JNI_JAR) + $(Q) " JAVAC $(HADOOPCLS)" + $(E)$(JAVAC) -cp "$(COMMONS_LOGGING_JAR):$(HADOOP_CORE_JAR):$(OFS_JNI_JAR):$(JNI_DIR)" $(HADOOPJAVA) + +$(OFS_HADOOP_JAR): $(HADOOPCLS) + $(Q) " JAR $@" + $(E)$(JAR) cf $@ -C src/client/jni org/orangefs/hadoop/fs/ofs +endif # BUILD_HADOOP + +ifdef BUILD_JNI +$(JNISTREAMSCHANNELSCLS): $(JNISTREAMSCHANNELSJAVA) + $(Q) " JAVAC $(JNISTREAMSCHANNELSCLS)" + $(E)$(JAVAC) -cp "$(COMMONS_LOGGING_JAR):$(JNI_DIR)" $(JNISTREAMSCHANNELSJAVA) + +$(OFS_JNI_JAR): $(JNIPOSIXCLS) $(JNISTDIOCLS) $(JNISTREAMSCHANNELSCLS) + $(Q) " JAR $@" + $(E)$(JAR) cf $@ -C src/client/jni org/orangefs/usrint + +$(JNIPOSIXCLS): $(JNIPOSIXJAVA) + $(Q) " JAVAC $(JNIPOSIXCLS)" + $(E)$(JAVAC) -cp $(JNI_DIR) $(JNIPOSIXJAVA) + +# Force the JNI posix .class files to be a dependency of the header file. +$(JNIPOSIXHEADER): $(JNI_DIR)/libPVFS2POSIXJNI.c $(JNIPOSIXCLS) + $(Q) " JAVAH $@" + $(E)$(JAVAH) -classpath $(JNI_DIR) -d $(JNI_DIR) $(ORGDOT).PVFS2POSIXJNI + +# Force the required javah generated header file to be a dependency of the +# dependency file. $(OFS_HADOOP_JAR) is considered a dependency only when +# BUILD_HADOOP is defined. +$(JNI_DIR)/libPVFS2POSIXJNI.d: $(JNIPOSIXHEADER) $(OFS_JNI_JAR) $(OFS_HADOOP_JAR) + +$(JNISTDIOCLS): $(JNISTDIOJAVA) + $(Q) " JAVAC $(JNISTDIOCLS)" + $(E)$(JAVAC) -cp "$(COMMONS_LOGGING_JAR):$(JNI_DIR)" $(JNISTDIOJAVA) + +# Force the JNI stdio .class files to be a dependency of the header file. +$(JNISTDIOHEADER): $(JNI_DIR)/libPVFS2STDIOJNI.c $(JNISTDIOCLS) + $(Q) " JAVAH $@" + $(E)$(JAVAH) -classpath $(JNI_DIR) -d $(JNI_DIR) $(ORGDOT).PVFS2STDIOJNI + +# Force the required javah generated header file to be a dependency of the +# dependency file. $(OFS_HADOOP_JAR) is considered a dependency only when +# BUILD_HADOOP is defined. +$(JNI_DIR)/libPVFS2STDIOJNI.d: $(JNISTDIOHEADER) $(OFS_JNI_JAR) $(OFS_HADOOP_JAR) +endif # BUILD_JNI # default rule for building executables from object files %: %.o $(LIBRARIES) @@ -1060,24 +1226,41 @@ endif clean:: $(Q) " CLEAN" $(E)rm -f $(LIBOBJS) $(LIBTHREADEDOBJS) \ - $(ULIBOBJS) $(ULIBTHREADEDOBJS) \ - $(SERVEROBJS) $(SERVERBINOBJS) $(MISCOBJS) \ - $(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \ - $(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\ - $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\ - $(USERTOOLS) $(USEROBJS) \ - $(UCACHEDTOOLS) $(UCACHEDOBJS) \ - $(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \ - $(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\ - $(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS) \ - $(STATECOMP) $(STATECOMPOBJS) $(LIBBMIOBJS) \ - $(BMILIBRARIES) $(FUSEOBJS) \ - $(VISMISCDEPENDS) $(KARMAOBJS) $(LIBPICOBJS)\ - $(STATECOMP) $(STATECOMPOBJS) \ - src/server/pvfs2-server-server.o \ - src/apps/karma/karma src/apps/fuse/pvfs2fuse + $(LIBPICOBJS) $(LIBTHREADEDPICOBJS) \ + $(ULIBOBJS) $(ULIBTHREADEDOBJS) \ + $(ULIBPICOBJS) $(ULIBDEPENDS) $(ULIBTHREADEDOBJS) \ + $(ULIBTHREADEDPICOBJS) $(ULIBTHREADEDDEPENDS) \ + $(UCACHEDTOOLS) $(UCACHEDOBJS) \ + $(SERVEROBJS) $(SERVERBINOBJS) $(MISCOBJS) \ + $(LIBRARIES) $(LIBRARIES_THREADED) $(DEPENDS) $(SERVER) \ + $(ADMINOBJS) $(ADMINOBJS_SERVER) $(ADMINTOOLS)\ + $(ADMINTOOLS_SERVER) lib/libpvfs2-server.a\ + $(USERTOOLS) $(USEROBJS) \ + $(KERNAPPOBJS) $(KERNAPPS) $(KERNAPPSTHR) \ + $(VISS) $(VISMISCOBJS) $(VISOBJS) $(VISDEPENDS)\ + $(VISMISCDEPENDS) $(KARMAOBJS) \ + $(STATECOMP) $(STATECOMPOBJS) $(LIBBMIOBJS) \ + $(BMILIBRARIES) $(FUSEOBJS) \ + $(VISMISCDEPENDS) $(KARMAOBJS) \ + $(STATECOMP) $(STATECOMPOBJS) \ + src/server/pvfs2-server-server.o \ + src/apps/karma/karma src/apps/fuse/pvfs2fuse \ + src/server/simple.conf examples/fs.conf + +ifdef BUILD_HADOOP +clean :: + $(E)rm -f $(HADOOPCLS) $(OFS_HADOOP_JAR) +endif + +ifdef BUILD_JNI +clean:: + $(E)rm -f $(JNIPOSIXHEADER) $(JNISTDIOHEADER) \ + $(ORGDIR)/*.class \ + $(OFS_JNI_JAR) +endif + ifndef DIST_RELEASE - $(E)rm -f $(STATECOMPGEN) + $(E)rm -f $(STATECOMPGEN) endif ifneq (,$(LINUX_KERNEL_SRC)) @@ -1171,9 +1354,9 @@ endif src/server/simple.conf: src/apps/admin/pvfs2-genconfig $(Q) " GENCONFIG $@" $(E)$(srcdir)/src/apps/admin/pvfs2-genconfig --protocol tcp --port 3334 \ - --ioservers localhost --metaservers localhost --logfile /tmp/pvfs2-server.log \ - --storage /tmp/pvfs2-test-space --logging "server,network,storage,flow" \ - --quiet src/server/simple.conf + --ioservers localhost --metaservers localhost --logfile $(prefix)/log/pvfs2-server.log \ + --storage $(prefix)/storage/data --metadata $(prefix)/storage/meta \ + --logging "server,network,storage,flow" --quiet src/server/simple.conf # whether this is a distribution tarball or not, drop some config files # into the "examples" subdir of the build dir @@ -1182,9 +1365,9 @@ all:: examples/fs.conf examples/fs.conf: src/apps/admin/pvfs2-genconfig $(Q) " GENCONFIG $@" $(E)$(srcdir)/src/apps/admin/pvfs2-genconfig --protocol tcp --port 3334 \ - --ioservers localhost --metaservers localhost --logfile /tmp/pvfs2-server.log \ - --storage /tmp/pvfs2-test-space \ - --quiet examples/fs.conf + --ioservers localhost --metaservers localhost --logfile $(prefix)/log/pvfs2-server.log \ + --storage $(prefix)/storage/data --metadata $(prefix)/storage/meta \ + --quiet examples/fs.conf endif install_doc: @@ -1260,6 +1443,7 @@ endif install -m 755 $(ADMINTOOLS) $(bindir) install -m 755 $(USERTOOLS) $(bindir) ifdef BUILD_UCACHE + install -d $(sbindir) install -m 755 $(UCACHEDTOOLS) $(sbindir) endif # for compatibility in case anyone really wants "lsplus" @@ -1284,6 +1468,17 @@ endif done install -d $(sbindir) + install -m 755 $(srcdir)/src/apps/admin/pvfs2-start-all $(sbindir) + install -m 755 $(srcdir)/src/apps/admin/pvfs2-stop-all $(sbindir) + +ifdef BUILD_HADOOP + install -m 755 $(OFS_HADOOP_JAR) $(libdir) +endif + +ifdef BUILD_JNI + install -m 755 $(OFS_JNI_JAR) $(libdir) + install -m 755 $(COMMONS_LOGGING_JAR) $(libdir) +endif ifdef BUILD_SERVER install -m 755 $(ADMINTOOLS_SERVER) $(bindir) @@ -1294,13 +1489,18 @@ ifdef BUILD_SERVER install -m 755 $(SERVER) $(sbindir)/pvfs2-server.bin endif endif + # create log and etc dirs under install dir + install -d $(sysconfdir) endif ifneq (,$(LINUX_KERNEL_SRC)) -NUM_UTS_LINES := $(shell grep -c UTS_RELEASE $(LINUX_KERNEL_SRC)/include/linux/version.h) +# version.h moved in linux 3.7 +VERSION_DOT_H := $(shell if test -r $(LINUX_KERNEL_SRC)/include/linux/version.h ;then ls $(LINUX_KERNEL_SRC)/include/linux/version.h ;elif test -r $(LINUX_KERNEL_SRC)/include/generated/uapi/linux/version.h ;then ls $(LINUX_KERNEL_SRC)/include/generated/uapi/linux/version.h ;else echo /tmp/version.h.NOT.FOUND; fi) + +NUM_UTS_LINES := $(shell grep -c UTS_RELEASE $(VERSION_DOT_H)) ifeq ($(NUM_UTS_LINES),1) - KERNEL_VERS := $(shell grep UTS_RELEASE $(LINUX_KERNEL_SRC)/include/linux/version.h | cut -d\" -f2) + KERNEL_VERS := $(shell grep UTS_RELEASE $(VERSION_DOT_H) | cut -d\" -f2) else # multiple locations of utsrelease.h, just find and grep so we don't have to change again KERNEL_VERS := $(shell find ${LINUX_KERNEL_SRC}/include -name utsrelease.h -exec grep UTS_RELEASE '{}' \; | cut -d \" -f2 ) diff --git a/PVFS2-GLOBAL-TODO.txt b/PVFS2-GLOBAL-TODO.txt deleted file mode 100644 index a4d1437..0000000 --- a/PVFS2-GLOBAL-TODO.txt +++ /dev/null @@ -1,193 +0,0 @@ -#################################################################### -# TODO list for pvfs2 project as a whole -# -# - -NOTE: Some (dated) status information can be found in doc/pvfs2-status.tex - -improving robustness of I/O apis: -==================================================================== -- our internal api's should be able to handle the following cases: - a) operations posted before initialize() should return error - b) operations posted after finalize() has started should return error - c) finalize() should gracefully terminate pending operations, although - those operations will have undefined results -- these API's in particular need update in that regard: - - dbpf-attr-cache DONE - - trove - - bmi - - flow - - job - - request scheduler - - device interface - -server operations: -==================================================================== -- not started: - - eattrib (set/get) - -- unfinished: - - general error handling - - performance monitoring (need more metrics) - -general server functionality: -==================================================================== -- attributes (permissions, etc.) on datafiles -- finishing file system semantics documentation -- don't forget to define semantics for access times - -request scheduler: -==================================================================== -- more generic implementation -- smarter concurrency rules - -system interface functionality: -==================================================================== -- not started: - - eattrib (set/get)? - -- unfinished: - - thread safety - - way to pass in consistency semantics (timeout values, etc.) - -- define how configuration info should be passed in - (how to do paths, fstab, url stuff, whatever) -- define how to pass in distribution and number of datafiles for - cases in which the caller wants to override the defaults -- add nonblocking api for some functions -- clean up API (in particular fstab parsing / initialize path, and removal of - depricated terminology) -- make input pointer argumentss to system interface be declared const -- make sure that system interface functions return an error, rather than - asserting, if the caller tries to operate on a bogus handle (one case occurs - in assertions following PINT_bucket_map_to_server()) - -kernel/vfs interface -==================================================================== - -performance tuning: -==================================================================== -- instrumenting -- steal what we can from mpich2 -- architecture specific locking, etc. -- thread tuning -- memory allocation cache -- do some benchmarking of thread context switches to help decide - how trove/job/flow interfaces should interact -- figure out how to make i/o faster - -request encoding: -==================================================================== -- come up with a mechanism for handling requests that go beyond - the BMI defined limit for unexpected messages (mainly an issue - on read/write with complex datatypes, but also potentially a - problem on setattr) - -error codes: -==================================================================== -- converting to new error code format (everywhere) -- documenting valid error codes from functions - -I/O path: -==================================================================== -- buffer cache on top of trove -- clean up buffer management in BMI to be more useful for I/O buffer - cache, maybe push to a seperate component -- optimizing small reads and writes (packing data into req/ack messages) -- native GM flowprotocol -- general optimizations (lock granularity, immediate completion, etc.) -- ability to unpost, correct use of timeouts, preposting operations -- semantics of short read and write operations -- bmi_tcp scalability and robustness -- ability to toggle synch behavior in trove -- use better buffer size in default flow protocol -- bmi shmem implementation -- many items in BMI and flow TODO files -- ability to compile out device support, or at least prevent device thread - from spawning if not used -- ability to fail over with multiple bmi transports - -correctness/performance testing -==================================================================== -- a comprehensive test suite of the system interface API -- more pts tests -- profiling code paths -- eliminate memory leaks -- handle server or client failures in a reasonable way (log and exit instead - of segfault, perhaps) - -system management utilities -==================================================================== -- pvfs2-fsck (serial tool done, evolve into parallel tool) -- decide what we want/need here? - - health monitoring - - system recovery - - system statistics (raid stat, mem used, etc.) - - etc. -- performance monitoring: - - more metrics - - more viz tools -- end user documentation -- better logging systems -- maybe make pvfs2-ping compute a cksum on the fs.conf from all - servers and issue a warning if they don't all match? - -documentation: -==================================================================== -- come up with an automated way to document the wire packet format - - also document headers that bmi tacks on, at least for bmi_tcp -- update the coding guidelines -- document config file options -- automate faq publishing -- mechanism for exporting to html -- update all design docs! -- review - -code cleanup: -==================================================================== -- remove some of the stuff from the test subdir for "make dist" target - - in particular, test/common (partial), test/io, test/proto, test/server -- put in header file wrappers to make them work with c++ -- audit code to make sure that all error paths are handled when - assertions are turned off -- maybe make a checklist for each pvfs2 component to use as we clean - up each section of the code? (items to check for each component - could include stuff like symbol names, PVFS_error code usage, - properly error handling when assertions are off, etc.) -- consistent formatting -- consistent function naming -- consistent header file inclusion -- come up with more named values like TROVE_HANDLE_NULL to use in - other parts of the code -- try to clean up flow / I/O path some, in particular so we don't have - to do so much mallocing to set up from client side - - maybe do things like embed file_data struct in flow desc. -- make permission checking in prelude.sm neater, maybe assert on - unkown op types so we don't forget to add new ones here - -fault tolerance: -===================================================================== -- what does the API look like -- data redundancy -- failover - -testing: -===================================================================== -- run common test programs and benchmarks, like: - - flash - - iozone - - dbench - - ior - - bonnie - - make kernel - - mpiiotest - - John May's tests? - - piobench -- more pts tests -- more datatype testing - - remember example of ub < lb - -rob's random list: -===================================================================== -- do something about the weird PINT_sys_wait and PINT_mgmt_wait macros in - client-state-machine.h diff --git a/cert-utils/pvfs2-grid-proxy-init.sh b/cert-utils/pvfs2-grid-proxy-init.sh deleted file mode 100644 index 3080b53..0000000 --- a/cert-utils/pvfs2-grid-proxy-init.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# This script generates a proxy certificate with a policy in the format -# of {UID}/{GID}, e.g. 1000/100. The certificate is stored in /tmp/x509up_u{UID}, -# e.g. /tmp/x509up_u1000. This certificate is for use with the OrangeFS -# Windows Client. -# -# $GLOBUS_LOCATION must be set, or grid-proxy-init must be on the path. -# -# Arguments to this script will be passed to grid-proxy-init. - -echo `id -u`/`id -g` > cert-policy -if [ $? -ne 0 ]; then - echo Could not create cert-policy, exiting - exit 1 -fi - -if [ "$GLOBUS_LOCATION" != "" ]; then - $GLOBUS_LOCATION/bin/grid-proxy-init -policy cert-policy -pl id-ppl-anyLanguage $@ -else - grid-proxy-init -policy cert-policy -pl id-ppl-anyLanguage $@ -fi - diff --git a/config.save b/config.save index 0a0b600..7d784ca 100755 --- a/config.save +++ b/config.save @@ -12,17 +12,73 @@ SHELL=${CONFIG_SHELL-/bin/bash} ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -32,33 +88,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -66,159 +149,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -227,7 +273,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -236,31 +303,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -268,27 +318,29 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -config_files=" include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +# Files that config.status was made for. +config_files=" include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/jni/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" config_headers=" pvfs2-config.h" ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -297,75 +349,77 @@ Configuration headers: $config_headers Report bugs to ." + ac_cs_version="\ config.status -configured by ./configure, generated by GNU Autoconf 2.59, +configured by ./configure, generated by GNU Autoconf 2.63, with options \"\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=. -INSTALL="/usr/bin/install -c" -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. + +ac_pwd='/home/cengizk/Desktop/working_on/pvfs_osd_code/pvfs2-osd' +srcdir='.' +INSTALL='/usr/bin/install -c' +test -n "$AWK" || AWK=awk +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -379,77 +433,94 @@ if $ac_cs_silent; then fi if $ac_cs_recheck; then - echo "running /bin/bash ./configure " $ac_configure_extra_args " --no-create --no-recursion" >&6 - exec /bin/bash ./configure $ac_configure_extra_args --no-create --no-recursion + set X '/bin/bash' './configure' $ac_configure_extra_args --no-create --no-recursion + shift + $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6 + CONFIG_SHELL='/bin/bash' + export CONFIG_SHELL + exec "$@" fi +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + + +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "include/pvfs2.h" ) CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "module.mk" ) CONFIG_FILES="$CONFIG_FILES module.mk" ;; - "src/apps/admin/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; - "src/apps/admin/pvfs2-config" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; - "src/apps/devel/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; - "src/apps/karma/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; - "src/apps/vis/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; - "src/apps/fuse/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; - "src/apps/ucache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; - "src/apps/kernel/linux/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; - "src/apps/user/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; - "src/io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; - "src/io/trove/trove-handle-mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; - "src/io/trove/trove-dbpf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; - "src/common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; - "src/common/quickhash/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; - "src/common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; - "src/common/dotconf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; - "src/common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; - "src/common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; - "src/common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; - "src/common/llist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; - "src/common/statecomp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; - "src/common/events/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; - "src/common/mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; - "src/io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; - "src/io/bmi/bmi_tcp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; - "src/io/bmi/bmi_gm/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; - "src/io/bmi/bmi_mx/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; - "src/io/bmi/bmi_ib/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; - "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; - "src/io/bmi/bmi_portals/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; - "src/io/bmi/bmi_zoid/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; - "src/io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; - "src/io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; - "src/io/flow/flowproto-bmi-trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; - "src/io/flow/flowproto-template/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; - "src/io/flow/flowproto-dump-offsets/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; - "src/io/flow/flowproto-bmi-cache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; - "src/io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; - "src/io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; - "src/io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; - "src/proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; - "src/server/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; - "src/server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; - "src/client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; - "src/client/usrint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; - "src/kernel/linux-2.6/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; - "src/kernel/linux-2.4/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; - "doc/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; - "doc/coding/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; - "doc/design/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; - "doc/random/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; - "examples/pvfs2-server.rc" ) CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; - "doc/doxygen/pvfs2-doxygen.conf" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; - "pvfs2-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "pvfs2-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; + "include/pvfs2.h") CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "module.mk") CONFIG_FILES="$CONFIG_FILES module.mk" ;; + "src/apps/admin/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; + "src/apps/admin/pvfs2-config") CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; + "src/apps/devel/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; + "src/apps/karma/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; + "src/apps/vis/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; + "src/apps/fuse/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; + "src/apps/ucache/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; + "src/apps/kernel/linux/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; + "src/apps/user/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; + "src/io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; + "src/io/trove/trove-handle-mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; + "src/io/trove/trove-dbpf/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; + "src/common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; + "src/common/quickhash/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; + "src/common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; + "src/common/dotconf/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; + "src/common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; + "src/common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; + "src/common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; + "src/common/llist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; + "src/common/statecomp/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; + "src/common/events/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; + "src/common/mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; + "src/io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; + "src/io/bmi/bmi_tcp/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; + "src/io/bmi/bmi_gm/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; + "src/io/bmi/bmi_mx/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; + "src/io/bmi/bmi_ib/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; + "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; + "src/io/bmi/bmi_portals/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; + "src/io/bmi/bmi_zoid/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; + "src/io/description/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; + "src/io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; + "src/io/flow/flowproto-bmi-trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; + "src/io/flow/flowproto-template/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; + "src/io/flow/flowproto-dump-offsets/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; + "src/io/flow/flowproto-bmi-cache/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; + "src/io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; + "src/io/job/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; + "src/io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; + "src/proto/module.mk") CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; + "src/server/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; + "src/server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; + "src/client/jni/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/jni/module.mk" ;; + "src/client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; + "src/client/usrint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; + "src/kernel/linux-2.6/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; + "src/kernel/linux-2.4/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; + "doc/module.mk") CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; + "doc/coding/module.mk") CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; + "doc/design/module.mk") CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; + "doc/random/module.mk") CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; + "examples/pvfs2-server.rc") CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; + "doc/doxygen/pvfs2-doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -460,718 +531,667 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then -# -# CONFIG_FILES section. -# -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF -s,@SHELL@,/bin/bash,;t t -s,@PATH_SEPARATOR@,:,;t t -s,@PACKAGE_NAME@,,;t t -s,@PACKAGE_TARNAME@,,;t t -s,@PACKAGE_VERSION@,,;t t -s,@PACKAGE_STRING@,,;t t -s,@PACKAGE_BUGREPORT@,,;t t -s,@exec_prefix@,${prefix},;t t -s,@prefix@,/usr/local,;t t -s,@program_transform_name@,s,x,x,,;t t -s,@bindir@,${exec_prefix}/bin,;t t -s,@sbindir@,${exec_prefix}/sbin,;t t -s,@libexecdir@,${exec_prefix}/libexec,;t t -s,@datadir@,${prefix}/share,;t t -s,@sysconfdir@,${prefix}/etc,;t t -s,@sharedstatedir@,${prefix}/com,;t t -s,@localstatedir@,${prefix}/var,;t t -s,@libdir@,${exec_prefix}/lib,;t t -s,@includedir@,${prefix}/include,;t t -s,@oldincludedir@,/usr/include,;t t -s,@infodir@,${prefix}/info,;t t -s,@mandir@,${prefix}/man,;t t -s,@build_alias@,,;t t -s,@host_alias@,,;t t -s,@target_alias@,,;t t -s,@DEFS@,-DHAVE_CONFIG_H,;t t -s,@ECHO_C@,,;t t -s,@ECHO_N@,-n,;t t -s,@ECHO_T@,,;t t -s,@LIBS@, -lcrypto -lssl -ldl,;t t -s,@PVFS2_VERSION@,2.8.6-orangefs-2012-12-29-223514,;t t -s,@PVFS2_VERSION_MAJOR@,2,;t t -s,@PVFS2_VERSION_MINOR@,8,;t t -s,@PVFS2_VERSION_SUB@,6,;t t -s,@build@,x86_64-unknown-linux-gnu,;t t -s,@build_cpu@,x86_64,;t t -s,@build_vendor@,unknown,;t t -s,@build_os@,linux-gnu,;t t -s,@host@,x86_64-unknown-linux-gnu,;t t -s,@host_cpu@,x86_64,;t t -s,@host_vendor@,unknown,;t t -s,@host_os@,linux-gnu,;t t -s,@CC@,gcc,;t t -s,@CFLAGS@, -g -O2,;t t -s,@LDFLAGS@, -rdynamic,;t t -s,@CPPFLAGS@,,;t t -s,@ac_ct_CC@,gcc,;t t -s,@EXEEXT@,,;t t -s,@OBJEXT@,o,;t t -s,@CPP@,gcc -E,;t t -s,@EGREP@,grep -E,;t t -s,@INSTALL_PROGRAM@,${INSTALL},;t t -s,@INSTALL_SCRIPT@,${INSTALL},;t t -s,@INSTALL_DATA@,${INSTALL} -m 644,;t t -s,@HAVE_PERL@,yes,;t t -s,@HAVE_FIND@,yes,;t t -s,@HAVE_BISON@,yes,;t t -s,@HAVE_FLEX@,yes,;t t -s,@BUILD_CC@,gcc,;t t -s,@BUILD_CFLAGS@,,;t t -s,@BUILD_LDFLAGS@,,;t t -s,@LIBCFLAGS@, -D__GEN_POSIX_LOCKING__,;t t -s,@THREAD_LIB@,-lpthread,;t t -s,@BUILD_SERVER@,1,;t t -s,@BUILD_BMI_ONLY@,,;t t -s,@NEED_BERKELEY_DB@,yes,;t t -s,@MMAP_RA_CACHE@,,;t t -s,@RESET_FILE_POS@,,;t t -s,@TRUSTED_CONNECTIONS@,,;t t -s,@HAVE_PKGCONFIG@,yes,;t t -s,@GTKLIBS@,,;t t -s,@GTKCFLAGS@,,;t t -s,@BUILD_KARMA@,,;t t -s,@build_static@,yes,;t t -s,@REDHAT_RELEASE@,,;t t -s,@NPTL_WORKAROUND@,,;t t -s,@MISC_TROVE_FLAGS@,-D__PVFS2_TROVE_AIO_THREADED__,;t t -s,@TAU_INCS@,,;t t -s,@BUILD_TAU@,,;t t -s,@BUILD_KERNEL@,,;t t -s,@THREADED_KMOD_HELPER@,,;t t -s,@LINUX_KERNEL_SRC@,,;t t -s,@LINUX24_KERNEL_SRC@,,;t t -s,@LINUX24_KERNEL_MINOR_VER@,,;t t -s,@BUILD_ABSOLUTE_TOP@,/usr/src/pvfs2-osd,;t t -s,@SRC_RELATIVE_TOP@,./,;t t -s,@SRC_ABSOLUTE_TOP@,/usr/src/pvfs2-osd,;t t -s,@FUSE_LDFLAGS@,,;t t -s,@FUSE_CFLAGS@,,;t t -s,@BUILD_FUSE@,,;t t -s,@ENABLE_COVERAGE@,,;t t -s,@STRICT_CFLAGS@,,;t t -s,@QUIET_COMPILE@,1,;t t -s,@BUILD_EPOLL@,1,;t t -s,@PVFS2_SEGV_BACKTRACE@,1,;t t -s,@build_shared@,no,;t t -s,@BUILD_USRINT@,1,;t t -s,@BUILDUSRINT@,,;t t -s,@BUILD_UCACHE@,,;t t -s,@BUILD_ACL_INTERFACE@,0,;t t -s,@INTELC@,,;t t -s,@GNUC@,1,;t t -s,@DB_CFLAGS@,,;t t -s,@DB_LIB@,-ldb,;t t -s,@NEEDS_LIBRT@,1,;t t -s,@TARGET_OS_DARWIN@,,;t t -s,@TARGET_OS_LINUX@,1,;t t -s,@BUILD_BMI_TCP@,1,;t t -s,@BUILD_GM@,,;t t -s,@GM_INCDIR@,,;t t -s,@GM_LIBDIR@,,;t t -s,@BUILD_MX@,,;t t -s,@MX_INCDIR@,,;t t -s,@MX_LIBDIR@,,;t t -s,@BUILD_IB@,,;t t -s,@IB_INCDIR@,,;t t -s,@IB_LIBDIR@,,;t t -s,@BUILD_OPENIB@,,;t t -s,@OPENIB_INCDIR@,,;t t -s,@OPENIB_LIBDIR@,,;t t -s,@BUILD_PORTALS@,,;t t -s,@PORTALS_INCS@,,;t t -s,@PORTALS_LIBS@,,;t t -s,@BUILD_ZOID@,,;t t -s,@ZOID_SRCDIR@,,;t t -s,@SERVER_LDFLAGS@, -rdynamic,;t t -s,@GOSSIP_ENABLE_BACKTRACE@,1,;t t -s,@BUILD_VIS@,,;t t -s,@VISCFLAGS@,,;t t -s,@VISLIBS@,,;t t -s,@LIBOBJS@,,;t t -s,@LTLIBOBJS@,,;t t -CEOF - - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +cat >>"$tmp/subs1.awk" <<\_ACAWK && +S["LTLIBOBJS"]="" +S["LIBOBJS"]="" +S["VISLIBS"]="" +S["VISCFLAGS"]="" +S["BUILD_VIS"]="" +S["GOSSIP_ENABLE_BACKTRACE"]="1" +S["SERVER_LDFLAGS"]=" -rdynamic" +S["ZOID_SRCDIR"]="" +S["BUILD_ZOID"]="" +S["PORTALS_LIBS"]="" +S["PORTALS_INCS"]="" +S["BUILD_PORTALS"]="" +S["OPENIB_LIBDIR"]="" +S["OPENIB_INCDIR"]="" +S["BUILD_OPENIB"]="" +S["IB_LIBDIR"]="" +S["IB_INCDIR"]="" +S["BUILD_IB"]="" +S["MX_LIBDIR"]="" +S["MX_INCDIR"]="" +S["BUILD_MX"]="" +S["GM_LIBDIR"]="" +S["GM_INCDIR"]="" +S["BUILD_GM"]="" +S["BUILD_BMI_TCP"]="1" +S["TARGET_OS_LINUX"]="1" +S["TARGET_OS_DARWIN"]="" +S["NEEDS_LIBRT"]="1" +S["DB_LIB"]="-ldb" +S["DB_CFLAGS"]="" +S["GNUC"]="1" +S["INTELC"]="" +S["BUILD_ACL_INTERFACE"]="0" +S["BUILD_HADOOP"]="" +S["HADOOP_PREFIX"]="" +S["BUILD_JNI"]="" +S["JAVA_HOME"]="" +S["BUILD_UCACHE"]="" +S["LIB_NEEDS_LIBRT"]="1" +S["build_usrint"]="yes" +S["build_threaded"]="yes" +S["build_shared"]="no" +S["PVFS2_SEGV_BACKTRACE"]="1" +S["BUILD_EPOLL"]="1" +S["QUIET_COMPILE"]="1" +S["STRICT_CFLAGS"]="" +S["ENABLE_COVERAGE"]="" +S["BUILD_FUSE"]="" +S["FUSE_CFLAGS"]="" +S["FUSE_LDFLAGS"]="" +S["CC_OPT"]="-O2" +S["SRC_ABSOLUTE_TOP"]="/home/cengizk/Desktop/working_on/pvfs_osd_code/pvfs2-osd" +S["SRC_RELATIVE_TOP"]="./" +S["BUILD_ABSOLUTE_TOP"]="/home/cengizk/Desktop/working_on/pvfs_osd_code/pvfs2-osd" +S["LINUX24_KERNEL_MINOR_VER"]="" +S["LINUX24_KERNEL_SRC"]="" +S["LINUX_KERNEL_SRC"]="" +S["THREADED_KMOD_HELPER"]="" +S["BUILD_KERNEL"]="" +S["BUILD_TAU"]="" +S["TAU_INCS"]="" +S["MISC_TROVE_FLAGS"]="-D__PVFS2_TROVE_AIO_THREADED__" +S["NPTL_WORKAROUND"]="" +S["REDHAT_RELEASE"]="" +S["build_static"]="yes" +S["BUILD_KARMA"]="" +S["GTKCFLAGS"]="" +S["GTKLIBS"]="" +S["HAVE_PKGCONFIG"]="yes" +S["TRUSTED_CONNECTIONS"]="" +S["RESET_FILE_POS"]="" +S["MMAP_RA_CACHE"]="" +S["NEED_BERKELEY_DB"]="yes" +S["BUILD_BMI_ONLY"]="" +S["BUILD_SERVER"]="1" +S["THREAD_LIB"]="-lpthread" +S["LIBCFLAGS"]=" -D__GEN_POSIX_LOCKING__" +S["BUILD_LDFLAGS"]="" +S["BUILD_CFLAGS"]="" +S["BUILD_CC"]="gcc" +S["HAVE_FLEX"]="yes" +S["HAVE_BISON"]="yes" +S["HAVE_FIND"]="yes" +S["HAVE_PERL"]="yes" +S["INSTALL_DATA"]="${INSTALL} -m 644" +S["INSTALL_SCRIPT"]="${INSTALL}" +S["INSTALL_PROGRAM"]="${INSTALL}" +S["EGREP"]="/bin/grep -E" +S["GREP"]="/bin/grep" +S["CPP"]="gcc -E" +S["OBJEXT"]="o" +S["EXEEXT"]="" +S["ac_ct_CC"]="gcc" +S["CPPFLAGS"]="" +S["LDFLAGS"]=" -rdynamic" +S["CFLAGS"]=" -g -O2" +S["CC"]="gcc" +S["host_os"]="linux-gnu" +S["host_vendor"]="unknown" +S["host_cpu"]="x86_64" +S["host"]="x86_64-unknown-linux-gnu" +S["build_os"]="linux-gnu" +S["build_vendor"]="unknown" +S["build_cpu"]="x86_64" +S["build"]="x86_64-unknown-linux-gnu" +S["PVFS2_VERSION_SUB"]="8" +S["PVFS2_VERSION_MINOR"]="8" +S["PVFS2_VERSION_MAJOR"]="2" +S["PVFS2_VERSION"]="2.8.8-orangefs" +S["target_alias"]="" +S["host_alias"]="" +S["build_alias"]="" +S["LIBS"]=" -lcrypto -lssl -ldl" +S["ECHO_T"]="" +S["ECHO_N"]="-n" +S["ECHO_C"]="" +S["DEFS"]="-DHAVE_CONFIG_H" +S["mandir"]="${datarootdir}/man" +S["localedir"]="${datarootdir}/locale" +S["libdir"]="${exec_prefix}/lib" +S["psdir"]="${docdir}" +S["pdfdir"]="${docdir}" +S["dvidir"]="${docdir}" +S["htmldir"]="${docdir}" +S["infodir"]="${datarootdir}/info" +S["docdir"]="${datarootdir}/doc/${PACKAGE}" +S["oldincludedir"]="/usr/include" +S["includedir"]="${prefix}/include" +S["localstatedir"]="${prefix}/var" +S["sharedstatedir"]="${prefix}/com" +S["sysconfdir"]="${prefix}/etc" +S["datadir"]="${datarootdir}" +S["datarootdir"]="${prefix}/share" +S["libexecdir"]="${exec_prefix}/libexec" +S["sbindir"]="${exec_prefix}/sbin" +S["bindir"]="${exec_prefix}/bin" +S["program_transform_name"]="s,x,x," +S["prefix"]="/usr/local" +S["exec_prefix"]="${prefix}" +S["PACKAGE_BUGREPORT"]="" +S["PACKAGE_STRING"]="" +S["PACKAGE_VERSION"]="" +S["PACKAGE_TARNAME"]="" +S["PACKAGE_NAME"]="" +S["PATH_SEPARATOR"]=":" +S["SHELL"]="/bin/bash" +_ACAWK +cat >>"$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } fi # test -n "$CONFIG_FILES" -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +D["PACKAGE_NAME"]=" \"\"" +D["PACKAGE_TARNAME"]=" \"\"" +D["PACKAGE_VERSION"]=" \"\"" +D["PACKAGE_STRING"]=" \"\"" +D["PACKAGE_BUGREPORT"]=" \"\"" +D["PVFS2_VERSION_MAJOR"]=" 2" +D["PVFS2_VERSION_MINOR"]=" 8" +D["PVFS2_VERSION_SUB"]=" 8" +D["STDC_HEADERS"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_INTTYPES_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_UNISTD_H"]=" 1" +D["HAVE_PWD_H"]=" 1" +D["HAVE_FEATURES_H"]=" 1" +D["HAVE_FSTAB_H"]=" 1" +D["HAVE_MALLOC_H"]=" 1" +D["HAVE_MEMORY_H"]=" 1" +D["HAVE_MNTENT_H"]=" 1" +D["HAVE_NETDB_H"]=" 1" +D["HAVE_STDARG_H"]=" 1" +D["HAVE_STDINT_H"]=" 1" +D["HAVE_STDLIB_H"]=" 1" +D["HAVE_STDIO_H"]=" 1" +D["HAVE_FCNTL_H"]=" 1" +D["HAVE_UTIME_H"]=" 1" +D["HAVE_STRING_H"]=" 1" +D["HAVE_STRINGS_H"]=" 1" +D["HAVE_ASSERT_H"]=" 1" +D["HAVE_LIBGEN_H"]=" 1" +D["HAVE_DIRENT_H"]=" 1" +D["HAVE_TIME_H"]=" 1" +D["HAVE_DLFCN_H"]=" 1" +D["HAVE_LINUX_TYPES_H"]=" 1" +D["HAVE_SELINUX_H"]=" 1" +D["HAVE_SYS_VFS_H"]=" 1" +D["HAVE_SYS_MOUNT_H"]=" 1" +D["HAVE_SYS_STAT_H"]=" 1" +D["HAVE_SYS_TYPES_H"]=" 1" +D["HAVE_SYS_SOCKET_H"]=" 1" +D["HAVE_SYS_SENDFILE_H"]=" 1" +D["HAVE_SYS_XATTR_H"]=" 1" +D["HAVE_SYS_STATVFS_H"]=" 1" +D["HAVE_SYS_UIO_H"]=" 1" +D["HAVE_SYS_MMAN_H"]=" 1" +D["HAVE_SYS_TIME_H"]=" 1" +D["HAVE_ARPA_INET_H"]=" 1" +D["SIZEOF_LONG_INT"]=" 8" +D["WITH_OPENSSL"]=" 1" +D["HAVE_OPENSSL_EVP_H"]=" 1" +D["HAVE_OPENSSL_CRYPTO_H"]=" 1" +D["HAVE_OPENSSL_SHA_H"]=" 1" +D["HAVE_AIOCB_ERROR_CODE"]=" 1" +D["HAVE_AIOCB_RETURN_VALUE"]=" 1" +D["SIZEOF_VOID_P"]=" 8" +D["HAVE_SYS_EPOLL_H"]=" 1" +D["PVFS_USRINT_BUILD"]=" 1" +D["PVFS_USRINT_KMOUNT"]=" 0" +D["PVFS_USRINT_CWD"]=" 1" +D["PVFS_STDIO_REDEFSTREAM"]=" 1" +D["PVFS_MALLOC_REDEF"]=" 1" +D["PVFS_MALLOC_MAGIC"]=" 1" +D["PVFS_MALLOC_ZERO"]=" 1" +D["PVFS_MALLOC_FREE_ZERO"]=" 1" +D["HAVE_O_CLOEXEC"]=" 1" +D["PVFS_UCACHE_ENABLE"]=" 0" +D["PVFS_JNI_ENABLE"]=" 0" +D["PVFS_HADOOP_ENABLE"]=" 0" +D["HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK"]=" 1" +D["HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK"]=" 1" +D["HAVE_TXNID_PARAMETER_TO_DB_STAT"]=" 1" +D["HAVE_TXNID_PARAMETER_TO_DB_OPEN"]=" 1" +D["HAVE_DB_DIRTY_READ"]=" 1" +D["HAVE_DB_BUFFER_SMALL"]=" 1" +D["HAVE_DB_GET_PAGESIZE"]=" 1" +D["TARGET_OS_LINUX"]=" 1" +D["HAVE_GETHOSTBYNAME"]=" 1" +D["HAVE_GETHOSTBYADDR"]=" 1" +D["HAVE_SYSINFO"]=" 1" +D["HAVE_STRNLEN"]=" 1" +D["HAVE_STRTOULL"]=" 1" +D["HAVE_STRSTR"]=" 1" +D["HAVE_FGETXATTR"]=" 1" +D["HAVE_FSETXATTR"]=" 1" +D["HAVE_FGETXATTR_PROTOTYPE"]=" 1" +D["HAVE_GETMNTENT"]=" 1" +D["HAVE_EXECINFO_H"]=" 1" +D["HAVE_STRERROR_R"]=" 1" +D["HAVE_DECL_STRERROR_R"]=" 1" +D["HAVE_GNU_STRERROR_R"]=" 1" +D["STRERROR_R_CHAR_P"]=" 1" +D["GETS_IS_GONE"]=" 1" + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+[_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ][_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789]*([\t (]|$)/ { + line = $ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - sed "/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + ac_datarootdir_hack=' + s&@datadir@&${datarootdir}&g + s&@docdir@&${datarootdir}/doc/${PACKAGE}&g + s&@infodir@&${datarootdir}/info&g + s&@localedir@&${datarootdir}/locale&g + s&@mandir@&${datarootdir}/man&g + s&\${datarootdir}&${prefix}/share&g' ;; +esac +ac_sed_extra="/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// } :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } -done +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - - # Handle all the #define templates only if necessary. - if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then - # If there are no defines, we may have an empty if/fi - : - cat >$tmp/defines.sed <$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in - - cat >$tmp/defines.sed <$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in - - fi # grep - - # Handle all the #undef templates - cat >$tmp/undefs.sed <$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in - - cat >$tmp/undefs.sed <$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi -done + ;; + + + esac + +done # for ac_tag + { (exit 0); exit 0; } diff --git a/configure b/configure index e0ba23e..59e721e 100755 --- a/configure +++ b/configure @@ -1,25 +1,82 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.63. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,33 +86,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +147,391 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +540,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +570,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -275,46 +602,271 @@ ac_unique_file="include/pvfs2-types.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS PVFS2_VERSION PVFS2_VERSION_MAJOR PVFS2_VERSION_MINOR PVFS2_VERSION_SUB build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX BUILD_CC BUILD_CFLAGS BUILD_LDFLAGS LIBCFLAGS THREAD_LIB BUILD_SERVER BUILD_BMI_ONLY NEED_BERKELEY_DB MMAP_RA_CACHE RESET_FILE_POS TRUSTED_CONNECTIONS HAVE_PKGCONFIG GTKLIBS GTKCFLAGS BUILD_KARMA build_static REDHAT_RELEASE NPTL_WORKAROUND MISC_TROVE_FLAGS TAU_INCS BUILD_TAU BUILD_KERNEL THREADED_KMOD_HELPER LINUX_KERNEL_SRC LINUX24_KERNEL_SRC LINUX24_KERNEL_MINOR_VER BUILD_ABSOLUTE_TOP SRC_RELATIVE_TOP SRC_ABSOLUTE_TOP FUSE_LDFLAGS FUSE_CFLAGS BUILD_FUSE ENABLE_COVERAGE STRICT_CFLAGS QUIET_COMPILE BUILD_EPOLL PVFS2_SEGV_BACKTRACE build_shared BUILD_USRINT BUILDUSRINT BUILD_UCACHE BUILD_ACL_INTERFACE INTELC GNUC DB_CFLAGS DB_LIB NEEDS_LIBRT TARGET_OS_DARWIN TARGET_OS_LINUX BUILD_BMI_TCP BUILD_GM GM_INCDIR GM_LIBDIR BUILD_MX MX_INCDIR MX_LIBDIR BUILD_IB IB_INCDIR IB_LIBDIR BUILD_OPENIB OPENIB_INCDIR OPENIB_LIBDIR BUILD_PORTALS PORTALS_INCS PORTALS_LIBS BUILD_ZOID ZOID_SRCDIR SERVER_LDFLAGS GOSSIP_ENABLE_BACKTRACE BUILD_VIS VISCFLAGS VISLIBS LIBOBJS LTLIBOBJS' +ac_subst_vars='LTLIBOBJS +LIBOBJS +VISLIBS +VISCFLAGS +BUILD_VIS +GOSSIP_ENABLE_BACKTRACE +SERVER_LDFLAGS +ZOID_SRCDIR +BUILD_ZOID +PORTALS_LIBS +PORTALS_INCS +BUILD_PORTALS +OPENIB_LIBDIR +OPENIB_INCDIR +BUILD_OPENIB +IB_LIBDIR +IB_INCDIR +BUILD_IB +MX_LIBDIR +MX_INCDIR +BUILD_MX +GM_LIBDIR +GM_INCDIR +BUILD_GM +BUILD_BMI_TCP +TARGET_OS_LINUX +TARGET_OS_DARWIN +NEEDS_LIBRT +DB_LIB +DB_CFLAGS +GNUC +INTELC +BUILD_ACL_INTERFACE +BUILD_HADOOP +HADOOP_PREFIX +BUILD_JNI +JAVA_HOME +BUILD_UCACHE +LIB_NEEDS_LIBRT +build_usrint +build_threaded +build_shared +PVFS2_SEGV_BACKTRACE +BUILD_EPOLL +QUIET_COMPILE +STRICT_CFLAGS +ENABLE_COVERAGE +BUILD_FUSE +FUSE_CFLAGS +FUSE_LDFLAGS +CC_OPT +SRC_ABSOLUTE_TOP +SRC_RELATIVE_TOP +BUILD_ABSOLUTE_TOP +LINUX24_KERNEL_MINOR_VER +LINUX24_KERNEL_SRC +LINUX_KERNEL_SRC +THREADED_KMOD_HELPER +BUILD_KERNEL +BUILD_TAU +TAU_INCS +MISC_TROVE_FLAGS +NPTL_WORKAROUND +REDHAT_RELEASE +build_static +BUILD_KARMA +GTKCFLAGS +GTKLIBS +HAVE_PKGCONFIG +TRUSTED_CONNECTIONS +RESET_FILE_POS +MMAP_RA_CACHE +NEED_BERKELEY_DB +BUILD_BMI_ONLY +BUILD_SERVER +THREAD_LIB +LIBCFLAGS +BUILD_LDFLAGS +BUILD_CFLAGS +BUILD_CC +HAVE_FLEX +HAVE_BISON +HAVE_FIND +HAVE_PERL +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +EGREP +GREP +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +PVFS2_VERSION_SUB +PVFS2_VERSION_MINOR +PVFS2_VERSION_MAJOR +PVFS2_VERSION +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_thread_safety +enable_server +with_openssl +enable_karma_mem_usage_stats +enable_bmi_only +enable_perf_counters +enable_mmap_racache +enable_reset_file_pos +enable_trusted_connections +enable_karma +enable_static +enable_redhat24 +enable_nptl_workaround +enable_aio_threaded_callbacks +with_mtrace +with_berkdb_debug +with_tau +with_kernel +with_kernel24 +enable_kernel_aio +enable_kernel_sendfile +enable_threaded_kmod_helper +enable_fast +enable_opt +enable_fuse +enable_strict +enable_verbose_build +enable_epoll +enable_segv_backtrace +enable_shared +enable_threaded +enable_usrint +enable_usrint_kmount +enable_usrint_cwd +enable_stdio_redefstream +enable_malloc_redef +enable_malloc_magic +enable_malloc_zero +enable_malloc_free_zero +enable_ucache +with_jdk +enable_jni +with_hadoop +enable_hadoop +with_efence +with_valgrind +with_db +with_bmi_tcp +with_gm +with_gm_includes +with_gm_libs +with_mx +with_mx_includes +with_mx_libs +with_ib +with_ib_includes +with_ib_libs +with_openib +with_openib_includes +with_openib_libs +with_portals +with_portals_includes +with_portals_libs +with_zoid +enable_static_server +enable_visual +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -337,34 +889,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,33 +952,61 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +1033,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +1063,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1137,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -584,26 +1197,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -623,7 +1248,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -632,17 +1257,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -651,31 +1275,39 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -689,7 +1321,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -702,74 +1334,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -798,14 +1432,11 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -815,18 +1446,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -842,6 +1480,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-thread-safety Disables thread safety in the client library @@ -871,6 +1510,7 @@ Optional Features: **EXPERIMENTAL** Use threads in the kernel helper application --enable-fast Disable optional debugging, enable optimizations. + --disable-opt Disables compiler optimization --enable-fuse **EXPERIMENTAL** Enable FUSE component --enable-strict Turn on strict compiler warnings --enable-verbose-build Enables full output during build process @@ -881,10 +1521,18 @@ Optional Features: --disable-segv-backtrace Disables back traces in segfault signal handler --enable-shared Build shared client library + --disable-threaded Do not build threaded client library --disable-usrint Do not build posix and stdio user libraries --enable-usrint-kmount Assume FS is mounted via kernel --disable-usrint-cwd Do not enable user interface CWD support - --enable-ucache Do not enable user user interface data cache. + --disable-stdio-redefstream Do not redefine stdin stdout stderr as PVFS streams + --disable-malloc-redef Do not redefine malloc + --disable-malloc-magic Do not have malloc check a magic number + --disable-malloc-zero Do not have malloc zero new memory + --disable-malloc-free-zero Do not have malloc zero freed memory + --enable-ucache Enables user interface data cache. + --enable-jni Enables PVFS Client JNI. Requires --with-jdk. + --enable-hadoop Enables OrangeFS extenions of Hadoop classes. Requires --enable-jni --with-jdk and --with-hadoop. --enable-static-server Builds the server static --enable-visual Enable visualisation tools. (Disabled by default, requires SDL) @@ -898,6 +1546,8 @@ Optional Packages: --with-tau=path Use TAU trace library installed in "path" --with-kernel=srcpath Build pvfs2 kernel module against 2.6.x src --with-kernel24=srcpath Build pvfs2 kernel module against 2.4.x src + --with-jdk= Enable support for JAVA and JNI. + --with-hadoop= Enables support for OrangeFS extensions of Hadoop classes. --with-efence= Use electric fence for malloc debugging. --with-valgrind= Use valgrind annotations for debugging. --with-db= Location of installed DB package (default=/usr) @@ -931,126 +1581,97 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1069,7 +1690,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1081,8 +1702,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1104,7 +1726,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1115,8 +1736,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1137,9 +1758,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1150,8 +1769,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1164,20 +1783,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1188,22 +1822,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1215,26 +1855,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1264,18 +1902,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1285,54 +1929,61 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1342,19 +1993,15 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1371,42 +2018,53 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= -for ac_dir in maint/config $srcdir/maint/config; do - if test -f $ac_dir/install-sh; then +for ac_dir in maint/config "$srcdir"/maint/config; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint/config $srcdir/maint/config" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in maint/config $srcdir/maint/config" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint/config \"$srcdir\"/maint/config" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in maint/config \"$srcdir\"/maint/config" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"` PVFS2_VERSION_MAJOR=2 PVFS2_VERSION_MINOR=8 -PVFS2_VERSION_SUB=6 -#PVFS2_VERSION_RELEASE="orangefs" +PVFS2_VERSION_SUB=8 +PVFS2_VERSION_RELEASE="orangefs" #PVFS2_PRE="" -PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" +#PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE$PVFS2_VERSION_PRE @@ -1433,57 +2091,86 @@ _ACEOF # Make sure we can run config.sub. -$ac_config_sub sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 -echo "$as_me: error: cannot run $ac_config_sub" >&2;} +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } -echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_build_alias=$build_alias -test -z "$ac_cv_build_alias" && - ac_cv_build_alias=`$ac_config_guess` -test -z "$ac_cv_build_alias" && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } -ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi -echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac build=$ac_cv_build -build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - - -echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6 +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_host_alias=$host_alias -test -z "$ac_cv_host_alias" && - ac_cv_host_alias=$ac_cv_build_alias -ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || - { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 -echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } +fi fi -echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac host=$ac_cv_host -host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac @@ -1492,7 +2179,7 @@ if test "x$USR_CFLAGS" = "x"; then USR_CFLAGS_SET=no fi - ac_config_headers="$ac_config_headers pvfs2-config.h" +ac_config_headers="$ac_config_headers pvfs2-config.h" ac_ext=c @@ -1503,10 +2190,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1517,34 +2204,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1555,38 +2244,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1597,76 +2297,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1678,17 +2338,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1706,24 +2367,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1734,38 +2396,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1776,58 +2440,90 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -1846,111 +2542,150 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1959,32 +2694,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2002,39 +2738,48 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2055,50 +2800,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2114,38 +2863,121 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2161,12 +2993,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2200,12 +3032,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2220,239 +3057,92 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -2466,35 +3156,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2504,34 +3194,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2549,8 +3239,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2573,35 +3263,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2611,34 +3301,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2647,11 +3337,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -2661,25 +3353,144 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2701,35 +3512,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2785,6 +3593,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2804,36 +3613,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2855,11 +3678,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2872,41 +3695,42 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -2915,17 +3739,17 @@ done if test "${ac_cv_header_pwd_h+set}" = set; then - echo "$as_me:$LINENO: checking for pwd.h" >&5 -echo $ECHO_N "checking for pwd.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for pwd.h" >&5 +$as_echo_n "checking for pwd.h... " >&6; } if test "${ac_cv_header_pwd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 -echo "${ECHO_T}$ac_cv_header_pwd_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 +$as_echo "$ac_cv_header_pwd_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking pwd.h usability" >&5 -echo $ECHO_N "checking pwd.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking pwd.h usability" >&5 +$as_echo_n "checking pwd.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -2936,41 +3760,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking pwd.h presence" >&5 -echo $ECHO_N "checking pwd.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking pwd.h presence" >&5 +$as_echo_n "checking pwd.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -2979,79 +3800,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pwd.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: pwd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: pwd.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pwd.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pwd.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pwd.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pwd.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pwd.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pwd.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pwd.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: pwd.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: pwd.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: pwd.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: pwd.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: pwd.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pwd.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: pwd.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for pwd.h" >&5 -echo $ECHO_N "checking for pwd.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for pwd.h" >&5 +$as_echo_n "checking for pwd.h... " >&6; } if test "${ac_cv_header_pwd_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_pwd_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 -echo "${ECHO_T}$ac_cv_header_pwd_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pwd_h" >&5 +$as_echo "$ac_cv_header_pwd_h" >&6; } fi -if test $ac_cv_header_pwd_h = yes; then +if test "x$ac_cv_header_pwd_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PWD_H 1 @@ -3061,17 +3875,17 @@ fi if test "${ac_cv_header_features_h+set}" = set; then - echo "$as_me:$LINENO: checking for features.h" >&5 -echo $ECHO_N "checking for features.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for features.h" >&5 +$as_echo_n "checking for features.h... " >&6; } if test "${ac_cv_header_features_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 -echo "${ECHO_T}$ac_cv_header_features_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 +$as_echo "$ac_cv_header_features_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking features.h usability" >&5 -echo $ECHO_N "checking features.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking features.h usability" >&5 +$as_echo_n "checking features.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3082,41 +3896,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking features.h presence" >&5 -echo $ECHO_N "checking features.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking features.h presence" >&5 +$as_echo_n "checking features.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3125,79 +3936,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: features.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: features.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: features.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: features.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: features.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: features.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: features.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: features.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: features.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: features.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: features.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: features.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: features.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: features.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: features.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: features.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: features.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: features.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: features.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: features.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for features.h" >&5 -echo $ECHO_N "checking for features.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for features.h" >&5 +$as_echo_n "checking for features.h... " >&6; } if test "${ac_cv_header_features_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_features_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 -echo "${ECHO_T}$ac_cv_header_features_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_features_h" >&5 +$as_echo "$ac_cv_header_features_h" >&6; } fi -if test $ac_cv_header_features_h = yes; then +if test "x$ac_cv_header_features_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FEATURES_H 1 @@ -3207,17 +4011,17 @@ fi if test "${ac_cv_header_fstab_h+set}" = set; then - echo "$as_me:$LINENO: checking for fstab.h" >&5 -echo $ECHO_N "checking for fstab.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for fstab.h" >&5 +$as_echo_n "checking for fstab.h... " >&6; } if test "${ac_cv_header_fstab_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 -echo "${ECHO_T}$ac_cv_header_fstab_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 +$as_echo "$ac_cv_header_fstab_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking fstab.h usability" >&5 -echo $ECHO_N "checking fstab.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fstab.h usability" >&5 +$as_echo_n "checking fstab.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3228,41 +4032,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking fstab.h presence" >&5 -echo $ECHO_N "checking fstab.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fstab.h presence" >&5 +$as_echo_n "checking fstab.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3271,79 +4072,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: fstab.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: fstab.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: fstab.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: fstab.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: fstab.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: fstab.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: fstab.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: fstab.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: fstab.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: fstab.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: fstab.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: fstab.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: fstab.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: fstab.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: fstab.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fstab.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: fstab.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for fstab.h" >&5 -echo $ECHO_N "checking for fstab.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for fstab.h" >&5 +$as_echo_n "checking for fstab.h... " >&6; } if test "${ac_cv_header_fstab_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_fstab_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 -echo "${ECHO_T}$ac_cv_header_fstab_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fstab_h" >&5 +$as_echo "$ac_cv_header_fstab_h" >&6; } fi -if test $ac_cv_header_fstab_h = yes; then +if test "x$ac_cv_header_fstab_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_FSTAB_H 1 @@ -3353,17 +4147,17 @@ fi if test "${ac_cv_header_malloc_h+set}" = set; then - echo "$as_me:$LINENO: checking for malloc.h" >&5 -echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for malloc.h" >&5 +$as_echo_n "checking for malloc.h... " >&6; } if test "${ac_cv_header_malloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 -echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +$as_echo "$ac_cv_header_malloc_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking malloc.h usability" >&5 -echo $ECHO_N "checking malloc.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking malloc.h usability" >&5 +$as_echo_n "checking malloc.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3374,41 +4168,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking malloc.h presence" >&5 -echo $ECHO_N "checking malloc.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking malloc.h presence" >&5 +$as_echo_n "checking malloc.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3417,79 +4208,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: malloc.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: malloc.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for malloc.h" >&5 -echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for malloc.h" >&5 +$as_echo_n "checking for malloc.h... " >&6; } if test "${ac_cv_header_malloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_malloc_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 -echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 +$as_echo "$ac_cv_header_malloc_h" >&6; } fi -if test $ac_cv_header_malloc_h = yes; then +if test "x$ac_cv_header_malloc_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC_H 1 @@ -3499,17 +4283,17 @@ fi if test "${ac_cv_header_memory_h+set}" = set; then - echo "$as_me:$LINENO: checking for memory.h" >&5 -echo $ECHO_N "checking for memory.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for memory.h" >&5 +$as_echo_n "checking for memory.h... " >&6; } if test "${ac_cv_header_memory_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 -echo "${ECHO_T}$ac_cv_header_memory_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 +$as_echo "$ac_cv_header_memory_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking memory.h usability" >&5 -echo $ECHO_N "checking memory.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking memory.h usability" >&5 +$as_echo_n "checking memory.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3520,41 +4304,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking memory.h presence" >&5 -echo $ECHO_N "checking memory.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking memory.h presence" >&5 +$as_echo_n "checking memory.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3563,79 +4344,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: memory.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: memory.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: memory.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: memory.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: memory.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: memory.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: memory.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: memory.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: memory.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: memory.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: memory.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: memory.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: memory.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: memory.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: memory.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: memory.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: memory.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: memory.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: memory.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: memory.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for memory.h" >&5 -echo $ECHO_N "checking for memory.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for memory.h" >&5 +$as_echo_n "checking for memory.h... " >&6; } if test "${ac_cv_header_memory_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_memory_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 -echo "${ECHO_T}$ac_cv_header_memory_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_memory_h" >&5 +$as_echo "$ac_cv_header_memory_h" >&6; } fi -if test $ac_cv_header_memory_h = yes; then +if test "x$ac_cv_header_memory_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MEMORY_H 1 @@ -3645,17 +4419,17 @@ fi if test "${ac_cv_header_mntent_h+set}" = set; then - echo "$as_me:$LINENO: checking for mntent.h" >&5 -echo $ECHO_N "checking for mntent.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mntent.h" >&5 +$as_echo_n "checking for mntent.h... " >&6; } if test "${ac_cv_header_mntent_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 -echo "${ECHO_T}$ac_cv_header_mntent_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 +$as_echo "$ac_cv_header_mntent_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking mntent.h usability" >&5 -echo $ECHO_N "checking mntent.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mntent.h usability" >&5 +$as_echo_n "checking mntent.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3666,41 +4440,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking mntent.h presence" >&5 -echo $ECHO_N "checking mntent.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking mntent.h presence" >&5 +$as_echo_n "checking mntent.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3709,79 +4480,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: mntent.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: mntent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: mntent.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: mntent.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: mntent.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: mntent.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: mntent.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: mntent.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: mntent.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: mntent.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: mntent.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: mntent.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: mntent.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: mntent.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: mntent.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: mntent.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: mntent.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for mntent.h" >&5 -echo $ECHO_N "checking for mntent.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for mntent.h" >&5 +$as_echo_n "checking for mntent.h... " >&6; } if test "${ac_cv_header_mntent_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_mntent_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 -echo "${ECHO_T}$ac_cv_header_mntent_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mntent_h" >&5 +$as_echo "$ac_cv_header_mntent_h" >&6; } fi -if test $ac_cv_header_mntent_h = yes; then +if test "x$ac_cv_header_mntent_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MNTENT_H 1 @@ -3791,17 +4555,17 @@ fi if test "${ac_cv_header_netdb_h+set}" = set; then - echo "$as_me:$LINENO: checking for netdb.h" >&5 -echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for netdb.h" >&5 +$as_echo_n "checking for netdb.h... " >&6; } if test "${ac_cv_header_netdb_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 -echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 +$as_echo "$ac_cv_header_netdb_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking netdb.h usability" >&5 -echo $ECHO_N "checking netdb.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking netdb.h usability" >&5 +$as_echo_n "checking netdb.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3812,41 +4576,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking netdb.h presence" >&5 -echo $ECHO_N "checking netdb.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking netdb.h presence" >&5 +$as_echo_n "checking netdb.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3855,79 +4616,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: netdb.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: netdb.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: netdb.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: netdb.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: netdb.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: netdb.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: netdb.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: netdb.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: netdb.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: netdb.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: netdb.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: netdb.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: netdb.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: netdb.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: netdb.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: netdb.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for netdb.h" >&5 -echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for netdb.h" >&5 +$as_echo_n "checking for netdb.h... " >&6; } if test "${ac_cv_header_netdb_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_netdb_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 -echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 +$as_echo "$ac_cv_header_netdb_h" >&6; } fi -if test $ac_cv_header_netdb_h = yes; then +if test "x$ac_cv_header_netdb_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_NETDB_H 1 @@ -3937,17 +4691,17 @@ fi if test "${ac_cv_header_stdarg_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdarg.h" >&5 -echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for stdarg.h" >&5 +$as_echo_n "checking for stdarg.h... " >&6; } if test "${ac_cv_header_stdarg_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 +$as_echo "$ac_cv_header_stdarg_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdarg.h usability" >&5 -echo $ECHO_N "checking stdarg.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdarg.h usability" >&5 +$as_echo_n "checking stdarg.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3958,41 +4712,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdarg.h presence" >&5 -echo $ECHO_N "checking stdarg.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdarg.h presence" >&5 +$as_echo_n "checking stdarg.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4001,79 +4752,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdarg.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: stdarg.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdarg.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdarg.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdarg.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdarg.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: stdarg.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: stdarg.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: stdarg.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdarg.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: stdarg.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for stdarg.h" >&5 -echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for stdarg.h" >&5 +$as_echo_n "checking for stdarg.h... " >&6; } if test "${ac_cv_header_stdarg_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_stdarg_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 +$as_echo "$ac_cv_header_stdarg_h" >&6; } fi -if test $ac_cv_header_stdarg_h = yes; then +if test "x$ac_cv_header_stdarg_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDARG_H 1 @@ -4083,17 +4827,17 @@ fi if test "${ac_cv_header_stdint_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } if test "${ac_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdint_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +$as_echo "$ac_cv_header_stdint_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdint.h usability" >&5 -echo $ECHO_N "checking stdint.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdint.h usability" >&5 +$as_echo_n "checking stdint.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4104,41 +4848,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdint.h presence" >&5 -echo $ECHO_N "checking stdint.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdint.h presence" >&5 +$as_echo_n "checking stdint.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4147,79 +4888,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: stdint.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: stdint.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: stdint.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: stdint.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: stdint.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: stdint.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: stdint.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdint.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: stdint.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for stdint.h" >&5 -echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for stdint.h" >&5 +$as_echo_n "checking for stdint.h... " >&6; } if test "${ac_cv_header_stdint_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_stdint_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdint_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdint_h" >&5 +$as_echo "$ac_cv_header_stdint_h" >&6; } fi -if test $ac_cv_header_stdint_h = yes; then +if test "x$ac_cv_header_stdint_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDINT_H 1 @@ -4229,17 +4963,17 @@ fi if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5 +$as_echo_n "checking for stdlib.h... " >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +$as_echo "$ac_cv_header_stdlib_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdlib.h usability" >&5 +$as_echo_n "checking stdlib.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4250,41 +4984,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdlib.h presence" >&5 +$as_echo_n "checking stdlib.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4293,79 +5024,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for stdlib.h" >&5 +$as_echo_n "checking for stdlib.h... " >&6; } if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_stdlib_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 +$as_echo "$ac_cv_header_stdlib_h" >&6; } fi -if test $ac_cv_header_stdlib_h = yes; then +if test "x$ac_cv_header_stdlib_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDLIB_H 1 @@ -4374,18 +5098,18 @@ _ACEOF fi -if test "${ac_cv_header_strings_h+set}" = set; then - echo "$as_me:$LINENO: checking for strings.h" >&5 -echo $ECHO_N "checking for strings.h... $ECHO_C" >&6 -if test "${ac_cv_header_strings_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_stdio_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for stdio.h" >&5 +$as_echo_n "checking for stdio.h... " >&6; } +if test "${ac_cv_header_stdio_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 -echo "${ECHO_T}$ac_cv_header_strings_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 +$as_echo "$ac_cv_header_stdio_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking strings.h usability" >&5 -echo $ECHO_N "checking strings.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdio.h usability" >&5 +$as_echo_n "checking stdio.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4393,145 +5117,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking strings.h presence" >&5 -echo $ECHO_N "checking strings.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking stdio.h presence" >&5 +$as_echo_n "checking stdio.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: strings.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: strings.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: strings.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: stdio.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: strings.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: strings.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: strings.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: strings.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: strings.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: strings.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: strings.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: stdio.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: stdio.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: stdio.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: stdio.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: stdio.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: stdio.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: stdio.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for strings.h" >&5 -echo $ECHO_N "checking for strings.h... $ECHO_C" >&6 -if test "${ac_cv_header_strings_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for stdio.h" >&5 +$as_echo_n "checking for stdio.h... " >&6; } +if test "${ac_cv_header_stdio_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_strings_h=$ac_header_preproc + ac_cv_header_stdio_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 -echo "${ECHO_T}$ac_cv_header_strings_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 +$as_echo "$ac_cv_header_stdio_h" >&6; } fi -if test $ac_cv_header_strings_h = yes; then +if test "x$ac_cv_header_stdio_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_STRINGS_H 1 +#define HAVE_STDIO_H 1 _ACEOF fi -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_fcntl_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for fcntl.h" >&5 +$as_echo_n "checking for fcntl.h... " >&6; } +if test "${ac_cv_header_fcntl_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fcntl_h" >&5 +$as_echo "$ac_cv_header_fcntl_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking stdlib.h usability" >&5 -echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fcntl.h usability" >&5 +$as_echo_n "checking fcntl.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4539,146 +5253,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking stdlib.h presence" >&5 -echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking fcntl.h presence" >&5 +$as_echo_n "checking fcntl.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: fcntl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: fcntl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: stdlib.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: stdlib.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: fcntl.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: fcntl.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: fcntl.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: fcntl.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: fcntl.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: fcntl.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: fcntl.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for stdlib.h" >&5 -echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 -if test "${ac_cv_header_stdlib_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for fcntl.h" >&5 +$as_echo_n "checking for fcntl.h... " >&6; } +if test "${ac_cv_header_fcntl_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_stdlib_h=$ac_header_preproc + ac_cv_header_fcntl_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_fcntl_h" >&5 +$as_echo "$ac_cv_header_fcntl_h" >&6; } fi -if test $ac_cv_header_stdlib_h = yes; then +if test "x$ac_cv_header_fcntl_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_STDLIB_H 1 +#define HAVE_FCNTL_H 1 _ACEOF fi - -if test "${ac_cv_header_linux_types_h+set}" = set; then - echo "$as_me:$LINENO: checking for linux/types.h" >&5 -echo $ECHO_N "checking for linux/types.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_utime_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for utime.h" >&5 +$as_echo_n "checking for utime.h... " >&6; } +if test "${ac_cv_header_utime_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_types_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_utime_h" >&5 +$as_echo "$ac_cv_header_utime_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking linux/types.h usability" >&5 -echo $ECHO_N "checking linux/types.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking utime.h usability" >&5 +$as_echo_n "checking utime.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4686,145 +5389,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking linux/types.h presence" >&5 -echo $ECHO_N "checking linux/types.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking utime.h presence" >&5 +$as_echo_n "checking utime.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/types.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: utime.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: utime.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/types.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/types.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/types.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/types.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/types.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/types.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/types.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: utime.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: utime.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: utime.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: utime.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: utime.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: utime.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: utime.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: utime.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for linux/types.h" >&5 -echo $ECHO_N "checking for linux/types.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for utime.h" >&5 +$as_echo_n "checking for utime.h... " >&6; } +if test "${ac_cv_header_utime_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_linux_types_h=$ac_header_preproc + ac_cv_header_utime_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_types_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_utime_h" >&5 +$as_echo "$ac_cv_header_utime_h" >&6; } fi -if test $ac_cv_header_linux_types_h = yes; then +if test "x$ac_cv_header_utime_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_LINUX_TYPES_H 1 +#define HAVE_UTIME_H 1 _ACEOF fi -if test "${ac_cv_header_linux_malloc_h+set}" = set; then - echo "$as_me:$LINENO: checking for linux/malloc.h" >&5 -echo $ECHO_N "checking for linux/malloc.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_malloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_string_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for string.h" >&5 +$as_echo_n "checking for string.h... " >&6; } +if test "${ac_cv_header_string_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_malloc_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +$as_echo "$ac_cv_header_string_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking linux/malloc.h usability" >&5 -echo $ECHO_N "checking linux/malloc.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking string.h usability" >&5 +$as_echo_n "checking string.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4832,147 +5525,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking linux/malloc.h presence" >&5 -echo $ECHO_N "checking linux/malloc.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking string.h presence" >&5 +$as_echo_n "checking string.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: linux/malloc.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: linux/malloc.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: linux/malloc.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: linux/malloc.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: linux/malloc.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: string.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: string.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for linux/malloc.h" >&5 -echo $ECHO_N "checking for linux/malloc.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_malloc_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for string.h" >&5 +$as_echo_n "checking for string.h... " >&6; } +if test "${ac_cv_header_string_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_linux_malloc_h=$ac_header_preproc + ac_cv_header_string_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_malloc_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 +$as_echo "$ac_cv_header_string_h" >&6; } fi -if test $ac_cv_header_linux_malloc_h = yes; then +if test "x$ac_cv_header_string_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_LINUX_MALLOC_H 1 +#define HAVE_STRING_H 1 _ACEOF fi - - -if test "${ac_cv_header_sys_vfs_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/vfs.h" >&5 -echo $ECHO_N "checking for sys/vfs.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_vfs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_strings_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for strings.h" >&5 +$as_echo_n "checking for strings.h... " >&6; } +if test "${ac_cv_header_strings_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_vfs_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 +$as_echo "$ac_cv_header_strings_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/vfs.h usability" >&5 -echo $ECHO_N "checking sys/vfs.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking strings.h usability" >&5 +$as_echo_n "checking strings.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4980,145 +5661,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/vfs.h presence" >&5 -echo $ECHO_N "checking sys/vfs.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking strings.h presence" >&5 +$as_echo_n "checking strings.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/vfs.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: strings.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: strings.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/vfs.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/vfs.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/vfs.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/vfs.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: strings.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: strings.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: strings.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: strings.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: strings.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: strings.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: strings.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: strings.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/vfs.h" >&5 -echo $ECHO_N "checking for sys/vfs.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_vfs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for strings.h" >&5 +$as_echo_n "checking for strings.h... " >&6; } +if test "${ac_cv_header_strings_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_vfs_h=$ac_header_preproc + ac_cv_header_strings_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_vfs_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_strings_h" >&5 +$as_echo "$ac_cv_header_strings_h" >&6; } fi -if test $ac_cv_header_sys_vfs_h = yes; then +if test "x$ac_cv_header_strings_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_VFS_H 1 +#define HAVE_STRINGS_H 1 _ACEOF fi -if test "${ac_cv_header_sys_mount_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/mount.h" >&5 -echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_mount_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_assert_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for assert.h" >&5 +$as_echo_n "checking for assert.h... " >&6; } +if test "${ac_cv_header_assert_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5 +$as_echo "$ac_cv_header_assert_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/mount.h usability" >&5 -echo $ECHO_N "checking sys/mount.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking assert.h usability" >&5 +$as_echo_n "checking assert.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5126,145 +5797,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/mount.h presence" >&5 -echo $ECHO_N "checking sys/mount.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking assert.h presence" >&5 +$as_echo_n "checking assert.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/mount.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: assert.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/mount.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/mount.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/mount.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/mount.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/mount.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/mount.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: assert.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: assert.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: assert.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: assert.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: assert.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: assert.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: assert.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: assert.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/mount.h" >&5 -echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_mount_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for assert.h" >&5 +$as_echo_n "checking for assert.h... " >&6; } +if test "${ac_cv_header_assert_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_mount_h=$ac_header_preproc + ac_cv_header_assert_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5 +$as_echo "$ac_cv_header_assert_h" >&6; } fi -if test $ac_cv_header_sys_mount_h = yes; then +if test "x$ac_cv_header_assert_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_MOUNT_H 1 +#define HAVE_ASSERT_H 1 _ACEOF fi -if test "${ac_cv_header_sys_stat_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/stat.h" >&5 -echo $ECHO_N "checking for sys/stat.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_stat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_libgen_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for libgen.h" >&5 +$as_echo_n "checking for libgen.h... " >&6; } +if test "${ac_cv_header_libgen_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_stat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libgen_h" >&5 +$as_echo "$ac_cv_header_libgen_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/stat.h usability" >&5 -echo $ECHO_N "checking sys/stat.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking libgen.h usability" >&5 +$as_echo_n "checking libgen.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5272,145 +5933,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/stat.h presence" >&5 -echo $ECHO_N "checking sys/stat.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking libgen.h presence" >&5 +$as_echo_n "checking libgen.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/stat.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: libgen.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: libgen.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/stat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/stat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/stat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/stat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/stat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/stat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: libgen.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: libgen.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: libgen.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: libgen.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: libgen.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: libgen.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: libgen.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/stat.h" >&5 -echo $ECHO_N "checking for sys/stat.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_stat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for libgen.h" >&5 +$as_echo_n "checking for libgen.h... " >&6; } +if test "${ac_cv_header_libgen_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_stat_h=$ac_header_preproc + ac_cv_header_libgen_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_stat_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_libgen_h" >&5 +$as_echo "$ac_cv_header_libgen_h" >&6; } fi -if test $ac_cv_header_sys_stat_h = yes; then +if test "x$ac_cv_header_libgen_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_STAT_H 1 +#define HAVE_LIBGEN_H 1 _ACEOF fi -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_dirent_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for dirent.h" >&5 +$as_echo_n "checking for dirent.h... " >&6; } +if test "${ac_cv_header_dirent_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dirent_h" >&5 +$as_echo "$ac_cv_header_dirent_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/types.h usability" >&5 -echo $ECHO_N "checking sys/types.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dirent.h usability" >&5 +$as_echo_n "checking dirent.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5418,145 +6069,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/types.h presence" >&5 -echo $ECHO_N "checking sys/types.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dirent.h presence" >&5 +$as_echo_n "checking dirent.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: dirent.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: dirent.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: dirent.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: dirent.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: dirent.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: dirent.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: dirent.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dirent.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: dirent.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/types.h" >&5 -echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_types_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for dirent.h" >&5 +$as_echo_n "checking for dirent.h... " >&6; } +if test "${ac_cv_header_dirent_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_types_h=$ac_header_preproc + ac_cv_header_dirent_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dirent_h" >&5 +$as_echo "$ac_cv_header_dirent_h" >&6; } fi -if test $ac_cv_header_sys_types_h = yes; then +if test "x$ac_cv_header_dirent_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_TYPES_H 1 +#define HAVE_DIRENT_H 1 _ACEOF fi -if test "${ac_cv_header_sys_socket_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/socket.h" >&5 -echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_socket_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_time_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for time.h" >&5 +$as_echo_n "checking for time.h... " >&6; } +if test "${ac_cv_header_time_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 +$as_echo "$ac_cv_header_time_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/socket.h usability" >&5 -echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking time.h usability" >&5 +$as_echo_n "checking time.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5564,145 +6205,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/socket.h presence" >&5 -echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking time.h presence" >&5 +$as_echo_n "checking time.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: time.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/socket.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: time.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: time.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: time.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: time.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: time.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: time.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: time.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: time.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/socket.h" >&5 -echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_socket_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for time.h" >&5 +$as_echo_n "checking for time.h... " >&6; } +if test "${ac_cv_header_time_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_socket_h=$ac_header_preproc + ac_cv_header_time_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 +$as_echo "$ac_cv_header_time_h" >&6; } fi -if test $ac_cv_header_sys_socket_h = yes; then +if test "x$ac_cv_header_time_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_SOCKET_H 1 +#define HAVE_TIME_H 1 _ACEOF fi -if test "${ac_cv_header_sys_sendfile_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sendfile.h" >&5 -echo $ECHO_N "checking for sys/sendfile.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_sendfile_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_dlfcn_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +$as_echo_n "checking for dlfcn.h... " >&6; } +if test "${ac_cv_header_dlfcn_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sendfile_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +$as_echo "$ac_cv_header_dlfcn_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sendfile.h usability" >&5 -echo $ECHO_N "checking sys/sendfile.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dlfcn.h usability" >&5 +$as_echo_n "checking dlfcn.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5710,145 +6341,136 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sendfile.h presence" >&5 -echo $ECHO_N "checking sys/sendfile.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dlfcn.h presence" >&5 +$as_echo_n "checking dlfcn.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sendfile.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sendfile.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sendfile.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/sendfile.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: dlfcn.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/sendfile.h" >&5 -echo $ECHO_N "checking for sys/sendfile.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_sendfile_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for dlfcn.h" >&5 +$as_echo_n "checking for dlfcn.h... " >&6; } +if test "${ac_cv_header_dlfcn_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_sendfile_h=$ac_header_preproc + ac_cv_header_dlfcn_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sendfile_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_dlfcn_h" >&5 +$as_echo "$ac_cv_header_dlfcn_h" >&6; } fi -if test $ac_cv_header_sys_sendfile_h = yes; then +if test "x$ac_cv_header_dlfcn_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_SENDFILE_H 1 +#define HAVE_DLFCN_H 1 _ACEOF fi -if test "${ac_cv_header_sys_xattr_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/xattr.h" >&5 -echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_xattr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +if test "${ac_cv_header_linux_types_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for linux/types.h" >&5 +$as_echo_n "checking for linux/types.h... " >&6; } +if test "${ac_cv_header_linux_types_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 +$as_echo "$ac_cv_header_linux_types_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/xattr.h usability" >&5 -echo $ECHO_N "checking sys/xattr.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking linux/types.h usability" >&5 +$as_echo_n "checking linux/types.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5856,146 +6478,135 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/xattr.h presence" >&5 -echo $ECHO_N "checking sys/xattr.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking linux/types.h presence" >&5 +$as_echo_n "checking linux/types.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/xattr.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: linux/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: linux/types.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/xattr.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/xattr.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: linux/types.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: linux/types.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: linux/types.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: linux/types.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: linux/types.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/types.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: linux/types.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/xattr.h" >&5 -echo $ECHO_N "checking for sys/xattr.h... $ECHO_C" >&6 -if test "${ac_cv_header_sys_xattr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for linux/types.h" >&5 +$as_echo_n "checking for linux/types.h... " >&6; } +if test "${ac_cv_header_linux_types_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_sys_xattr_h=$ac_header_preproc + ac_cv_header_linux_types_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_xattr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_types_h" >&5 +$as_echo "$ac_cv_header_linux_types_h" >&6; } fi -if test $ac_cv_header_sys_xattr_h = yes; then +if test "x$ac_cv_header_linux_types_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_XATTR_H 1 +#define HAVE_LINUX_TYPES_H 1 _ACEOF fi - -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 -echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for linux/malloc.h" >&5 +$as_echo_n "checking for linux/malloc.h... " >&6; } +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 -echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 +$as_echo "$ac_cv_header_linux_malloc_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 -echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking linux/malloc.h usability" >&5 +$as_echo_n "checking linux/malloc.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6003,145 +6614,136 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5 -echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking linux/malloc.h presence" >&5 +$as_echo_n "checking linux/malloc.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: linux/malloc.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: linux/malloc.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 -echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 -if test "${ac_cv_header_arpa_inet_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for linux/malloc.h" >&5 +$as_echo_n "checking for linux/malloc.h... " >&6; } +if test "${ac_cv_header_linux_malloc_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_arpa_inet_h=$ac_header_preproc + ac_cv_header_linux_malloc_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 -echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_malloc_h" >&5 +$as_echo "$ac_cv_header_linux_malloc_h" >&6; } fi -if test $ac_cv_header_arpa_inet_h = yes; then +if test "x$ac_cv_header_linux_malloc_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ARPA_INET_H 1 +#define HAVE_LINUX_MALLOC_H 1 _ACEOF fi -if test "${ac_cv_header_attr_xattr_h+set}" = set; then - echo "$as_me:$LINENO: checking for attr/xattr.h" >&5 -echo $ECHO_N "checking for attr/xattr.h... $ECHO_C" >&6 -if test "${ac_cv_header_attr_xattr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 -echo "${ECHO_T}$ac_cv_header_attr_xattr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking attr/xattr.h usability" >&5 -echo $ECHO_N "checking attr/xattr.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5 +$as_echo_n "checking selinux/selinux.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6149,301 +6751,273 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking attr/xattr.h presence" >&5 -echo $ECHO_N "checking attr/xattr.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5 +$as_echo_n "checking selinux/selinux.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: attr/xattr.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: attr/xattr.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: attr/xattr.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: attr/xattr.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: attr/xattr.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for attr/xattr.h" >&5 -echo $ECHO_N "checking for attr/xattr.h... $ECHO_C" >&6 -if test "${ac_cv_header_attr_xattr_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 +$as_echo_n "checking for selinux/selinux.h... " >&6; } +if test "${ac_cv_header_selinux_selinux_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_header_attr_xattr_h=$ac_header_preproc + ac_cv_header_selinux_selinux_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 -echo "${ECHO_T}$ac_cv_header_attr_xattr_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5 +$as_echo "$ac_cv_header_selinux_selinux_h" >&6; } fi -if test $ac_cv_header_attr_xattr_h = yes; then +if test "x$ac_cv_header_selinux_selinux_h" = x""yes; then cat >>confdefs.h <<\_ACEOF -#define HAVE_ATTR_XATTR_H 1 +#define HAVE_SELINUX_H 1 _ACEOF fi -echo "$as_me:$LINENO: checking for long int" >&5 -echo $ECHO_N "checking for long int... $ECHO_C" >&6 -if test "${ac_cv_type_long_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/vfs.h" >&5 +$as_echo_n "checking for sys/vfs.h... " >&6; } +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 +$as_echo "$ac_cv_header_sys_vfs_h" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/vfs.h usability" >&5 +$as_echo_n "checking sys/vfs.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -if ((long int *) 0) - return 0; -if (sizeof (long int)) - return 0; - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_long_int=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_long_int=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5 -echo "${ECHO_T}$ac_cv_type_long_int" >&6 -echo "$as_me:$LINENO: checking size of long int" >&5 -echo $ECHO_N "checking size of long int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long_int" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= 0)]; -test_array [0] = 0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/vfs.h presence" >&5 +$as_echo_n "checking sys/vfs.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/vfs.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/vfs.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/vfs.h" >&5 +$as_echo_n "checking for sys/vfs.h... " >&6; } +if test "${ac_cv_header_sys_vfs_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_vfs_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_vfs_h" >&5 +$as_echo "$ac_cv_header_sys_vfs_h" >&6; } + +fi +if test "x$ac_cv_header_sys_vfs_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_VFS_H 1 +_ACEOF +fi + + +if test "${ac_cv_header_sys_mount_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/mount.h" >&5 +$as_echo_n "checking for sys/mount.h... " >&6; } +if test "${ac_cv_header_sys_mount_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +$as_echo "$ac_cv_header_sys_mount_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/mount.h usability" >&5 +$as_echo_n "checking sys/mount.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6451,4001 +7025,7649 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long int))) < 0)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/mount.h presence" >&5 +$as_echo_n "checking sys/mount.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long int))) >= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mount.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/mount.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/mount.h" >&5 +$as_echo_n "checking for sys/mount.h... " >&6; } +if test "${ac_cv_header_sys_mount_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_mount_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +$as_echo "$ac_cv_header_sys_mount_h" >&6; } -ac_lo= ac_hi= fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +if test "x$ac_cv_header_sys_mount_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_MOUNT_H 1 +_ACEOF + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF + + +if test "${ac_cv_header_sys_stat_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/stat.h" >&5 +$as_echo_n "checking for sys/stat.h... " >&6; } +if test "${ac_cv_header_sys_stat_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 +$as_echo "$ac_cv_header_sys_stat_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/stat.h usability" >&5 +$as_echo_n "checking sys/stat.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long int))) <= $ac_mid)]; -test_array [0] = 0 - - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_long_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/stat.h presence" >&5 +$as_echo_n "checking sys/stat.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (long int)); } -unsigned long ulongval () { return (long) (sizeof (long int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long int))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long int)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long int)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - - ; - return 0; -} +#include _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_long_int=`cat conftest.val` + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long int), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_long_int=0 -fi + ac_header_preproc=no fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int -_ACEOF +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/stat.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/stat.h: in the future, the compiler will take precedence" >&2;} -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done ;; esac -done - - +{ $as_echo "$as_me:$LINENO: checking for sys/stat.h" >&5 +$as_echo_n "checking for sys/stat.h... " >&6; } +if test "${ac_cv_header_sys_stat_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_stat_h=$ac_header_preproc fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_stat_h" >&5 +$as_echo "$ac_cv_header_sys_stat_h" >&6; } + fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +if test "x$ac_cv_header_sys_stat_h" = x""yes; then -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_STAT_H 1 +_ACEOF -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' +fi -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_header_sys_types_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/types.h" >&5 +$as_echo_n "checking for sys/types.h... " >&6; } +if test "${ac_cv_header_sys_types_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 +$as_echo "$ac_cv_header_sys_types_h" >&6; } else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/types.h usability" >&5 +$as_echo_n "checking sys/types.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/types.h presence" >&5 +$as_echo_n "checking sys/types.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_header_preproc=no fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/types.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/types.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/types.h" >&5 +$as_echo_n "checking for sys/types.h... " >&6; } +if test "${ac_cv_header_sys_types_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - + ac_cv_header_sys_types_h=$ac_header_preproc fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 +$as_echo "$ac_cv_header_sys_types_h" >&6; } fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi +if test "x$ac_cv_header_sys_types_h" = x""yes; then - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_TYPES_H 1 +_ACEOF -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi - test -n "$ac_ct_CC" && break -done - - CC=$ac_ct_CC -fi +if test "${ac_cv_header_sys_socket_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/socket.h" >&5 +$as_echo_n "checking for sys/socket.h... " >&6; } +if test "${ac_cv_header_sys_socket_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi - - -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - -# Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } - -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 +$as_echo "$ac_cv_header_sys_socket_h" >&6; } else - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/socket.h usability" >&5 +$as_echo_n "checking sys/socket.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} +$ac_includes_default +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_compiler_gnu=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu -fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/socket.h presence" >&5 +$as_echo_n "checking sys/socket.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi + ac_header_preproc=no fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -#include -#include -#include -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/socket.h" >&5 +$as_echo_n "checking for sys/socket.h... " >&6; } +if test "${ac_cv_header_sys_socket_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_socket_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 +$as_echo "$ac_cv_header_sys_socket_h" >&6; } fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC +if test "x$ac_cv_header_sys_socket_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SOCKET_H 1 +_ACEOF fi -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/sendfile.h" >&5 +$as_echo_n "checking for sys/sendfile.h... " >&6; } +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 +$as_echo "$ac_cv_header_sys_sendfile_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/sendfile.h usability" >&5 +$as_echo_n "checking sys/sendfile.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} +$ac_includes_default +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -continue + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/sendfile.h presence" >&5 +$as_echo_n "checking sys/sendfile.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} +#include _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sendfile.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/sendfile.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/sendfile.h" >&5 +$as_echo_n "checking for sys/sendfile.h... " >&6; } +if test "${ac_cv_header_sys_sendfile_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_header_sys_sendfile_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sendfile_h" >&5 +$as_echo "$ac_cv_header_sys_sendfile_h" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test "x$ac_cv_header_sys_sendfile_h" = x""yes; then +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_SENDFILE_H 1 +_ACEOF -echo "$as_me:$LINENO: checking for required gcc" >&5 -echo $ECHO_N "checking for required gcc... $ECHO_C" >&6 -if test "x$GCC" = "x"; then - { { echo "$as_me:$LINENO: error: no" >&5 -echo "$as_me: error: no" >&2;} - { (exit 1); exit 1; }; } fi -CFLAGS=$USR_CFLAGS -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/xattr.h" >&5 +$as_echo_n "checking for sys/xattr.h... " >&6; } +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 +$as_echo "$ac_cv_header_sys_xattr_h" >&6; } else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/xattr.h usability" >&5 +$as_echo_n "checking sys/xattr.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +$ac_includes_default +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/xattr.h presence" >&5 +$as_echo_n "checking sys/xattr.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - break +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/xattr.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/xattr.h" >&5 +$as_echo_n "checking for sys/xattr.h... " >&6; } +if test "${ac_cv_header_sys_xattr_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_xattr_h=$ac_header_preproc fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_xattr_h" >&5 +$as_echo "$ac_cv_header_sys_xattr_h" >&6; } - done - ac_cv_prog_CPP=$CPP +fi +if test "x$ac_cv_header_sys_xattr_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_XATTR_H 1 +_ACEOF fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP + + +if test "${ac_cv_header_sys_statvfs_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/statvfs.h" >&5 +$as_echo_n "checking for sys/statvfs.h... " >&6; } +if test "${ac_cv_header_sys_statvfs_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_statvfs_h" >&5 +$as_echo "$ac_cv_header_sys_statvfs_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/statvfs.h usability" >&5 +$as_echo_n "checking sys/statvfs.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error +$ac_includes_default +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Broken: fails on valid input. -continue + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/statvfs.h presence" >&5 +$as_echo_n "checking sys/statvfs.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include +#include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - # Broken: success on invalid input. -continue + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. -ac_preproc_ok=: -break + ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : -else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } -# Extract the first word of "perl", so it can be a program name with args. -set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_PERL"; then - ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_PERL="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/statvfs.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/statvfs.h: in the future, the compiler will take precedence" >&2;} - test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" -fi -fi -HAVE_PERL=$ac_cv_prog_HAVE_PERL -if test -n "$HAVE_PERL"; then - echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 -echo "${ECHO_T}$HAVE_PERL" >&6 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/statvfs.h" >&5 +$as_echo_n "checking for sys/statvfs.h... " >&6; } +if test "${ac_cv_header_sys_statvfs_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_header_sys_statvfs_h=$ac_header_preproc fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_statvfs_h" >&5 +$as_echo "$ac_cv_header_sys_statvfs_h" >&6; } -if test $HAVE_PERL = "no"; then - { { echo "$as_me:$LINENO: error: \"perl required in PATH to complete build\"" >&5 -echo "$as_me: error: \"perl required in PATH to complete build\"" >&2;} - { (exit 1); exit 1; }; } fi +if test "x$ac_cv_header_sys_statvfs_h" = x""yes; then -# Extract the first word of "find", so it can be a program name with args. -set dummy find; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_FIND+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_FIND"; then - ac_cv_prog_HAVE_FIND="$HAVE_FIND" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_FIND="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_STATVFS_H 1 +_ACEOF - test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" fi + + +if test "${ac_cv_header_sys_uio_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/uio.h" >&5 +$as_echo_n "checking for sys/uio.h... " >&6; } +if test "${ac_cv_header_sys_uio_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -HAVE_FIND=$ac_cv_prog_HAVE_FIND -if test -n "$HAVE_FIND"; then - echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 -echo "${ECHO_T}$HAVE_FIND" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_uio_h" >&5 +$as_echo "$ac_cv_header_sys_uio_h" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/uio.h usability" >&5 +$as_echo_n "checking sys/uio.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $HAVE_FIND = "no"; then - { { echo "$as_me:$LINENO: error: \"find required in PATH complete build\"" >&5 -echo "$as_me: error: \"find required in PATH complete build\"" >&2;} - { (exit 1); exit 1; }; } + ac_header_compiler=no fi -# Extract the first word of "bison", so it can be a program name with args. -set dummy bison; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_BISON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_BISON"; then - ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test. +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/uio.h presence" >&5 +$as_echo_n "checking sys/uio.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_BISON="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" -fi + ac_header_preproc=no fi -HAVE_BISON=$ac_cv_prog_HAVE_BISON -if test -n "$HAVE_BISON"; then - echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 -echo "${ECHO_T}$HAVE_BISON" >&6 + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/uio.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/uio.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/uio.h" >&5 +$as_echo_n "checking for sys/uio.h... " >&6; } +if test "${ac_cv_header_sys_uio_h+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_header_sys_uio_h=$ac_header_preproc fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_uio_h" >&5 +$as_echo "$ac_cv_header_sys_uio_h" >&6; } -if test $HAVE_BISON = "no"; then - { { echo "$as_me:$LINENO: error: \"bison required in PATH to complete build\"" >&5 -echo "$as_me: error: \"bison required in PATH to complete build\"" >&2;} - { (exit 1); exit 1; }; } fi +if test "x$ac_cv_header_sys_uio_h" = x""yes; then -# Extract the first word of "flex", so it can be a program name with args. -set dummy flex; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_FLEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_FLEX"; then - ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_FLEX="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_UIO_H 1 +_ACEOF - test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" fi + + +if test "${ac_cv_header_sys_mman_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/mman.h" >&5 +$as_echo_n "checking for sys/mman.h... " >&6; } +if test "${ac_cv_header_sys_mman_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -HAVE_FLEX=$ac_cv_prog_HAVE_FLEX -if test -n "$HAVE_FLEX"; then - echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 -echo "${ECHO_T}$HAVE_FLEX" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 +$as_echo "$ac_cv_header_sys_mman_h" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/mman.h usability" >&5 +$as_echo_n "checking sys/mman.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test $HAVE_FLEX = "no"; then - { { echo "$as_me:$LINENO: error: \"flex required in PATH to complete build\"" >&5 -echo "$as_me: error: \"flex required in PATH to complete build\"" >&2;} - { (exit 1); exit 1; }; } + ac_header_compiler=no fi -echo "$as_me:$LINENO: checking for required Math::BigInt perl module" >&5 -echo $ECHO_N "checking for required Math::BigInt perl module... $ECHO_C" >&6 -perl -e "use Math::BigInt" 2>&1 > /dev/null -if test $? != 0; then - { { echo "$as_me:$LINENO: error: no" >&5 -echo "$as_me: error: no" >&2;} - { (exit 1); exit 1; }; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/mman.h presence" >&5 +$as_echo_n "checking sys/mman.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi -if test $host != $build; then - for ac_prog in gcc cc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_BUILD_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$BUILD_CC"; then - ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/mman.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/mman.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/mman.h" >&5 +$as_echo_n "checking for sys/mman.h... " >&6; } +if test "${ac_cv_header_sys_mman_h+set}" = set; then + $as_echo_n "(cached) " >&6 else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_BUILD_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done + ac_cv_header_sys_mman_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mman_h" >&5 +$as_echo "$ac_cv_header_sys_mman_h" >&6; } fi +if test "x$ac_cv_header_sys_mman_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_MMAN_H 1 +_ACEOF + fi -BUILD_CC=$ac_cv_prog_BUILD_CC -if test -n "$BUILD_CC"; then - echo "$as_me:$LINENO: result: $BUILD_CC" >&5 -echo "${ECHO_T}$BUILD_CC" >&6 + + +if test "${ac_cv_header_sys_time_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for sys/time.h" >&5 +$as_echo_n "checking for sys/time.h... " >&6; } +if test "${ac_cv_header_sys_time_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 +$as_echo "$ac_cv_header_sys_time_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking sys/time.h usability" >&5 +$as_echo_n "checking sys/time.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no fi - test -n "$BUILD_CC" && break -done +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking sys/time.h presence" >&5 +$as_echo_n "checking sys/time.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes else - BUILD_CC=$CC - BUILD_CFLAGS=$BUILD_CFLAGS - BUILD_LDFLAGS=$BUILD_LDFLAGS + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no fi +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/time.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/time.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/time.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/time.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/time.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/time.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/time.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/time.h: in the future, the compiler will take precedence" >&2;} + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for sys/time.h" >&5 +$as_echo_n "checking for sys/time.h... " >&6; } +if test "${ac_cv_header_sys_time_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_sys_time_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 +$as_echo "$ac_cv_header_sys_time_h" >&6; } +fi +if test "x$ac_cv_header_sys_time_h" = x""yes; then -# -# Threading options. -# -# Client - thread-safe or not -# --disable-thread-safety : chooses null or posix locking mechanism -# For applications that know they are not multi-threaded, or choose -# to handle locking themselves, this configure option can be used to -# slightly decrease library-induced latency by removing the locking. -# -# Client - job threading -# libpvfs2-threaded.{so,a} with __PVFS2_JOB_THREADED__ -# This option causes the client library to spawn an extra thread -# to handle network communications. In this way, it is possible -# that the library can handle new and completed requests from -# the application while also interacting with the network. -# -# These separate libraries can not be built using the existing -# configure mechanism. They are only built if required by the -# kernel module helper. -# -# Server - three options: -# trove -# (hack Makefile.in) -# job -# (hack Makefile.in) -# aio -# --disable-aio-threaded-callbacks -# -# Trove (storage) and job threading in the server are implemented -# using #defines, but not exported through the configure mechanism. -# AIO threaded callbacks are a separate thread used in conjunction -# with trove, and can be disabled through a configure option as -# AIO has been found to be buggy on many systems. -# -# -# Kernel module helper - job threading -# --enable-threaded-kmod-helper -# -# This is a special client that "helps" applications that access PVFS -# through the kernel using normal VFS calls (e.g. "ls"). This -# configure options builds it using __PVFS2_JOB_THREADED__ as described -# above. That enables a thread for the network layer and a thread -# for the kernel interface. This has the potential to increase the -# rate at which concurrent operations are processed, but has the potential -# drawback of somewhat higher overhead for a single operation and lack -# of testing. -# -# Enabling this options causes one of libpvfs2-threaded.{so,a} to be -# built, depending on --enable-shared and --enable-static. If both are -# enabled, the shared library takes precedence. -# +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_TIME_H 1 +_ACEOF -echo "$as_me:$LINENO: checking for client library thread safety support" >&5 -echo $ECHO_N "checking for client library thread safety support... $ECHO_C" >&6 -# Check whether --enable-thread-safety or --disable-thread-safety was given. -if test "${enable_thread_safety+set}" = set; then - enableval="$enable_thread_safety" - if test "x$enableval" = "xno" ; then - LIBCFLAGS="$LIBCFLAGS -D__GEN_NULL_LOCKING__" - THREAD_LIB="" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi -else - LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__" - THREAD_LIB="-lpthread" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -fi; - -# Check whether --enable-server or --disable-server was given. -if test "${enable_server+set}" = set; then - enableval="$enable_server" - if test "x$enableval" = "xyes" ; then - BUILD_SERVER=1 - NEED_BERKELEY_DB=yes -else - BUILD_SERVER="" +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 +$as_echo_n "checking for arpa/inet.h... " >&6; } +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 +$as_echo "$ac_cv_header_arpa_inet_h" >&6; } else - BUILD_SERVER=1 - NEED_BERKELEY_DB=yes -fi; + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 +$as_echo_n "checking arpa/inet.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } -# Check whether --with-openssl or --without-openssl was given. -if test "${with_openssl+set}" = set; then - withval="$with_openssl" +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5 +$as_echo_n "checking arpa/inet.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - opensslpath=${withval} + ac_header_preproc=no +fi - if test "x${withval}" != "xno"; then +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } - echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;} - if test "x${opensslpath}" != "x"; then - CFLAGS="${CFLAGS} -I${opensslpath}/include" - LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 +$as_echo_n "checking for arpa/inet.h... " >&6; } +if test "${ac_cv_header_arpa_inet_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_arpa_inet_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 +$as_echo "$ac_cv_header_arpa_inet_h" >&6; } + +fi +if test "x$ac_cv_header_arpa_inet_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ARPA_INET_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for attr/xattr.h" >&5 +$as_echo_n "checking for attr/xattr.h... " >&6; } +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + $as_echo_n "(cached) " >&6 +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 +$as_echo "$ac_cv_header_attr_xattr_h" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking attr/xattr.h usability" >&5 +$as_echo_n "checking attr/xattr.h usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking attr/xattr.h presence" >&5 +$as_echo_n "checking attr/xattr.h presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: attr/xattr.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: attr/xattr.h: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for attr/xattr.h" >&5 +$as_echo_n "checking for attr/xattr.h... " >&6; } +if test "${ac_cv_header_attr_xattr_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_attr_xattr_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_attr_xattr_h" >&5 +$as_echo "$ac_cv_header_attr_xattr_h" >&6; } + +fi +if test "x$ac_cv_header_attr_xattr_h" = x""yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ATTR_XATTR_H 1 +_ACEOF + +fi + + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of long int" >&5 +$as_echo_n "checking size of long int... " >&6; } +if test "${ac_cv_sizeof_long_int+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long int))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long int))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (long int))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr '(' $ac_mid ')' + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_long_int=$ac_lo;; +'') if test "$ac_cv_type_long_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long_int=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +static long int longval () { return (long int) (sizeof (long int)); } +static unsigned long int ulongval () { return (long int) (sizeof (long int)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (long int))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (long int)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (long int)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_long_int=`cat conftest.val` +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +if test "$ac_cv_type_long_int" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (long int) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_long_int=0 + fi +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 +$as_echo "$ac_cv_sizeof_long_int" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int +_ACEOF + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } + +# Provide some information about the compiler. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking for required gcc" >&5 +$as_echo_n "checking for required gcc... " >&6; } +if test "x$GCC" = "x"; then + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +fi + +CFLAGS=$USR_CFLAGS + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi + +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + # Broken: success on invalid input. +continue +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi + +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_PERL+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_PERL"; then + ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_PERL="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" +fi +fi +HAVE_PERL=$ac_cv_prog_HAVE_PERL +if test -n "$HAVE_PERL"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 +$as_echo "$HAVE_PERL" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test $HAVE_PERL = "no"; then + { { $as_echo "$as_me:$LINENO: error: \"perl required in PATH to complete build\"" >&5 +$as_echo "$as_me: error: \"perl required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "find", so it can be a program name with args. +set dummy find; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_FIND+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_FIND"; then + ac_cv_prog_HAVE_FIND="$HAVE_FIND" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_FIND="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" +fi +fi +HAVE_FIND=$ac_cv_prog_HAVE_FIND +if test -n "$HAVE_FIND"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 +$as_echo "$HAVE_FIND" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test $HAVE_FIND = "no"; then + { { $as_echo "$as_me:$LINENO: error: \"find required in PATH complete build\"" >&5 +$as_echo "$as_me: error: \"find required in PATH complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "bison", so it can be a program name with args. +set dummy bison; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_BISON+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_BISON"; then + ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_BISON="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" +fi +fi +HAVE_BISON=$ac_cv_prog_HAVE_BISON +if test -n "$HAVE_BISON"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 +$as_echo "$HAVE_BISON" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test $HAVE_BISON = "no"; then + { { $as_echo "$as_me:$LINENO: error: \"bison required in PATH to complete build\"" >&5 +$as_echo "$as_me: error: \"bison required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +# Extract the first word of "flex", so it can be a program name with args. +set dummy flex; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_FLEX+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_FLEX"; then + ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_FLEX="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" +fi +fi +HAVE_FLEX=$ac_cv_prog_HAVE_FLEX +if test -n "$HAVE_FLEX"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 +$as_echo "$HAVE_FLEX" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +if test $HAVE_FLEX = "no"; then + { { $as_echo "$as_me:$LINENO: error: \"flex required in PATH to complete build\"" >&5 +$as_echo "$as_me: error: \"flex required in PATH to complete build\"" >&2;} + { (exit 1); exit 1; }; } +fi + +{ $as_echo "$as_me:$LINENO: checking for required Math::BigInt perl module" >&5 +$as_echo_n "checking for required Math::BigInt perl module... " >&6; } +perl -e "use Math::BigInt" 2>&1 > /dev/null +if test $? != 0; then + { { $as_echo "$as_me:$LINENO: error: no" >&5 +$as_echo "$as_me: error: no" >&2;} + { (exit 1); exit 1; }; } +else + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +fi + +if test $host != $build; then + for ac_prog in gcc cc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_BUILD_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$BUILD_CC"; then + ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_BUILD_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +BUILD_CC=$ac_cv_prog_BUILD_CC +if test -n "$BUILD_CC"; then + { $as_echo "$as_me:$LINENO: result: $BUILD_CC" >&5 +$as_echo "$BUILD_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$BUILD_CC" && break +done + +else + BUILD_CC=$CC + BUILD_CFLAGS=$BUILD_CFLAGS + BUILD_LDFLAGS=$BUILD_LDFLAGS +fi + + + + + +# +# Threading options. +# +# Client - thread-safe or not +# --disable-thread-safety : chooses null or posix locking mechanism +# For applications that know they are not multi-threaded, or choose +# to handle locking themselves, this configure option can be used to +# slightly decrease library-induced latency by removing the locking. +# +# Client - job threading +# libpvfs2-threaded.{so,a} with __PVFS2_JOB_THREADED__ +# This option causes the client library to spawn an extra thread +# to handle network communications. In this way, it is possible +# that the library can handle new and completed requests from +# the application while also interacting with the network. +# +# These separate libraries can not be built using the existing +# configure mechanism. They are only built if required by the +# kernel module helper. +# +# Server - three options: +# trove +# (hack Makefile.in) +# job +# (hack Makefile.in) +# aio +# --disable-aio-threaded-callbacks +# +# Trove (storage) and job threading in the server are implemented +# using #defines, but not exported through the configure mechanism. +# AIO threaded callbacks are a separate thread used in conjunction +# with trove, and can be disabled through a configure option as +# AIO has been found to be buggy on many systems. +# +# +# Kernel module helper - job threading +# --enable-threaded-kmod-helper +# +# This is a special client that "helps" applications that access PVFS +# through the kernel using normal VFS calls (e.g. "ls"). This +# configure options builds it using __PVFS2_JOB_THREADED__ as described +# above. That enables a thread for the network layer and a thread +# for the kernel interface. This has the potential to increase the +# rate at which concurrent operations are processed, but has the potential +# drawback of somewhat higher overhead for a single operation and lack +# of testing. +# +# Enabling this options causes one of libpvfs2-threaded.{so,a} to be +# built, depending on --enable-shared and --enable-static. If both are +# enabled, the shared library takes precedence. +# + +{ $as_echo "$as_me:$LINENO: checking for client library thread safety support" >&5 +$as_echo_n "checking for client library thread safety support... " >&6; } +# Check whether --enable-thread-safety was given. +if test "${enable_thread_safety+set}" = set; then + enableval=$enable_thread_safety; if test "x$enableval" = "xno" ; then + LIBCFLAGS="$LIBCFLAGS -D__GEN_NULL_LOCKING__" + THREAD_LIB="" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +else + LIBCFLAGS="$LIBCFLAGS -D__GEN_POSIX_LOCKING__" + THREAD_LIB="-lpthread" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +fi + + + + + +# Check whether --enable-server was given. +if test "${enable_server+set}" = set; then + enableval=$enable_server; if test "x$enableval" = "xyes" ; then + BUILD_SERVER=1 + NEED_BERKELEY_DB=yes +else + BUILD_SERVER="" +fi +else + BUILD_SERVER=1 + NEED_BERKELEY_DB=yes +fi + + + + +# Check whether --with-openssl was given. +if test "${with_openssl+set}" = set; then + withval=$with_openssl; + opensslpath=${withval} + + if test "x${withval}" != "xno"; then + + { $as_echo "$as_me:$LINENO: checking for openssl library" >&5 +$as_echo_n "checking for openssl library... " >&6; } + + if test "x${opensslpath}" != "x"; then + CFLAGS="${CFLAGS} -I${opensslpath}/include" + LDFLAGS="$LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" SERVER_LDFLAGS="$SERVER_LDFLAGS -L${opensslpath}/lib64 -L${opensslpath}/lib" fi LIBS="$LIBS -lcrypto -lssl" - cat >conftest.$ac_ext <<_ACEOF -#include "openssl/bio.h" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "openssl/bio.h" +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 +$as_echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "openssl/bio.h" +int +main () +{ +BIO * b; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { { $as_echo "$as_me:$LINENO: error: could not find openssl libs" >&5 +$as_echo "$as_me: error: could not find openssl libs" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + +cat >>confdefs.h <<\_ACEOF +#define WITH_OPENSSL 1 +_ACEOF + + + +for ac_header in openssl/evp.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in openssl/crypto.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in openssl/sha.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + fi + +else + + { $as_echo "$as_me:$LINENO: checking for openssl library" >&5 +$as_echo_n "checking for openssl library... " >&6; } + TMPLIBS=${LIBS} + LIBS="$LIBS -lcrypto -lssl" + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "openssl/bio.h" +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +$as_echo "$as_me: WARNING: No openssl headers found." >&2;} +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "openssl/bio.h" +int +main () +{ +BIO * b; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define WITH_OPENSSL 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + { $as_echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +$as_echo "$as_me: WARNING: No openssl headers found." >&2;} + LIBS=${TMPLIBS} + +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + + +for ac_header in openssl/evp.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in openssl/crypto.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in openssl/sha.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +fi + + + +# Check whether --enable-karma-mem-usage-stats was given. +if test "${enable_karma_mem_usage_stats+set}" = set; then + enableval=$enable_karma_mem_usage_stats; if test "x$enableval" = "xno" ; then + CFLAGS="$CFLAGS -D__KARMA_DISABLE_MEM_USAGE__" +fi + +fi + + +# Check whether --enable-bmi-only was given. +if test "${enable_bmi_only+set}" = set; then + enableval=$enable_bmi_only; if test "x$enableval" = "xyes" ; then + BUILD_BMI_ONLY=1 +fi + +fi + + + +if test "x$BUILD_BMI_ONLY" = "x1"; then + BUILD_SERVER="" + NEED_BERKELEY_DB=no + + +fi + +# Check whether --enable-perf-counters was given. +if test "${enable_perf_counters+set}" = set; then + enableval=$enable_perf_counters; if test "x$enableval" = "xno" ; then + CFLAGS="$CFLAGS -D__PVFS2_DISABLE_PERF_COUNTERS__" +fi + +fi + + +MMAP_RA_CACHE="" +# Check whether --enable-mmap-racache was given. +if test "${enable_mmap_racache+set}" = set; then + enableval=$enable_mmap_racache; if test "x$enableval" = "xyes" ; then +MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE" +fi + +fi + + + +RESET_FILE_POS="" +# Check whether --enable-reset-file-pos was given. +if test "${enable_reset_file_pos+set}" = set; then + enableval=$enable_reset_file_pos; if test "x$enableval" = "xyes" ; then +RESET_FILE_POS="-DRESET_FILE_POS" +fi + +fi + + + + +# Check whether --enable-trusted-connections was given. +if test "${enable_trusted_connections+set}" = set; then + enableval=$enable_trusted_connections; if test "x$enableval" = "xyes"; then +TRUSTED_CONNECTIONS="-DUSE_TRUSTED" +fi +fi + + + + +test_for_karma() +{ + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_PKGCONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_PKGCONFIG"; then + ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_PKGCONFIG="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" +fi +fi +HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG +if test -n "$HAVE_PKGCONFIG"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 +$as_echo "$HAVE_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + if test "x$HAVE_PKGCONFIG" = "xyes" ; then + { $as_echo "$as_me:$LINENO: checking for gtk2.0 (for karma gui)" >&5 +$as_echo_n "checking for gtk2.0 (for karma gui)... " >&6; } + if `pkg-config --exists gtk+-2.0` ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + GTKLIBS=`pkg-config --libs gtk+-2.0` + GTKCFLAGS=`pkg-config --cflags gtk+-2.0` + + + + BUILD_KARMA="1" + + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi + fi +} + +# Check whether --enable-karma was given. +if test "${enable_karma+set}" = set; then + enableval=$enable_karma; if test "x$enableval" = "xyes" ; then + test_for_karma + fi + +else + test_for_karma + +fi + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then + enableval=$enable_static; build_static=$enableval +else + build_static=yes +fi + + + + + +set_redhat24=0 +use_redhat24=0 + +# Check whether --enable-redhat24 was given. +if test "${enable_redhat24+set}" = set; then + enableval=$enable_redhat24; set_redhat24=1 + if test "$enableval" = no ; then + use_redhat24=0 + else + use_redhat24=1 + fi + +fi + + + +set_nptl_workaround=0 +use_nptl_workaround=0 + +# Check whether --enable-nptl-workaround was given. +if test "${enable_nptl_workaround+set}" = set; then + enableval=$enable_nptl_workaround; set_nptl_workaround=1 + if test "$enableval" = no ; then + use_nptl_workaround=0 + else + use_nptl_workaround=1 + fi + +fi + + +RHTAG1="Red Hat Linux release 9" +RHTAG2="Red Hat Enterprise Linux WS release 3" +RHTAG3="Red Hat Enterprise Linux AS release 3" +RHTAG4="Red Hat Enterprise Linux ES release 3" +RHTAG5="Red Hat Linux Advanced Server release 2.1AS" +RHTAG6="Fedora Core release 1 (Yarrow)" + + + +REDHAT_RELEASE="" +if test -f /etc/redhat-release; then + { $as_echo "$as_me:$LINENO: checking for tagged Redhat releases (must patch)" >&5 +$as_echo_n "checking for tagged Redhat releases (must patch)... " >&6; } + REDHAT_REL=`cat /etc/redhat-release` + if test "x`echo $REDHAT_REL | cut -b 1-23`" = "x$RHTAG1" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG2" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG3" || + test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG4" || + test "x`echo $REDHAT_REL | cut -b 1-43`" = "x$RHTAG5" || + test "x`echo $REDHAT_REL | cut -b 1-30`" = "x$RHTAG6" ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + + if test "$set_redhat24" = 0 || test "$set_nptl_workaround" = 0 ; then + { { $as_echo "$as_me:$LINENO: error: + You appear to be configuring PVFS2 on a RedHat distribution that + likely ships with a heavily modified kernel and c library. You must + specify two configure arguments to provide necessary information before + proceeding. First pick one of these two options: + ============================= + --enable-redhat24 (if you are using a redhat provided 2.4 kernel) + --disable-redhat24 (if you are using a stock kernel.org kernel) + ============================= + Also pick one of the next two options. You should probably enable the + workaround if you are using RedHat EL 3 prior to update 2. Otherwise it + is probably safer (and higher performance) to disable it: + ============================= + --enable-nptl-workaround (to work around buggy glibc pthread library) + --disable-nptl-workaround (if you trust your glibc pthread library) + ============================= " >&5 +$as_echo "$as_me: error: + You appear to be configuring PVFS2 on a RedHat distribution that + likely ships with a heavily modified kernel and c library. You must + specify two configure arguments to provide necessary information before + proceeding. First pick one of these two options: + ============================= + --enable-redhat24 (if you are using a redhat provided 2.4 kernel) + --disable-redhat24 (if you are using a stock kernel.org kernel) + ============================= + Also pick one of the next two options. You should probably enable the + workaround if you are using RedHat EL 3 prior to update 2. Otherwise it + is probably safer (and higher performance) to disable it: + ============================= + --enable-nptl-workaround (to work around buggy glibc pthread library) + --disable-nptl-workaround (if you trust your glibc pthread library) + ============================= " >&2;} + { (exit 1); exit 1; }; } + fi + else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi +fi + + +if test "$use_redhat24" = 1 ; then + REDHAT_RELEASE="-DREDHAT_RELEASE_9" +fi + + +if test "$use_nptl_workaround" = 1 ; then + NPTL_WORKAROUND="1" +fi + + +use_aio_thcb=1 +# Check whether --enable-aio-threaded-callbacks was given. +if test "${enable_aio_threaded_callbacks+set}" = set; then + enableval=$enable_aio_threaded_callbacks; if test "$enableval" = no ; then use_aio_thcb=0 ; fi +fi + + + +MISC_TROVE_FLAGS="" +if test $use_aio_thcb = 1 ; then + MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__" +fi + + +{ $as_echo "$as_me:$LINENO: checking for __error_code field in aiocb struct" >&5 +$as_echo_n "checking for __error_code field in aiocb struct... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + +int +main () +{ + + struct aiocb aiocb; + aiocb.__error_code = 0; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIOCB_ERROR_CODE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for __return_value field in aiocb struct" >&5 +$as_echo_n "checking for __return_value field in aiocb struct... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + +int +main () +{ + + struct aiocb aiocb; + aiocb.__return_value = 0; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_AIOCB_RETURN_VALUE 1 +_ACEOF + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 +$as_echo_n "checking whether byte ordering is bigendian... " >&6; } +if test "${ac_cv_c_bigendian+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_c_bigendian=unknown + # See if we're dealing with a universal compiler. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __APPLE_CC__ + not a universal capable compiler + #endif + typedef int dummy; + +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + # Check for potential -arch flags. It is not universal unless + # there are some -arch flags. Note that *ppc* also matches + # ppc64. This check is also rather less than ideal. + case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #( + *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;; + esac +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $ac_cv_c_bigendian = unknown; then + # See if sys/param.h defines the BYTE_ORDER macro. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ + && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ + && LITTLE_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +#if BYTE_ORDER != BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) + bogus endian macros + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + # It does; now see whether it defined to _BIG_ENDIAN or not. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +int +main () +{ +#ifndef _BIG_ENDIAN + not big endian + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_c_bigendian=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_c_bigendian=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + if test $ac_cv_c_bigendian = unknown; then + # Compile a test program. + if test "$cross_compiling" = yes; then + # Try to guess by grepping values from an object file. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +short int ascii_mm[] = + { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; + short int ascii_ii[] = + { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; + int use_ascii (int i) { + return ascii_mm[i] + ascii_ii[i]; + } + short int ebcdic_ii[] = + { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; + short int ebcdic_mm[] = + { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; + int use_ebcdic (int i) { + return ebcdic_mm[i] + ebcdic_ii[i]; + } + extern int foo; + +int +main () +{ +return use_ascii (foo) == use_ebcdic (foo); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then + ac_cv_c_bigendian=yes + fi + if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then + if test "$ac_cv_c_bigendian" = unknown; then + ac_cv_c_bigendian=no + else + # finding both strings is unlikely to happen, but who knows? + ac_cv_c_bigendian=unknown + fi + fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ + + /* Are we little or big endian? From Harbison&Steele. */ + union + { + long int l; + char c[sizeof (long int)]; + } u; + u.l = 1; + return u.c[sizeof (long int) - 1] == 1; + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_bigendian=no +else + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_c_bigendian=yes +fi +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 +$as_echo "$ac_cv_c_bigendian" >&6; } + case $ac_cv_c_bigendian in #( + yes) + cat >>confdefs.h <<\_ACEOF +#define WORDS_BIGENDIAN 1 +_ACEOF +;; #( + no) + ;; #( + universal) + +cat >>confdefs.h <<\_ACEOF +#define AC_APPLE_UNIVERSAL_BUILD 1 +_ACEOF + + ;; #( + *) + { { $as_echo "$as_me:$LINENO: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&5 +$as_echo "$as_me: error: unknown endianness + presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} + { (exit 1); exit 1; }; } ;; + esac + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. +{ $as_echo "$as_me:$LINENO: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if test "${ac_cv_sizeof_void_p+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_lo=$ac_mid; break +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_lo= ac_hi= +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_hi=$ac_mid else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 -echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} - { (exit 1); exit 1; }; } + ac_lo=`expr '(' $ac_mid ')' + 1` fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_void_p=$ac_lo;; +'') if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi ;; +esac +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "openssl/bio.h" +$ac_includes_default +static long int longval () { return (long int) (sizeof (void *)); } +static unsigned long int ulongval () { return (long int) (sizeof (void *)); } +#include +#include int main () { -BIO * b; + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + return 1; + if (((long int) (sizeof (void *))) < 0) + { + long int i = longval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%ld", i); + } + else + { + unsigned long int i = ulongval (); + if (i != ((long int) (sizeof (void *)))) + return 1; + fprintf (f, "%lu", i); + } + /* Do not output a trailing newline, as this causes \r\n confusion + on some platforms. */ + return ferror (f) || fclose (f) != 0; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + ac_cv_sizeof_void_p=`cat conftest.val` else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: could not find openssl libs" >&5 -echo "$as_me: error: could not find openssl libs" >&2;} - { (exit 1); exit 1; }; } +( exit $ac_status ) +if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: cannot compute sizeof (void *) +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; }; } + else + ac_cv_sizeof_void_p=0 + fi fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.val +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } -cat >>confdefs.h <<\_ACEOF -#define WITH_OPENSSL 1 + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF -for ac_header in openssl/evp.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# Check whether --with-mtrace was given. +if test "${with_mtrace+set}" = set; then + withval=$with_mtrace; CFLAGS="$CFLAGS -include mcheck.h" + +cat >>confdefs.h <<\_ACEOF +#define WITH_MTRACE 1 +_ACEOF + + fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + + + +# Check whether --with-berkdb-debug was given. +if test "${with_berkdb_debug+set}" = set; then + withval=$with_berkdb_debug; +cat >>confdefs.h <<\_ACEOF +#define BERKDB_ERROR_REPORTING 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + +fi + + +TAU_INCS= +BUILD_TAU= + + +# Check whether --with-tau was given. +if test "${with_tau+set}" = set; then + withval=$with_tau; if test "x$withval" = "xyes" ; then + { { $as_echo "$as_me:$LINENO: error: --with-tau must be given a pathname" >&5 +$as_echo "$as_me: error: --with-tau must be given a pathname" >&2;} + { (exit 1); exit 1; }; } + else + TAU_INCS="-I$withval/include" + CFLAGS="$CFLAGS $TAU_INCS -D__PVFS2_ENABLE_EVENT__" + LDFLAGS="$LDFLAGS -L$withval/$(uname -m)/lib" + tau_mkfile=$withval/$(uname -m)/lib/Makefile.*-profile-trace + if test ! -f $tau_mkfile; then + { { $as_echo "$as_me:$LINENO: error: TAU not compiled with profiling and tracing support" >&5 +$as_echo "$as_me: error: TAU not compiled with profiling and tracing support" >&2;} + { (exit 1); exit 1; }; } + fi + tau_config=$(echo $tau_mkfile | sed -e "s|.*Makefile.tau-||") + LIBS="$LIBS -lTAU_tf -lTAU_traceinput-$tau_config -ltau-$tau_config -lpthread -lstdc++" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_TAU 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes + + BUILD_TAU=1 + fi + +fi + + + + + +BUILD_KERNEL= + + +# Check whether --with-kernel was given. +if test "${with_kernel+set}" = set; then + withval=$with_kernel; if test "x$withval" = "xyes" -o "x$withval" = "x" ; then + { { $as_echo "$as_me:$LINENO: error: --with-kernel must be given the path to your kernel source." >&5 +$as_echo "$as_me: error: --with-kernel must be given the path to your kernel source." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -d $withval ; then + { { $as_echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 +$as_echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -r $withval/include/linux/version.h && ! test -r $withval/include/generated/uapi/linux/version.h ; then + { { $as_echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 +$as_echo "$as_me: error: The kernel source tree must have been configured." >&2;} + { (exit 1); exit 1; }; } + fi + + if test -r $withval/include/linux/version.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` + elif test -r $withval/include/linux/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/utsrelease.h` + elif test -r $withval/include/generated/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/generated/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` + elif test -r $withval/include/generated/utsrelease.h && grep -qE UTS_RELEASE..3\\. $withval/include/generated/utsrelease.h; then + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` + else + { { $as_echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.6 or 3.X" >&5 +$as_echo "$as_me: error: The kernel source tree does not appear to be 2.6 or 3.X" >&2;} + { (exit 1); exit 1; }; } + + fi + + # At least up through 2.6.3 needed to write .__modpost.cmd; this changed + # sometime between then and 2.6.10. Now anybody can compile out-of-tree + # modules against a configured kernel tree + LINUX_KERNEL_SRC="$withval" + BUILD_KERNEL=1 + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + LINUX_KERNEL_SRC="" + +fi + + + +# Check whether --with-kernel24 was given. +if test "${with_kernel24+set}" = set; then + withval=$with_kernel24; if test "x$withval" = "xyes" -o "x$withval" = "x" ; then + { { $as_echo "$as_me:$LINENO: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&5 +$as_echo "$as_me: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -d $withval ; then + { { $as_echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 +$as_echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} + { (exit 1); exit 1; }; } + fi + if ! test -r $withval/include/linux/version.h ; then + { { $as_echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 +$as_echo "$as_me: error: The kernel source tree must have been configured." >&2;} + { (exit 1); exit 1; }; } + fi + vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` + if ! grep -q UTS_RELEASE..2\\.4\\. $withval/include/linux/version.h ; then + { { $as_echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.4" >&5 +$as_echo "$as_me: error: The kernel source tree does not appear to be 2.4" >&2;} + { (exit 1); exit 1; }; } + fi + k24_minor_ver=`echo $vers | cut -b 26- | sed -n 's/\"//p' | head -n 1` + tmp_k24_minor_ver=`echo $k24_minor_ver | grep \-` + if ! test "x$tmp_k24_minor_ver" = "x"; then + tmp_k24_minor_ver=`echo $k24_minor_ver | cut -d- -f1` + k24_minor_ver=$tmp_k24_minor_ver + fi + LINUX24_KERNEL_SRC="$withval" LINUX24_KERNEL_MINOR_VER="`echo $k24_minor_ver| cut -d'.' -f 1`" + BUILD_KERNEL=1 + +else + LINUX24_KERNEL_SRC="" LINUX24_KERNEL_MINOR_VER="" +fi + + + + + +oldcflags=$CFLAGS +if test -z "${LINUX_KERNEL_SRC}" ; then + lk_src=${LINUX24_KERNEL_SRC} +elif test -z "${LINUX24_KERNEL_SRC}" ; then + lk_src=${LINUX_KERNEL_SRC} +fi + + +# Check whether --enable-kernel-aio was given. +if test "${enable_kernel_aio+set}" = set; then + enableval=$enable_kernel_aio; enable_kernel_aio=$enableval +else + enable_kernel_aio=yes + +fi + + +# Check whether --enable-kernel-sendfile was given. +if test "${enable_kernel_sendfile+set}" = set; then + enableval=$enable_kernel_sendfile; enable_kernel_sendfile=$enableval +else + enable_kernel_sendfile=no + +fi + + +if test -n "$lk_src" ; then + + + + + NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`" + + if test -d $lk_src/source; then + lk_src_source="$lk_src/source" + else + lk_src_source=$lk_src + fi + + CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src_source/include -I$lk_src_source/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty)" + + if test -f $lk_src/include/generated/autoconf.h ; then + CFLAGS="$CFLAGS -imacros $lk_src/include/generated/autoconf.h" + else + CFLAGS="$CFLAGS -imacros $lk_src/include/linux/autoconf.h" + fi + + if test -n "${ARCH}" ; then + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" + else + SUBARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ + -e s/arm.*/arm/ -e s/sa110/arm/ \ + -e s/s390x/s390/ -e s/parisc64/parisc/ \ + -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ + -e s/sh.*/sh/` + if test "x$SUBARCH" = "xi386"; then + ARCH=x86 + elif test "x$SUBARCH" = "xx86_64"; then + ARCH=x86 + elif test "x$SUBARCH" = "xsparc64"; then + ARCH=sparc + else + ARCH=$SUBARCH + fi -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + fi + + if test -n "${ARCH}" && + test -d $lk_src_source/arch/${ARCH}/include/uapi; then + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include/uapi" + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include/generated/uapi" + fi + if test -d $lk_src_source/include/uapi; then + CFLAGS="$CFLAGS -I$lk_src_source/include/uapi" + fi + + for i in `find "$lk_src" -follow -name generated` + do + addThis="`echo $i | sed 's/generated.*$//'`" + addThisToo="`echo $i | sed 's/generated.*$/generated/'`" + CFLAGS="$CFLAGS -I$addThis -I$addThisToo" + done + + { $as_echo "$as_me:$LINENO: checking for kconfig.h" >&5 +$as_echo_n "checking for kconfig.h... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + + #include + +int +main () +{ + + ; + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_KCONFIG 1 +_ACEOF -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in openssl/crypto.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -O2" + { $as_echo "$as_me:$LINENO: checking for vmtruncate" >&5 +$as_echo_n "checking for vmtruncate... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + +int +main () +{ + + struct iattr *iattr; + struct inode *inode; + vmtruncate(inode, iattr->ia_size); + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_VMTRUNCATE 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -O2" + { $as_echo "$as_me:$LINENO: checking for namespace parameter in posix_acl_from_xattr" >&5 +$as_echo_n "checking for namespace parameter in posix_acl_from_xattr... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + +int +main () +{ + + int i; + char *c; + posix_acl_from_xattr(&init_user_ns, c, i); + + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_USER_NAMESPACE 1 +_ACEOF -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -for ac_header in openssl/sha.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + need_optimize_flag=0 + { $as_echo "$as_me:$LINENO: checking for sanity of linux/fs.h include" >&5 +$as_echo_n "checking for sanity of linux/fs.h include... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #define __KERNEL__ + #include + +int +main () +{ + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + need_optimize_flag=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test $need_optimize_flag -eq 1; then + CFLAGS="-Os $CFLAGS" + fi + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel inode ops create uses umode_t" >&5 +$as_echo_n "checking if kernel inode ops create uses umode_t... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + + #define __KERNEL__ + #include + extern int mycreate(struct inode *, + struct dentry *, + umode_t, + struct nameidata *); + +int +main () +{ + + static struct inode_operations in_op = { + .create = mycreate + }; + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_CREATE_USES_UMODE_T 1 _ACEOF -fi - -done - - fi else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 - TMPLIBS=${LIBS} - LIBS="$LIBS -lcrypto -lssl" - cat >conftest.$ac_ext <<_ACEOF -#include "openssl/bio.h" -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + -{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel inode ops mkdir uses umode_t" >&5 +$as_echo_n "checking if kernel inode ops mkdir uses umode_t... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include "openssl/bio.h" + + #define __KERNEL__ + #include + extern int mymkdir(struct inode *, + struct dentry *, + umode_t); + int main () { -BIO * b; + + static struct inode_operations in_op = { + .mkdir = mymkdir + }; + ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define WITH_OPENSSL 1 +#define PVFS_KMOD_MKDIR_USES_UMODE_T 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} - LIBS=${TMPLIBS} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -for ac_header in openssl/evp.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel inode ops mknod uses umode_t" >&5 +$as_echo_n "checking if kernel inode ops mknod uses umode_t... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #define __KERNEL__ + #include + extern int mymknod(struct inode *, + struct dentry *, + umode_t, + dev_t); + +int +main () +{ + + static struct inode_operations in_op = { + .mknod = mymknod + }; + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_MKNOD_USES_UMODE_T 1 _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -for ac_header in openssl/crypto.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel inode ops create takes nameidata" >&5 +$as_echo_n "checking if kernel inode ops create takes nameidata... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #define __KERNEL__ + #include + extern int mycreate(struct inode *, + struct dentry *, + #ifdef PVFS_KMOD_CREATE_USES_UMODE_T + umode_t mode, + #else + int, + #endif + struct nameidata *); + +int +main () +{ + + static struct inode_operations in_op = { + .create = mycreate + }; + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -ac_header_compiler=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_CREATE_TAKES_NAMEIDATA 1 _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes + + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -for ac_header in openssl/sha.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel inode ops lookup takes nameidata" >&5 +$as_echo_n "checking if kernel inode ops lookup takes nameidata... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> + + #define __KERNEL__ + #include + extern struct dentry *mylookup(struct inode *, + struct dentry *, + struct nameidata *); + +int +main () +{ + + static struct inode_operations in_op = { + .lookup = mylookup + }; + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_LOOKUP_TAKES_NAMEIDATA 1 +_ACEOF + + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for if kernel dentry ops d_revalidate takes nameidata" >&5 +$as_echo_n "checking for if kernel dentry ops d_revalidate takes nameidata... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> + + #define __KERNEL__ + #include + #include + extern int myreval(struct dentry *, struct nameidata *); + +int +main () +{ + + static struct dentry_operations dc_op = { + .d_revalidate = myreval + }; + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_D_REVALIDATE_TAKES_NAMEIDATA 1 _ACEOF -fi - -done - - - -fi; - - -# Check whether --enable-karma-mem-usage-stats or --disable-karma-mem-usage-stats was given. -if test "${enable_karma_mem_usage_stats+set}" = set; then - enableval="$enable_karma_mem_usage_stats" - if test "x$enableval" = "xno" ; then - CFLAGS="$CFLAGS -D__KARMA_DISABLE_MEM_USAGE__" -fi - -fi; - -# Check whether --enable-bmi-only or --disable-bmi-only was given. -if test "${enable_bmi_only+set}" = set; then - enableval="$enable_bmi_only" - if test "x$enableval" = "xyes" ; then - BUILD_BMI_ONLY=1 -fi -fi; +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "x$BUILD_BMI_ONLY" = "x1"; then - BUILD_SERVER="" - NEED_BERKELEY_DB=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -# Check whether --enable-perf-counters or --disable-perf-counters was given. -if test "${enable_perf_counters+set}" = set; then - enableval="$enable_perf_counters" - if test "x$enableval" = "xno" ; then - CFLAGS="$CFLAGS -D__PVFS2_DISABLE_PERF_COUNTERS__" -fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -fi; + { $as_echo "$as_me:$LINENO: checking if kernel inode ops has get_acl " >&5 +$as_echo_n "checking if kernel inode ops has get_acl ... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -MMAP_RA_CACHE="" -# Check whether --enable-mmap-racache or --disable-mmap-racache was given. -if test "${enable_mmap_racache+set}" = set; then - enableval="$enable_mmap_racache" - if test "x$enableval" = "xyes" ; then -MMAP_RA_CACHE="-DUSE_MMAP_RA_CACHE" -fi + #define __KERNEL__ + #include -fi; +int +main () +{ + static struct inode_operations in_op = { + .get_acl = NULL + }; -RESET_FILE_POS="" -# Check whether --enable-reset-file-pos or --disable-reset-file-pos was given. -if test "${enable_reset_file_pos+set}" = set; then - enableval="$enable_reset_file_pos" - if test "x$enableval" = "xyes" ; then -RESET_FILE_POS="-DRESET_FILE_POS" -fi + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -fi; + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define PVFS_KMOD_HAVE_GET_ACL 1 +_ACEOF -# Check whether --enable-trusted-connections or --disable-trusted-connections was given. -if test "${enable_trusted_connections+set}" = set; then - enableval="$enable_trusted_connections" - if test "x$enableval" = "xyes"; then -TRUSTED_CONNECTIONS="-DUSE_TRUSTED" -fi -fi; +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -test_for_karma() -{ - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_PKGCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_PKGCONFIG"; then - ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_PKGCONFIG="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" -fi -fi -HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG -if test -n "$HAVE_PKGCONFIG"; then - echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 -echo "${ECHO_T}$HAVE_PKGCONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 fi - if test "x$HAVE_PKGCONFIG" = "xyes" ; then - echo "$as_me:$LINENO: checking for gtk2.0 (for karma gui)" >&5 -echo $ECHO_N "checking for gtk2.0 (for karma gui)... $ECHO_C" >&6 - if `pkg-config --exists gtk+-2.0` ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - GTKLIBS=`pkg-config --libs gtk+-2.0` - GTKCFLAGS=`pkg-config --cflags gtk+-2.0` - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + if test "$lk_src" != "$lk_src_source"; then + CFLAGS="$CFLAGS -I$lk_src/include" + fi - BUILD_KARMA="1" + { $as_echo "$as_me:$LINENO: checking for d_alloc_root" >&5 +$as_echo_n "checking for d_alloc_root... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi - fi -} + #define __KERNEL__ + #include -# Check whether --enable-karma or --disable-karma was given. -if test "${enable_karma+set}" = set; then - enableval="$enable_karma" - if test "x$enableval" = "xyes" ; then - test_for_karma - fi +int +main () +{ -else - test_for_karma + struct inode *root_inode; + struct dentry *root_dentry; + root_dentry=d_alloc_root(root_inode); -fi; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then -# Check whether --enable-static or --disable-static was given. -if test "${enable_static+set}" = set; then - enableval="$enable_static" - build_static=$enableval -else - build_static=yes -fi; + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_ALLOC_ROOT 1 +_ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -set_redhat24=0 -use_redhat24=0 -# Check whether --enable-redhat24 or --disable-redhat24 was given. -if test "${enable_redhat24+set}" = set; then - enableval="$enable_redhat24" - set_redhat24=1 - if test "$enableval" = no ; then - use_redhat24=0 - else - use_redhat24=1 - fi + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi; +fi -set_nptl_workaround=0 -use_nptl_workaround=0 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Check whether --enable-nptl-workaround or --disable-nptl-workaround was given. -if test "${enable_nptl_workaround+set}" = set; then - enableval="$enable_nptl_workaround" - set_nptl_workaround=1 - if test "$enableval" = no ; then - use_nptl_workaround=0 - else - use_nptl_workaround=1 - fi + { $as_echo "$as_me:$LINENO: checking for i_size_write in kernel" >&5 +$as_echo_n "checking for i_size_write in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ -fi; + #define __KERNEL__ + #include + void i_size_write(struct inode *inode, + loff_t i_size) + { + return; + } -RHTAG1="Red Hat Linux release 9" -RHTAG2="Red Hat Enterprise Linux WS release 3" -RHTAG3="Red Hat Enterprise Linux AS release 3" -RHTAG4="Red Hat Enterprise Linux ES release 3" -RHTAG5="Red Hat Linux Advanced Server release 2.1AS" -RHTAG6="Fedora Core release 1 (Yarrow)" +int +main () +{ + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -REDHAT_RELEASE="" -if test -f /etc/redhat-release; then - echo "$as_me:$LINENO: checking for tagged Redhat releases (must patch)" >&5 -echo $ECHO_N "checking for tagged Redhat releases (must patch)... $ECHO_C" >&6 - REDHAT_REL=`cat /etc/redhat-release` - if test "x`echo $REDHAT_REL | cut -b 1-23`" = "x$RHTAG1" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG2" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG3" || - test "x`echo $REDHAT_REL | cut -b 1-37`" = "x$RHTAG4" || - test "x`echo $REDHAT_REL | cut -b 1-43`" = "x$RHTAG5" || - test "x`echo $REDHAT_REL | cut -b 1-30`" = "x$RHTAG6" ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SIZE_WRITE 1 +_ACEOF - if test "$set_redhat24" = 0 || test "$set_nptl_workaround" = 0 ; then - { { echo "$as_me:$LINENO: error: - You appear to be configuring PVFS2 on a RedHat distribution that - likely ships with a heavily modified kernel and c library. You must - specify two configure arguments to provide necessary information before - proceeding. First pick one of these two options: - ============================= - --enable-redhat24 (if you are using a redhat provided 2.4 kernel) - --disable-redhat24 (if you are using a stock kernel.org kernel) - ============================= - Also pick one of the next two options. You should probably enable the - workaround if you are using RedHat EL 3 prior to update 2. Otherwise it - is probably safer (and higher performance) to disable it: - ============================= - --enable-nptl-workaround (to work around buggy glibc pthread library) - --disable-nptl-workaround (if you trust your glibc pthread library) - ============================= " >&5 -echo "$as_me: error: - You appear to be configuring PVFS2 on a RedHat distribution that - likely ships with a heavily modified kernel and c library. You must - specify two configure arguments to provide necessary information before - proceeding. First pick one of these two options: - ============================= - --enable-redhat24 (if you are using a redhat provided 2.4 kernel) - --disable-redhat24 (if you are using a stock kernel.org kernel) - ============================= - Also pick one of the next two options. You should probably enable the - workaround if you are using RedHat EL 3 prior to update 2. Otherwise it - is probably safer (and higher performance) to disable it: - ============================= - --enable-nptl-workaround (to work around buggy glibc pthread library) - --disable-nptl-workaround (if you trust your glibc pthread library) - ============================= " >&2;} - { (exit 1); exit 1; }; } - fi - else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - fi fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -if test "$use_redhat24" = 1 ; then - REDHAT_RELEASE="-DREDHAT_RELEASE_9" -fi + { $as_echo "$as_me:$LINENO: checking for i_size_read in kernel" >&5 +$as_echo_n "checking for i_size_read in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #define __KERNEL__ + #include + loff_t i_size_read(struct inode *inode) + { + return 0; + } -if test "$use_nptl_workaround" = 1 ; then - NPTL_WORKAROUND="1" -fi +int +main () +{ + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -use_aio_thcb=1 -# Check whether --enable-aio-threaded-callbacks or --disable-aio-threaded-callbacks was given. -if test "${enable_aio_threaded_callbacks+set}" = set; then - enableval="$enable_aio_threaded_callbacks" - if test "$enableval" = no ; then use_aio_thcb=0 ; fi -fi; + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SIZE_READ 1 +_ACEOF -MISC_TROVE_FLAGS="" -if test $use_aio_thcb = 1 ; then - MISC_TROVE_FLAGS="-D__PVFS2_TROVE_AIO_THREADED__" fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for __error_code field in aiocb struct" >&5 -echo $ECHO_N "checking for __error_code field in aiocb struct... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for iget_locked function in kernel" >&5 +$as_echo_n "checking for iget_locked function in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #define __KERNEL__ + #include + loff_t iget_locked(struct inode *inode) + { + return 0; + } int main () { - struct aiocb aiocb; - aiocb.__error_code = 0; - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AIOCB_ERROR_CODE 1 -_ACEOF - - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IGET_LOCKED 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for __return_value field in aiocb struct" >&5 -echo $ECHO_N "checking for __return_value field in aiocb struct... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for iget4_locked function in kernel" >&5 +$as_echo_n "checking for iget4_locked function in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include + #define __KERNEL__ + #include + loff_t iget4_locked(struct inode *inode) + { + return 0; + } int main () { - struct aiocb aiocb; - aiocb.__return_value = 0; - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_AIOCB_RETURN_VALUE 1 +#define HAVE_IGET4_LOCKED 1 _ACEOF +fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for iget5_locked function in kernel" >&5 +$as_echo_n "checking for iget5_locked function in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include + + #define __KERNEL__ + #include + loff_t iget5_locked(struct inode *inode) + { + return 0; + } int main () { -#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - # It does; now see whether it defined to BIG_ENDIAN or not. -cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IGET5_LOCKED 1 +_ACEOF + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for d_set_d_op function in kernel" >&5 +$as_echo_n "checking for d_set_d_op function in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#include + + #define __KERNEL__ + #include + loff_t d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) + { + return 0; + } int main () { -#if BYTE_ORDER != BIG_ENDIAN - not big endian -#endif ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_c_bigendian=no + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_D_SET_D_OP 1 +_ACEOF + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -# It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for struct xtvec in kernel" >&5 +$as_echo_n "checking for struct xtvec in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } + + #define __KERNEL__ + #include + static struct xtvec xv = { 0, 0 }; + int main () { - _ascii (); _ebcdic (); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -int -main () -{ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 1); -} +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_XTVEC 1 _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_c_bigendian=no + else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -( exit $ac_status ) -ac_cv_c_bigendian=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -case $ac_cv_c_bigendian in - yes) + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for void *" >&5 -echo $ECHO_N "checking for void *... $ECHO_C" >&6 -if test "${ac_cv_type_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for struct kmem_cache in kernel" >&5 +$as_echo_n "checking for struct kmem_cache in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + + int foo(struct kmem_cache *s) + { + return (s == NULL) ? 3 : 4; + } + int main () { -if ((void * *) 0) - return 0; -if (sizeof (void *)) - return 0; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_void_p=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRUCT_KMEM_CACHE 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_void_p=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5 -echo "${ECHO_T}$ac_cv_type_void_p" >&6 -echo "$as_me:$LINENO: checking size of void *" >&5 -echo $ECHO_N "checking size of void *... $ECHO_C" >&6 -if test "${ac_cv_sizeof_void_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_void_p" = yes; then - # The cast to unsigned long works around a bug in the HP C Compiler - # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects - # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. - # This bug is HP SR number 8606223364. - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking for SLAB_KERNEL flag in kernel" >&5 +$as_echo_n "checking for SLAB_KERNEL flag in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + static int flags = SLAB_KERNEL; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)]; -test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=0 ac_mid=0 - while :; do - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SLAB_KERNEL 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for memory_backed in struct backing_dev_info in kernel" >&5 +$as_echo_n "checking for memory_backed in struct backing_dev_info in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + static struct backing_dev_info bdi = { + .memory_backed = 0 + }; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid; break + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_BDI_MEMORY_BACKED 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr $ac_mid + 1` - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid + 1` + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "x$enable_kernel_sendfile" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for sendfile callback in struct file_operations in kernel" >&5 +$as_echo_n "checking for sendfile callback in struct file_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #include + static struct file_operations fop = { + .sendfile = NULL, + }; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)]; -test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=-1 ac_mid=-1 - while :; do - cat >conftest.$ac_ext <<_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SENDFILE_VFS_SUPPORT 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + { $as_echo "$as_me:$LINENO: checking for readv callback in struct file_operations in kernel" >&5 +$as_echo_n "checking for readv callback in struct file_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #include + static struct file_operations fop = { + .readv = NULL, + }; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)]; -test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_lo=$ac_mid; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_READV_FILE_OPERATIONS 1 +_ACEOF -ac_hi=`expr '(' $ac_mid ')' - 1` - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - ac_mid=`expr 2 '*' $ac_mid` -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo= ac_hi= -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for writev callback in struct file_operations in kernel" >&5 +$as_echo_n "checking for writev callback in struct file_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default + + #define __KERNEL__ + #include + static struct file_operations fop = { + .writev = NULL, + }; + int main () { -static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)]; -test_array [0] = 0 ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_hi=$ac_mid + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WRITEV_FILE_OPERATIONS 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_lo=`expr '(' $ac_mid ')' + 1` + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in -?*) ac_cv_sizeof_void_p=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } ;; -esac -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for find_inode_handle callback in struct super_operations in kernel" >&5 +$as_echo_n "checking for find_inode_handle callback in struct super_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -$ac_includes_default -long longval () { return (long) (sizeof (void *)); } -unsigned long ulongval () { return (long) (sizeof (void *)); } -#include -#include + + #define __KERNEL__ + #include + static struct super_operations sop = { + .find_inode_handle = NULL, + }; + int main () { - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (void *))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (void *)))) - exit (1); - fprintf (f, "%lu\n", i); - } - exit (ferror (f) || fclose (f) != 0); - ; return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_sizeof_void_p=`cat conftest.val` -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (void *), 77 -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.val -else - ac_cv_sizeof_void_p=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5 -echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_VOID_P $ac_cv_sizeof_void_p -_ACEOF - - - - -# Check whether --with-mtrace or --without-mtrace was given. -if test "${with_mtrace+set}" = set; then - withval="$with_mtrace" - CFLAGS="$CFLAGS -include mcheck.h" + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define WITH_MTRACE 1 +#define HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -fi; + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi -# Check whether --with-berkdb-debug or --without-berkdb-debug was given. -if test "${with_berkdb_debug+set}" = set; then - withval="$with_berkdb_debug" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -cat >>confdefs.h <<\_ACEOF -#define BERKDB_ERROR_REPORTING 1 + { $as_echo "$as_me:$LINENO: checking for i_blksize in struct inode" >&5 +$as_echo_n "checking for i_blksize in struct inode... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + #define __KERNEL__ + #include + static struct inode i = { + .i_blksize = 0, + }; -fi; - -TAU_INCS= -BUILD_TAU= - - -# Check whether --with-tau or --without-tau was given. -if test "${with_tau+set}" = set; then - withval="$with_tau" - if test "x$withval" = "xyes" ; then - { { echo "$as_me:$LINENO: error: --with-tau must be given a pathname" >&5 -echo "$as_me: error: --with-tau must be given a pathname" >&2;} - { (exit 1); exit 1; }; } - else - TAU_INCS="-I$withval/include" - CFLAGS="$CFLAGS $TAU_INCS -D__PVFS2_ENABLE_EVENT__" - LDFLAGS="$LDFLAGS -L$withval/$(uname -m)/lib" - tau_mkfile=$withval/$(uname -m)/lib/Makefile.*-profile-trace - if test ! -f $tau_mkfile; then - { { echo "$as_me:$LINENO: error: TAU not compiled with profiling and tracing support" >&5 -echo "$as_me: error: TAU not compiled with profiling and tracing support" >&2;} - { (exit 1); exit 1; }; } - fi - tau_config=$(echo $tau_mkfile | sed -e "s|.*Makefile.tau-||") - LIBS="$LIBS -lTAU_tf -lTAU_traceinput-$tau_config -ltau-$tau_config -lpthread -lstdc++" +int +main () +{ -cat >>confdefs.h <<\_ACEOF -#define HAVE_TAU 1 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_BLKSIZE_IN_STRUCT_INODE 1 _ACEOF - - BUILD_TAU=1 - fi - -fi; - - - - -BUILD_KERNEL= - - -# Check whether --with-kernel or --without-kernel was given. -if test "${with_kernel+set}" = set; then - withval="$with_kernel" - if test "x$withval" = "xyes" -o "x$withval" = "x" ; then - { { echo "$as_me:$LINENO: error: --with-kernel must be given the path to your kernel source." >&5 -echo "$as_me: error: --with-kernel must be given the path to your kernel source." >&2;} - { (exit 1); exit 1; }; } - fi - if ! test -d $withval ; then - { { echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 -echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} - { (exit 1); exit 1; }; } - fi - if ! test -r $withval/include/linux/version.h ; then - { { echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 -echo "$as_me: error: The kernel source tree must have been configured." >&2;} - { (exit 1); exit 1; }; } - fi - - if test -r $withval/include/linux/version.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/version.h ; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` - elif test -r $withval/include/linux/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/linux/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/utsrelease.h` - elif test -r $withval/include/generated/utsrelease.h && grep -q UTS_RELEASE..2\\.6\\. $withval/include/generated/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` - elif test -r $withval/include/generated/utsrelease.h && grep -qE UTS_RELEASE..3\\. $withval/include/generated/utsrelease.h; then - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/generated/utsrelease.h` - else - { { echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.6 or 3.X" >&5 -echo "$as_me: error: The kernel source tree does not appear to be 2.6 or 3.X" >&2;} - { (exit 1); exit 1; }; } - - fi - - # At least up through 2.6.3 needed to write .__modpost.cmd; this changed - # sometime between then and 2.6.10. Now anybody can compile out-of-tree - # modules against a configured kernel tree - LINUX_KERNEL_SRC="$withval" - BUILD_KERNEL=1 - -else - LINUX_KERNEL_SRC="" - -fi; - - -# Check whether --with-kernel24 or --without-kernel24 was given. -if test "${with_kernel24+set}" = set; then - withval="$with_kernel24" - if test "x$withval" = "xyes" -o "x$withval" = "x" ; then - { { echo "$as_me:$LINENO: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&5 -echo "$as_me: error: --with-kernel24 must be given the path to your kernel 2.4.x source." >&2;} - { (exit 1); exit 1; }; } - fi - if ! test -d $withval ; then - { { echo "$as_me:$LINENO: error: The --with-kernel path $withval is not a directory." >&5 -echo "$as_me: error: The --with-kernel path $withval is not a directory." >&2;} - { (exit 1); exit 1; }; } - fi - if ! test -r $withval/include/linux/version.h ; then - { { echo "$as_me:$LINENO: error: The kernel source tree must have been configured." >&5 -echo "$as_me: error: The kernel source tree must have been configured." >&2;} - { (exit 1); exit 1; }; } - fi - vers=`sed -n '/UTS_RELEASE/{; s/.*"\(0-9\.0-9\).*".*/\1/; p; }' $withval/include/linux/version.h` - if ! grep -q UTS_RELEASE..2\\.4\\. $withval/include/linux/version.h ; then - { { echo "$as_me:$LINENO: error: The kernel source tree does not appear to be 2.4" >&5 -echo "$as_me: error: The kernel source tree does not appear to be 2.4" >&2;} - { (exit 1); exit 1; }; } - fi - k24_minor_ver=`echo $vers | cut -b 26- | sed -n 's/\"//p' | head -n 1` - tmp_k24_minor_ver=`echo $k24_minor_ver | grep \-` - if ! test "x$tmp_k24_minor_ver" = "x"; then - tmp_k24_minor_ver=`echo $k24_minor_ver | cut -d- -f1` - k24_minor_ver=$tmp_k24_minor_ver - fi - LINUX24_KERNEL_SRC="$withval" LINUX24_KERNEL_MINOR_VER="`echo $k24_minor_ver| cut -d'.' -f 1`" - BUILD_KERNEL=1 else - LINUX24_KERNEL_SRC="" LINUX24_KERNEL_MINOR_VER="" -fi; + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -oldcflags=$CFLAGS -if test -z "${LINUX_KERNEL_SRC}" ; then - lk_src=${LINUX24_KERNEL_SRC} -elif test -z "${LINUX24_KERNEL_SRC}" ; then - lk_src=${LINUX_KERNEL_SRC} -fi + { $as_echo "$as_me:$LINENO: checking for i_sem in struct inode" >&5 +$as_echo_n "checking for i_sem in struct inode... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #define __KERNEL__ + #include + static struct inode i = { + .i_sem = {0}, + }; +int +main () +{ -# Check whether --enable-kernel-aio or --disable-kernel-aio was given. -if test "${enable_kernel_aio+set}" = set; then - enableval="$enable_kernel_aio" - enable_kernel_aio=$enableval -else - enable_kernel_aio=yes + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -fi; +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_SEM_IN_STRUCT_INODE 1 +_ACEOF -# Check whether --enable-kernel-sendfile or --disable-kernel-sendfile was given. -if test "${enable_kernel_sendfile+set}" = set; then - enableval="$enable_kernel_sendfile" - enable_kernel_sendfile=$enableval else - enable_kernel_sendfile=no - -fi; + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test -n "$lk_src" ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for statfs_lite callback in struct super_operations in kernel" >&5 +$as_echo_n "checking for statfs_lite callback in struct super_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ - NOSTDINCFLAGS="-Werror-implicit-function-declaration -nostdinc -isystem `$CC -print-file-name=include`" + #define __KERNEL__ + #include + static struct super_operations sop = { + .statfs_lite = NULL, + }; - if test -d $lk_src/source; then - lk_src_source="$lk_src/source" - else - lk_src_source=$lk_src - fi +int +main () +{ - CFLAGS="$USR_CFLAGS $NOSTDINCFLAGS -I$lk_src_source/include -I$lk_src_source/include/asm/mach-default -DKBUILD_STR(s)=#s -DKBUILD_BASENAME=KBUILD_STR(empty) -DKBUILD_MODNAME=KBUILD_STR(empty)" + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - if test -f $lk_src/include/generated/autoconf.h ; then - CFLAGS="$CFLAGS -imacros $lk_src/include/generated/autoconf.h" - else - CFLAGS="$CFLAGS -imacros $lk_src/include/linux/autoconf.h" - fi +cat >>confdefs.h <<\_ACEOF +#define HAVE_STATFS_LITE_SUPER_OPERATIONS 1 +_ACEOF - if test -n "${ARCH}" ; then - CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" - else - SUBARCH=`uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ \ - -e s/ppc.*/powerpc/ -e s/mips.*/mips/ \ - -e s/sh.*/sh/` - if test "x$SUBARCH" = "xi386"; then - ARCH=x86 - elif test "x$SUBARCH" = "xx86_64"; then - ARCH=x86 - elif test "x$SUBARCH" = "xsparc64"; then - ARCH=sparc - else - ARCH=$SUBARCH - fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } - fi +fi - if test "$lk_src" != "$lk_src_source"; then - CFLAGS="$CFLAGS -I$lk_src/include" - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - need_optimize_flag=0 - echo "$as_me:$LINENO: checking for sanity of linux/fs.h include" >&5 -echo $ECHO_N "checking for sanity of linux/fs.h include... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for fill_handle callback in struct inode_operations in kernel" >&5 +$as_echo_n "checking for fill_handle callback in struct inode_operations in kernel... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -10455,6 +14677,9 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include + static struct inode_operations iop = { + .fill_handle = NULL, + }; int main () @@ -10465,45 +14690,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FILL_HANDLE_INODE_OPERATIONS 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - need_optimize_flag=1 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test $need_optimize_flag -eq 1; then - CFLAGS="-Os $CFLAGS" - fi - echo "$as_me:$LINENO: checking for i_size_write in kernel" >&5 -echo $ECHO_N "checking for i_size_write in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for getattr_lite callback in struct inode_operations in kernel" >&5 +$as_echo_n "checking for getattr_lite callback in struct inode_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10512,11 +14736,9 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - void i_size_write(struct inode *inode, - loff_t i_size) - { - return; - } + static struct inode_operations iop = { + .getattr_lite = NULL, + }; int main () @@ -10527,46 +14749,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_SIZE_WRITE 1 +#define HAVE_GETATTR_LITE_INODE_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for i_size_read in kernel" >&5 -echo $ECHO_N "checking for i_size_read in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for get_fs_key callback in struct super_operations in kernel" >&5 +$as_echo_n "checking for get_fs_key callback in struct super_operations in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10575,10 +14795,9 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - loff_t i_size_read(struct inode *inode) - { - return 0; - } + static struct super_operations sop = { + .get_fs_key = NULL, + }; int main () @@ -10589,232 +14808,345 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GET_FS_KEY_SUPER_OPERATIONS 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for readdir member in file_operations structure" >&5 +$as_echo_n "checking for readdir member in file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #define __KERNEL__ + #include + +int +main () +{ + + struct file_operations filop = { + .readdir = NULL + }; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_SIZE_READ 1 +#define HAVE_READDIR_FILE_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for iget_locked function in kernel" >&5 -echo $ECHO_N "checking for iget_locked function in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for readdirplus member in file_operations structure" >&5 +$as_echo_n "checking for readdirplus member in file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - loff_t iget_locked(struct inode *inode) - { - return 0; - } + #define __KERNEL__ + #include + +int +main () +{ + + struct file_operations filop = { + .readdirplus = NULL + }; + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_READDIRPLUS_FILE_OPERATIONS 1 +_ACEOF + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for readdirplus_lite member in file_operations structure" >&5 +$as_echo_n "checking for readdirplus_lite member in file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #define __KERNEL__ + #include int main () { + struct file_operations filop = { + .readdirplus_lite = NULL + }; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_IGET_LOCKED 1 +#define HAVE_READDIRPLUSLITE_FILE_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for iget4_locked function in kernel" >&5 -echo $ECHO_N "checking for iget4_locked function in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + { $as_echo "$as_me:$LINENO: checking for readx member in file_operations structure" >&5 +$as_echo_n "checking for readx member in file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - loff_t iget4_locked(struct inode *inode) - { - return 0; - } + #define __KERNEL__ + #include int main () { + struct file_operations filop = { + .readx = NULL + }; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_IGET4_LOCKED 1 +#define HAVE_READX_FILE_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for iget5_locked function in kernel" >&5 -echo $ECHO_N "checking for iget5_locked function in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for writex member in file_operations structure" >&5 +$as_echo_n "checking for writex member in file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - loff_t iget5_locked(struct inode *inode) - { - return 0; - } + #define __KERNEL__ + #include int main () { + struct file_operations filop = { + .writex = NULL + }; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_IGET5_LOCKED 1 +#define HAVE_WRITEX_FILE_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for struct xtvec in kernel" >&5 -echo $ECHO_N "checking for struct xtvec in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for aio support in kernel" >&5 +$as_echo_n "checking for aio support in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -10822,8 +15154,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - static struct xtvec xv = { 0, 0 }; + #include + #include + static struct kiocb iocb; int main () @@ -10834,63 +15167,59 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_XTVEC 1 +#define HAVE_AIO 1 _ACEOF + have_aio=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + have_aio=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for struct kmem_cache in kernel" >&5 -echo $ECHO_N "checking for struct kmem_cache in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for ki_dtor in kiocb structure of kernel" >&5 +$as_echo_n "checking for ki_dtor in kiocb structure of kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - - int foo(struct kmem_cache *s) - { - return (s == NULL) ? 3 : 4; - } + #define __KERNEL__ + #include + #include + static struct kiocb io_cb = { + .ki_dtor = NULL, + }; int main () @@ -10901,172 +15230,167 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_KMEM_CACHE 1 +#define HAVE_AIO_VFS_SUPPORT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking for SLAB_KERNEL flag in kernel" >&5 -echo $ECHO_N "checking for SLAB_KERNEL flag in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for kiocbSetCancelled" >&5 +$as_echo_n "checking for kiocbSetCancelled... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static int flags = SLAB_KERNEL; + #define __KERNEL__ + #include + #include int main () { + struct kiocb *iocb; + kiocbSetCancelled(iocb); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SLAB_KERNEL 1 +#define HAVE_KIOCBSETCANCELLED 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for memory_backed in struct backing_dev_info in kernel" >&5 -echo $ECHO_N "checking for memory_backed in struct backing_dev_info in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for atomic ki_users" >&5 +$as_echo_n "checking for atomic ki_users... " >&6; } + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - static struct backing_dev_info bdi = { - .memory_backed = 0 - }; + #define __KERNEL__ + #include + #include int main () { + struct kiocb *iocb; + atomic_dec(&iocb->ki_users); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDI_MEMORY_BACKED 1 +#define KI_USERS_ATOMIC 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$enable_kernel_sendfile" = "xyes"; then - echo "$as_me:$LINENO: checking for sendfile callback in struct file_operations in kernel" >&5 -echo $ECHO_N "checking for sendfile callback in struct file_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + tmp_cflags=$CFLAGS + + { $as_echo "$as_me:$LINENO: checking for aio_put_req returns int" >&5 +$as_echo_n "checking for aio_put_req returns int... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11074,134 +15398,135 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - static struct file_operations fop = { - .sendfile = NULL, - }; + #include + #include int main () { + struct kiocb *iocb; + int r; + r = aio_put_req(iocb); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SENDFILE_VFS_SUPPORT 1 +#define AIO_PUT_REQ_RETURNS_INT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: checking for readv callback in struct file_operations in kernel" >&5 -echo $ECHO_N "checking for readv callback in struct file_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for kiocb_set_cancel_fn" >&5 +$as_echo_n "checking for kiocb_set_cancel_fn... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct file_operations fop = { - .readv = NULL, - }; + #define __KERNEL__ + #include + #include int main () { + struct kiocb *iocb; + int (*aio_cancel)(struct kiocb *, struct io_event *); + kiocb_set_cancel_fn(iocb, aio_cancel); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_READV_FILE_OPERATIONS 1 +#define HAVE_KIOCB_SET_CANCEL_FN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for writev callback in struct file_operations in kernel" >&5 -echo $ECHO_N "checking for writev callback in struct file_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for new prototype of aio_read callback of file_operations structure" >&5 +$as_echo_n "checking for new prototype of aio_read callback of file_operations structure... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct file_operations fop = { - .writev = NULL, - }; + #define __KERNEL__ + #include + extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); + static struct file_operations fop = { + .aio_read = my_aio_read, + }; int main () @@ -11212,47 +15537,49 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_WRITEV_FILE_OPERATIONS 1 +#define HAVE_AIO_NEW_AIO_SIGNATURE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for find_inode_handle callback in struct super_operations in kernel" >&5 -echo $ECHO_N "checking for find_inode_handle callback in struct super_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + fi + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for dentry argument in kernel super_operations statfs" >&5 +$as_echo_n "checking for dentry argument in kernel super_operations statfs... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11261,60 +15588,62 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct super_operations sop = { - .find_inode_handle = NULL, - }; + struct super_operations sop; + int s(struct dentry *de, struct kstatfs *kfs) + { + return 0; + } int main () { + sop.statfs = s; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS 1 +#define HAVE_DENTRY_STATFS_SOP 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for i_blksize in struct inode" >&5 -echo $ECHO_N "checking for i_blksize in struct inode... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking for vfsmount argument in kernel file_system_type get_sb" >&5 +$as_echo_n "checking for vfsmount argument in kernel file_system_type get_sb... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11323,9 +15652,14 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct inode i = { - .i_blksize = 0, - }; + int get_sb_bdev(struct file_system_type *fs_type, int flags, + const char *dev_name, void *data, + int (*fill_super)(struct super_block *, void *, + int), + struct vfsmount *vfsm) + { + return 0; + } int main () @@ -11336,46 +15670,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_BLKSIZE_IN_STRUCT_INODE 1 +#define HAVE_VFSMOUNT_GETSB 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for i_sem in struct inode" >&5 -echo $ECHO_N "checking for i_sem in struct inode... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for get_sb_nodev" >&5 +$as_echo_n "checking for get_sb_nodev... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11383,61 +15714,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct inode i = { - .i_sem = {0}, - }; + #define __KERNEL__ + #include + int v_fill_sb(struct super_block *sb, void *data, int s) + { + return 0; + } int main () { + int ret = 0; + struct super_block *sb = NULL; +#ifdef HAVE_VFSMOUNT_GETSB + ret = get_sb_nodev(NULL, 0, NULL, v_fill_sb, NULL ); +#else + sb = get_sb_nodev(NULL, 0, NULL, v_fill_sb); +#endif + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_SEM_IN_STRUCT_INODE 1 +#define HAVE_GETSB_NODEV 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for statfs_lite callback in struct super_operations in kernel" >&5 -echo $ECHO_N "checking for statfs_lite callback in struct super_operations in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for file_system_type get_sb" >&5 +$as_echo_n "checking for file_system_type get_sb... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11445,61 +15782,60 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct super_operations sop = { - .statfs_lite = NULL, - }; + #define __KERNEL__ + #include int main () { + struct file_system_type f; + f.get_sb = NULL; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_STATFS_LITE_SUPER_OPERATIONS 1 +#define HAVE_FSTYPE_GET_SB 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for fill_handle callback in struct inode_operations in kernel" >&5 -echo $ECHO_N "checking for fill_handle callback in struct inode_operations in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + + + { $as_echo "$as_me:$LINENO: checking for file_system_type mount exclusively" >&5 +$as_echo_n "checking for file_system_type mount exclusively... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11507,62 +15843,63 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct inode_operations iop = { - .fill_handle = NULL, - }; + #define __KERNEL__ + #include int main () { +#ifdef HAVE_FSTYPE_GET_SB + assert(0); +#else + struct file_system_type f; + f.mount = NULL; +#endif + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FILL_HANDLE_INODE_OPERATIONS 1 +#define HAVE_FSTYPE_MOUNT_ONLY 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for getattr_lite callback in struct inode_operations in kernel" >&5 -echo $ECHO_N "checking for getattr_lite callback in struct inode_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for xattr support in kernel" >&5 +$as_echo_n "checking for xattr support in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11571,9 +15908,9 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct inode_operations iop = { - .getattr_lite = NULL, - }; + static struct inode_operations in_op = { + .getxattr = NULL + }; int main () @@ -11584,47 +15921,47 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GETATTR_LITE_INODE_OPERATIONS 1 +#define HAVE_XATTR 1 _ACEOF + have_xattr=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + have_xattr=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for get_fs_key callback in struct super_operations in kernel" >&5 -echo $ECHO_N "checking for get_fs_key callback in struct super_operations in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test "x$have_xattr" = "xyes"; then + { $as_echo "$as_me:$LINENO: checking for const argument to setxattr function" >&5 +$as_echo_n "checking for const argument to setxattr function... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11633,59 +15970,65 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct super_operations sop = { - .get_fs_key = NULL, - }; int main () { + struct inode_operations inode_ops; + int ret; + struct dentry * dent = NULL; + const char * name = NULL; + const void * val = NULL; + size_t size = 0; + int flags = 0; + + ret = inode_ops.setxattr(dent, name, val, size, flags); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_FS_KEY_SUPER_OPERATIONS 1 +#define HAVE_SETXATTR_CONST_ARG 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for readdirplus member in file_operations structure" >&5 -echo $ECHO_N "checking for readdirplus member in file_operations structure... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi + + + { $as_echo "$as_me:$LINENO: checking for file argument to sysctl proc handlers" >&5 +$as_echo_n "checking for file argument to sysctl proc handlers... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -11695,61 +16038,64 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include + #include int main () { - struct file_operations filop = { - .readdirplus = NULL - }; + struct ctl_table * ctl = NULL; + int write = 0; + struct file * filp = NULL; + void __user * buffer = NULL; + size_t * lenp = NULL; + loff_t * ppos = NULL; + + proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_READDIRPLUS_FILE_OPERATIONS 1 +#define HAVE_PROC_HANDLER_FILE_ARG 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for readdirplus_lite member in file_operations structure" >&5 -echo $ECHO_N "checking for readdirplus_lite member in file_operations structure... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for ppos argument to sysctl proc handlers" >&5 +$as_echo_n "checking for ppos argument to sysctl proc handlers... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -11758,588 +16104,718 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include + #include int main () { - struct file_operations filop = { - .readdirplus_lite = NULL - }; + struct ctl_table * ctl = NULL; + int write = 0; + void __user * buffer = NULL; + size_t * lenp = NULL; + loff_t * ppos = NULL; + + proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_READDIRPLUSLITE_FILE_OPERATIONS 1 +#define HAVE_PROC_HANDLER_PPOS_ARG 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for readx member in file_operations structure" >&5 -echo $ECHO_N "checking for readx member in file_operations structure... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + + +for ac_header in linux/posix_acl.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #ifdef HAVE_XATTR + #include + #endif - #define __KERNEL__ - #include -int -main () -{ +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - struct file_operations filop = { - .readx = NULL - }; + eval "$as_ac_Header=no" +fi - ; - return 0; -} +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in linux/posix_acl_xattr.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #ifdef HAVE_XATTR + #include + #endif + + +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_READX_FILE_OPERATIONS 1 + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in linux/xattr_acl.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ _ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #ifdef HAVE_XATTR + #include + #endif + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - echo "$as_me:$LINENO: checking for writex member in file_operations structure" >&5 -echo $ECHO_N "checking for writex member in file_operations structure... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + + +for ac_header in linux/mount.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #include - #define __KERNEL__ - #include - -int -main () -{ - - struct file_operations filop = { - .writex = NULL - }; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_WRITEX_FILE_OPERATIONS 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - echo "$as_me:$LINENO: checking for aio support in kernel" >&5 -echo $ECHO_N "checking for aio support in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + +for ac_header in linux/ioctl32.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #include - #define __KERNEL__ - #include - #include - static struct kiocb iocb; - -int -main () -{ - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AIO 1 -_ACEOF - - have_aio=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - have_aio=no + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - if test "x$have_aio" = "xyes" -a "x$enable_kernel_aio" = "xyes"; then - echo "$as_me:$LINENO: checking for ki_dtor in kiocb structure of kernel" >&5 -echo $ECHO_N "checking for ki_dtor in kiocb structure of kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + +for ac_header in linux/compat.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include - #define __KERNEL__ - #include - #include - static struct kiocb io_cb = { - .ki_dtor = NULL, - }; - -int -main () -{ - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AIO_VFS_SUPPORT 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for new prototype of aio_read callback of file_operations structure" >&5 -echo $ECHO_N "checking for new prototype of aio_read callback of file_operations structure... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + +for ac_header in linux/syscalls.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include - #define __KERNEL__ - #include - extern ssize_t my_aio_read(struct kiocb *, const struct iovec *, unsigned long, loff_t); - static struct file_operations fop = { - .aio_read = my_aio_read, - }; - -int -main () -{ - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_AIO_NEW_AIO_SIGNATURE 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - fi +fi - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for dentry argument in kernel super_operations statfs" >&5 -echo $ECHO_N "checking for dentry argument in kernel super_operations statfs... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +done + + +for ac_header in asm/ioctl32.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #include - #define __KERNEL__ - #include - struct super_operations sop; - int s(struct dentry *de, struct kstatfs *kfs) - { - return 0; - } - -int -main () -{ - - sop.statfs = s; - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_STATFS_SOP 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + eval "$as_ac_Header=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF - echo "$as_me:$LINENO: checking for vfsmount argument in kernel file_system_type get_sb" >&5 -echo $ECHO_N "checking for vfsmount argument in kernel file_system_type get_sb... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +fi + +done + + +for ac_header in linux/exportfs.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #include - #define __KERNEL__ - #include - int get_sb_bdev(struct file_system_type *fs_type, int flags, - const char *dev_name, void *data, - int (*fill_super)(struct super_block *, void *, - int), - struct vfsmount *vfsm) - { - return 0; - } - -int -main () -{ - ; - return 0; -} +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + eval "$as_ac_Header=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_VFSMOUNT_GETSB 1 + eval "$as_ac_Header=no" +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +done -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for get_sb_nodev" >&5 -echo $ECHO_N "checking for get_sb_nodev... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for linux/smp_lock.h" >&5 +$as_echo_n "checking for linux/smp_lock.h... " >&6; } +if test "${ac_cv_header_linux_smp_lock_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ +#define __KERNEL__ + #include - #define __KERNEL__ - #include - int v_fill_sb(struct super_block *sb, void *data, int s) - { - return 0; - } - -int -main () -{ - - int ret = 0; - struct super_block *sb = NULL; -#ifdef HAVE_VFSMOUNT_GETSB - ret = get_sb_nodev(NULL, 0, NULL, v_fill_sb, NULL ); -#else - sb = get_sb_nodev(NULL, 0, NULL, v_fill_sb); -#endif - ; - return 0; -} +#include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GETSB_NODEV 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_header_linux_smp_lock_h=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + ac_cv_header_linux_smp_lock_h=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_linux_smp_lock_h" >&5 +$as_echo "$ac_cv_header_linux_smp_lock_h" >&6; } + + + + { $as_echo "$as_me:$LINENO: checking for generic_file_readv api in kernel" >&5 +$as_echo_n "checking for generic_file_readv api in kernel... " >&6; } - echo "$as_me:$LINENO: checking for file_system_type get_sb" >&5 -echo $ECHO_N "checking for file_system_type get_sb... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12347,63 +16823,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + int generic_file_readv(struct inode *inode) + { + return 0; + } int main () { - struct file_system_type f; - f.get_sb = NULL; - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSTYPE_GET_SB 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_FILE_READV 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for generic_permission api in kernel" >&5 +$as_echo_n "checking for generic_permission api in kernel... " >&6; } - echo "$as_me:$LINENO: checking for file_system_type mount exclusively" >&5 -echo $ECHO_N "checking for file_system_type mount exclusively... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12411,66 +16883,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + int generic_permission(struct inode *inode) + { + return 0; + } int main () { -#ifdef HAVE_FSTYPE_GET_SB - assert(0); -#else - struct file_system_type f; - f.mount = NULL; -#endif - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSTYPE_MOUNT_ONLY 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_PERMISSION 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for xattr support in kernel" >&5 -echo $ECHO_N "checking for xattr support in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for three-param generic_permission" >&5 +$as_echo_n "checking for three-param generic_permission... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12479,63 +16944,57 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct inode_operations in_op = { - .getxattr = NULL - }; + struct inode *f; int main () { + generic_permission(f, 0, NULL); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_XATTR 1 +#define HAVE_THREE_PARAM_GENERIC_PERMISSION 1 _ACEOF - have_xattr=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - have_xattr=no + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test "x$have_xattr" = "xyes"; then - echo "$as_me:$LINENO: checking for const argument to setxattr function" >&5 -echo $ECHO_N "checking for const argument to setxattr function... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for four-param generic_permission" >&5 +$as_echo_n "checking for four-param generic_permission... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -12544,68 +17003,56 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include + struct inode *f; int main () { - struct inode_operations inode_ops; - int ret; - struct dentry * dent = NULL; - const char * name = NULL; - const void * val = NULL; - size_t size = 0; - int flags = 0; - - ret = inode_ops.setxattr(dent, name, val, size, flags); + generic_permission(f, 0, 0, NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SETXATTR_CONST_ARG 1 +#define HAVE_FOUR_PARAM_GENERIC_PERMISSION 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for file argument to sysctl proc handlers" >&5 -echo $ECHO_N "checking for file argument to sysctl proc handlers... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for two-param generic_permission" >&5 +$as_echo_n "checking for two-param generic_permission... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -12613,770 +17060,687 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include + #define __KERNEL__ + #include + struct inode *f; int main () { - struct ctl_table * ctl = NULL; - int write = 0; - struct file * filp = NULL; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, filp, buffer, lenp, ppos); + generic_permission(f, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_PROC_HANDLER_FILE_ARG 1 +#define HAVE_TWO_PARAM_GENERIC_PERMISSION 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for ppos argument to sysctl proc handlers" >&5 -echo $ECHO_N "checking for ppos argument to sysctl proc handlers... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for set_nlink" >&5 +$as_echo_n "checking for set_nlink... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include + #define __KERNEL__ + #include + struct inode *i; int main () { - struct ctl_table * ctl = NULL; - int write = 0; - void __user * buffer = NULL; - size_t * lenp = NULL; - loff_t * ppos = NULL; - - proc_dointvec_minmax(ctl, write, buffer, lenp, ppos); + set_nlink(i, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_PROC_HANDLER_PPOS_ARG 1 +#define HAVE_I_SET_NLINK 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/posix_acl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for inc_nlink" >&5 +$as_echo_n "checking for inc_nlink... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif - - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - + #define __KERNEL__ + #include + struct inode *i; -for ac_header in linux/posix_acl_xattr.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif +int +main () +{ + inc_nlink(i); -#include <$ac_header> + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_INC_NLINK 1 _ACEOF -fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -done + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/xattr_acl.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for drop_nlink" >&5 +$as_echo_n "checking for drop_nlink... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include - #ifdef HAVE_XATTR - #include - #endif + #define __KERNEL__ + #include + struct inode *i; + +int +main () +{ + + drop_nlink(i); -#include <$ac_header> + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_DROP_NLINK 1 _ACEOF -fi +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -done + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/mount.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for clear_nlink" >&5 +$as_echo_n "checking for clear_nlink... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #include + struct inode *i; -#include <$ac_header> +int +main () +{ + + clear_nlink(i); + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_I_CLEAR_NLINK 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/ioctl32.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for posix_acl_equiv_mode umode_t" >&5 +$as_echo_n "checking for posix_acl_equiv_mode umode_t... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + struct posix_acl *acl; + umode_t mode = 0; -#include <$ac_header> +int +main () +{ + + posix_acl_equiv_mode(acl, &mode); + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags -for ac_header in linux/compat.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for posix_acl_create" >&5 +$as_echo_n "checking for posix_acl_create... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + struct posix_acl *acl; + umode_t mode = 0; -#include <$ac_header> +int +main () +{ + + posix_acl_create(&acl, GFP_KERNEL, &mode); + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CREATE 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/syscalls.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for posix_acl_chmod" >&5 +$as_echo_n "checking for posix_acl_chmod... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + struct posix_acl *acl; + struct inode *inode; + umode_t mode = 0; -#include <$ac_header> +int +main () +{ + + posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode ); + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CHMOD 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in asm/ioctl32.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for posix_acl_clone" >&5 +$as_echo_n "checking for posix_acl_clone... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + struct posix_acl *acl; + +int +main () +{ + + posix_acl_clone(acl, GFP_KERNEL); -#include <$ac_header> + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_POSIX_ACL_CLONE 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done - +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -for ac_header in linux/exportfs.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for fsync with loff_t" >&5 +$as_echo_n "checking for fsync with loff_t... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #include + + int my_fsync(struct file *, loff_t, loff_t, int); + + int my_fsync(struct file *f, loff_t start, loff_t end, int datasync) + { + } + +int +main () +{ + + struct file_operations fop; -#include <$ac_header> + fop.fsync = my_fsync; + + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_Header=yes" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FSYNC_LOFF_T_PARAMS 1 +_ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -done +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking for linux/smp_lock.h" >&5 -echo $ECHO_N "checking for linux/smp_lock.h... $ECHO_C" >&6 -if test "${ac_cv_header_linux_smp_lock_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for generic_getxattr api in kernel" >&5 +$as_echo_n "checking for generic_getxattr api in kernel... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + int generic_getxattr(struct inode *inode) + { + return 0; + } + +int +main () +{ -#include + ; + return 0; +} _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_header_linux_smp_lock_h=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_linux_smp_lock_h=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_header_linux_smp_lock_h" >&5 -echo "${ECHO_T}$ac_cv_header_linux_smp_lock_h" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +cat >>confdefs.h <<\_ACEOF +#define HAVE_GENERIC_GETXATTR 1 +_ACEOF +fi - echo "$as_me:$LINENO: checking for generic_file_readv api in kernel" >&5 -echo $ECHO_N "checking for generic_file_readv api in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for arg member in read_descriptor_t in kernel" >&5 +$as_echo_n "checking for arg member in read_descriptor_t in kernel... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13384,62 +17748,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - int generic_file_readv(struct inode *inode) - { - return 0; - } + #define __KERNEL__ + #include int main () { + read_descriptor_t x; + x.arg.data = NULL; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GENERIC_FILE_READV 1 +#define HAVE_ARG_IN_READ_DESCRIPTOR_T 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for generic_permission api in kernel" >&5 -echo $ECHO_N "checking for generic_permission api in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking for fh_to_dentry member in export_operations in kernel" >&5 +$as_echo_n "checking for fh_to_dentry member in export_operations in kernel... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13447,63 +17807,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - int generic_permission(struct inode *inode) - { - return 0; - } + #define __KERNEL__ + #include int main () { + struct export_operations x; + x.fh_to_dentry = NULL; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GENERIC_PERMISSION 1 +#define HAVE_FHTODENTRY_EXPORT_OPERATIONS 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for three-param generic_permission" >&5 -echo $ECHO_N "checking for three-param generic_permission... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for encode_fh member in export_operations in kernel" >&5 +$as_echo_n "checking for encode_fh member in export_operations in kernel... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13511,127 +17866,128 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *f; + #define __KERNEL__ + #include int main () { - generic_permission(f, 0, NULL); + struct export_operations x; + x.encode_fh = NULL; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_THREE_PARAM_GENERIC_PERMISSION 1 +#define HAVE_ENCODEFH_EXPORT_OPERATIONS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for four-param generic_permission" >&5 -echo $ECHO_N "checking for four-param generic_permission... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=${CFLAGS} + CFLAGS="${CFLAGS} -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel export ops get inode from dentry" >&5 +$as_echo_n "checking if kernel export ops get inode from dentry... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *f; + #define __KERNEL__ + #include + #include + extern int myencode(struct dentry *, + __u32 *, + int *, + int); int main () { - generic_permission(f, 0, 0, NULL); + static struct export_operations ex_op = {.encode_fh = myencode}; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FOUR_PARAM_GENERIC_PERMISSION 1 +#define PVFS_ENCODE_FS_USES_DENTRY 1 _ACEOF + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for two-param generic_permission" >&5 -echo $ECHO_N "checking for two-param generic_permission... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking for second arg type int in address_space_operations releasepage" >&5 +$as_echo_n "checking for second arg type int in address_space_operations releasepage... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13639,63 +17995,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *f; + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + extern int try_to_release_page(struct page *page, int gfp_mask); int main () { - generic_permission(f, 0); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TWO_PARAM_GENERIC_PERMISSION 1 +#define HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for set_nlink" >&5 -echo $ECHO_N "checking for set_nlink... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for int return in inode_operations follow_link" >&5 +$as_echo_n "checking for int return in inode_operations follow_link... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13703,63 +18055,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *i; + #define __KERNEL__ + #include + extern int page_follow_link_light(struct dentry *, + struct nameidata *); int main () { - set_nlink(i, 0); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_SET_NLINK 1 +#define HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for inc_nlink" >&5 -echo $ECHO_N "checking for inc_nlink... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for int return in kmem_cache_destroy" >&5 +$as_echo_n "checking for int return in kmem_cache_destroy... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13767,63 +18113,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *i; + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + extern int kmem_cache_destroy(kmem_cache_t *); int main () { - inc_nlink(i); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_INC_NLINK 1 +#define HAVE_INT_RETURN_KMEM_CACHE_DESTROY 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for drop_nlink" >&5 -echo $ECHO_N "checking for drop_nlink... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for older int return in invalidatepage" >&5 +$as_echo_n "checking for older int return in invalidatepage... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13833,61 +18175,61 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - struct inode *i; int main () { - drop_nlink(i); + struct address_space_operations aso; + + int ret; + struct page * page = NULL; + unsigned long offset; + + ret = aso.invalidatepage(page, offset); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_DROP_NLINK 1 +#define HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: NO" >&5 +$as_echo "NO" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for clear_nlink" >&5 -echo $ECHO_N "checking for clear_nlink... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for three argument invalidatepage function" >&5 +$as_echo_n "checking for three argument invalidatepage function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13897,61 +18239,62 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - struct inode *i; int main () { - clear_nlink(i); + struct address_space_operations aso; + + struct page *p; + unsigned int i,j; + + aso.invalidatepage(p,i,j); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_I_CLEAR_NLINK 1 +#define HAVE_THREE_ARGUMENT_INVALIDATEPAGE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: NO" >&5 +$as_echo "NO" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for posix_acl_equiv_mode umode_t" >&5 -echo $ECHO_N "checking for posix_acl_equiv_mode umode_t... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=${CFLAGS} + CFLAGS="${CFLAGS} -Werror" + { $as_echo "$as_me:$LINENO: checking for warnings when including linux/config.h" >&5 +$as_echo_n "checking for warnings when including linux/config.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -13960,64 +18303,55 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - struct posix_acl *acl; - umode_t mode = 0; + #include int main () { - posix_acl_equiv_mode(acl, &mode); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T 1 +#define HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for posix_acl_create" >&5 -echo $ECHO_N "checking for posix_acl_create... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking for compat_ioctl member in file_operations structure" >&5 +$as_echo_n "checking for compat_ioctl member in file_operations structure... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14025,66 +18359,61 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - struct posix_acl *acl; - umode_t mode = 0; + #define __KERNEL__ + #include int main () { - posix_acl_create(&acl, GFP_KERNEL, &mode); + struct file_operations filop = { + .compat_ioctl = NULL + }; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_ACL_CREATE 1 +#define HAVE_COMPAT_IOCTL_HANDLER 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for posix_acl_chmod" >&5 -echo $ECHO_N "checking for posix_acl_chmod... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + if test x$ac_cv_header_linux_ioctl32_h = xyes ; then + { $as_echo "$as_me:$LINENO: checking for register_ioctl32_conversion kernel exports" >&5 +$as_echo_n "checking for register_ioctl32_conversion kernel exports... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14092,66 +18421,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - struct posix_acl *acl; - struct inode *inode; - umode_t mode = 0; + #include + #include + int register_ioctl32_conversion(void) + { + return 0; + } int main () { - posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode ); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_ACL_CHMOD 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_REGISTER_IOCTL32_CONVERSION 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + fi - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for posix_acl_clone" >&5 -echo $ECHO_N "checking for posix_acl_clone... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for int return value of kmem_cache_destroy" >&5 +$as_echo_n "checking for int return value of kmem_cache_destroy... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14160,63 +18482,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - struct posix_acl *acl; + #ifdef HAVE_KCONFIG + #include + #endif + #include int main () { - posix_acl_clone(acl, GFP_KERNEL); + int i = kmem_cache_destroy(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_POSIX_ACL_CLONE 1 +#define HAVE_KMEM_CACHE_DESTROY_INT_RETURN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for fsync with loff_t" >&5 -echo $ECHO_N "checking for fsync with loff_t... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for combined file_operations readv and aio_read" >&5 +$as_echo_n "checking for combined file_operations readv and aio_read... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14224,70 +18542,59 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - - int my_fsync(struct file *, loff_t, loff_t, int); - - int my_fsync(struct file *f, loff_t start, loff_t end, int datasync) - { - } + #define __KERNEL__ + #include int main () { - struct file_operations fop; - - fop.fsync = my_fsync; + struct file_operations filop = { + .readv = NULL + }; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_FSYNC_LOFF_T_PARAMS 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_COMBINED_AIO_AND_VECTOR 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for generic_getxattr api in kernel" >&5 -echo $ECHO_N "checking for generic_getxattr api in kernel... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for kzalloc" >&5 +$as_echo_n "checking for kzalloc... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14295,61 +18602,60 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - int generic_getxattr(struct inode *inode) - { - return 0; - } + #ifdef HAVE_KCONFIG + #include + #endif + #include int main () { + void * a; + a = kzalloc(1024, GFP_KERNEL); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_GENERIC_GETXATTR 1 +#define HAVE_KZALLOC 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for arg member in read_descriptor_t in kernel" >&5 -echo $ECHO_N "checking for arg member in read_descriptor_t in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for two arguments to register_sysctl_table" >&5 +$as_echo_n "checking for two arguments to register_sysctl_table... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14357,61 +18663,61 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include int main () { - read_descriptor_t x; - x.arg.data = NULL; + register_sysctl_table(NULL, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ARG_IN_READ_DESCRIPTOR_T 1 +#define HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for fh_to_dentry member in export_operations in kernel" >&5 -echo $ECHO_N "checking for fh_to_dentry member in export_operations in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for generic FS_IOC ioctl flags" >&5 +$as_echo_n "checking for generic FS_IOC ioctl flags... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14420,60 +18726,56 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include int main () { - struct export_operations x; - x.fh_to_dentry = NULL; + int flags = FS_IOC_GETFLAGS; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + cat >>confdefs.h <<\_ACEOF -#define HAVE_FHTODENTRY_EXPORT_OPERATIONS 1 +#define HAVE_NO_FS_IOC_FLAGS 1 _ACEOF -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for encode_fh member in export_operations in kernel" >&5 -echo $ECHO_N "checking for encode_fh member in export_operations in kernel... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for obsolete struct page count without underscore" >&5 +$as_echo_n "checking for obsolete struct page count without underscore... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14482,60 +18784,61 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #ifdef HAVE_KCONFIG + #include + #endif + #include int main () { - struct export_operations x; - x.encode_fh = NULL; + struct page *p; + int foo; + foo = atomic_read(&(p)->count); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_ENCODEFH_EXPORT_OPERATIONS 1 +#define HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for second arg type int in address_space_operations releasepage" >&5 -echo $ECHO_N "checking for second arg type int in address_space_operations releasepage... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if kernel has device classes" >&5 +$as_echo_n "checking if kernel has device classes... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14544,58 +18847,56 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - extern int try_to_release_page(struct page *page, int gfp_mask); + #include int main () { + class_device_destroy(NULL, "pvfs2") + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE 1 +#define HAVE_KERNEL_DEVICE_CLASSES 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for int return in inode_operations follow_link" >&5 -echo $ECHO_N "checking for int return in inode_operations follow_link... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for destructor param to kmem_cache_create" >&5 +$as_echo_n "checking for destructor param to kmem_cache_create... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14604,59 +18905,61 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - extern int page_follow_link_light(struct dentry *, - struct nameidata *); + #ifdef HAVE_KCONFIG + #include + #endif + #include int main () { + kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK 1 +#define HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for int return in kmem_cache_destroy" >&5 -echo $ECHO_N "checking for int return in kmem_cache_destroy... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for one-param kmem_cache_create constructor" >&5 +$as_echo_n "checking for one-param kmem_cache_create constructor... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14664,59 +18967,67 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - extern int kmem_cache_destroy(kmem_cache_t *); + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + void ctor(void *req) + { + } int main () { + kmem_cache_create("config-test", 0, 0, 0, ctor); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INT_RETURN_KMEM_CACHE_DESTROY 1 +#define HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for older int return in invalidatepage" >&5 -echo $ECHO_N "checking for older int return in invalidatepage... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for two param permission" >&5 +$as_echo_n "checking for two param permission... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14725,67 +19036,71 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include #include + #include + int ctor(struct inode *i, int a) + { + return 0; + } + struct inode_operations iop = { + .permission = ctor, + }; int main () { - struct address_space_operations aso; - - int ret; - struct page * page = NULL; - unsigned long offset; - - ret = aso.invalidatepage(page, offset); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE 1 +#define HAVE_TWO_PARAM_PERMISSION 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: NO" >&5 -echo "${ECHO_T}NO" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=${CFLAGS} - CFLAGS="${CFLAGS} -Werror" - echo "$as_me:$LINENO: checking for warnings when including linux/config.h" >&5 -echo $ECHO_N "checking for warnings when including linux/config.h... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for two-param kmem_cache_create constructor" >&5 +$as_echo_n "checking for two-param kmem_cache_create constructor... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14794,58 +19109,64 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + void ctor(struct kmem_cache *cachep, void *req) + { + } int main () { + kmem_cache_create("config-test", 0, 0, 0, ctor); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H 1 +#define HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking for compat_ioctl member in file_operations structure" >&5 -echo $ECHO_N "checking for compat_ioctl member in file_operations structure... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if kernel address_space struct has a spin_lock field named page_lock" >&5 +$as_echo_n "checking if kernel address_space struct has a spin_lock field named page_lock... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14853,64 +19174,61 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct file_operations filop = { - .compat_ioctl = NULL - }; + struct address_space as; + spin_lock(&as.page_lock); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_COMPAT_IOCTL_HANDLER 1 +#define HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$ac_cv_header_linux_ioctl32_h = xyes ; then - echo "$as_me:$LINENO: checking for register_ioctl32_conversion kernel exports" >&5 -echo $ECHO_N "checking for register_ioctl32_conversion kernel exports... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel address_space struct has a rwlock_t field named tree_lock" >&5 +$as_echo_n "checking if kernel address_space struct has a rwlock_t field named tree_lock... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -14918,62 +19236,60 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - int register_ioctl32_conversion(void) - { - return 0; - } + #include int main () { + struct address_space as; + read_lock(&as.tree_lock); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_REGISTER_IOCTL32_CONVERSION 1 +#define HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - echo "$as_me:$LINENO: checking for int return value of kmem_cache_destroy" >&5 -echo $ECHO_N "checking for int return value of kmem_cache_destroy... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking if kernel address_space struct has a spinlock_t field named tree_lock" >&5 +$as_echo_n "checking if kernel address_space struct has a spinlock_t field named tree_lock... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -14982,59 +19298,58 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include int main () { - int i = kmem_cache_destroy(NULL); + struct address_space as; + spin_lock(&as.tree_lock); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMEM_CACHE_DESTROY_INT_RETURN 1 +#define HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for combined file_operations readv and aio_read" >&5 -echo $ECHO_N "checking for combined file_operations readv and aio_read... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking if kernel address_space struct has a priv_lock field - from RT linux" >&5 +$as_echo_n "checking if kernel address_space struct has a priv_lock field - from RT linux... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15042,61 +19357,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct file_operations filop = { - .readv = NULL - }; + struct address_space as; + spin_lock(&as.priv_lock); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_COMBINED_AIO_AND_VECTOR 1 +#define HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT 1 _ACEOF +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for kzalloc" >&5 -echo $ECHO_N "checking for kzalloc... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if kernel defines mapping_nrpages macro - from RT linux" >&5 +$as_echo_n "checking if kernel defines mapping_nrpages macro - from RT linux... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15105,60 +19417,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include int main () { - void * a; - a = kzalloc(1024, GFP_KERNEL); + struct address_space idata; + int i = mapping_nrpages(&idata); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KZALLOC 1 +#define HAVE_MAPPING_NRPAGES_MACRO 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for two arguments to register_sysctl_table" >&5 -echo $ECHO_N "checking for two arguments to register_sysctl_table... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if kernel super_operations contains read_inode field" >&5 +$as_echo_n "checking if kernel super_operations contains read_inode field... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15167,60 +19476,57 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include + #include int main () { - register_sysctl_table(NULL, 0); + struct super_operations sops; + sops.read_inode(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE 1 +#define HAVE_READ_INODE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for generic FS_IOC ioctl flags" >&5 -echo $ECHO_N "checking for generic FS_IOC ioctl flags... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if kernel super_operations contains drop_inode field" >&5 +$as_echo_n "checking if kernel super_operations contains drop_inode field... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15228,60 +19534,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - int flags = FS_IOC_GETFLAGS; + struct super_operations sops; + sops.drop_inode(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_NO_FS_IOC_FLAGS 1 +#define HAVE_DROP_INODE 1 _ACEOF - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for obsolete struct page count without underscore" >&5 -echo $ECHO_N "checking for obsolete struct page count without underscore... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if kernel super_operations contains put_inode field" >&5 +$as_echo_n "checking if kernel super_operations contains put_inode field... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15289,62 +19593,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - struct page *p; - int foo; - foo = atomic_read(&(p)->count); + struct super_operations sops; + sops.put_inode(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE 1 +#define HAVE_PUT_INODE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if kernel has device classes" >&5 -echo $ECHO_N "checking if kernel has device classes... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if mount.h defines MNT_NOATIME" >&5 +$as_echo_n "checking if mount.h defines MNT_NOATIME... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15352,60 +19652,57 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - class_device_destroy(NULL, "pvfs2") + int flag = MNT_NOATIME; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KERNEL_DEVICE_CLASSES 1 +#define HAVE_MNT_NOATIME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for destructor param to kmem_cache_create" >&5 -echo $ECHO_N "checking for destructor param to kmem_cache_create... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking if mount.h defines MNT_NODIRATIME" >&5 +$as_echo_n "checking if mount.h defines MNT_NODIRATIME... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15413,270 +19710,240 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include int main () { - kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); + int flag = MNT_NODIRATIME; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM 1 +#define HAVE_MNT_NODIRATIME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for one-param kmem_cache_create constructor" >&5 -echo $ECHO_N "checking for one-param kmem_cache_create constructor... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for d_alloc_anon" >&5 +$as_echo_n "checking for d_alloc_anon... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - void ctor(void *req) - { - } + #define __KERNEL__ + #include int main () { - kmem_cache_create("config-test", 0, 0, 0, ctor); + struct inode *i; + d_alloc_anon(i); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM 1 +#define HAVE_D_ALLOC_ANON 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wall" - echo "$as_me:$LINENO: checking for two param permission" >&5 -echo $ECHO_N "checking for two param permission... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for s_dirty in struct super_block" >&5 +$as_echo_n "checking for s_dirty in struct super_block... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - #include - #include - int ctor(struct inode *i, int a) - { - return 0; - } - struct inode_operations iop = { - .permission = ctor, - }; + #define __KERNEL__ + #include int main () { + struct super_block *s; + list_empty(&s->s_dirty); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TWO_PARAM_PERMISSION 1 +#define HAVE_SB_DIRTY_LIST 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for two-param kmem_cache_create constructor" >&5 -echo $ECHO_N "checking for two-param kmem_cache_create constructor... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for current_fsuid" >&5 +$as_echo_n "checking for current_fsuid... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include - void ctor(struct kmem_cache *cachep, void *req) - { - } + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include int main () { - kmem_cache_create("config-test", 0, 0, 0, ctor); + int uid = current_fsuid(); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM 1 +#define HAVE_CURRENT_FSUID 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking if kernel address_space struct has a spin_lock field named page_lock" >&5 -echo $ECHO_N "checking if kernel address_space struct has a spin_lock field named page_lock... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + { $as_echo "$as_me:$LINENO: checking if kernel backing_dev_info struct has a name field" >&5 +$as_echo_n "checking if kernel backing_dev_info struct has a name field... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15685,127 +19952,131 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include + #include int main () { - struct address_space as; - spin_lock(&as.page_lock); + struct backing_dev_info foo = + { + .name = "foo" + }; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT 1 +#define HAVE_BACKING_DEV_INFO_NAME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking if kernel address_space struct has a rwlock_t field named tree_lock" >&5 -echo $ECHO_N "checking if kernel address_space struct has a rwlock_t field named tree_lock... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:$LINENO: checking for bdi_init" >&5 +$as_echo_n "checking for bdi_init... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include + #include int main () { - struct address_space as; - read_lock(&as.tree_lock); + int ret = bdi_init(NULL); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT 1 +#define HAVE_BDI_INIT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking if kernel address_space struct has a spinlock_t field named tree_lock" >&5 -echo $ECHO_N "checking if kernel address_space struct has a spinlock_t field named tree_lock... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 +$as_echo_n "checking whether struct ctl_table has ctl_name... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15814,61 +20085,58 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include + static struct ctl_table c = { .ctl_name = 0, }; int main () { - struct address_space as; - spin_lock(&as.tree_lock); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT 1 +#define HAVE_CTL_NAME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking if kernel address_space struct has a priv_lock field - from RT linux" >&5 -echo $ECHO_N "checking if kernel address_space struct has a priv_lock field - from RT linux... $ECHO_C" >&6 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking whether struct ctl_table has strategy" >&5 +$as_echo_n "checking whether struct ctl_table has strategy... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15877,60 +20145,58 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include + static struct ctl_table c = { .strategy = 0, }; int main () { - struct address_space as; - spin_lock(&as.priv_lock); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT 1 +#define HAVE_STRATEGY_NAME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if kernel defines mapping_nrpages macro - from RT linux" >&5 -echo $ECHO_N "checking if kernel defines mapping_nrpages macro - from RT linux... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for five-param xattr_handler.get" >&5 +$as_echo_n "checking for five-param xattr_handler.get... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -15939,60 +20205,67 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + static struct xattr_handler x; + static int get_xattr_h( struct dentry *d, const char *n, + void *b, size_t s, int h) + { return 0; } int main () { - struct address_space idata; - int i = mapping_nrpages(&idata); + x.get = get_xattr_h; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_MAPPING_NRPAGES_MACRO 1 +#define HAVE_XATTR_HANDLER_GET_FIVE_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if kernel super_operations contains read_inode field" >&5 -echo $ECHO_N "checking if kernel super_operations contains read_inode field... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for six-param xattr_handler.set" >&5 +$as_echo_n "checking for six-param xattr_handler.set... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16001,60 +20274,67 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + static struct xattr_handler x; + static int set_xattr_h( struct dentry *d, const char *n, + const void *b, size_t s, int f, int h) + { return 0; } int main () { - struct super_operations sops; - sops.read_inode(NULL); + x.set = set_xattr_h; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_READ_INODE 1 +#define HAVE_XATTR_HANDLER_SET_SIX_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if kernel super_operations contains drop_inode field" >&5 -echo $ECHO_N "checking if kernel super_operations contains drop_inode field... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for const s_xattr member in super_block struct" >&5 +$as_echo_n "checking for const s_xattr member in super_block struct... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16063,60 +20343,65 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include + #include + struct super_block sb; + const struct xattr_handler *x[] = { NULL }; int main () { - struct super_operations sops; - sops.drop_inode(NULL); + sb.s_xattr = x; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_DROP_INODE 1 +#define HAVE_CONST_S_XATTR_IN_SUPERBLOCK 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if kernel super_operations contains put_inode field" >&5 -echo $ECHO_N "checking if kernel super_operations contains put_inode field... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking stddef.h true/false enum" >&5 +$as_echo_n "checking stddef.h true/false enum... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16125,60 +20410,59 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include + int f = true; int main () { - struct super_operations sops; - sops.put_inode(NULL); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_PUT_INODE 1 +#define HAVE_TRUE_FALSE_ENUM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if mount.h defines MNT_NOATIME" >&5 -echo $ECHO_N "checking if mount.h defines MNT_NOATIME... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for dentry argument in fsync" >&5 +$as_echo_n "checking for dentry argument in fsync... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16187,59 +20471,62 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include + static struct file_operations f; + static int local_fsync(struct file *f, struct dentry *d, int i) + { return 0; } int main () { - int flag = MNT_NOATIME; + f.fsync = local_fsync; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_MNT_NOATIME 1 +#define HAVE_FSYNC_DENTRY_PARAM 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking if mount.h defines MNT_NODIRATIME" >&5 -echo $ECHO_N "checking if mount.h defines MNT_NODIRATIME... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for unlocked_ioctl in file_operations" >&5 +$as_echo_n "checking for unlocked_ioctl in file_operations... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16248,248 +20535,257 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include + #include + static struct file_operations f; int main () { - int flag = MNT_NODIRATIME; + f.unlocked_ioctl = NULL; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_MNT_NODIRATIME 1 +#define HAVE_UNLOCKED_IOCTL_HANDLER 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for d_alloc_anon" >&5 -echo $ECHO_N "checking for d_alloc_anon... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for inode_setattr" >&5 +$as_echo_n "checking for inode_setattr... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + struct iattr *iattr; + struct inode *inode; + int ret; int main () { - struct inode *i; - d_alloc_anon(i); + ret = inode_setattr(inode, iattr); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_D_ALLOC_ANON 1 +#define HAVE_INODE_SETATTR 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for s_dirty in struct super_block" >&5 -echo $ECHO_N "checking for s_dirty in struct super_block... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for three-param dentry_operations.d_hash" >&5 +$as_echo_n "checking for three-param dentry_operations.d_hash... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_hash_t(const struct dentry *d, + const struct inode *i, + struct qstr * q) + { return 0; } int main () { - struct super_block *s; - list_empty(&s->s_dirty); + d.d_hash = d_hash_t; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_SB_DIRTY_LIST 1 +#define HAVE_THREE_PARAM_D_HASH 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for current_fsuid" >&5 -echo $ECHO_N "checking for current_fsuid... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for two-param dentry_operations.d_hash with const" >&5 +$as_echo_n "checking for two-param dentry_operations.d_hash with const... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - #include + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_hash_t(const struct dentry *d, + struct qstr * q) + { return 0; } int main () { - int uid = current_fsuid(); + d.d_hash = d_hash_t; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CURRENT_FSUID 1 +#define HAVE_TWO_PARAM_D_HASH_WITH_CONST 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - echo "$as_me:$LINENO: checking if kernel backing_dev_info struct has a name field" >&5 -echo $ECHO_N "checking if kernel backing_dev_info struct has a name field... $ECHO_C" >&6 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for seven-param dentry_operations.d_compare" >&5 +$as_echo_n "checking for seven-param dentry_operations.d_compare... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16499,130 +20795,137 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - #include + #include + static struct dentry_operations d; + static int d_compare_t(const struct dentry *d1, + const struct inode *i1, + const struct dentry *d2, + const struct inode *i2, + unsigned int len, + const char *str, + const struct qstr *qstr) + { return 0; } int main () { - struct backing_dev_info foo = - { - .name = "foo" - }; + d.d_compare = d_compare_t; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BACKING_DEV_INFO_NAME 1 +#define HAVE_SEVEN_PARAM_D_COMPARE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for bdi_init" >&5 -echo $ECHO_N "checking for bdi_init... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for five-param dentry_operations.d_compare" >&5 +$as_echo_n "checking for five-param dentry_operations.d_compare... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ + #define __KERNEL__ #include - #include + #include + static struct dentry_operations d; + static int d_compare_t(const struct dentry *d1, + const struct dentry *d2, + unsigned int len, + const char *str, + const struct qstr *qstr) + { return 0; } int main () { - int ret = bdi_init(NULL); + d.d_compare = d_compare_t; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_BDI_INIT 1 +#define HAVE_FIVE_PARAM_D_COMPARE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking whether struct ctl_table has ctl_name" >&5 -echo $ECHO_N "checking whether struct ctl_table has ctl_name... $ECHO_C" >&6 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for constified dentry_operations.d_delete" >&5 +$as_echo_n "checking for constified dentry_operations.d_delete... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16631,58 +20934,63 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - static struct ctl_table c = { .ctl_name = 0, }; + #include + #include + static struct dentry_operations d; + static int d_delete_t(const struct dentry *d) + { return 0; } int main () { + d.d_delete = d_delete_t; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CTL_NAME 1 +#define HAVE_D_DELETE_CONST 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking whether struct ctl_table has strategy" >&5 -echo $ECHO_N "checking whether struct ctl_table has strategy... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + { $as_echo "$as_me:$LINENO: checking for dentry.d_count atomic_t type" >&5 +$as_echo_n "checking for dentry.d_count atomic_t type... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16691,61 +20999,62 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - static struct ctl_table c = { .strategy = 0, }; + #include + #include + struct dentry d; + atomic_t x; int main () { + x = d.d_count; + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_STRATEGY_NAME 1 +#define HAVE_DENTRY_D_COUNT_ATOMIC 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for five-param xattr_handler.get" >&5 -echo $ECHO_N "checking for five-param xattr_handler.get... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dentry with lockref struct" >&5 +$as_echo_n "checking for dentry with lockref struct... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16754,66 +21063,62 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int get_xattr_h( struct dentry *d, const char *n, - void *b, size_t s, int h) - { return 0; } + #include + #include + struct dentry d; + unsigned int x; int main () { - x.get = get_xattr_h; + x = d.d_lockref.count ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_XATTR_HANDLER_GET_FIVE_PARAM 1 +#define HAVE_DENTRY_LOCKREF_STRUCT 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - tmp_cflags=$CFLAGS +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags + + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for six-param xattr_handler.set" >&5 -echo $ECHO_N "checking for six-param xattr_handler.set... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for three-param inode_operations permission" >&5 +$as_echo_n "checking for three-param inode_operations permission... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16822,67 +21127,62 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - #include - static struct xattr_handler x; - static int set_xattr_h( struct dentry *d, const char *n, - const void *b, size_t s, int f, int h) - { return 0; } + #include + struct inode_operations i; + int p(struct inode *i, int mode, unsigned int flags) + { return 0; } int main () { - x.set = set_xattr_h; + i.permission = p; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_XATTR_HANDLER_SET_SIX_PARAM 1 +#define HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for const s_xattr member in super_block struct" >&5 -echo $ECHO_N "checking for const s_xattr member in super_block struct... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for three-param acl_check of generic_permission" >&5 +$as_echo_n "checking for three-param acl_check of generic_permission... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16892,64 +21192,61 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - #include - struct super_block sb; - const struct xattr_handler *x[] = { NULL }; + struct inode *i; + int p(struct inode *i, int mode, unsigned int flags) + { return 0; } int main () { - sb.s_xattr = x; + generic_permission(i, 0, 0, p); ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_CONST_S_XATTR_IN_SUPERBLOCK 1 +#define HAVE_THREE_PARAM_ACL_CHECK 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking stddef.h true/false enum" >&5 -echo $ECHO_N "checking stddef.h true/false enum... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for SPIN_LOCK_UNLOCKED " >&5 +$as_echo_n "checking for SPIN_LOCK_UNLOCKED ... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -16958,8 +21255,9 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __KERNEL__ - #include - int f = true; + #include + spinlock_t test_lock = SPIN_LOCK_UNLOCKED; + struct inode *i; int main () @@ -16970,50 +21268,46 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_TRUE_FALSE_ENUM 1 +#define HAVE_SPIN_LOCK_UNLOCKED 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for dentry argument in fsync" >&5 -echo $ECHO_N "checking for dentry argument in fsync... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for get_sb " >&5 +$as_echo_n "checking for get_sb ... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17023,64 +21317,59 @@ cat >>conftest.$ac_ext <<_ACEOF #define __KERNEL__ #include - static struct file_operations f; - static int local_fsync(struct file *f, struct dentry *d, int i) - { return 0; } + struct file_system_type f; int main () { - f.fsync = local_fsync; + f.get_sb = NULL; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_FSYNC_DENTRY_PARAM 1 +#define HAVE_GET_SB_MEMBER_FILE_SYSTEM_TYPE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for unlocked_ioctl in file_operations" >&5 -echo $ECHO_N "checking for unlocked_ioctl in file_operations... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dirty_inode flag" >&5 +$as_echo_n "checking for dirty_inode flag... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -17088,1201 +21377,996 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - static struct file_operations f; + #define __KERNEL__ + #include + void di(struct inode *i, int f) + { + return; + } int main () { - f.unlocked_ioctl = NULL; + struct super_operations s; + s.dirty_inode = di; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF -#define HAVE_UNLOCKED_IOCTL_HANDLER 1 +#define HAVE_DIRTY_INODE_FLAGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for inode_setattr" >&5 -echo $ECHO_N "checking for inode_setattr... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ + CFLAGS=$oldcflags + + + +cat >>confdefs.h <<\_ACEOF +#define WITH_LINUX_KMOD 1 _ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - #define __KERNEL__ - #include - struct iattr *iattr; - struct inode *inode; - int ret; +fi -int -main () +# Check whether --enable-threaded-kmod-helper was given. +if test "${enable_threaded_kmod_helper+set}" = set; then + enableval=$enable_threaded_kmod_helper; if test "x$enableval" = "xyes" ; then + THREADED_KMOD_HELPER=yes + fi + +fi + + + +BUILD_ABSOLUTE_TOP=`pwd` +SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"` +SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd` + + + + + + + + +# Check whether --enable-fast was given. +if test "${enable_fast+set}" = set; then + enableval=$enable_fast; +if test "x$USR_CFLAGS_SET" = "xno"; then + CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG" +fi + +fi + + +# Check whether --enable-opt was given. +if test "${enable_opt+set}" = set; then + enableval=$enable_opt; if test "x$enableval" = "xyes" ; then + CC_OPT=-O2 +else + CC_OPT=-O0 +fi +else + CC_OPT=-O2 +fi + + + +test_for_fuse() { + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_HAVE_PKGCONFIG+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$HAVE_PKGCONFIG"; then + ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_HAVE_PKGCONFIG="yes" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS - ret = inode_setattr(inode, iattr); + test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" +fi +fi +HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG +if test -n "$HAVE_PKGCONFIG"; then + { $as_echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 +$as_echo "$HAVE_PKGCONFIG" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi - ; - return 0; + + if test "x$HAVE_PKGCONFIG" = "xyes" ; then + { $as_echo "$as_me:$LINENO: checking for FUSE library" >&5 +$as_echo_n "checking for FUSE library... " >&6; } + if `pkg-config --exists fuse` ; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + FUSE_LDFLAGS=`pkg-config --libs fuse` + FUSE_CFLAGS=`pkg-config --cflags fuse` + + + + BUILD_FUSE="1" + + else + { { $as_echo "$as_me:$LINENO: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&5 +$as_echo "$as_me: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&2;} + { (exit 1); exit 1; }; } + fi + else + { { $as_echo "$as_me:$LINENO: error: FUSE: pkg-config not available. Please install pkg-config." >&5 +$as_echo "$as_me: error: FUSE: pkg-config not available. Please install pkg-config." >&2;} + { (exit 1); exit 1; }; } + fi } -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_INODE_SETATTR 1 -_ACEOF +# Check whether --enable-fuse was given. +if test "${enable_fuse+set}" = set; then + enableval=$enable_fuse; +if test "x$enableval" = "xyes" ; then + test_for_fuse + CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__" +fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +# default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast +if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then + CFLAGS="$CFLAGS -g $CC_OPT" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for three-param dentry_operations.d_hash" >&5 -echo $ECHO_N "checking for three-param dentry_operations.d_hash... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_hash_t(const struct dentry *d, - const struct inode *i, - struct qstr * q) - { return 0; } -int -main () -{ - d.d_hash = d_hash_t; +STRICT_CFLAGS= +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; STRICT_CFLAGS=1 +fi - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_THREE_PARAM_D_HASH 1 -_ACEOF +# Check whether --enable-verbose-build was given. +if test "${enable_verbose_build+set}" = set; then + enableval=$enable_verbose_build; QUIET_COMPILE=0 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + QUIET_COMPILE=1 +fi -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for seven-param dentry_operations.d_compare" >&5 -echo $ECHO_N "checking for seven-param dentry_operations.d_compare... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +test_for_epoll() +{ + +for ac_header in sys/epoll.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_compare_t(const struct dentry *d1, - const struct inode *i1, - const struct dentry *d2, - const struct inode *i2, - unsigned int len, - const char *str, - const struct qstr *qstr) - { return 0; } - -int -main () -{ - - d.d_compare = d_compare_t; - - ; - return 0; -} +$ac_includes_default +#include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_SEVEN_PARAM_D_COMPARE 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for constified dentry_operations.d_delete" >&5 -echo $ECHO_N "checking for constified dentry_operations.d_delete... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - #include - static struct dentry_operations d; - static int d_delete_t(const struct dentry *d) - { return 0; } - -int -main () -{ - - d.d_delete = d_delete_t; - - ; - return 0; -} +#include <$ac_header> _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_D_DELETE_CONST 1 -_ACEOF + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +fi +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for dentry.d_count atomic_t type" >&5 -echo $ECHO_N "checking for dentry.d_count atomic_t type... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +done + + { $as_echo "$as_me:$LINENO: checking for epoll functions" >&5 +$as_echo_n "checking for epoll functions... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - #include - struct dentry d; - atomic_t x; - +#include int main () { - x = d.d_count; + int fd; + fd = epoll_create(1); + close(fd); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DENTRY_D_COUNT_ATOMIC 1 -_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + BUILD_EPOLL=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for three-param inode_operations permission" >&5 -echo $ECHO_N "checking for three-param inode_operations permission... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - #define __KERNEL__ - #include - struct inode_operations i; - int p(struct inode *i, int mode, unsigned int flags) - { return 0; } - -int -main () -{ - i.permission = p; - - ; - return 0; +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext } -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -cat >>confdefs.h <<\_ACEOF -#define HAVE_THREE_PARAM_PERMISSION_WITH_FLAG 1 -_ACEOF +# Check whether --enable-epoll was given. +if test "${enable_epoll+set}" = set; then + enableval=$enable_epoll; + if test "x$enableval" = "xyes"; then + BUILD_EPOLL=1 + + fi else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + test_for_epoll fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for three-param acl_check of generic_permission" >&5 -echo $ECHO_N "checking for three-param acl_check of generic_permission... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + +# Check whether --enable-segv-backtrace was given. +if test "${enable_segv_backtrace+set}" = set; then + enableval=$enable_segv_backtrace; +else + { $as_echo "$as_me:$LINENO: checking if segv backtrace capable" >&5 +$as_echo_n "checking if segv backtrace capable... " >&6; } + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #define __KERNEL__ - #include - struct inode *i; - int p(struct inode *i, int mode, unsigned int flags) - { return 0; } +#include +#define __USE_GNU +#include +#if !defined(REG_EIP) && !defined(REG_RIP) + choke me +#endif int main () { - generic_permission(i, 0, 0, p); - ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + PVFS2_SEGV_BACKTRACE=1 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -cat >>confdefs.h <<\_ACEOF -#define HAVE_THREE_PARAM_ACL_CHECK 1 -_ACEOF + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + + +# Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then + enableval=$enable_shared; build_shared=$enableval else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + build_shared=no +fi -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + +if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then + { { $as_echo "$as_me:$LINENO: error: Must do --enable-shared or --enable-static or both." >&5 +$as_echo "$as_me: error: Must do --enable-shared or --enable-static or both." >&2;} + { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for SPIN_LOCK_UNLOCKED " >&5 -echo $ECHO_N "checking for SPIN_LOCK_UNLOCKED ... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +# Check whether --enable-threaded was given. +if test "${enable_threaded+set}" = set; then + enableval=$enable_threaded; if "x$THREADED_KMOD_HELPER = xyes" ; then + build_threaded=yes + { $as_echo "$as_me:$LINENO: WARNING: Ignoring --disable-threaded in favor of --enable-threaded-kmod-heaper." >&5 +$as_echo "$as_me: WARNING: Ignoring --disable-threaded in favor of --enable-threaded-kmod-heaper." >&2;} + else + build_threaded=$enableval + fi - #define __KERNEL__ - #include - spinlock_t test_lock = SPIN_LOCK_UNLOCKED; - struct inode *i; +else + build_threaded=yes +fi -int -main () -{ - ; - return 0; -} + +BUILD_USRINT= +# Check whether --enable-usrint was given. +if test "${enable_usrint+set}" = set; then + enableval=$enable_usrint; if test "x$enableval" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_BUILD 1 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + + BUILD_USRINT=1 + else cat >>confdefs.h <<\_ACEOF -#define HAVE_SPIN_LOCK_UNLOCKED 1 +#define PVFS_USRINT_BUILD 0 _ACEOF + fi + build_usrint=$enableval + else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_BUILD 1 +_ACEOF + + build_usrint=yes + BUILD_USRINT=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" - echo "$as_me:$LINENO: checking for get_sb " >&5 -echo $ECHO_N "checking for get_sb ... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + + +if test "x$build_usrint" = "xyes"; then + + +{ $as_echo "$as_me:$LINENO: checking if user library needs -lrt" >&5 +$as_echo_n "checking if user library needs -lrt... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - struct file_system_type f; - +#include int main () { - - f.get_sb = NULL; - +shm_open("foo", 0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GET_SB_MEMBER_FILE_SYSTEM_TYPE 1 -_ACEOF - + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for dirty_inode flag" >&5 -echo $ECHO_N "checking for dirty_inode flag... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF + oldlibs=$LIBS + LIBS="$LIBS -lrt" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - - #define __KERNEL__ - #include - void di(struct inode *i, int f) - { - return; - } - +#include int main () { - - struct super_operations s; - s.dirty_inode = di; - +shm_open("foo", 0, 0); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DIRTY_INODE_FLAGS 1 -_ACEOF + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + LIB_NEEDS_LIBRT=1 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { { $as_echo "$as_me:$LINENO: error: failed attempting to link shm_open" >&5 +$as_echo "$as_me: error: failed attempting to link shm_open" >&2;} + { (exit 1); exit 1; }; } +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + LIBS=$oldlibs fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CFLAGS=$tmp_cflags - CFLAGS=$oldcflags +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +fi +USRINT_KMOUNT= +# Check whether --enable-usrint-kmount was given. +if test "${enable_usrint_kmount+set}" = set; then + enableval=$enable_usrint_kmount; if test "x$enableval" = "xyes" ; then + if test "x$BUILD_KERNEL" = "x1" -o "x$BUILD_FUSE" = "x1" ; then cat >>confdefs.h <<\_ACEOF -#define WITH_LINUX_KMOD 1 +#define PVFS_USRINT_KMOUNT 1 +_ACEOF + + USRINT_KMOUNT=1 + else + { { $as_echo "$as_me:$LINENO: error: Assume FS mounted but neither kernel nor FUSE build " >&5 +$as_echo "$as_me: error: Assume FS mounted but neither kernel nor FUSE build " >&2;} + { (exit 1); exit 1; }; } + fi +else + +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_KMOUNT 0 _ACEOF fi +else -# Check whether --enable-threaded-kmod-helper or --disable-threaded-kmod-helper was given. -if test "${enable_threaded_kmod_helper+set}" = set; then - enableval="$enable_threaded_kmod_helper" - if test "x$enableval" = "xyes" ; then - THREADED_KMOD_HELPER=yes - fi +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_KMOUNT 0 +_ACEOF -fi; +fi -BUILD_ABSOLUTE_TOP=`pwd` -SRC_RELATIVE_TOP=`echo $0 | sed -e "s|configure$||"` -SRC_ABSOLUTE_TOP=`cd $SRC_RELATIVE_TOP ; pwd` +# Check whether --enable-usrint-cwd was given. +if test "${enable_usrint_cwd+set}" = set; then + enableval=$enable_usrint_cwd; if test "x$enableval" = "xyes" ; then +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 1 +_ACEOF +else +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 0 +_ACEOF +fi +else + if test "x$USRINT_KMOUNT" = "x1" ; then +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 0 +_ACEOF +else -# Check whether --enable-fast or --disable-fast was given. -if test "${enable_fast+set}" = set; then - enableval="$enable_fast" +cat >>confdefs.h <<\_ACEOF +#define PVFS_USRINT_CWD 1 +_ACEOF -if test "x$USR_CFLAGS_SET" = "xno"; then - CFLAGS="$CFLAGS -DNDEBUG -O3 -DGOSSIP_DISABLE_DEBUG" +fi fi -fi; -test_for_fuse() -{ - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_HAVE_PKGCONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$HAVE_PKGCONFIG"; then - ac_cv_prog_HAVE_PKGCONFIG="$HAVE_PKGCONFIG" # Let the user override the test. +# Check whether --enable-stdio-redefstream was given. +if test "${enable_stdio_redefstream+set}" = set; then + enableval=$enable_stdio_redefstream; if test "x$enableval" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define PVFS_STDIO_REDEFSTREAM 1 +_ACEOF + else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_HAVE_PKGCONFIG="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - test -z "$ac_cv_prog_HAVE_PKGCONFIG" && ac_cv_prog_HAVE_PKGCONFIG="no" -fi +cat >>confdefs.h <<\_ACEOF +#define PVFS_STDIO_REDEFSTREAM 0 +_ACEOF + fi -HAVE_PKGCONFIG=$ac_cv_prog_HAVE_PKGCONFIG -if test -n "$HAVE_PKGCONFIG"; then - echo "$as_me:$LINENO: result: $HAVE_PKGCONFIG" >&5 -echo "${ECHO_T}$HAVE_PKGCONFIG" >&6 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define PVFS_STDIO_REDEFSTREAM 1 +_ACEOF + + fi - if test "x$HAVE_PKGCONFIG" = "xyes" ; then - echo "$as_me:$LINENO: checking for FUSE library" >&5 -echo $ECHO_N "checking for FUSE library... $ECHO_C" >&6 - if `pkg-config --exists fuse` ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - FUSE_LDFLAGS=`pkg-config --libs fuse` - FUSE_CFLAGS=`pkg-config --cflags fuse` +# Check whether --enable-malloc-redef was given. +if test "${enable_malloc_redef+set}" = set; then + enableval=$enable_malloc_redef; if test "x$enableval" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_REDEF 1 +_ACEOF + + MALLOC_REDEF=1 +else +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_REDEF 0 +_ACEOF - BUILD_FUSE="1" +fi +else - else - { { echo "$as_me:$LINENO: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&5 -echo "$as_me: error: FUSE: FUSE library not found. Check LD_LIBRARY_PATH." >&2;} - { (exit 1); exit 1; }; } - fi - else - { { echo "$as_me:$LINENO: error: FUSE: pkg-config not available. Please install pkg-config." >&5 -echo "$as_me: error: FUSE: pkg-config not available. Please install pkg-config." >&2;} - { (exit 1); exit 1; }; } - fi -} +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_REDEF 1 +_ACEOF -# Check whether --enable-fuse or --disable-fuse was given. -if test "${enable_fuse+set}" = set; then - enableval="$enable_fuse" +MALLOC_REDEF=1 -if test "x$enableval" = "xyes" ; then - test_for_fuse - CFLAGS="$CFLAGS -D__PVFS2_ENABLE_FUSE__" fi -fi; -# default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast -if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then - CFLAGS="$CFLAGS -g -O2" -fi +# Check whether --enable-malloc-magic was given. +if test "${enable_malloc_magic+set}" = set; then + enableval=$enable_malloc_magic; if test "x$enableval" = "xyes" ; then +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_MAGIC 1 +_ACEOF +else +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_MAGIC 0 +_ACEOF +fi +else -STRICT_CFLAGS= -# Check whether --enable-strict or --disable-strict was given. -if test "${enable_strict+set}" = set; then - enableval="$enable_strict" - STRICT_CFLAGS=1 -fi; +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_MAGIC 1 +_ACEOF -# Check whether --enable-verbose-build or --disable-verbose-build was given. -if test "${enable_verbose_build+set}" = set; then - enableval="$enable_verbose_build" - QUIET_COMPILE=0 -else - QUIET_COMPILE=1 -fi; +fi +# Check whether --enable-malloc-zero was given. +if test "${enable_malloc_zero+set}" = set; then + enableval=$enable_malloc_zero; if test "x$enableval" = "xyes" ; then -test_for_epoll() -{ +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_ZERO 1 +_ACEOF -for ac_header in sys/epoll.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else - # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_ZERO 0 _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 +else -# Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_ZERO 1 _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no + fi -rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +# Check whether --enable-malloc-free-zero was given. +if test "${enable_malloc_free_zero+set}" = set; then + enableval=$enable_malloc_free_zero; if test "x$enableval" = "xyes" ; then + +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_FREE_ZERO 1 +_ACEOF + else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_FREE_ZERO 0 +_ACEOF fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +else + +cat >>confdefs.h <<\_ACEOF +#define PVFS_MALLOC_FREE_ZERO 1 _ACEOF + fi -done - echo "$as_me:$LINENO: checking for epoll functions" >&5 -echo $ECHO_N "checking for epoll functions... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: checking for O_CLOEXEC flag in open()" >&5 +$as_echo_n "checking for O_CLOEXEC flag in open()... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include + + #include + int main () { - int fd; - fd = epoll_create(1); - close(fd); + int flags; + flags = O_CLOEXEC; ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - BUILD_EPOLL=1 - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -} - -# Check whether --enable-epoll or --disable-epoll was given. -if test "${enable_epoll+set}" = set; then - enableval="$enable_epoll" + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } - if test "x$enableval" = "xyes"; then - BUILD_EPOLL=1 +cat >>confdefs.h <<\_ACEOF +#define HAVE_O_CLOEXEC 1 +_ACEOF - fi else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 - test_for_epoll + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -fi; +fi -# Check whether --enable-segv-backtrace or --disable-segv-backtrace was given. -if test "${enable_segv_backtrace+set}" = set; then - enableval="$enable_segv_backtrace" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me:$LINENO: checking if segv backtrace capable" >&5 -echo $ECHO_N "checking if segv backtrace capable... $ECHO_C" >&6 - cat >conftest.$ac_ext <<_ACEOF +{ $as_echo "$as_me:$LINENO: checking if dlfns needs explicit library request" >&5 +$as_echo_n "checking if dlfns needs explicit library request... " >&6; } +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include -#define __USE_GNU -#include -#if !defined(REG_EIP) && !defined(REG_RIP) - choke me -#endif - -int -main () -{ +#define _GNU_SOURCE 1 +#include +main() {void *p = dlsym(RTLD_DEFAULT,"sym");} - ; - return 0; -} _ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - PVFS2_SEGV_BACKTRACE=1 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -fi; + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } -# Check whether --enable-shared or --disable-shared was given. -if test "${enable_shared+set}" = set; then - enableval="$enable_shared" - build_shared=$enableval else - build_shared=no -fi; + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then - { { echo "$as_me:$LINENO: error: Must do --enable-shared or --enable-static or both." >&5 -echo "$as_me: error: Must do --enable-shared or --enable-static or both." >&2;} - { (exit 1); exit 1; }; } + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + LIBS="$LIBS -ldl" + fi -BUILD_USRINT= -# Check whether --enable-usrint or --disable-usrint was given. -if test "${enable_usrint+set}" = set; then - enableval="$enable_usrint" - if test "x$enableval" = "xyes" ; then +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext + +BUILD_UCACHE= +# Check whether --enable-ucache was given. +if test "${enable_ucache+set}" = set; then + enableval=$enable_ucache; if test "x$enableval" = "xyes" ; then cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_BUILD 1 +#define PVFS_UCACHE_ENABLE 1 _ACEOF - BUILD_USRINT=1 + BUILD_UCACHE=1 else cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_BUILD 0 +#define PVFS_UCACHE_ENABLE 0 _ACEOF fi @@ -18290,157 +22374,192 @@ fi else cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_BUILD 1 +#define PVFS_UCACHE_ENABLE 0 _ACEOF -BUILD_USRINT=1 -fi; +fi -USRINT_KMOUNT= -# Check whether --enable-usrint-kmount or --disable-usrint-kmount was given. -if test "${enable_usrint_kmount+set}" = set; then - enableval="$enable_usrint_kmount" - if test "x$enableval" = "xyes" ; then - if test "x$BUILD_KERNEL" = "x1" -o "x$BUILD_FUSE" = "x1" ; then -cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_KMOUNT 1 -_ACEOF +JAVA_HOME= - USRINT_KMOUNT=1 - else - { { echo "$as_me:$LINENO: error: Assume FS mounted but neither kernel nor FUSE build " >&5 -echo "$as_me: error: Assume FS mounted but neither kernel nor FUSE build " >&2;} +# Check whether --with-jdk was given. +if test "${with_jdk+set}" = set; then + withval=$with_jdk; + as_ac_File=`$as_echo "ac_cv_file_$withval/include/jni.h" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $withval/include/jni.h" >&5 +$as_echo_n "checking for $withval/include/jni.h... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } - fi +if test -r "$withval/include/jni.h"; then + eval "$as_ac_File=yes" else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_KMOUNT 0 +#define HAVE_JNI_H 1 _ACEOF + JAVA_HOME=$withval + +else + + { { $as_echo "$as_me:$LINENO: error: could not locate include/jni.h at the path given with --with-jdk." >&5 +$as_echo "$as_me: error: could not locate include/jni.h at the path given with --with-jdk." >&2;} + { (exit 1); exit 1; }; } + + fi + + else + with_jdk=no -cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_KMOUNT 0 -_ACEOF +fi -fi; -# Check whether --enable-usrint-cwd or --disable-usrint-cwd was given. -if test "${enable_usrint_cwd+set}" = set; then - enableval="$enable_usrint_cwd" - if test "x$enableval" = "xyes" ; then +BUILD_JNI= +# Check whether --enable-jni was given. +if test "${enable_jni+set}" = set; then + enableval=$enable_jni; if test "x$enableval" = "xyes" ; then + if test "x$JAVA_HOME" = "x"; then + { { $as_echo "$as_me:$LINENO: error: --enable-jni must be used in conjunction with --with-jdk=jdk_path." >&5 +$as_echo "$as_me: error: --enable-jni must be used in conjunction with --with-jdk=jdk_path." >&2;} + { (exit 1); exit 1; }; } + fi cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_CWD 1 +#define PVFS_JNI_ENABLE 1 _ACEOF -else + BUILD_JNI=1 + else cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_CWD 0 +#define PVFS_JNI_ENABLE 0 _ACEOF -fi + fi + else - if test "x$USRINT_KMOUNT" = "x1" ; then cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_CWD 0 +#define PVFS_JNI_ENABLE 0 _ACEOF -else -cat >>confdefs.h <<\_ACEOF -#define PVFS_USRINT_CWD 1 -_ACEOF fi -fi; -echo "$as_me:$LINENO: checking if dlfns needs explicit library request" >&5 -echo $ECHO_N "checking if dlfns needs explicit library request... $ECHO_C" >&6 -cat >conftest.$ac_ext <<_ACEOF -#define _GNU_SOURCE 1 -#include -main() {void *p = dlsym(RTLD_DEFAULT,"sym");} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +HADOOP_PREFIX= + +# Check whether --with-hadoop was given. +if test "${with_hadoop+set}" = set; then + withval=$with_hadoop; + HADOOP_PREFIX=$withval; + corepath=`ls $withval/hadoop-core*` + as_ac_File=`$as_echo "ac_cv_file_$corepath" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $corepath" >&5 +$as_echo_n "checking for $corepath... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "$corepath"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then + : +else + + { { $as_echo "$as_me:$LINENO: error: could not locate $withval/hadoop-core-*.jar at the path given with --with-hadoop." >&5 +$as_echo "$as_me: error: could not locate $withval/hadoop-core-*.jar at the path given with --with-hadoop." >&2;} + { (exit 1); exit 1; }; } + + +fi - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 + with_hadoop=no +fi - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - LIBS="$LIBS -ldl" -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -BUILD_UCACHE= -# Check whether --enable-ucache or --disable-ucache was given. -if test "${enable_ucache+set}" = set; then - enableval="$enable_ucache" - if test "x$enableval" = "xyes" ; then +BUILD_HADOOP= +# Check whether --enable-hadoop was given. +if test "${enable_hadoop+set}" = set; then + enableval=$enable_hadoop; if test "x$enableval" = "xyes" ; then + if test "x$HADOOP_PREFIX" = "x"; then + { { $as_echo "$as_me:$LINENO: error: --enable-hadoop must be used in conjunction with --with-hadoop=path." >&5 +$as_echo "$as_me: error: --enable-hadoop must be used in conjunction with --with-hadoop=path." >&2;} + { (exit 1); exit 1; }; } + fi + if test "$BUILD_JNI" != "1"; then + { { $as_echo "$as_me:$LINENO: error: --enable-hadoop must be used in conjunction with --enable-jni." >&5 +$as_echo "$as_me: error: --enable-hadoop must be used in conjunction with --enable-jni." >&2;} + { (exit 1); exit 1; }; } + fi cat >>confdefs.h <<\_ACEOF -#define PVFS_UCACHE_ENABLE 1 +#define PVFS_HADOOP_ENABLE 1 _ACEOF - BUILD_UCACHE=1 -else + BUILD_HADOOP=1 + else cat >>confdefs.h <<\_ACEOF -#define PVFS_UCACHE_ENABLE 0 +#define PVFS_HADOOP_ENABLE 0 _ACEOF -fi + fi else cat >>confdefs.h <<\_ACEOF -#define PVFS_UCACHE_ENABLE 0 +#define PVFS_HADOOP_ENABLE 0 _ACEOF -fi; + +fi + + BUILD_ACL_INTERFACE= -echo "$as_me:$LINENO: checking for user acl includes sys/acl.h acl/libacl.h" >&5 -echo $ECHO_N "checking for user acl includes sys/acl.h acl/libacl.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for user acl includes sys/acl.h acl/libacl.h" >&5 +$as_echo_n "checking for user acl includes sys/acl.h acl/libacl.h... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18460,29 +22579,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_ACL_INTERFACE=1 cat >>confdefs.h <<\_ACEOF @@ -18491,19 +22606,20 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } BUILD_ACL_INTERFACE=0 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for scandir compare arg using void pointers" >&5 -echo $ECHO_N "checking for scandir compare arg using void pointers... $ECHO_C" >&6 + +{ $as_echo "$as_me:$LINENO: checking for scandir compare arg using void pointers" >&5 +$as_echo_n "checking for scandir compare arg using void pointers... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18532,29 +22648,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define PVFS_SCANDIR_VOID 1 @@ -18562,20 +22674,21 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext INTELC= GNUC= -echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 -echo $ECHO_N "checking whether cc is an Intel compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 +$as_echo_n "checking whether cc is an Intel compiler... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -18596,40 +22709,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } INTELC=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$INTELC" = "x" ; then if test "x$GCC" = "xyes" ; then GNUC=1 @@ -18639,17 +22749,16 @@ fi -# Check whether --with-efence or --without-efence was given. +# Check whether --with-efence was given. if test "${with_efence+set}" = set; then - withval="$with_efence" - if test "x$withval" != "xyes" ; then + withval=$with_efence; if test "x$withval" != "xyes" ; then LDFLAGS="${LDFLAGS} -L$withval" fi -echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 -echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 +$as_echo_n "checking for malloc in -lefence... " >&6; } if test "${ac_cv_lib_efence_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lefence $LIBS" @@ -18660,57 +22769,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_efence_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_efence_malloc=no + ac_cv_lib_efence_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6 -if test $ac_cv_lib_efence_malloc = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 +$as_echo "$ac_cv_lib_efence_malloc" >&6; } +if test "x$ac_cv_lib_efence_malloc" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEFENCE 1 _ACEOF @@ -18720,85 +22830,90 @@ _ACEOF fi -fi; +fi -# Check whether --with-valgrind or --without-valgrind was given. -if test "${with_valgrind+set}" = set; then - withval="$with_valgrind" +# Check whether --with-valgrind was given. +if test "${with_valgrind+set}" = set; then + withval=$with_valgrind; found=no save_cppflags="$CPPFLAGS" - echo "$as_me:$LINENO: checking for valgrind.h usability" >&5 -echo $ECHO_N "checking for valgrind.h usability... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for valgrind.h usability" >&5 +$as_echo_n "checking for valgrind.h usability... " >&6; } if test "x$withval" = xyes ; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then found=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$found = xno ; then CPPFLAGS="$CPPFLAGS -I/usr/include/valgrind" cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then found=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -CPPFLAGS="$save_cppflags" + CPPFLAGS="$save_cppflags" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else for d in $withval $withval/include \ @@ -18806,45 +22921,47 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext do CPPFLAGS="$CPPFLAGS -I$d" cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then found=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -CPPFLAGS="$save_cppflags" + CPPFLAGS="$save_cppflags" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$found = xyes ; then break fi done fi - echo "$as_me:$LINENO: result: $found" >&5 -echo "${ECHO_T}$found" >&6 + { $as_echo "$as_me:$LINENO: result: $found" >&5 +$as_echo "$found" >&6; } if test x$found = xyes ; then cat >>confdefs.h <<\_ACEOF @@ -18853,19 +22970,19 @@ _ACEOF fi -fi; +fi + if test "x$NEED_BERKELEY_DB" = "xyes" ; then -# Check whether --with-db or --without-db was given. +# Check whether --with-db was given. if test "${with_db+set}" = set; then - withval="$with_db" - + withval=$with_db; dbpath=${withval} DB_LDFLAGS= - echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for db library" >&5 +$as_echo_n "checking for db library... " >&6; } oldlibs=$LIBS lib=notfound @@ -18873,78 +22990,85 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldcflags=$CFLAGS for dbheader in db4 db3 notfound; do cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/$dbheader/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/$dbheader/" break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 -echo "$as_me: error: Invalid libdb path specified. No db.h found. +$as_echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -18969,38 +23093,77 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lib=db else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags else + DBDOTH="" + for i in `find /usr/include -name db.h` + do + if test "$i" = "/usr/include/db.h" + then + DBDOTH="" + break + else + DBDOTH="$i" + fi + done + if test "$DBDOTH" != "" + then + DB_CFLAGS="-I `dirname $DBDOTH`" + CFLAGS="$CFLAGS $DB_CFLAGS" + DBPACKAGE=`rpm -qf $DBDOTH` + else + DBPACKAGE="" + fi + + strings /etc/ld.so.cache | grep -q /lib64 + if test "$?" = "0" + then + LIBPATH="/usr/lib64" + else + LIBPATH="/usr/lib" + fi + + for i in `find "$LIBPATH" -name libdb.so` + do + LIBPACKAGE=`rpm -qf $i` + if test "$DBPACKAGE" = "$LIBPACKAGE" + then + LDFLAGS="$LDFLAGS -L"`dirname $i` + fi + done + for lib in db4 db3 db notfound; do LIBS="${oldlibs} -l$lib -lpthread" DB_LIB="-l$lib" @@ -19020,53 +23183,55 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$oldlibs if test "x$lib" = "xnotfound" ; then - { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 -echo "$as_me: error: could not find DB libraries" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +$as_echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6 + { $as_echo "$as_me:$LINENO: result: $lib" >&5 +$as_echo "$lib" >&6; } fi - echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -19098,29 +23263,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 @@ -19128,18 +23289,19 @@ _ACEOF have_dbenv_parameter_to_db_error_callback=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_dbenv_parameter_to_db_error_callback=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +$as_echo_n "checking if third parameter to error callback function is const... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19169,47 +23331,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19236,29 +23395,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -19266,19 +23421,20 @@ _ACEOF have_db_stat_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_db_stat_malloc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19304,29 +23460,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -19334,19 +23486,20 @@ _ACEOF have_txnid_param_to_stat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_txnid_param_to_stat=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +$as_echo_n "checking for txnid parameter to DB open function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19376,45 +23529,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19435,45 +23585,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19495,45 +23642,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19558,45 +23702,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking Berkeley DB version" >&5 -echo $ECHO_N "checking Berkeley DB version... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +$as_echo_n "checking Berkeley DB version... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19622,40 +23763,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } HAVE_DB_OLD=0 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } HAVE_DB_OLD=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" else @@ -19663,8 +23801,8 @@ else dbpath="" DB_LDFLAGS= - echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for db library" >&5 +$as_echo_n "checking for db library... " >&6; } oldlibs=$LIBS lib=notfound @@ -19672,78 +23810,85 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldcflags=$CFLAGS for dbheader in db4 db3 notfound; do cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/$dbheader/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/$dbheader/" break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 -echo "$as_me: error: Invalid libdb path specified. No db.h found. +$as_echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -19768,38 +23913,77 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lib=db else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags else + DBDOTH="" + for i in `find /usr/include -name db.h` + do + if test "$i" = "/usr/include/db.h" + then + DBDOTH="" + break + else + DBDOTH="$i" + fi + done + if test "$DBDOTH" != "" + then + DB_CFLAGS="-I `dirname $DBDOTH`" + CFLAGS="$CFLAGS $DB_CFLAGS" + DBPACKAGE=`rpm -qf $DBDOTH` + else + DBPACKAGE="" + fi + + strings /etc/ld.so.cache | grep -q /lib64 + if test "$?" = "0" + then + LIBPATH="/usr/lib64" + else + LIBPATH="/usr/lib" + fi + + for i in `find "$LIBPATH" -name libdb.so` + do + LIBPACKAGE=`rpm -qf $i` + if test "$DBPACKAGE" = "$LIBPACKAGE" + then + LDFLAGS="$LDFLAGS -L"`dirname $i` + fi + done + for lib in db4 db3 db notfound; do LIBS="${oldlibs} -l$lib -lpthread" DB_LIB="-l$lib" @@ -19819,53 +24003,55 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$oldlibs if test "x$lib" = "xnotfound" ; then - { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 -echo "$as_me: error: could not find DB libraries" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +$as_echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6 + { $as_echo "$as_me:$LINENO: result: $lib" >&5 +$as_echo "$lib" >&6; } fi - echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -19897,29 +24083,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 @@ -19927,18 +24109,19 @@ _ACEOF have_dbenv_parameter_to_db_error_callback=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_dbenv_parameter_to_db_error_callback=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +$as_echo_n "checking if third parameter to error callback function is const... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -19968,47 +24151,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20035,29 +24215,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -20065,19 +24241,20 @@ _ACEOF have_db_stat_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_db_stat_malloc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20103,29 +24280,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -20133,19 +24306,20 @@ _ACEOF have_txnid_param_to_stat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_txnid_param_to_stat=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +$as_echo_n "checking for txnid parameter to DB open function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20175,45 +24349,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20234,45 +24405,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20294,45 +24462,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20357,45 +24522,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking Berkeley DB version" >&5 -echo $ECHO_N "checking Berkeley DB version... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +$as_echo_n "checking Berkeley DB version... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20421,50 +24583,48 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } HAVE_DB_OLD=0 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } HAVE_DB_OLD=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" -fi; +fi + fi if test "x$BUILD_SERVER" = "x1"; then -echo "$as_me:$LINENO: checking if server lib needs -lrt" >&5 -echo $ECHO_N "checking if server lib needs -lrt... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking if server lib needs -lrt" >&5 +$as_echo_n "checking if server lib needs -lrt... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20483,31 +24643,30 @@ lio_listio(LIO_NOWAIT, NULL, 0, NULL); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 @@ -20531,45 +24690,48 @@ lio_listio(LIO_NOWAIT, NULL, 0, NULL); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then NEEDS_LIBRT=1 - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: failed attempting to link lio_listio" >&5 -echo "$as_me: error: failed attempting to link lio_listio" >&2;} + { { $as_echo "$as_me:$LINENO: error: failed attempting to link lio_listio" >&5 +$as_echo "$as_me: error: failed attempting to link lio_listio" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$oldlibs fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -20583,6 +24745,8 @@ cat >>confdefs.h <<\_ACEOF _ACEOF TARGET_OS_DARWIN=1 + CFLAGS="$CFLAGS -D__DARWIN__" + ;; *linux*) @@ -20596,8 +24760,8 @@ _ACEOF ;; esac -echo "$as_me:$LINENO: checking for gethostbyname" >&5 -echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5 +$as_echo_n "checking for gethostbyname... " >&6; } oldcflags="$CFLAGS" CFLAGS="$USR_CFLAGS" cat >conftest.$ac_ext <<_ACEOF @@ -20620,46 +24784,43 @@ gethostbyname("localhost"); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYNAME 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } WARN_ABOUT_HOSTNAMES="yes" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for gethostbyaddr" >&5 -echo $ECHO_N "checking for gethostbyaddr... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for gethostbyaddr" >&5 +$as_echo_n "checking for gethostbyaddr... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20681,104 +24842,101 @@ gethostbyaddr((void *)&peer.sin_addr.s_addr, sizeof(struct in_addr), AF_INET); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GETHOSTBYADDR 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" BUILD_BMI_TCP=1 -# Check whether --with-bmi-tcp or --without-bmi-tcp was given. +# Check whether --with-bmi-tcp was given. if test "${with_bmi_tcp+set}" = set; then - withval="$with_bmi_tcp" - if test -z "$withval" -o "$withval" = yes ; then + withval=$with_bmi_tcp; if test -z "$withval" -o "$withval" = yes ; then : elif test "$withval" = no ; then BUILD_BMI_TCP= else - { { echo "$as_me:$LINENO: error: Option --with-tcp requires yes/no argument." >&5 -echo "$as_me: error: Option --with-tcp requires yes/no argument." >&2;} + { { $as_echo "$as_me:$LINENO: error: Option --with-tcp requires yes/no argument." >&5 +$as_echo "$as_me: error: Option --with-tcp requires yes/no argument." >&2;} { (exit 1); exit 1; }; } fi -fi; +fi + gm_home= -# Check whether --with-gm or --without-gm was given. +# Check whether --with-gm was given. if test "${with_gm+set}" = set; then - withval="$with_gm" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-gm requires the path to your GM tree." >&5 -echo "$as_me: error: Option --with-gm requires the path to your GM tree." >&2;} + withval=$with_gm; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-gm requires the path to your GM tree." >&5 +$as_echo "$as_me: error: Option --with-gm requires the path to your GM tree." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then gm_home="$withval" fi -fi; +fi + -# Check whether --with-gm-includes or --without-gm-includes was given. +# Check whether --with-gm-includes was given. if test "${with_gm_includes+set}" = set; then - withval="$with_gm_includes" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-gm-includes requires path to GM headers." >&5 -echo "$as_me: error: Option --with-gm-includes requires path to GM headers." >&2;} + withval=$with_gm_includes; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-gm-includes requires path to GM headers." >&5 +$as_echo "$as_me: error: Option --with-gm-includes requires path to GM headers." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then GM_INCDIR="$withval" fi -fi; +fi + -# Check whether --with-gm-libs or --without-gm-libs was given. +# Check whether --with-gm-libs was given. if test "${with_gm_libs+set}" = set; then - withval="$with_gm_libs" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-gm-libs requires path to GM libraries." >&5 -echo "$as_me: error: Option --with-gm-libs requires path to GM libraries." >&2;} + withval=$with_gm_libs; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-gm-libs requires path to GM libraries." >&5 +$as_echo "$as_me: error: Option --with-gm-libs requires path to GM libraries." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then GM_LIBDIR="$withval" fi -fi; +fi + if test -n "$gm_home" ; then if test -z "$GM_INCDIR"; then GM_INCDIR=$gm_home/include @@ -20794,17 +24952,17 @@ fi; save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm" if test "${ac_cv_header_gm_h+set}" = set; then - echo "$as_me:$LINENO: checking for gm.h" >&5 -echo $ECHO_N "checking for gm.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for gm.h" >&5 +$as_echo_n "checking for gm.h... " >&6; } if test "${ac_cv_header_gm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gm_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 +$as_echo "$ac_cv_header_gm_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking gm.h usability" >&5 -echo $ECHO_N "checking gm.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking gm.h usability" >&5 +$as_echo_n "checking gm.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20815,41 +24973,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking gm.h presence" >&5 -echo $ECHO_N "checking gm.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking gm.h presence" >&5 +$as_echo_n "checking gm.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -20858,91 +25013,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: gm.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gm.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: gm.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: gm.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gm.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gm.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gm.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gm.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gm.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gm.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gm.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: gm.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: gm.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: gm.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: gm.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: gm.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: gm.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: gm.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: gm.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for gm.h" >&5 -echo $ECHO_N "checking for gm.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for gm.h" >&5 +$as_echo_n "checking for gm.h... " >&6; } if test "${ac_cv_header_gm_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_gm_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 -echo "${ECHO_T}$ac_cv_header_gm_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_gm_h" >&5 +$as_echo "$ac_cv_header_gm_h" >&6; } fi -if test $ac_cv_header_gm_h = yes; then +if test "x$ac_cv_header_gm_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header gm.h not found." >&5 -echo "$as_me: error: Header gm.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header gm.h not found." >&5 +$as_echo "$as_me: error: Header gm.h not found." >&2;} { (exit 1); exit 1; }; } fi if test ! -f $GM_LIBDIR/libgm.so ; then if test ! -f $GM_LIBDIR/libgm.a ; then - { { echo "$as_me:$LINENO: error: Neither GM library libgm.so or libgm.a found." >&5 -echo "$as_me: error: Neither GM library libgm.so or libgm.a found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Neither GM library libgm.so or libgm.a found." >&5 +$as_echo "$as_me: error: Neither GM library libgm.so or libgm.a found." >&2;} { (exit 1); exit 1; }; } fi fi @@ -20957,44 +25105,44 @@ echo "$as_me: error: Neither GM library libgm.so or libgm.a found." >&2;} mx_home= -# Check whether --with-mx or --without-mx was given. +# Check whether --with-mx was given. if test "${with_mx+set}" = set; then - withval="$with_mx" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-mx requires the path to your MX tree." >&5 -echo "$as_me: error: Option --with-mx requires the path to your MX tree." >&2;} + withval=$with_mx; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-mx requires the path to your MX tree." >&5 +$as_echo "$as_me: error: Option --with-mx requires the path to your MX tree." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then mx_home="$withval" fi -fi; +fi + -# Check whether --with-mx-includes or --without-mx-includes was given. +# Check whether --with-mx-includes was given. if test "${with_mx_includes+set}" = set; then - withval="$with_mx_includes" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-mx-includes requires path to MX headers." >&5 -echo "$as_me: error: Option --with-mx-includes requires path to MX headers." >&2;} + withval=$with_mx_includes; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-mx-includes requires path to MX headers." >&5 +$as_echo "$as_me: error: Option --with-mx-includes requires path to MX headers." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then MX_INCDIR="$withval" fi -fi; +fi + -# Check whether --with-mx-libs or --without-mx-libs was given. +# Check whether --with-mx-libs was given. if test "${with_mx_libs+set}" = set; then - withval="$with_mx_libs" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-mx-libs requires path to MX libraries." >&5 -echo "$as_me: error: Option --with-mx-libs requires path to MX libraries." >&2;} + withval=$with_mx_libs; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-mx-libs requires path to MX libraries." >&5 +$as_echo "$as_me: error: Option --with-mx-libs requires path to MX libraries." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then MX_LIBDIR="$withval" fi -fi; +fi + if test -n "$mx_home" ; then if test -z "$MX_INCDIR"; then MX_INCDIR=$mx_home/include @@ -21010,17 +25158,17 @@ fi; save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx" if test "${ac_cv_header_myriexpress_h+set}" = set; then - echo "$as_me:$LINENO: checking for myriexpress.h" >&5 -echo $ECHO_N "checking for myriexpress.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for myriexpress.h" >&5 +$as_echo_n "checking for myriexpress.h... " >&6; } if test "${ac_cv_header_myriexpress_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 -echo "${ECHO_T}$ac_cv_header_myriexpress_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 +$as_echo "$ac_cv_header_myriexpress_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking myriexpress.h usability" >&5 -echo $ECHO_N "checking myriexpress.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking myriexpress.h usability" >&5 +$as_echo_n "checking myriexpress.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21031,41 +25179,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking myriexpress.h presence" >&5 -echo $ECHO_N "checking myriexpress.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking myriexpress.h presence" >&5 +$as_echo_n "checking myriexpress.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21074,91 +25219,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: myriexpress.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: myriexpress.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: myriexpress.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: myriexpress.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: myriexpress.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: myriexpress.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: myriexpress.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: myriexpress.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: myriexpress.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for myriexpress.h" >&5 -echo $ECHO_N "checking for myriexpress.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for myriexpress.h" >&5 +$as_echo_n "checking for myriexpress.h... " >&6; } if test "${ac_cv_header_myriexpress_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_myriexpress_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 -echo "${ECHO_T}$ac_cv_header_myriexpress_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_myriexpress_h" >&5 +$as_echo "$ac_cv_header_myriexpress_h" >&6; } fi -if test $ac_cv_header_myriexpress_h = yes; then +if test "x$ac_cv_header_myriexpress_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header myriexpress.h not found." >&5 -echo "$as_me: error: Header myriexpress.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header myriexpress.h not found." >&5 +$as_echo "$as_me: error: Header myriexpress.h not found." >&2;} { (exit 1); exit 1; }; } fi if test ! -f $MX_LIBDIR/libmyriexpress.so ; then if test ! -f $MX_LIBDIR/libmyriexpress.a ; then - { { echo "$as_me:$LINENO: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&5 -echo "$as_me: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&5 +$as_echo "$as_me: error: Neither MX library libmyriexpress.so or libmyriexpress.a found." >&2;} { (exit 1); exit 1; }; } fi fi @@ -21177,8 +25315,8 @@ echo "$as_me: error: Neither MX library libmyriexpress.so or libmyriexpress.a fo save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$MX_INCDIR" - echo "$as_me:$LINENO: checking for mx_decompose_endpoint_addr2" >&5 -echo $ECHO_N "checking for mx_decompose_endpoint_addr2... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for mx_decompose_endpoint_addr2" >&5 +$as_echo_n "checking for mx_decompose_endpoint_addr2... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21201,41 +25339,42 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Function mx_decompose_endpoint_addr2() not found." >&5 -echo "$as_me: error: Function mx_decompose_endpoint_addr2() not found." >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: Function mx_decompose_endpoint_addr2() not found." >&5 +$as_echo "$as_me: error: Function mx_decompose_endpoint_addr2() not found." >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_ldflags" @@ -21247,44 +25386,44 @@ rm -f conftest.err conftest.$ac_objext \ ib_home= -# Check whether --with-ib or --without-ib was given. +# Check whether --with-ib was given. if test "${with_ib+set}" = set; then - withval="$with_ib" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-ib requires the path to your IB tree." >&5 -echo "$as_me: error: Option --with-ib requires the path to your IB tree." >&2;} + withval=$with_ib; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-ib requires the path to your IB tree." >&5 +$as_echo "$as_me: error: Option --with-ib requires the path to your IB tree." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then ib_home="$withval" fi -fi; +fi + -# Check whether --with-ib-includes or --without-ib-includes was given. +# Check whether --with-ib-includes was given. if test "${with_ib_includes+set}" = set; then - withval="$with_ib_includes" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-ib-includes requires path to IB headers." >&5 -echo "$as_me: error: Option --with-ib-includes requires path to IB headers." >&2;} + withval=$with_ib_includes; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-ib-includes requires path to IB headers." >&5 +$as_echo "$as_me: error: Option --with-ib-includes requires path to IB headers." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then IB_INCDIR="$withval" fi -fi; +fi + -# Check whether --with-ib-libs or --without-ib-libs was given. +# Check whether --with-ib-libs was given. if test "${with_ib_libs+set}" = set; then - withval="$with_ib_libs" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-ib-libs requires path to IB libraries." >&5 -echo "$as_me: error: Option --with-ib-libs requires path to IB libraries." >&2;} + withval=$with_ib_libs; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-ib-libs requires path to IB libraries." >&5 +$as_echo "$as_me: error: Option --with-ib-libs requires path to IB libraries." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then IB_LIBDIR="$withval" fi -fi; +fi + if test -n "$ib_home" ; then if test -z "$IB_INCDIR"; then IB_INCDIR=$ib_home/include @@ -21300,17 +25439,17 @@ fi; save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$IB_INCDIR" if test "${ac_cv_header_vapi_h+set}" = set; then - echo "$as_me:$LINENO: checking for vapi.h" >&5 -echo $ECHO_N "checking for vapi.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for vapi.h" >&5 +$as_echo_n "checking for vapi.h... " >&6; } if test "${ac_cv_header_vapi_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 -echo "${ECHO_T}$ac_cv_header_vapi_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 +$as_echo "$ac_cv_header_vapi_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking vapi.h usability" >&5 -echo $ECHO_N "checking vapi.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking vapi.h usability" >&5 +$as_echo_n "checking vapi.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21321,41 +25460,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking vapi.h presence" >&5 -echo $ECHO_N "checking vapi.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking vapi.h presence" >&5 +$as_echo_n "checking vapi.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21364,99 +25500,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: vapi.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: vapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: vapi.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: vapi.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: vapi.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: vapi.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: vapi.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: vapi.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: vapi.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: vapi.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: vapi.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: vapi.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: vapi.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: vapi.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: vapi.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: vapi.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: vapi.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for vapi.h" >&5 -echo $ECHO_N "checking for vapi.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for vapi.h" >&5 +$as_echo_n "checking for vapi.h... " >&6; } if test "${ac_cv_header_vapi_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_vapi_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 -echo "${ECHO_T}$ac_cv_header_vapi_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_vapi_h" >&5 +$as_echo "$ac_cv_header_vapi_h" >&6; } fi -if test $ac_cv_header_vapi_h = yes; then +if test "x$ac_cv_header_vapi_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header vapi.h not found." >&5 -echo "$as_me: error: Header vapi.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header vapi.h not found." >&5 +$as_echo "$as_me: error: Header vapi.h not found." >&2;} { (exit 1); exit 1; }; } fi if test ! -f $IB_LIBDIR/libvapi.so ; then if test ! -f $IB_LIBDIR/libvapi.a ; then - { { echo "$as_me:$LINENO: error: Infiniband library libvapi.so not found." >&5 -echo "$as_me: error: Infiniband library libvapi.so not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Infiniband library libvapi.so not found." >&5 +$as_echo "$as_me: error: Infiniband library libvapi.so not found." >&2;} { (exit 1); exit 1; }; } fi fi BUILD_IB=1 - echo "$as_me:$LINENO: checking for wrap_common.h" >&5 -echo $ECHO_N "checking for wrap_common.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for wrap_common.h" >&5 +$as_echo_n "checking for wrap_common.h... " >&6; } if test "${ac_cv_header_wrap_common_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21469,39 +25598,36 @@ cat >>conftest.$ac_ext <<_ACEOF #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_wrap_common_h=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_wrap_common_h=no + ac_cv_header_wrap_common_h=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_header_wrap_common_h" >&5 -echo "${ECHO_T}$ac_cv_header_wrap_common_h" >&6 -if test $ac_cv_header_wrap_common_h = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wrap_common_h" >&5 +$as_echo "$ac_cv_header_wrap_common_h" >&6; } +if test "x$ac_cv_header_wrap_common_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_IB_WRAP_COMMON_H 1 @@ -21518,44 +25644,44 @@ fi openib_home= -# Check whether --with-openib or --without-openib was given. +# Check whether --with-openib was given. if test "${with_openib+set}" = set; then - withval="$with_openib" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-openib requires the path to your OpenIB tree." >&5 -echo "$as_me: error: Option --with-openib requires the path to your OpenIB tree." >&2;} + withval=$with_openib; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-openib requires the path to your OpenIB tree." >&5 +$as_echo "$as_me: error: Option --with-openib requires the path to your OpenIB tree." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then openib_home="$withval" fi -fi; +fi + -# Check whether --with-openib-includes or --without-openib-includes was given. +# Check whether --with-openib-includes was given. if test "${with_openib_includes+set}" = set; then - withval="$with_openib_includes" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-openib-includes requires path to OpenIB headers." >&5 -echo "$as_me: error: Option --with-openib-includes requires path to OpenIB headers." >&2;} + withval=$with_openib_includes; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-openib-includes requires path to OpenIB headers." >&5 +$as_echo "$as_me: error: Option --with-openib-includes requires path to OpenIB headers." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then OPENIB_INCDIR="$withval" fi -fi; +fi + -# Check whether --with-openib-libs or --without-openib-libs was given. +# Check whether --with-openib-libs was given. if test "${with_openib_libs+set}" = set; then - withval="$with_openib_libs" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-openib-libs requires path to OpenIB libraries." >&5 -echo "$as_me: error: Option --with-openib-libs requires path to OpenIB libraries." >&2;} + withval=$with_openib_libs; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-openib-libs requires path to OpenIB libraries." >&5 +$as_echo "$as_me: error: Option --with-openib-libs requires path to OpenIB libraries." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then OPENIB_LIBDIR="$withval" fi -fi; +fi + if test -n "$openib_home" ; then if test -z "$OPENIB_INCDIR"; then OPENIB_INCDIR=$openib_home/include @@ -21571,17 +25697,17 @@ fi; save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then - echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5 -echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5 +$as_echo_n "checking for infiniband/verbs.h... " >&6; } if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 -echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 +$as_echo "$ac_cv_header_infiniband_verbs_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5 -echo $ECHO_N "checking infiniband/verbs.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking infiniband/verbs.h usability" >&5 +$as_echo_n "checking infiniband/verbs.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21592,41 +25718,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5 -echo $ECHO_N "checking infiniband/verbs.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking infiniband/verbs.h presence" >&5 +$as_echo_n "checking infiniband/verbs.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21635,91 +25758,84 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: infiniband/verbs.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5 -echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5 +$as_echo_n "checking for infiniband/verbs.h... " >&6; } if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_infiniband_verbs_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 -echo "${ECHO_T}$ac_cv_header_infiniband_verbs_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_infiniband_verbs_h" >&5 +$as_echo "$ac_cv_header_infiniband_verbs_h" >&6; } fi -if test $ac_cv_header_infiniband_verbs_h = yes; then +if test "x$ac_cv_header_infiniband_verbs_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header infiniband/verbs.h not found." >&5 -echo "$as_me: error: Header infiniband/verbs.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header infiniband/verbs.h not found." >&5 +$as_echo "$as_me: error: Header infiniband/verbs.h not found." >&2;} { (exit 1); exit 1; }; } fi if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then - { { echo "$as_me:$LINENO: error: OpenIB library libibverbs.so not found." >&5 -echo "$as_me: error: OpenIB library libibverbs.so not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: OpenIB library libibverbs.so not found." >&5 +$as_echo "$as_me: error: OpenIB library libibverbs.so not found." >&2;} { (exit 1); exit 1; }; } fi fi @@ -21736,8 +25852,8 @@ echo "$as_me: error: OpenIB library libibverbs.so not found." >&2;} save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR" - echo "$as_me:$LINENO: checking for ibv_get_devices" >&5 -echo $ECHO_N "checking for ibv_get_devices... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for ibv_get_devices" >&5 +$as_echo_n "checking for ibv_get_devices... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21756,47 +25872,48 @@ main () } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_IBV_GET_DEVICES 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - echo "$as_me:$LINENO: checking for IBV_EVENT_CLIENT_REREGISTER" >&5 -echo $ECHO_N "checking for IBV_EVENT_CLIENT_REREGISTER... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for IBV_EVENT_CLIENT_REREGISTER" >&5 +$as_echo_n "checking for IBV_EVENT_CLIENT_REREGISTER... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -21817,43 +25934,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_IBV_EVENT_CLIENT_REREGISTER 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext LDFLAGS="$save_ldflags" CPPFLAGS="$save_cppflags" @@ -21866,42 +25980,42 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext incs= libs= -# Check whether --with-portals or --without-portals was given. +# Check whether --with-portals was given. if test "${with_portals+set}" = set; then - withval="$with_portals" - if test -z "$withval" -o "$withval" = yes ; then + withval=$with_portals; if test -z "$withval" -o "$withval" = yes ; then use_portals=yes elif test "$withval" != no ; then home="$withval" fi -fi; +fi + -# Check whether --with-portals-includes or --without-portals-includes was given. +# Check whether --with-portals-includes was given. if test "${with_portals_includes+set}" = set; then - withval="$with_portals_includes" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-portals-includes requires an argument." >&5 -echo "$as_me: error: Option --with-portals-includes requires an argument." >&2;} + withval=$with_portals_includes; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-portals-includes requires an argument." >&5 +$as_echo "$as_me: error: Option --with-portals-includes requires an argument." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then incs="$withval" fi -fi; +fi + -# Check whether --with-portals-libs or --without-portals-libs was given. +# Check whether --with-portals-libs was given. if test "${with_portals_libs+set}" = set; then - withval="$with_portals_libs" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-portals-libs requires an argument." >&5 -echo "$as_me: error: Option --with-portals-libs requires an argument." >&2;} + withval=$with_portals_libs; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-portals-libs requires an argument." >&5 +$as_echo "$as_me: error: Option --with-portals-libs requires an argument." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then libs="$withval" fi -fi; +fi + if test -n "$home" ; then if test -z "$incs"; then incs=-I$home/include @@ -21928,8 +26042,8 @@ fi; PORTALS_LIBS="$libs" LIBS="$save_libs $PORTALS_LIBS" - echo "$as_me:$LINENO: checking for portals3.h header" >&5 -echo $ECHO_N "checking for portals3.h header... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for portals3.h header" >&5 +$as_echo_n "checking for portals3.h header... " >&6; } ok=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -21947,48 +26061,46 @@ int m, n; m = PtlInit(&n); } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ok" = yes ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Header portals/portals3.h not found." >&5 -echo "$as_me: error: Header portals/portals3.h not found." >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: Header portals/portals3.h not found." >&5 +$as_echo "$as_me: error: Header portals/portals3.h not found." >&2;} { (exit 1); exit 1; }; } fi - echo "$as_me:$LINENO: checking for portals libraries" >&5 -echo $ECHO_N "checking for portals libraries... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for portals libraries" >&5 +$as_echo_n "checking for portals libraries... " >&6; } ok=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22006,34 +26118,36 @@ int m, n; m = PtlInit(&n); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$ok" = no ; then @@ -22055,34 +26169,36 @@ int m, n; m = PtlInit(&n); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi @@ -22105,46 +26221,48 @@ int m, n; m = PtlInit(&n); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ok=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi if test "$ok" = yes ; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } BUILD_PORTALS=1 else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: Could not link Portals library." >&5 -echo "$as_me: error: Could not link Portals library." >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: Could not link Portals library." >&5 +$as_echo "$as_me: error: Could not link Portals library." >&2;} { (exit 1); exit 1; }; } fi @@ -22154,11 +26272,11 @@ echo "$as_me: error: Could not link Portals library." >&2;} for ac_func in PtlErrorStr do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22183,71 +26301,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -22256,11 +26373,11 @@ done for ac_func in PtlEventKindStr do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -22285,71 +26402,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -22373,38 +26489,36 @@ int m; ptl_process_id_t any_pid; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then cat >>confdefs.h <<\_ACEOF #define HAVE_PTLACENTRY_JID 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Reset CPPFLAGS="$save_cppflags" @@ -22417,33 +26531,33 @@ rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -# Check whether --with-zoid or --without-zoid was given. +# Check whether --with-zoid was given. if test "${with_zoid+set}" = set; then - withval="$with_zoid" - if test -z "$withval" -o "$withval" = yes ; then - { { echo "$as_me:$LINENO: error: Option --with-zoid requires the path to your ZOID source tree." >&5 -echo "$as_me: error: Option --with-zoid requires the path to your ZOID source tree." >&2;} + withval=$with_zoid; if test -z "$withval" -o "$withval" = yes ; then + { { $as_echo "$as_me:$LINENO: error: Option --with-zoid requires the path to your ZOID source tree." >&5 +$as_echo "$as_me: error: Option --with-zoid requires the path to your ZOID source tree." >&2;} { (exit 1); exit 1; }; } elif test "$withval" != no ; then ZOID_SRCDIR="$withval" fi -fi; +fi + if test -n "$ZOID_SRCDIR" ; then save_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -Isrc/io/bmi -I$ZOID_SRCDIR/include -I$ZOID_SRCDIR/zbmi -I$ZOID_SRCDIR/zbmi/implementation" if test "${ac_cv_header_zbmi_h+set}" = set; then - echo "$as_me:$LINENO: checking for zbmi.h" >&5 -echo $ECHO_N "checking for zbmi.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for zbmi.h" >&5 +$as_echo_n "checking for zbmi.h... " >&6; } if test "${ac_cv_header_zbmi_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 -echo "${ECHO_T}$ac_cv_header_zbmi_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 +$as_echo "$ac_cv_header_zbmi_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zbmi.h usability" >&5 -echo $ECHO_N "checking zbmi.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zbmi.h usability" >&5 +$as_echo_n "checking zbmi.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22454,41 +26568,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zbmi.h presence" >&5 -echo $ECHO_N "checking zbmi.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zbmi.h presence" >&5 +$as_echo_n "checking zbmi.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22497,99 +26608,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zbmi.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zbmi.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zbmi.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zbmi.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zbmi.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zbmi.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zbmi.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zbmi.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zbmi.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zbmi.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zbmi.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zbmi.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zbmi.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zbmi.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zbmi.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for zbmi.h" >&5 -echo $ECHO_N "checking for zbmi.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for zbmi.h" >&5 +$as_echo_n "checking for zbmi.h... " >&6; } if test "${ac_cv_header_zbmi_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_zbmi_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 -echo "${ECHO_T}$ac_cv_header_zbmi_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_h" >&5 +$as_echo "$ac_cv_header_zbmi_h" >&6; } fi -if test $ac_cv_header_zbmi_h = yes; then +if test "x$ac_cv_header_zbmi_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header zbmi.h not found." >&5 -echo "$as_me: error: Header zbmi.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header zbmi.h not found." >&5 +$as_echo "$as_me: error: Header zbmi.h not found." >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_zoid_api_h+set}" = set; then - echo "$as_me:$LINENO: checking for zoid_api.h" >&5 -echo $ECHO_N "checking for zoid_api.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for zoid_api.h" >&5 +$as_echo_n "checking for zoid_api.h... " >&6; } if test "${ac_cv_header_zoid_api_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 -echo "${ECHO_T}$ac_cv_header_zoid_api_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 +$as_echo "$ac_cv_header_zoid_api_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zoid_api.h usability" >&5 -echo $ECHO_N "checking zoid_api.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zoid_api.h usability" >&5 +$as_echo_n "checking zoid_api.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22600,41 +26704,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zoid_api.h presence" >&5 -echo $ECHO_N "checking zoid_api.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zoid_api.h presence" >&5 +$as_echo_n "checking zoid_api.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22643,99 +26744,92 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zoid_api.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zoid_api.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zoid_api.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zoid_api.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zoid_api.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zoid_api.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zoid_api.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zoid_api.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zoid_api.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for zoid_api.h" >&5 -echo $ECHO_N "checking for zoid_api.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for zoid_api.h" >&5 +$as_echo_n "checking for zoid_api.h... " >&6; } if test "${ac_cv_header_zoid_api_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_zoid_api_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 -echo "${ECHO_T}$ac_cv_header_zoid_api_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zoid_api_h" >&5 +$as_echo "$ac_cv_header_zoid_api_h" >&6; } fi -if test $ac_cv_header_zoid_api_h = yes; then +if test "x$ac_cv_header_zoid_api_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header zoid_api.h not found." >&5 -echo "$as_me: error: Header zoid_api.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header zoid_api.h not found." >&5 +$as_echo "$as_me: error: Header zoid_api.h not found." >&2;} { (exit 1); exit 1; }; } fi if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then - echo "$as_me:$LINENO: checking for zbmi_protocol.h" >&5 -echo $ECHO_N "checking for zbmi_protocol.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for zbmi_protocol.h" >&5 +$as_echo_n "checking for zbmi_protocol.h... " >&6; } if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 -echo "${ECHO_T}$ac_cv_header_zbmi_protocol_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 +$as_echo "$ac_cv_header_zbmi_protocol_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking zbmi_protocol.h usability" >&5 -echo $ECHO_N "checking zbmi_protocol.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zbmi_protocol.h usability" >&5 +$as_echo_n "checking zbmi_protocol.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22746,41 +26840,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking zbmi_protocol.h presence" >&5 -echo $ECHO_N "checking zbmi_protocol.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking zbmi_protocol.h presence" >&5 +$as_echo_n "checking zbmi_protocol.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22789,83 +26880,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: zbmi_protocol.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: zbmi_protocol.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: zbmi_protocol.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for zbmi_protocol.h" >&5 -echo $ECHO_N "checking for zbmi_protocol.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for zbmi_protocol.h" >&5 +$as_echo_n "checking for zbmi_protocol.h... " >&6; } if test "${ac_cv_header_zbmi_protocol_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_zbmi_protocol_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 -echo "${ECHO_T}$ac_cv_header_zbmi_protocol_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_zbmi_protocol_h" >&5 +$as_echo "$ac_cv_header_zbmi_protocol_h" >&6; } fi -if test $ac_cv_header_zbmi_protocol_h = yes; then +if test "x$ac_cv_header_zbmi_protocol_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: Header zbmi_protocol.h not found." >&5 -echo "$as_me: error: Header zbmi_protocol.h not found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Header zbmi_protocol.h not found." >&5 +$as_echo "$as_me: error: Header zbmi_protocol.h not found." >&2;} { (exit 1); exit 1; }; } fi @@ -22877,8 +26961,8 @@ fi -echo "$as_me:$LINENO: checking for F_NOCACHE" >&5 -echo $ECHO_N "checking for F_NOCACHE... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for F_NOCACHE" >&5 +$as_echo_n "checking for F_NOCACHE... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22899,40 +26983,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for open O_DIRECT" >&5 -echo $ECHO_N "checking for open O_DIRECT... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for open O_DIRECT" >&5 +$as_echo_n "checking for open O_DIRECT... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -22953,39 +27034,36 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 -echo $ECHO_N "checking for fgetxattr extra arguments... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 +$as_echo_n "checking for fgetxattr extra arguments... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23012,46 +27090,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FGETXATTR_EXTRA_ARGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for setxattr extra arguments" >&5 -echo $ECHO_N "checking for setxattr extra arguments... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for setxattr extra arguments" >&5 +$as_echo_n "checking for setxattr extra arguments... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23078,46 +27153,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_SETXATTR_EXTRA_ARGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for getxattr extra arguments" >&5 -echo $ECHO_N "checking for getxattr extra arguments... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for getxattr extra arguments" >&5 +$as_echo_n "checking for getxattr extra arguments... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23144,56 +27216,53 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GETXATTR_EXTRA_ARGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then - echo "$as_me:$LINENO: checking for sys/sysinfo.h" >&5 -echo $ECHO_N "checking for sys/sysinfo.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for sys/sysinfo.h" >&5 +$as_echo_n "checking for sys/sysinfo.h... " >&6; } if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysinfo_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 +$as_echo "$ac_cv_header_sys_sysinfo_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking sys/sysinfo.h usability" >&5 -echo $ECHO_N "checking sys/sysinfo.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sys/sysinfo.h usability" >&5 +$as_echo_n "checking sys/sysinfo.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23204,41 +27273,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking sys/sysinfo.h presence" >&5 -echo $ECHO_N "checking sys/sysinfo.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking sys/sysinfo.h presence" >&5 +$as_echo_n "checking sys/sysinfo.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23247,79 +27313,72 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: sys/sysinfo.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for sys/sysinfo.h" >&5 -echo $ECHO_N "checking for sys/sysinfo.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for sys/sysinfo.h" >&5 +$as_echo_n "checking for sys/sysinfo.h... " >&6; } if test "${ac_cv_header_sys_sysinfo_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_sys_sysinfo_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_sysinfo_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysinfo_h" >&5 +$as_echo "$ac_cv_header_sys_sysinfo_h" >&6; } fi -if test $ac_cv_header_sys_sysinfo_h = yes; then +if test "x$ac_cv_header_sys_sysinfo_h" = x""yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYSINFO 1 @@ -23333,11 +27392,11 @@ fi for ac_func in strnlen do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23362,71 +27421,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -23435,11 +27493,11 @@ done for ac_func in strtoull do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23464,71 +27522,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -23537,11 +27594,11 @@ done for ac_func in strstr do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23566,71 +27623,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -23639,11 +27695,11 @@ done for ac_func in fgetxattr do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23668,71 +27724,70 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -23741,11 +27796,11 @@ done for ac_func in fsetxattr do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -23770,79 +27825,78 @@ cat >>conftest.$ac_ext <<_ACEOF #undef $ac_func -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +#if defined __stub_$ac_func || defined __stub___$ac_func choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != $ac_func; +return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then eval "$as_ac_var=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_var=no" + eval "$as_ac_var=no" fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done -echo "$as_me:$LINENO: checking for fgetxattr prototype" >&5 -echo $ECHO_N "checking for fgetxattr prototype... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for fgetxattr prototype" >&5 +$as_echo_n "checking for fgetxattr prototype... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23868,35 +27922,31 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FGETXATTR_PROTOTYPE 1 @@ -23904,11 +27954,12 @@ _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 -echo $ECHO_N "checking for fgetxattr extra arguments... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for fgetxattr extra arguments" >&5 +$as_echo_n "checking for fgetxattr extra arguments... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -23939,46 +27990,43 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FGETXATTR_EXTRA_ARGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: checking for fsetxattr extra arguments" >&5 -echo $ECHO_N "checking for fsetxattr extra arguments... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for fsetxattr extra arguments" >&5 +$as_echo_n "checking for fsetxattr extra arguments... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24005,120 +28053,50 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_FSETXATTR_EXTRA_ARGS 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - -# getmntent is in -lsun on Irix 4, -lseq on Dynix/PTX, -lgen on Unixware. -echo "$as_me:$LINENO: checking for getmntent in -lsun" >&5 -echo $ECHO_N "checking for getmntent in -lsun... $ECHO_C" >&6 -if test "${ac_cv_lib_sun_getmntent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsun $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char getmntent (); -int -main () -{ -getmntent (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_sun_getmntent=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_sun_getmntent=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getmntent" >&5 -echo "${ECHO_T}$ac_cv_lib_sun_getmntent" >&6 -if test $ac_cv_lib_sun_getmntent = yes; then - LIBS="-lsun $LIBS" +# getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, +# -lseq on Dynix/PTX, -lgen on Unixware. +{ $as_echo "$as_me:$LINENO: checking for library containing getmntent" >&5 +$as_echo_n "checking for library containing getmntent... " >&6; } +if test "${ac_cv_search_getmntent+set}" = set; then + $as_echo_n "(cached) " >&6 else - echo "$as_me:$LINENO: checking for getmntent in -lseq" >&5 -echo $ECHO_N "checking for getmntent in -lseq... $ECHO_C" >&6 -if test "${ac_cv_lib_seq_getmntent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lseq $LIBS" + ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24126,243 +28104,97 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ -char getmntent (); -int -main () -{ -getmntent (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_seq_getmntent=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_seq_getmntent=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_seq_getmntent" >&5 -echo "${ECHO_T}$ac_cv_lib_seq_getmntent" >&6 -if test $ac_cv_lib_seq_getmntent = yes; then - LIBS="-lseq $LIBS" -else - echo "$as_me:$LINENO: checking for getmntent in -lgen" >&5 -echo $ECHO_N "checking for getmntent in -lgen... $ECHO_C" >&6 -if test "${ac_cv_lib_gen_getmntent+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lgen $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getmntent (); int main () { -getmntent (); +return getmntent (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' sun seq gen; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_lib_gen_getmntent=yes + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_getmntent=$ac_res else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_gen_getmntent=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getmntent" >&5 -echo "${ECHO_T}$ac_cv_lib_gen_getmntent" >&6 -if test $ac_cv_lib_gen_getmntent = yes; then - LIBS="-lgen $LIBS" -fi fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_getmntent+set}" = set; then + break fi - - -for ac_func in getmntent -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 -if eval "test \"\${$as_ac_var+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -{ -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_$ac_func) || defined (__stub___$ac_func) -choke me -#else -char (*f) () = $ac_func; -#endif -#ifdef __cplusplus -} -#endif - -int -main () -{ -return f != $ac_func; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - eval "$as_ac_var=yes" +done +if test "${ac_cv_search_getmntent+set}" = set; then + : else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -eval "$as_ac_var=no" + ac_cv_search_getmntent=no fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_getmntent" >&5 +$as_echo "$ac_cv_search_getmntent" >&6; } +ac_res=$ac_cv_search_getmntent +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + ac_cv_func_getmntent=yes + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETMNTENT 1 _ACEOF +else + ac_cv_func_getmntent=no fi -done -# Check whether --enable-static-server or --disable-static-server was given. +# Check whether --enable-static-server was given. if test "${enable_static_server+set}" = set; then - enableval="$enable_static_server" - staticserver=$enableval + enableval=$enable_static_server; staticserver=$enableval else staticserver="no" -fi; +fi + if test "$staticserver" = "yes"; then SERVER_LDFLAGS="$LDFLAGS -static" @@ -24375,19 +28207,21 @@ fi for ac_header in execinfo.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24398,41 +28232,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24441,81 +28272,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF LDFLAGS="$LDFLAGS -rdynamic" GOSSIP_ENABLE_BACKTRACE=1 @@ -24528,12 +28356,12 @@ done test_for_sdl() { - echo "$as_me:$LINENO: checking for SDL" >&5 -echo $ECHO_N "checking for SDL... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for SDL" >&5 +$as_echo_n "checking for SDL... " >&6; } SDL_CONFIG=`which sdl-config 2> /dev/null` if ! test -z "$SDL_CONFIG" && test -x "$SDL_CONFIG"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SDL_VERSION=`sdl-config --version` VISCFLAGS=`sdl-config --cflags` VISCLIBS=`sdl-config --libs` @@ -24541,19 +28369,21 @@ echo "${ECHO_T}yes" >&6 for ac_header in SDL_ttf.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24564,41 +28394,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24607,81 +28434,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF BUILD_VIS="1" CPPFLAGS="$CPPFLAGS $VISCFLAGS" @@ -24689,19 +28513,21 @@ else for ac_header in SDL/SDL_ttf.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24712,41 +28538,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24755,81 +28578,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF BUILD_VIS="1" CPPFLAGS="$CPPFLAGS $VISCFLAGS" @@ -24846,23 +28666,23 @@ done else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi } -# Check whether --enable-visual or --disable-visual was given. +# Check whether --enable-visual was given. if test "${enable_visual+set}" = set; then - enableval="$enable_visual" - + enableval=$enable_visual; if test "x$enableval" = "xyes" ; then test_for_sdl fi -fi; +fi + -echo "$as_me:$LINENO: checking for GNU-style strerror_r" >&5 -echo $ECHO_N "checking for GNU-style strerror_r... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for strerror_r" >&5 +$as_echo_n "checking for strerror_r... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -24870,63 +28690,268 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ - #include - extern char *strerror_r(); + #include int main () { + int errnum, buflen; + char *buf; + strerror_r(errnum, buf, buflen); + ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define HAVE_STRERROR_R 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DECL_STRERROR_R 1 +_ACEOF + + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for GNU-style strerror_r" >&5 +$as_echo_n "checking for GNU-style strerror_r... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + +int +main () +{ + + int errnum, buflen; + char *buf, *ret; + ret = strerror_r(errnum, buf, buflen); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_GNU_STRERROR_R 1 _ACEOF +cat >>confdefs.h <<\_ACEOF +#define STRERROR_R_CHAR_P 1 +_ACEOF + + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for __bswap_64 is a function" >&5 +$as_echo_n "checking for __bswap_64 is a function... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + #include + +int +main () +{ + + __uint64_t x; + #ifndef __bswap_64 + __bswap_64(x); + #else + __bswap_64_is_not_a_function(not a function); + #endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define BSWAP_64_IS_A_FUNC 1 +_ACEOF + + + +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking for gets" >&5 +$as_echo_n "checking for gets... " >&6; } +oldcflags="$CFLAGS" +CFLAGS="$CFLAGS -Werror" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #include + +int +main () +{ + + char *s; + gets(s); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + +cat >>confdefs.h <<\_ACEOF +#define GETS_IS_GONE 1 +_ACEOF + + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +CFLAGS="$oldcflags" for d in src/apps src/io src/common src/client src/kernel \ doc src/apps/kernel test; do install -d $d; done - ac_config_files="$ac_config_files include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" +ac_config_files="$ac_config_files include/pvfs2.h Makefile module.mk src/apps/admin/module.mk src/apps/admin/pvfs2-config src/apps/devel/module.mk src/apps/karma/module.mk src/apps/vis/module.mk src/apps/fuse/module.mk src/apps/ucache/module.mk src/apps/kernel/linux/module.mk src/apps/user/module.mk src/io/trove/module.mk src/io/trove/trove-handle-mgmt/module.mk src/io/trove/trove-dbpf/module.mk src/common/misc/module.mk src/common/quickhash/module.mk src/common/quicklist/module.mk src/common/dotconf/module.mk src/common/id-generator/module.mk src/common/gossip/module.mk src/common/gen-locks/module.mk src/common/llist/module.mk src/common/statecomp/module.mk src/common/events/module.mk src/common/mgmt/module.mk src/io/bmi/module.mk src/io/bmi/bmi_tcp/module.mk src/io/bmi/bmi_gm/module.mk src/io/bmi/bmi_mx/module.mk src/io/bmi/bmi_ib/module.mk src/io/bmi/bmi_osd/module.mk src/io/bmi/bmi_portals/module.mk src/io/bmi/bmi_zoid/module.mk src/io/description/module.mk src/io/flow/module.mk src/io/flow/flowproto-bmi-trove/module.mk src/io/flow/flowproto-template/module.mk src/io/flow/flowproto-dump-offsets/module.mk src/io/flow/flowproto-bmi-cache/module.mk src/io/buffer/module.mk src/io/job/module.mk src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk src/client/jni/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile src/kernel/linux-2.4/Makefile doc/module.mk doc/coding/module.mk doc/design/module.mk doc/random/module.mk examples/pvfs2-server.rc doc/doxygen/pvfs2-doxygen.conf" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -24945,39 +28970,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -24986,32 +29031,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -25019,12 +29050,14 @@ LTLIBOBJS=$ac_ltlibobjs + : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -25037,22 +29070,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -25062,33 +29151,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -25096,159 +29212,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# CDPATH. +$as_unset CDPATH - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -25257,7 +29336,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -25266,31 +29366,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -25298,45 +29381,44 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -25345,83 +29427,82 @@ Configuration headers: $config_headers Report bugs to ." -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -25435,86 +29516,103 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "include/pvfs2.h" ) CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "module.mk" ) CONFIG_FILES="$CONFIG_FILES module.mk" ;; - "src/apps/admin/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; - "src/apps/admin/pvfs2-config" ) CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; - "src/apps/devel/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; - "src/apps/karma/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; - "src/apps/vis/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; - "src/apps/fuse/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; - "src/apps/ucache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; - "src/apps/kernel/linux/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; - "src/apps/user/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; - "src/io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; - "src/io/trove/trove-handle-mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; - "src/io/trove/trove-dbpf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; - "src/common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; - "src/common/quickhash/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; - "src/common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; - "src/common/dotconf/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; - "src/common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; - "src/common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; - "src/common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; - "src/common/llist/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; - "src/common/statecomp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; - "src/common/events/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; - "src/common/mgmt/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; - "src/io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; - "src/io/bmi/bmi_tcp/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; - "src/io/bmi/bmi_gm/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; - "src/io/bmi/bmi_mx/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; - "src/io/bmi/bmi_ib/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; - "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; - "src/io/bmi/bmi_portals/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; - "src/io/bmi/bmi_zoid/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; - "src/io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; - "src/io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; - "src/io/flow/flowproto-bmi-trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; - "src/io/flow/flowproto-template/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; - "src/io/flow/flowproto-dump-offsets/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; - "src/io/flow/flowproto-bmi-cache/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; - "src/io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; - "src/io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; - "src/io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; - "src/proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; - "src/server/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; - "src/server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; - "src/client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; - "src/client/usrint/module.mk" ) CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; - "src/kernel/linux-2.6/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; - "src/kernel/linux-2.4/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; - "doc/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; - "doc/coding/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; - "doc/design/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; - "doc/random/module.mk" ) CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; - "examples/pvfs2-server.rc" ) CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; - "doc/doxygen/pvfs2-doxygen.conf" ) CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; - "pvfs2-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "pvfs2-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-config.h" ;; + "include/pvfs2.h") CONFIG_FILES="$CONFIG_FILES include/pvfs2.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "module.mk") CONFIG_FILES="$CONFIG_FILES module.mk" ;; + "src/apps/admin/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/admin/module.mk" ;; + "src/apps/admin/pvfs2-config") CONFIG_FILES="$CONFIG_FILES src/apps/admin/pvfs2-config" ;; + "src/apps/devel/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/devel/module.mk" ;; + "src/apps/karma/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/karma/module.mk" ;; + "src/apps/vis/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/vis/module.mk" ;; + "src/apps/fuse/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/fuse/module.mk" ;; + "src/apps/ucache/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/ucache/module.mk" ;; + "src/apps/kernel/linux/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/kernel/linux/module.mk" ;; + "src/apps/user/module.mk") CONFIG_FILES="$CONFIG_FILES src/apps/user/module.mk" ;; + "src/io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/module.mk" ;; + "src/io/trove/trove-handle-mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-handle-mgmt/module.mk" ;; + "src/io/trove/trove-dbpf/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/trove/trove-dbpf/module.mk" ;; + "src/common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/misc/module.mk" ;; + "src/common/quickhash/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quickhash/module.mk" ;; + "src/common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/quicklist/module.mk" ;; + "src/common/dotconf/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/dotconf/module.mk" ;; + "src/common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/id-generator/module.mk" ;; + "src/common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gossip/module.mk" ;; + "src/common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/gen-locks/module.mk" ;; + "src/common/llist/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/llist/module.mk" ;; + "src/common/statecomp/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/statecomp/module.mk" ;; + "src/common/events/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/events/module.mk" ;; + "src/common/mgmt/module.mk") CONFIG_FILES="$CONFIG_FILES src/common/mgmt/module.mk" ;; + "src/io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/module.mk" ;; + "src/io/bmi/bmi_tcp/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_tcp/module.mk" ;; + "src/io/bmi/bmi_gm/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_gm/module.mk" ;; + "src/io/bmi/bmi_mx/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_mx/module.mk" ;; + "src/io/bmi/bmi_ib/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_ib/module.mk" ;; + "src/io/bmi/bmi_osd/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_osd/module.mk" ;; + "src/io/bmi/bmi_portals/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_portals/module.mk" ;; + "src/io/bmi/bmi_zoid/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/bmi/bmi_zoid/module.mk" ;; + "src/io/description/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/description/module.mk" ;; + "src/io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/module.mk" ;; + "src/io/flow/flowproto-bmi-trove/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-trove/module.mk" ;; + "src/io/flow/flowproto-template/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-template/module.mk" ;; + "src/io/flow/flowproto-dump-offsets/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-dump-offsets/module.mk" ;; + "src/io/flow/flowproto-bmi-cache/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/flow/flowproto-bmi-cache/module.mk" ;; + "src/io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/buffer/module.mk" ;; + "src/io/job/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/job/module.mk" ;; + "src/io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES src/io/dev/module.mk" ;; + "src/proto/module.mk") CONFIG_FILES="$CONFIG_FILES src/proto/module.mk" ;; + "src/server/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/module.mk" ;; + "src/server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES src/server/request-scheduler/module.mk" ;; + "src/client/jni/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/jni/module.mk" ;; + "src/client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/sysint/module.mk" ;; + "src/client/usrint/module.mk") CONFIG_FILES="$CONFIG_FILES src/client/usrint/module.mk" ;; + "src/kernel/linux-2.6/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.6/Makefile" ;; + "src/kernel/linux-2.4/Makefile") CONFIG_FILES="$CONFIG_FILES src/kernel/linux-2.4/Makefile" ;; + "doc/module.mk") CONFIG_FILES="$CONFIG_FILES doc/module.mk" ;; + "doc/coding/module.mk") CONFIG_FILES="$CONFIG_FILES doc/coding/module.mk" ;; + "doc/design/module.mk") CONFIG_FILES="$CONFIG_FILES doc/design/module.mk" ;; + "doc/random/module.mk") CONFIG_FILES="$CONFIG_FILES doc/random/module.mk" ;; + "examples/pvfs2-server.rc") CONFIG_FILES="$CONFIG_FILES examples/pvfs2-server.rc" ;; + "doc/doxygen/pvfs2-doxygen.conf") CONFIG_FILES="$CONFIG_FILES doc/doxygen/pvfs2-doxygen.conf" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -25525,645 +29623,610 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@PVFS2_VERSION@,$PVFS2_VERSION,;t t -s,@PVFS2_VERSION_MAJOR@,$PVFS2_VERSION_MAJOR,;t t -s,@PVFS2_VERSION_MINOR@,$PVFS2_VERSION_MINOR,;t t -s,@PVFS2_VERSION_SUB@,$PVFS2_VERSION_SUB,;t t -s,@build@,$build,;t t -s,@build_cpu@,$build_cpu,;t t -s,@build_vendor@,$build_vendor,;t t -s,@build_os@,$build_os,;t t -s,@host@,$host,;t t -s,@host_cpu@,$host_cpu,;t t -s,@host_vendor@,$host_vendor,;t t -s,@host_os@,$host_os,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@HAVE_PERL@,$HAVE_PERL,;t t -s,@HAVE_FIND@,$HAVE_FIND,;t t -s,@HAVE_BISON@,$HAVE_BISON,;t t -s,@HAVE_FLEX@,$HAVE_FLEX,;t t -s,@BUILD_CC@,$BUILD_CC,;t t -s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t -s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t -s,@LIBCFLAGS@,$LIBCFLAGS,;t t -s,@THREAD_LIB@,$THREAD_LIB,;t t -s,@BUILD_SERVER@,$BUILD_SERVER,;t t -s,@BUILD_BMI_ONLY@,$BUILD_BMI_ONLY,;t t -s,@NEED_BERKELEY_DB@,$NEED_BERKELEY_DB,;t t -s,@MMAP_RA_CACHE@,$MMAP_RA_CACHE,;t t -s,@RESET_FILE_POS@,$RESET_FILE_POS,;t t -s,@TRUSTED_CONNECTIONS@,$TRUSTED_CONNECTIONS,;t t -s,@HAVE_PKGCONFIG@,$HAVE_PKGCONFIG,;t t -s,@GTKLIBS@,$GTKLIBS,;t t -s,@GTKCFLAGS@,$GTKCFLAGS,;t t -s,@BUILD_KARMA@,$BUILD_KARMA,;t t -s,@build_static@,$build_static,;t t -s,@REDHAT_RELEASE@,$REDHAT_RELEASE,;t t -s,@NPTL_WORKAROUND@,$NPTL_WORKAROUND,;t t -s,@MISC_TROVE_FLAGS@,$MISC_TROVE_FLAGS,;t t -s,@TAU_INCS@,$TAU_INCS,;t t -s,@BUILD_TAU@,$BUILD_TAU,;t t -s,@BUILD_KERNEL@,$BUILD_KERNEL,;t t -s,@THREADED_KMOD_HELPER@,$THREADED_KMOD_HELPER,;t t -s,@LINUX_KERNEL_SRC@,$LINUX_KERNEL_SRC,;t t -s,@LINUX24_KERNEL_SRC@,$LINUX24_KERNEL_SRC,;t t -s,@LINUX24_KERNEL_MINOR_VER@,$LINUX24_KERNEL_MINOR_VER,;t t -s,@BUILD_ABSOLUTE_TOP@,$BUILD_ABSOLUTE_TOP,;t t -s,@SRC_RELATIVE_TOP@,$SRC_RELATIVE_TOP,;t t -s,@SRC_ABSOLUTE_TOP@,$SRC_ABSOLUTE_TOP,;t t -s,@FUSE_LDFLAGS@,$FUSE_LDFLAGS,;t t -s,@FUSE_CFLAGS@,$FUSE_CFLAGS,;t t -s,@BUILD_FUSE@,$BUILD_FUSE,;t t -s,@ENABLE_COVERAGE@,$ENABLE_COVERAGE,;t t -s,@STRICT_CFLAGS@,$STRICT_CFLAGS,;t t -s,@QUIET_COMPILE@,$QUIET_COMPILE,;t t -s,@BUILD_EPOLL@,$BUILD_EPOLL,;t t -s,@PVFS2_SEGV_BACKTRACE@,$PVFS2_SEGV_BACKTRACE,;t t -s,@build_shared@,$build_shared,;t t -s,@BUILD_USRINT@,$BUILD_USRINT,;t t -s,@BUILDUSRINT@,$BUILDUSRINT,;t t -s,@BUILD_UCACHE@,$BUILD_UCACHE,;t t -s,@BUILD_ACL_INTERFACE@,$BUILD_ACL_INTERFACE,;t t -s,@INTELC@,$INTELC,;t t -s,@GNUC@,$GNUC,;t t -s,@DB_CFLAGS@,$DB_CFLAGS,;t t -s,@DB_LIB@,$DB_LIB,;t t -s,@NEEDS_LIBRT@,$NEEDS_LIBRT,;t t -s,@TARGET_OS_DARWIN@,$TARGET_OS_DARWIN,;t t -s,@TARGET_OS_LINUX@,$TARGET_OS_LINUX,;t t -s,@BUILD_BMI_TCP@,$BUILD_BMI_TCP,;t t -s,@BUILD_GM@,$BUILD_GM,;t t -s,@GM_INCDIR@,$GM_INCDIR,;t t -s,@GM_LIBDIR@,$GM_LIBDIR,;t t -s,@BUILD_MX@,$BUILD_MX,;t t -s,@MX_INCDIR@,$MX_INCDIR,;t t -s,@MX_LIBDIR@,$MX_LIBDIR,;t t -s,@BUILD_IB@,$BUILD_IB,;t t -s,@IB_INCDIR@,$IB_INCDIR,;t t -s,@IB_LIBDIR@,$IB_LIBDIR,;t t -s,@BUILD_OPENIB@,$BUILD_OPENIB,;t t -s,@OPENIB_INCDIR@,$OPENIB_INCDIR,;t t -s,@OPENIB_LIBDIR@,$OPENIB_LIBDIR,;t t -s,@BUILD_PORTALS@,$BUILD_PORTALS,;t t -s,@PORTALS_INCS@,$PORTALS_INCS,;t t -s,@PORTALS_LIBS@,$PORTALS_LIBS,;t t -s,@BUILD_ZOID@,$BUILD_ZOID,;t t -s,@ZOID_SRCDIR@,$ZOID_SRCDIR,;t t -s,@SERVER_LDFLAGS@,$SERVER_LDFLAGS,;t t -s,@GOSSIP_ENABLE_BACKTRACE@,$GOSSIP_ENABLE_BACKTRACE,;t t -s,@BUILD_VIS@,$BUILD_VIS,;t t -s,@VISCFLAGS@,$VISCFLAGS,;t t -s,@VISLIBS@,$VISLIBS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } -# -# CONFIG_HEADER section. -# +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi -done -_ACEOF + ;; + + + esac + +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -26185,26 +30248,30 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi chmod +x $BUILD_ABSOLUTE_TOP/src/apps/admin/pvfs2-config # print a summary of the configuration information if test "x$BUILD_BMI_ONLY" = "x1" ; then - echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 - echo "$as_me:$LINENO: result: ***** Displaying BMI configuration information *****" >&5 -echo "${ECHO_T}***** Displaying BMI configuration information *****" >&6 - echo "$as_me:$LINENO: result: ----------------------------------------------------" >&5 -echo "${ECHO_T}----------------------------------------------------" >&6 + { $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:$LINENO: result: ***** Displaying BMI configuration information *****" >&5 +$as_echo "***** Displaying BMI configuration information *****" >&6; } + { $as_echo "$as_me:$LINENO: result: ----------------------------------------------------" >&5 +$as_echo "----------------------------------------------------" >&6; } PKGSTR="BMI" else - echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 - echo "$as_me:$LINENO: result: ***** Displaying PVFS Configuration Information *****" >&5 -echo "${ECHO_T}***** Displaying PVFS Configuration Information *****" >&6 - echo "$as_me:$LINENO: result: ------------------------------------------------------" >&5 -echo "${ECHO_T}------------------------------------------------------" >&6 + { $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } + { $as_echo "$as_me:$LINENO: result: ***** Displaying PVFS Configuration Information *****" >&5 +$as_echo "***** Displaying PVFS Configuration Information *****" >&6; } + { $as_echo "$as_me:$LINENO: result: ------------------------------------------------------" >&5 +$as_echo "------------------------------------------------------" >&6; } PKGSTR="PVFS2" fi @@ -26212,164 +30279,193 @@ fi if test "x$BUILD_BMI_ONLY" != "x1" ; then if test "x$BUILD_KARMA" = "x1" ; then - echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : yes" >&5 -echo "${ECHO_T}PVFS2 configured to build karma gui : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : yes" >&5 +$as_echo "PVFS2 configured to build karma gui : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : no" >&5 -echo "${ECHO_T}PVFS2 configured to build karma gui : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to build karma gui : no" >&5 +$as_echo "PVFS2 configured to build karma gui : no" >&6; } fi if test "x$BUILD_VIS" = "x1" ; then - echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : yes" >&5 -echo "${ECHO_T}PVFS2 configured to build visualization tools : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : yes" >&5 +$as_echo "PVFS2 configured to build visualization tools : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : no" >&5 -echo "${ECHO_T}PVFS2 configured to build visualization tools : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to build visualization tools : no" >&5 +$as_echo "PVFS2 configured to build visualization tools : no" >&6; } fi if test "x$ENABLE_COVERAGE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : yes" >&5 -echo "${ECHO_T}PVFS2 configured to perform coverage analysis : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : yes" >&5 +$as_echo "PVFS2 configured to perform coverage analysis : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : no" >&5 -echo "${ECHO_T}PVFS2 configured to perform coverage analysis : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to perform coverage analysis : no" >&5 +$as_echo "PVFS2 configured to perform coverage analysis : no" >&6; } fi if test "x$MISC_TROVE_FLAGS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : no" >&5 -echo "${ECHO_T}PVFS2 configured for aio threaded callbacks : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : no" >&5 +$as_echo "PVFS2 configured for aio threaded callbacks : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : yes" >&5 -echo "${ECHO_T}PVFS2 configured for aio threaded callbacks : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for aio threaded callbacks : yes" >&5 +$as_echo "PVFS2 configured for aio threaded callbacks : yes" >&6; } fi if test "x$BUILD_FUSE" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : yes" >&5 -echo "${ECHO_T}PVFS2 configured to use FUSE : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : yes" >&5 +$as_echo "PVFS2 configured to use FUSE : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : no" >&5 -echo "${ECHO_T}PVFS2 configured to use FUSE : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured to use FUSE : no" >&5 +$as_echo "PVFS2 configured to use FUSE : no" >&6; } fi if test "x$LINUX_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : no" >&5 -echo "${ECHO_T}PVFS2 configured for the 2.6/3 kernel module : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : no" >&5 +$as_echo "PVFS2 configured for the 2.6/3 kernel module : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : yes" >&5 -echo "${ECHO_T}PVFS2 configured for the 2.6/3 kernel module : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for the 2.6/3 kernel module : yes" >&5 +$as_echo "PVFS2 configured for the 2.6/3 kernel module : yes" >&6; } fi if test "x$LINUX24_KERNEL_SRC" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : no" >&5 -echo "${ECHO_T}PVFS2 configured for the 2.4.x kernel module : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : no" >&5 +$as_echo "PVFS2 configured for the 2.4.x kernel module : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : yes" >&5 -echo "${ECHO_T}PVFS2 configured for the 2.4.x kernel module : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for the 2.4.x kernel module : yes" >&5 +$as_echo "PVFS2 configured for the 2.4.x kernel module : yes" >&6; } fi if test "x$MMAP_RA_CACHE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : no" >&5 -echo "${ECHO_T}PVFS2 configured for using the mmap-ra-cache : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : no" >&5 +$as_echo "PVFS2 configured for using the mmap-ra-cache : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : yes" >&5 -echo "${ECHO_T}PVFS2 configured for using the mmap-ra-cache : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for using the mmap-ra-cache : yes" >&5 +$as_echo "PVFS2 configured for using the mmap-ra-cache : yes" >&6; } fi if test "x$RESET_FILE_POS" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : no" >&5 -echo "${ECHO_T}PVFS2 configured for resetting file position : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : no" >&5 +$as_echo "PVFS2 configured for resetting file position : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : yes" >&5 -echo "${ECHO_T}PVFS2 configured for resetting file position : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 configured for resetting file position : yes" >&5 +$as_echo "PVFS2 configured for resetting file position : yes" >&6; } fi if test "x$REDHAT_RELEASE" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : no" >&5 -echo "${ECHO_T}PVFS2 will use workaround for redhat 2.4 kernels : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : no" >&5 +$as_echo "PVFS2 will use workaround for redhat 2.4 kernels : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : yes" >&5 -echo "${ECHO_T}PVFS2 will use workaround for redhat 2.4 kernels : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 will use workaround for redhat 2.4 kernels : yes" >&5 +$as_echo "PVFS2 will use workaround for redhat 2.4 kernels : yes" >&6; } fi if test "x$NPTL_WORKAROUND" = "x" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : no" >&5 -echo "${ECHO_T}PVFS2 will use workaround for buggy NPTL : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : no" >&5 +$as_echo "PVFS2 will use workaround for buggy NPTL : no" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : yes" >&5 -echo "${ECHO_T}PVFS2 will use workaround for buggy NPTL : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 will use workaround for buggy NPTL : yes" >&5 +$as_echo "PVFS2 will use workaround for buggy NPTL : yes" >&6; } fi if test "x$BUILD_SERVER" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then - echo "$as_me:$LINENO: result: PVFS2 server will be built : yes" >&5 -echo "${ECHO_T}PVFS2 server will be built : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 server will be built : yes" >&5 +$as_echo "PVFS2 server will be built : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 server will be built : no" >&5 -echo "${ECHO_T}PVFS2 server will be built : no" >&6 - + { $as_echo "$as_me:$LINENO: result: PVFS2 server will be built : no" >&5 +$as_echo "PVFS2 server will be built : no" >&6; } fi if test "x$BUILD_USRINT" = "x1" ; then - echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : yes" >&5 -echo "${ECHO_T}PVFS2 user interface libraries will be built : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : yes" >&5 +$as_echo "PVFS2 user interface libraries will be built : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : no" >&5 -echo "${ECHO_T}PVFS2 user interface libraries will be built : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 user interface libraries will be built : no" >&5 +$as_echo "PVFS2 user interface libraries will be built : no" >&6; } +fi +if test "x$BUILD_SYMBOLIC" = "x1" ; then + { $as_echo "$as_me:$LINENO: result: PVFS2 symbolic libraries will be built : yes" >&5 +$as_echo "PVFS2 symbolic libraries will be built : yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: PVFS2 symbolic libraries will be built : no" >&5 +$as_echo "PVFS2 symbolic libraries will be built : no" >&6; } fi if test "x$BUILD_UCACHE" = "x1" ; then - echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : yes" >&5 -echo "${ECHO_T}PVFS2 user interface library cache enabled : yes" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : yes" >&5 +$as_echo "PVFS2 user interface library cache enabled : yes" >&6; } else - echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : no" >&5 -echo "${ECHO_T}PVFS2 user interface library cache enabled : no" >&6 + { $as_echo "$as_me:$LINENO: result: PVFS2 user interface library cache enabled : no" >&5 +$as_echo "PVFS2 user interface library cache enabled : no" >&6; } +fi + +if test "x$MALLOC_REDEF" = "x1" ; then + { $as_echo "$as_me:$LINENO: result: Malloc will be redefined : yes" >&5 +$as_echo "Malloc will be redefined : yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: Malloc will be redefined : no" >&5 +$as_echo "Malloc will be redefined : no" >&6; } +fi +if test "x$BUILD_JNI" = "x1" ; then + { $as_echo "$as_me:$LINENO: result: PVFS2 client JNI enabled : yes" >&5 +$as_echo "PVFS2 client JNI enabled : yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: PVFS2 client JNI enabled : no" >&5 +$as_echo "PVFS2 client JNI enabled : no" >&6; } +fi + +if test "x$BUILD_HADOOP" = "x1" ; then + { $as_echo "$as_me:$LINENO: result: OrangeFS/Hadoop libraries enabled : yes" >&5 +$as_echo "OrangeFS/Hadoop libraries enabled : yes" >&6; } +else + { $as_echo "$as_me:$LINENO: result: OrangeFS/Hadoop libraries enabled : no" >&5 +$as_echo "OrangeFS/Hadoop libraries enabled : no" >&6; } fi else # print BMI and PVFS configs if test "x$THREAD_LIB" = "x"; then - echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : no" >&5 -echo "${ECHO_T}$PKGSTR configured for a thread-safe client library : no" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : no" >&5 +$as_echo "$PKGSTR configured for a thread-safe client library : no" >&6; } else - echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : yes" >&5 -echo "${ECHO_T}$PKGSTR configured for a thread-safe client library : yes" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured for a thread-safe client library : yes" >&5 +$as_echo "$PKGSTR configured for a thread-safe client library : yes" >&6; } fi if test "x$BUILD_EPOLL" = "x1" ; then - echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : yes" >&5 -echo "${ECHO_T}$PKGSTR configured to use epoll : yes" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : yes" >&5 +$as_echo "$PKGSTR configured to use epoll : yes" >&6; } else - echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : no" >&5 -echo "${ECHO_T}$PKGSTR configured to use epoll : no" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured to use epoll : no" >&5 +$as_echo "$PKGSTR configured to use epoll : no" >&6; } fi if test "x$TRUSTED_CONNECTIONS" = "x" ; then - echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : no" >&5 -echo "${ECHO_T}$PKGSTR configured for using trusted connections : no" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : no" >&5 +$as_echo "$PKGSTR configured for using trusted connections : no" >&6; } else - echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : yes" >&5 -echo "${ECHO_T}$PKGSTR configured for using trusted connections : yes" >&6 + { $as_echo "$as_me:$LINENO: result: $PKGSTR configured for using trusted connections : yes" >&5 +$as_echo "$PKGSTR configured for using trusted connections : yes" >&6; } fi fi # end of BMI/PVFS config display if test "x$WARN_ABOUT_HOSTNAMES" = "xyes" ; then - echo "$as_me:$LINENO: result: WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&5 -echo "${ECHO_T}WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&6 + { $as_echo "$as_me:$LINENO: result: WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&5 +$as_echo "WARNING: gethostbyname is not supported on this machine: ALL ADDRESSES MUST BE IN DOT NOTATION." >&6; } fi if test x$BUILD_GM = x1 -o x$BUILD_MX = x1 -o x$BUILD_IB = x1 -o \ x$BUILD_OPENIB = x1 -o x$BUILD_PORTALS = x1 -o x$BUILD_ZOID = x1 ; then if test x$BUILD_BMI_TCP = x1 ; then - { echo "$as_me:$LINENO: WARNING: You have selected to build $PKGSTR to use a \"fast\" network + { $as_echo "$as_me:$LINENO: WARNING: You have selected to build $PKGSTR to use a \"fast\" network interface, but have not disabled TCP. The way this is currently implemented will lead to rather slow response times on the fast interface. Suggest you configure with \"--without-bmi-tcp\" for the best performance." >&5 -echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" network +$as_echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" network interface, but have not disabled TCP. The way this is currently implemented will lead to rather slow response times on the fast interface. Suggest you configure with @@ -26378,20 +30474,20 @@ echo "$as_me: WARNING: You have selected to build $PKGSTR to use a \"fast\" netw fi if test x$HAVE_DB_OLD = x1; then - { echo "$as_me:$LINENO: WARNING: The detected version of Berkeley DB is not at least 4.8.30. + { $as_echo "$as_me:$LINENO: WARNING: The detected version of Berkeley DB is not at least 4.8.30. Metadata corruption has been documented in versions prior to 4.8.30. It is highly recommended that you update the version of Berkeley DB you are building against." >&5 -echo "$as_me: WARNING: The detected version of Berkeley DB is not at least 4.8.30. +$as_echo "$as_me: WARNING: The detected version of Berkeley DB is not at least 4.8.30. Metadata corruption has been documented in versions prior to 4.8.30. It is highly recommended that you update the version of Berkeley DB you are building against." >&2;} fi -echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 -echo "$as_me:$LINENO: result: $PKGSTR version string: $PVFS2_VERSION" >&5 -echo "${ECHO_T}$PKGSTR version string: $PVFS2_VERSION" >&6 +{ $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } +{ $as_echo "$as_me:$LINENO: result: $PKGSTR version string: $PVFS2_VERSION" >&5 +$as_echo "$PKGSTR version string: $PVFS2_VERSION" >&6; } -echo "$as_me:$LINENO: result: " >&5 -echo "${ECHO_T}" >&6 +{ $as_echo "$as_me:$LINENO: result: " >&5 +$as_echo "" >&6; } diff --git a/configure.in b/configure.ac similarity index 78% rename from configure.in rename to configure.ac index 62bf3b4..ea5bec7 100644 --- a/configure.in +++ b/configure.ac @@ -18,10 +18,10 @@ dnl An @ in the date string can confuse e.g. scp and 'make kmod' CONFIGURE_TIME=`date -u +"%Y-%m-%d-%H%M%S"` PVFS2_VERSION_MAJOR=2 PVFS2_VERSION_MINOR=8 -PVFS2_VERSION_SUB=6 -#PVFS2_VERSION_RELEASE="orangefs" +PVFS2_VERSION_SUB=8 +PVFS2_VERSION_RELEASE="orangefs" #PVFS2_PRE="" -PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" +#PVFS2_VERSION_PRE="orangefs-$CONFIGURE_TIME" PVFS2_VERSION=$PVFS2_VERSION_MAJOR.$PVFS2_VERSION_MINOR.$PVFS2_VERSION_SUB-$PVFS2_VERSION_RELEASE$PVFS2_VERSION_PRE AC_SUBST(PVFS2_VERSION) @@ -68,16 +68,35 @@ AC_CHECK_HEADER([stdint.h], [AC_DEFINE(HAVE_STDINT_H, 1, Define if stdint.h exists)]) AC_CHECK_HEADER([stdlib.h], [AC_DEFINE(HAVE_STDLIB_H, 1, Define if stdlib.h exists)]) +AC_CHECK_HEADER([stdio.h], + [AC_DEFINE(HAVE_STDIO_H, 1, Define if stdio.h exists)]) +AC_CHECK_HEADER([fcntl.h], + [AC_DEFINE(HAVE_FCNTL_H, 1, Define if fcntl.h exists)]) +AC_CHECK_HEADER([utime.h], + [AC_DEFINE(HAVE_UTIME_H, 1, Define if utime.h exists)]) +AC_CHECK_HEADER([string.h], + [AC_DEFINE(HAVE_STRING_H, 1, Define if string.h exists)]) AC_CHECK_HEADER([strings.h], [AC_DEFINE(HAVE_STRINGS_H, 1, Define if strings.h exists)]) -AC_CHECK_HEADER([stdlib.h], - [AC_DEFINE(HAVE_STDLIB_H, 1, Define if stdlib.h exists)]) +AC_CHECK_HEADER([assert.h], + [AC_DEFINE(HAVE_ASSERT_H, 1, Define if assert.h exists)]) +AC_CHECK_HEADER([libgen.h], + [AC_DEFINE(HAVE_LIBGEN_H, 1, Define if libgen.h exists)]) +AC_CHECK_HEADER([dirent.h], + [AC_DEFINE(HAVE_DIRENT_H, 1, Define if dirent.h exists)]) +AC_CHECK_HEADER([time.h], + [AC_DEFINE(HAVE_TIME_H, 1, Define if time.h exists)]) +AC_CHECK_HEADER([dlfcn.h], + [AC_DEFINE(HAVE_DLFCN_H, 1, Define if dlfcn.h exists)]) AC_CHECK_HEADER([linux/types.h], [AC_DEFINE(HAVE_LINUX_TYPES_H, 1, Define if linux/types.h exists)]) AC_CHECK_HEADER([linux/malloc.h], [AC_DEFINE(HAVE_LINUX_MALLOC_H, 1, Define if linux/malloc.h exists)]) +AC_CHECK_HEADER([selinux/selinux.h], + [AC_DEFINE(HAVE_SELINUX_H, 1, Define if selinux/selinux.h exists)]) + dnl These are kernel headers checked in maint/config/kernel.m4 dnl AC_CHECK_HEADERS([linux/compat.h]) dnl AC_CHECK_HEADERS([linux/exportfs.h]) @@ -102,6 +121,14 @@ AC_CHECK_HEADER([sys/sendfile.h], [AC_DEFINE(HAVE_SYS_SENDFILE_H, 1, Define if sys/sendfile.h exists)]) AC_CHECK_HEADER([sys/xattr.h], [AC_DEFINE(HAVE_SYS_XATTR_H, 1, Define if sys/xattr.h exists)]) +AC_CHECK_HEADER([sys/statvfs.h], + [AC_DEFINE(HAVE_SYS_STATVFS_H, 1, Define if sys/statvfs.h exists)]) +AC_CHECK_HEADER([sys/uio.h], + [AC_DEFINE(HAVE_SYS_UIO_H, 1, Define if sys/uio.h exists)]) +AC_CHECK_HEADER([sys/mman.h], + [AC_DEFINE(HAVE_SYS_MMAN_H, 1, Define if sys/mman.h exists)]) +AC_CHECK_HEADER([sys/time.h], + [AC_DEFINE(HAVE_SYS_TIME_H, 1, Define if sys/time.h exists)]) AC_CHECK_HEADER([arpa/inet.h], [AC_DEFINE(HAVE_ARPA_INET_H, 1, Define if arpa/inet.h exists)]) @@ -585,7 +612,7 @@ AC_ARG_WITH(kernel, if ! test -d $withval ; then AC_MSG_ERROR(The --with-kernel path $withval is not a directory.) fi - if ! test -r $withval/include/linux/version.h ; then + if ! test -r $withval/include/linux/version.h && ! test -r $withval/include/generated/uapi/linux/version.h ; then AC_MSG_ERROR(The kernel source tree must have been configured.) fi @@ -714,6 +741,17 @@ if test "x$USR_CFLAGS_SET" = "xno"; then fi ]) +dnl Disable compiler optimization +AC_ARG_ENABLE(opt, +[ --disable-opt Disables compiler optimization], +[if test "x$enableval" = "xyes" ; then + CC_OPT=-O2 +else + CC_OPT=-O0 +fi], + CC_OPT=-O2) +AC_SUBST(CC_OPT) + dnl dnl a function to check for FUSE dnl @@ -752,7 +790,7 @@ fi # default CFLAGS is -g -O2, unless user set CFLAGS or asked for --enable-fast if test "x$USR_CFLAGS_SET" = "xno" && test "x$enable_fast" != "xyes"; then - CFLAGS="$CFLAGS -g -O2" + CFLAGS="$CFLAGS -g $CC_OPT" fi dnl Options that are not yet working @@ -842,8 +880,9 @@ AC_SUBST(PVFS2_SEGV_BACKTRACE) dnl shared or static client library AC_ARG_ENABLE(shared, -[ --enable-shared Build shared client library], -[build_shared=$enableval], [build_shared=no]) + [ --enable-shared Build shared client library], + [build_shared=$enableval], + [build_shared=no]) AC_SUBST(build_shared) dnl Bad things happen in the makefile if you happen to --disable-static @@ -852,26 +891,73 @@ if test "x$build_shared" = "xno" -a "x$build_static" = "xno" ; then AC_MSG_ERROR([Must do --enable-shared or --enable-static or both.]) fi +dnl shared or static client library +AC_ARG_ENABLE(threaded, + [ --disable-threaded Do not build threaded client library], + [if "x$THREADED_KMOD_HELPER = xyes" ; then + build_threaded=yes + AC_MSG_WARN([Ignoring --disable-threaded in favor of --enable-threaded-kmod-heaper.]) + else + build_threaded=$enableval + fi + ], + [build_threaded=yes]) +AC_SUBST(build_threaded) + dnl Method to disable build of user interface libraries BUILD_USRINT= AC_ARG_ENABLE(usrint, -[ --disable-usrint Do not build posix and stdio user libraries], -[if test "x$enableval" = "xyes" ; then - AC_DEFINE(PVFS_USRINT_BUILD, 1, - [Should we build user interface libraries.]) - BUILD_USRINT=1 -else - AC_DEFINE(PVFS_USRINT_BUILD, 0, - [Should we build user interface libraries.]) + [ --disable-usrint Do not build posix and stdio user libraries], + [if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_USRINT_BUILD, 1, + [Should we build user interface libraries.]) + BUILD_USRINT=1 + else + AC_DEFINE(PVFS_USRINT_BUILD, 0, + [Should we build user interface libraries.]) + fi + build_usrint=$enableval + ], + [AC_DEFINE(PVFS_USRINT_BUILD, 1, + [Should we build user interface libraries.]) + build_usrint=yes + BUILD_USRINT=1 + ]) +AC_SUBST(build_usrint) + +if test "x$build_usrint" = "xyes"; then + dnl check if -lrt is required by usrint + AX_CHECK_LIB_NEEDS_LIBRT fi -AC_SUBST(BUILD_USRINT)], -[AC_DEFINE(PVFS_USRINT_BUILD, 1, - [Should we build user interface libraries.]) -BUILD_USRINT=1 -AC_SUBST(BUILDUSRINT)]) -USRINT_KMOUNT= +dnl libofs is ALWAYS symbolic, others should never be +dnl +dnl Method to enable symbolic user interface libraries +dnl BUILD_SYMBOLIC= +dnl AC_ARG_ENABLE(symbolic, +dnl [ --enable-symbolic Build library to force programs to use libofs.so], +dnl [if test "x$enableval" = "xyes" ; then +dnl if test "x$build_usrint" = "xyes" -a "x$build_shared" = "xyes" ; then +dnl AC_DEFINE(PVFS_USRINT_SYMBOLIC, 1, +dnl [Build library to force programs to use libofs.so.]) +dnl BUILD_SYMBOLIC=1 +dnl else +dnl AC_MSG_ERROR([Must build usrint and shared to build symbolic library.]) +dnl fi +dnl else +dnl AC_DEFINE(PVFS_USRINT_SYMBOLIC, 0, +dnl [Build library to force programs to use libofs.so.]) +dnl fi +dnl build_symbolic=$enableval +dnl ], +dnl [AC_DEFINE(PVFS_USRINT_SYMBOLIC, 0, +dnl [Build library to force programs to use libofs.so.]) +dnl build_symbolic=no +dnl ]) +dnl AC_SUBST(build_symbolic) + dnl Method to enable user interface kmod support +USRINT_KMOUNT= AC_ARG_ENABLE(usrint-kmount, [ --enable-usrint-kmount Assume FS is mounted via kernel], [if test "x$enableval" = "xyes" ; then @@ -908,14 +994,98 @@ else [Should we enable user interface CWD support.]) fi]) +dnl Method to disable usrint redefining stdin stdout stderr as PVFS streams +AC_ARG_ENABLE(stdio-redefstream, +[ --disable-stdio-redefstream Do not redefine stdin stdout stderr as PVFS streams], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_STDIO_REDEFSTREAM, 1, + [Should we redefine stdin stdout stderr as PVFS streams.]) +else + AC_DEFINE(PVFS_STDIO_REDEFSTREAM, 0, + [Should we redefine stdin stdout stderr as PVFS streams.]) +fi], +[AC_DEFINE(PVFS_STDIO_REDEFSTREAM, 1, + [Should we redefine stdin stdout stderr as PVFS streams.]) +]) + +dnl Method to disable redefining malloc +AC_ARG_ENABLE(malloc-redef, +[ --disable-malloc-redef Do not redefine malloc], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_MALLOC_REDEF, 1, + [Should we redefine malloc.]) + MALLOC_REDEF=1 +else + AC_DEFINE(PVFS_MALLOC_REDEF, 0, + [Should we redefine malloc.]) +fi], +[AC_DEFINE(PVFS_MALLOC_REDEF, 1, + [Should we redefine malloc.]) +MALLOC_REDEF=1 +]) + +dnl Method to disable malloc checking a magic number +AC_ARG_ENABLE(malloc-magic, +[ --disable-malloc-magic Do not have malloc check a magic number], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_MALLOC_MAGIC, 1, + [Should we have malloc check a magic number.]) +else AC_DEFINE(PVFS_MALLOC_MAGIC, 0, + [Should we have malloc check a magic number.]) +fi], +[AC_DEFINE(PVFS_MALLOC_MAGIC, 1, + [Should we have malloc check a magic number.]) +]) + +dnl Method to disable malloc zeroing new memory +AC_ARG_ENABLE(malloc-zero, +[ --disable-malloc-zero Do not have malloc zero new memory], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_MALLOC_ZERO, 1, + [Should we have malloc zero new memory.]) +else AC_DEFINE(PVFS_MALLOC_ZERO, 0, + [Should we have malloc zero new memory.]) +fi], +[AC_DEFINE(PVFS_MALLOC_ZERO, 1, + [Should we have malloc zero new memory.]) +]) + +dnl Method to disable malloc zeroing freed memory +AC_ARG_ENABLE(malloc-free-zero, +[ --disable-malloc-free-zero Do not have malloc zero freed memory], +[if test "x$enableval" = "xyes" ; then + AC_DEFINE(PVFS_MALLOC_FREE_ZERO, 1, + [Should we have malloc zero freed memory.]) +else AC_DEFINE(PVFS_MALLOC_FREE_ZERO, 0, + [Should we have malloc zero freed memory.]) +fi], +[AC_DEFINE(PVFS_MALLOC_FREE_ZERO, 1, + [Should we have malloc zero freed memory.]) +]) + +dnl Check for O_CLOEXEC flag in open() +AC_MSG_CHECKING([for O_CLOEXEC flag in open()]) +AC_TRY_COMPILE( + [ + #include + ], + [ + int flags; + flags = O_CLOEXEC; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_O_CLOEXEC, 1, Define if open() has O_CLOEXEC flag) + , + AC_MSG_RESULT(no) +) + dnl Method to check if dl calls need an explicit link flag AC_MSG_CHECKING(if dlfns needs explicit library request) -AC_LINK_IFELSE( -[ +AC_LINK_IFELSE([AC_LANG_SOURCE([ #define _GNU_SOURCE 1 #include main() {void *p = dlsym(RTLD_DEFAULT,"sym");} -],[ +])],[ AC_MSG_RESULT(no) ],[ AC_MSG_RESULT(yes) @@ -925,7 +1095,7 @@ main() {void *p = dlsym(RTLD_DEFAULT,"sym");} dnl Method to enable user interface data cache BUILD_UCACHE= AC_ARG_ENABLE(ucache, -[ --enable-ucache Do not enable user user interface data cache.], +[ --enable-ucache Enables user interface data cache.], [if test "x$enableval" = "xyes" ; then AC_DEFINE(PVFS_UCACHE_ENABLE, 1, [Should we enable user interface data cache.]) @@ -939,6 +1109,94 @@ AC_SUBST(BUILD_UCACHE)], [Should we enable user interface data cache.]) AC_SUBST(BUILD_UCACHE)]) +dnl Method to set JAVA_HOME if it hasn't already been set using --with-jdk +JAVA_HOME= +AC_ARG_WITH( + jdk, + [ --with-jdk= Enable support for JAVA and JNI.], + [ + dnl Check for jni.h + AC_CHECK_FILE($withval/include/jni.h, + [ + AC_DEFINE(HAVE_JNI_H, 1, Define if jni.h exists at the path given with --with-jdk) + JAVA_HOME=$withval + ], + [ + AC_MSG_ERROR(could not locate include/jni.h at the path given with --with-jdk.) + ] + ) + ], + [ with_jdk=no] +) +AC_SUBST(JAVA_HOME) + +dnl Method to enable JNI prefixed stdio and posix calls +BUILD_JNI= +AC_ARG_ENABLE( + jni, + [ --enable-jni Enables PVFS Client JNI. Requires --with-jdk.], + [ if test "x$enableval" = "xyes" ; then + if test "x$JAVA_HOME" = "x"; then + AC_MSG_ERROR(--enable-jni must be used in conjunction with --with-jdk=jdk_path.) + fi + AC_DEFINE(PVFS_JNI_ENABLE, 1, + [Should we enable PVFS Client JNI.]) + BUILD_JNI=1 + else + AC_DEFINE(PVFS_JNI_ENABLE, 0, + [Should we enable PVFS Client JNI.]) + fi + ], + [ AC_DEFINE(PVFS_JNI_ENABLE, 0, + [Should we enable PVFS Client JNI.]) + ] +) +AC_SUBST(BUILD_JNI) + +HADOOP_PREFIX= +AC_ARG_WITH( + hadoop, + [ --with-hadoop= Enables support for OrangeFS extensions of Hadoop classes.], + [ + HADOOP_PREFIX=$withval; + corepath=`ls $withval/hadoop-core*` + AC_CHECK_FILE($corepath, + [], + [ + AC_MSG_ERROR(could not locate $withval/hadoop-core-*.jar at the path given with --with-hadoop.) + ] + ) + ], + [ with_hadoop=no] +) +AC_SUBST(HADOOP_PREFIX) + +dnl Method to enable OrangeFS extensions to Hadoop classes. +BUILD_HADOOP= +AC_ARG_ENABLE( + hadoop, + [ --enable-hadoop Enables OrangeFS extenions of Hadoop classes. Requires --enable-jni --with-jdk and --with-hadoop.], + [ if test "x$enableval" = "xyes" ; then + if test "x$HADOOP_PREFIX" = "x"; then + AC_MSG_ERROR(--enable-hadoop must be used in conjunction with --with-hadoop=path.) + fi + if test "$BUILD_JNI" != "1"; then + AC_MSG_ERROR(--enable-hadoop must be used in conjunction with --enable-jni.) + fi + AC_DEFINE(PVFS_HADOOP_ENABLE, 1, + [Should we enable OrangeFS extensions of Hadoop classes.]) + BUILD_HADOOP=1 + else + AC_DEFINE(PVFS_HADOOP_ENABLE, 0, + [Should we enable OrangeFS extensions of Hadoop classes.]) + fi + ], + [ AC_DEFINE(PVFS_HADOOP_ENABLE, 0, + [Should we enable OrangeFS extensions of Hadoop classes.]) + ] +) +AC_SUBST(BUILD_HADOOP) + dnl See if we have includes needed for acls BUILD_ACL_INTERFACE= AC_MSG_CHECKING(for user acl includes sys/acl.h acl/libacl.h) @@ -1022,10 +1280,10 @@ AC_ARG_WITH(valgrind, save_cppflags="$CPPFLAGS" AC_MSG_CHECKING(for valgrind.h usability) if test "x$withval" = xyes ; then - AC_COMPILE_IFELSE([#include ], found=yes) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include ]])], found=yes) if test x$found = xno ; then CPPFLAGS="$CPPFLAGS -I/usr/include/valgrind" - AC_COMPILE_IFELSE([#include ], found=yes, + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include ]])], found=yes, CPPFLAGS="$save_cppflags") fi else @@ -1033,7 +1291,7 @@ AC_ARG_WITH(valgrind, $withval/valgrind $withval/include/valgrind do CPPFLAGS="$CPPFLAGS -I$d" - AC_COMPILE_IFELSE([#include ], found=yes, + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include ]])], found=yes, CPPFLAGS="$save_cppflags") if test x$found = xyes ; then break @@ -1068,6 +1326,8 @@ case "$host_os" in *darwin*) AC_DEFINE([TARGET_OS_DARWIN], 1, Define if on darwin) TARGET_OS_DARWIN=1 + CFLAGS="$CFLAGS -D__DARWIN__" + AC_SUBST(CFLAGS) AC_SUBST(TARGET_OS_DARWIN) ;; *linux*) @@ -1369,19 +1629,114 @@ fi ], ) +dnl Do we have strerror_r? +AC_MSG_CHECKING([for strerror_r]) +AC_TRY_COMPILE( + [ + #include + ], + [ + int errnum, buflen; + char *buf; + strerror_r(errnum, buf, buflen); + ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_STRERROR_R, 1, Define if have strerror_r) + AC_DEFINE(HAVE_DECL_STRERROR_R, 1, Define if have strerror_r) + ] + , + AC_MSG_RESULT(no) +) + dnl Which form of strerror? AC_MSG_CHECKING([for GNU-style strerror_r]) AC_TRY_COMPILE( [ - #include - extern char *strerror_r(); - ], [], - AC_MSG_RESULT(yes) - AC_DEFINE(HAVE_GNU_STRERROR_R, 1, Define if strerror_r is GNU-specific) + #include + ], + [ + int errnum, buflen; + char *buf, *ret; + ret = strerror_r(errnum, buf, buflen); + ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GNU_STRERROR_R, 1, Define if strerror_r is GNU-specific) + AC_DEFINE(STRERROR_R_CHAR_P, 1, Define if strerror_r return char ptr) + ] , AC_MSG_RESULT(no) ) +dnl in our src/io/bmi/bmi-byteswap.h we check to see if __bswap_64 +dnl is defined, and if not, we define it. We probably haven't +dnl had to use our define for a long time, __bswap_64 has been +dnl defined in some glibc package (wherever /usr/include/bits/byteswap.h +dnl comes from) for a long time. We could probably get rid of our +dnl check in bmi-byteswap.h: even as far back as Red Hat 7.3 where +dnl /usr/include/bits/byteswap.h came from glibc-devel-2.2.5.34, __bswap_64 +dnl would be defined for anyone using gcc > 2.0. +dnl +dnl Anyhow, more recently (for example: when /usr/include/bits/byteswap.h +dnl comes from glibc-headers-2.17-11.fc19.x86_64), dnl __bswap_64 is +dnl an inline function in most situations. This causes our define of +dnl __bswap_64 to kick in (since __bswap_64 is NOT defined) and this +dnl is a problem - our stinky old define overrides the inline function. +dnl This test sets a define if __bswap_64 is a function. We can use +dnl this define in src/io/bmi/bmi-byteswap.h to avoid defining __bswap_64 +dnl if it is an inline function. This way, we can leave the test in +dnl src/io/bmi/bmi-byteswap.h in case there's anyone out there who +dnl still needs it. +AC_MSG_CHECKING([for __bswap_64 is a function]) +AC_TRY_COMPILE( + [ + #include + #include + ], + [ + __uint64_t x; + #ifndef __bswap_64 + __bswap_64(x); + #else + __bswap_64_is_not_a_function(not a function); + #endif + ], + [ + AC_MSG_RESULT(yes) + AC_DEFINE(BSWAP_64_IS_A_FUNC, 1, Define if __bswap_64 is a function) + ] + , + AC_MSG_RESULT(no) +) + +dnl gets has been officially removed in ISO C11 +dnl - /usr/include/stdio.h +dnl - glibc-headers-2.17-11.fc19.x86_64 +dnl +dnl glibc 2.15 and later don't declare gets anymore for ISO C11 mode +dnl and if _GNU_SOURCE is defined. +dnl - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51785 +AC_MSG_CHECKING([for gets]) +oldcflags="$CFLAGS" +CFLAGS="$CFLAGS -Werror" +AC_TRY_COMPILE( + [ + #include + ], + [ + char *s; + gets(s); + ], + AC_MSG_RESULT(yes) + , + [ + AC_MSG_RESULT(no) + AC_DEFINE(GETS_IS_GONE, 1, Define if gets is gone from stdio.h) + ] +) +CFLAGS="$oldcflags" + dnl create any missing subdirectories that wouldn't be created dnl by AC_OUTPUT below (which won't create intermediate dirs). for d in src/apps src/io src/common src/client src/kernel \ @@ -1437,6 +1792,7 @@ src/io/dev/module.mk src/proto/module.mk src/server/module.mk src/server/request-scheduler/module.mk +src/client/jni/module.mk src/client/sysint/module.mk src/client/usrint/module.mk src/kernel/linux-2.6/Makefile @@ -1537,21 +1893,42 @@ if test "x$BUILD_SERVER" = "x1" -a "x$BUILD_BMI_ONLY" != "x1"; then AC_MSG_RESULT([PVFS2 server will be built : yes]) else AC_MSG_RESULT([PVFS2 server will be built : no]) - fi if test "x$BUILD_USRINT" = "x1" ; then AC_MSG_RESULT([PVFS2 user interface libraries will be built : yes]) else AC_MSG_RESULT([PVFS2 user interface libraries will be built : no]) +fi +if test "x$BUILD_SYMBOLIC" = "x1" ; then + AC_MSG_RESULT([PVFS2 symbolic libraries will be built : yes]) +else + AC_MSG_RESULT([PVFS2 symbolic libraries will be built : no]) fi if test "x$BUILD_UCACHE" = "x1" ; then AC_MSG_RESULT([PVFS2 user interface library cache enabled : yes]) else AC_MSG_RESULT([PVFS2 user interface library cache enabled : no]) +fi +if test "x$MALLOC_REDEF" = "x1" ; then + AC_MSG_RESULT([Malloc will be redefined : yes]) +else + AC_MSG_RESULT([Malloc will be redefined : no]) +fi + +if test "x$BUILD_JNI" = "x1" ; then + AC_MSG_RESULT([PVFS2 client JNI enabled : yes]) +else + AC_MSG_RESULT([PVFS2 client JNI enabled : no]) +fi + +if test "x$BUILD_HADOOP" = "x1" ; then + AC_MSG_RESULT([OrangeFS/Hadoop libraries enabled : yes]) +else + AC_MSG_RESULT([OrangeFS/Hadoop libraries enabled : no]) fi else diff --git a/doc/.cvsignore b/doc/.cvsignore deleted file mode 100644 index d60c2ce..0000000 --- a/doc/.cvsignore +++ /dev/null @@ -1,3 +0,0 @@ -*.aux -*.log -*.toc diff --git a/doc/coding/developer-guidelines.tex b/doc/coding/developer-guidelines.tex old mode 100644 new mode 100755 diff --git a/doc/pvfs2-quickstart.tex b/doc/pvfs2-quickstart.tex old mode 100644 new mode 100755 diff --git a/doc/pvfs2-status.tex b/doc/pvfs2-status.tex old mode 100644 new mode 100755 diff --git a/doc/zones/pvfs2.conf b/doc/zones/pvfs2.conf new file mode 100644 index 0000000..b8e4c99 --- /dev/null +++ b/doc/zones/pvfs2.conf @@ -0,0 +1,44 @@ + + UnexpectedRequests 50 + EventLogging none + EnableTracing no + LogStamp datetime + BMIModules bmi_tcp + FlowModules flowproto_multiqueue + PerfUpdateInterval 1000 + ServerJobBMITimeoutSecs 30 + ServerJobFlowTimeoutSecs 30 + ClientJobBMITimeoutSecs 300 + ClientJobFlowTimeoutSecs 300 + ClientRetryLimit 5 + ClientRetryDelayMilliSecs 2000 + PrecreateBatchSize 0,32,512,32,32,32,0 + PrecreateLowThreshold 0,16,256,16,16,16,0 + + DataStorageSpace /tmp/walt/tdata-stable + MetadataStorageSpace /tmp/walt/tdata-stable + + LogFile /tmp/server-stable.log + + + + Alias node1 tcp-ib://node1-ib:3334 tcp-mx://node1-mx:3334 tcp-eth://node1:3334 + + + + Name orangefs + ID 881345249 + RootHandle 1048576 + FileStuffing yes + + Range node1 3-4611686018427387904 + + + Range node1 4611686018427387905-9223372036854775806 + + + TroveSyncMeta yes + TroveSyncData no + TroveMethod alt-aio + + diff --git a/doc/zones/pvfs2tab b/doc/zones/pvfs2tab new file mode 100644 index 0000000..81f9aa1 --- /dev/null +++ b/doc/zones/pvfs2tab @@ -0,0 +1 @@ +tcp-mx://node1-mx:3334/orangefs,tcp-ib://node1-ib:3334/orangsfs,tcp-eth://node1:3334/orangefs /mnt/pvfs2 pvfs2 defaults,noauto 0 0 diff --git a/errors b/errors new file mode 100644 index 0000000..f42e27c --- /dev/null +++ b/errors @@ -0,0 +1,830 @@ + BUILD_CC src/common/statecomp/statecomp.o + BUILD_CC src/common/statecomp/codegen.o + BISON src/common/statecomp/parser.c + BUILD_CC src/common/statecomp/parser.o + FLEX src/common/statecomp/scanner.c + BUILD_CC src/common/statecomp/scanner.o + BUILD_LD src/common/statecomp/statecomp + SMC src/server/unstuff.c + DEP src/server/unstuff.d + SMC src/server/unexpected.c + DEP src/server/unexpected.d + SMC src/server/truncate.c + DEP src/server/truncate.d + SMC src/server/tree-communicate.c + DEP src/server/tree-communicate.d + SMC src/server/statfs.c + DEP src/server/statfs.d + SMC src/server/small-io.c + DEP src/server/small-io.d + SMC src/server/setparam.c + DEP src/server/setparam.d + SMC src/server/set-eattr.c + DEP src/server/set-eattr.d + SMC src/server/set-attr.c + DEP src/server/set-attr.d + SMC src/server/rmdirent.c + DEP src/server/rmdirent.d + DEP src/server/request-scheduler/request-scheduler.d + SMC src/server/remove.c + DEP src/server/remove.d + SMC src/server/readdir.c + DEP src/server/readdir.d + DEP src/server/pvfs2-server.d + DEP src/server/pvfs2-server-req.d + SMC src/server/proto-error.c + DEP src/server/proto-error.d + SMC src/server/prelude.c + DEP src/server/prelude.d + SMC src/server/precreate-pool-refiller.c + DEP src/server/precreate-pool-refiller.d + SMC src/server/pjmp-machines.c + DEP src/server/pjmp-machines.d + SMC src/server/perf-update.c + DEP src/server/perf-update.d + SMC src/server/perf-mon.c + DEP src/server/perf-mon.d + SMC src/server/noop.c + DEP src/server/noop.d + SMC src/server/mkdir.c + DEP src/server/mkdir.d + SMC src/server/mirror.c + DEP src/server/mirror.d + SMC src/server/mgmt-remove-object.c + DEP src/server/mgmt-remove-object.d + SMC src/server/mgmt-remove-dirent.c + DEP src/server/mgmt-remove-dirent.d + SMC src/server/mgmt-get-uid.c + DEP src/server/mgmt-get-uid.d + SMC src/server/mgmt-get-dirdata-handle.c + DEP src/server/mgmt-get-dirdata-handle.d + SMC src/server/lookup.c + DEP src/server/lookup.d + SMC src/server/list-eattr.c + DEP src/server/list-eattr.d + SMC src/server/list-attr.c + DEP src/server/list-attr.d + SMC src/server/job-timer.c + DEP src/server/job-timer.d + SMC src/server/iterate-handles.c + DEP src/server/iterate-handles.d + SMC src/server/io.c + DEP src/server/io.d + SMC src/server/get-eattr.c + DEP src/server/get-eattr.d + SMC src/server/get-config.c + DEP src/server/get-config.d + SMC src/server/get-attr.c + DEP src/server/get-attr.d + SMC src/server/flush.c + DEP src/server/flush.d + SMC src/server/final-response.c + DEP src/server/final-response.d + SMC src/server/del-eattr.c + DEP src/server/del-eattr.d + SMC src/server/create.c + DEP src/server/create.d + SMC src/server/create-immutable-copies.c + DEP src/server/create-immutable-copies.d + SMC src/server/crdirent.c + DEP src/server/crdirent.d + SMC src/server/chdirent.c + DEP src/server/chdirent.d + SMC src/server/batch-remove.c + DEP src/server/batch-remove.d + SMC src/server/batch-create.c + DEP src/server/batch-create.d + DEP src/proto/PINT-reqproto-encode.d + DEP src/proto/PINT-le-bytefield.d + DEP src/io/trove/trove.d + DEP src/io/trove/trove-migrate.d + DEP src/io/trove/trove-mgmt.d + DEP src/io/trove/trove-handle-mgmt/trove-ledger.d + DEP src/io/trove/trove-handle-mgmt/trove-handle-mgmt.d + DEP src/io/trove/trove-handle-mgmt/trove-extentlist.d + DEP src/io/trove/trove-handle-mgmt/avltree.d + DEP src/io/trove/trove-error.d + DEP src/io/trove/trove-dbpf/dbpf-thread.d + DEP src/io/trove/trove-dbpf/dbpf-sync.d + DEP src/io/trove/trove-dbpf/dbpf-open-cache.d + DEP src/io/trove/trove-dbpf/dbpf-op.d + DEP src/io/trove/trove-dbpf/dbpf-op-queue.d + DEP src/io/trove/trove-dbpf/dbpf-null-aio.d + DEP src/io/trove/trove-dbpf/dbpf-mgmt.d + DEP src/io/trove/trove-dbpf/dbpf-keyval.d + DEP src/io/trove/trove-dbpf/dbpf-keyval-pcache.d + DEP src/io/trove/trove-dbpf/dbpf-error.d + DEP src/io/trove/trove-dbpf/dbpf-dspace.d + DEP src/io/trove/trove-dbpf/dbpf-context.d + DEP src/io/trove/trove-dbpf/dbpf-collection.d + DEP src/io/trove/trove-dbpf/dbpf-bstream.d + DEP src/io/trove/trove-dbpf/dbpf-bstream-direct.d + DEP src/io/trove/trove-dbpf/dbpf-bstream-aio.d + DEP src/io/trove/trove-dbpf/dbpf-attr-cache.d + DEP src/io/trove/trove-dbpf/dbpf-alt-aio.d + DEP src/io/job/thread-mgr.d + DEP src/io/job/job.d + DEP src/io/job/job-time-mgr.d + DEP src/io/job/job-desc-queue.d + DEP src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.d + DEP src/io/flow/flowproto-bmi-cache/flowproto-bmi-cache-server.d + DEP src/io/flow/flow.d + DEP src/io/flow/flow-ref.d + DEP src/io/dev/pint-dev.d + DEP src/io/description/pvfs-request.d + DEP src/io/description/pint-request.d + DEP src/io/description/pint-distribution.d + DEP src/io/description/pint-dist-utils.d + DEP src/io/description/dist-varstrip.d + DEP src/io/description/dist-varstrip-parser.d + DEP src/io/description/dist-twod-stripe.d + DEP src/io/description/dist-simple-stripe.d + DEP src/io/description/dist-basic.d + DEP src/io/buffer/state.d + DEP src/io/buffer/radix.d + DEP src/io/buffer/ncac-trove.d + DEP src/io/buffer/ncac-lru.d + DEP src/io/buffer/ncac-job.d + DEP src/io/buffer/ncac-interface.d + DEP src/io/buffer/ncac-init.d + DEP src/io/buffer/ncac-buf-job.d + DEP src/io/buffer/internal.d + DEP src/io/buffer/cache.d + DEP src/io/bmi/reference-list.d + DEP src/io/bmi/op-list.d + DEP src/io/bmi/bmi_tcp/sockio.d + DEP src/io/bmi/bmi_tcp/socket-collection-epoll.d + DEP src/io/bmi/bmi_tcp/bmi-tcp.d + DEP src/io/bmi/bmi_osd/osd.d + DEP src/io/bmi/bmi.d + DEP src/io/bmi/bmi-method-support.d + DEP src/common/statecomp/statecomp.d + DEP src/common/statecomp/scanner.d + DEP src/common/statecomp/parser.d + DEP src/common/statecomp/codegen.d + DEP src/common/misc/xattr-utils.d + SMC src/common/misc/void.c + DEP src/common/misc/void.d + DEP src/common/misc/tcache.d + DEP src/common/misc/str-utils.d + DEP src/common/misc/state-machine-fns.d + DEP src/common/misc/server-config.d + DEP src/common/misc/server-config-mgr.d + DEP src/common/misc/realpath.d + DEP src/common/misc/pvfs2-util.d + DEP src/common/misc/pvfs2-debug.d + DEP src/common/misc/pint-util.d + DEP src/common/misc/pint-uid-mgmt.d + DEP src/common/misc/pint-perf-counter.d + DEP src/common/misc/pint-malloc.d + DEP src/common/misc/pint-hint.d + DEP src/common/misc/pint-event.d + DEP src/common/misc/pint-eattr.d + DEP src/common/misc/pint-cached-config.d + SMC src/common/misc/msgpairarray.c + DEP src/common/misc/msgpairarray.d + DEP src/common/misc/mmap-ra-cache.d + DEP src/common/misc/mkspace.d + DEP src/common/misc/fsck-utils.d + DEP src/common/misc/extent-utils.d + DEP src/common/misc/errno-mapping.d + DEP src/common/misc/digest.d + DEP src/common/mgmt/pint-worker-threaded-queues.d + DEP src/common/mgmt/pint-worker-queues.d + DEP src/common/mgmt/pint-worker-pool.d + DEP src/common/mgmt/pint-worker-per-op.d + DEP src/common/mgmt/pint-worker-external.d + DEP src/common/mgmt/pint-worker-blocking.d + DEP src/common/mgmt/pint-queue.d + DEP src/common/mgmt/pint-op.d + DEP src/common/mgmt/pint-mgmt.d + DEP src/common/mgmt/pint-context.d + DEP src/common/llist/llist.d + DEP src/common/id-generator/id-generator.d + DEP src/common/gossip/gossip.d + DEP src/common/gen-locks/gen-locks.d + DEP src/common/dotconf/dotconf.d + DEP src/client/usrint/ucache.d + DEP src/client/usrint/stdio.d + DEP src/client/usrint/selinux.d + DEP src/client/usrint/request.d + DEP src/client/usrint/pvfs-qualify-path.d + DEP src/client/usrint/pvfs-path.d + DEP src/client/usrint/posix.d + DEP src/client/usrint/posix-pvfs.d + DEP src/client/usrint/openfile-util.d + DEP src/client/usrint/mmap.d + DEP src/client/usrint/iocommon.d + DEP src/client/usrint/glob.d + DEP src/client/usrint/fts.d + DEP src/client/usrint/error.d + SMC src/client/sysint/sys-truncate.c + DEP src/client/sysint/sys-truncate.d + SMC src/client/sysint/sys-symlink.c + DEP src/client/sysint/sys-symlink.d + SMC src/client/sysint/sys-statfs.c + DEP src/client/sysint/sys-statfs.d + SMC src/client/sysint/sys-small-io.c + DEP src/client/sysint/sys-small-io.d + SMC src/client/sysint/sys-setattr.c + DEP src/client/sysint/sys-setattr.d + SMC src/client/sysint/sys-set-eattr.c + DEP src/client/sysint/sys-set-eattr.d + SMC src/client/sysint/sys-rename.c + DEP src/client/sysint/sys-rename.d + SMC src/client/sysint/sys-remove.c + DEP src/client/sysint/sys-remove.d + SMC src/client/sysint/sys-readdirplus.c + DEP src/client/sysint/sys-readdirplus.d + SMC src/client/sysint/sys-readdir.c + DEP src/client/sysint/sys-readdir.d + SMC src/client/sysint/sys-osd-io.c + DEP src/client/sysint/sys-osd-io.d + SMC src/client/sysint/sys-osd-dir.c + DEP src/client/sysint/sys-osd-dir.d + SMC src/client/sysint/sys-mkdir.c + DEP src/client/sysint/sys-mkdir.d + SMC src/client/sysint/sys-lookup.c + DEP src/client/sysint/sys-lookup.d + SMC src/client/sysint/sys-list-eattr.c + DEP src/client/sysint/sys-list-eattr.d + SMC src/client/sysint/sys-io.c + DEP src/client/sysint/sys-io.d + SMC src/client/sysint/sys-getattr.c + DEP src/client/sysint/sys-getattr.d + SMC src/client/sysint/sys-get-eattr.c + DEP src/client/sysint/sys-get-eattr.d + SMC src/client/sysint/sys-flush.c + DEP src/client/sysint/sys-flush.d + DEP src/client/sysint/sys-dist.d + SMC src/client/sysint/sys-del-eattr.c + DEP src/client/sysint/sys-del-eattr.d + SMC src/client/sysint/sys-create.c + DEP src/client/sysint/sys-create.d + SMC src/client/sysint/server-get-config.c + DEP src/client/sysint/server-get-config.d + SMC src/client/sysint/remove.c + DEP src/client/sysint/remove.d + DEP src/client/sysint/pint-sysint-utils.d + SMC src/client/sysint/pint-sysdev-unexp.c + DEP src/client/sysint/pint-sysdev-unexp.d + SMC src/client/sysint/perf-count-timer.c + DEP src/client/sysint/perf-count-timer.d + SMC src/client/sysint/osdsm.c + DEP src/client/sysint/osdsm.d + DEP src/client/sysint/osd.d + DEP src/client/sysint/ncache.d + SMC src/client/sysint/mgmt-statfs-list.c + DEP src/client/sysint/mgmt-statfs-list.d + SMC src/client/sysint/mgmt-setparam-list.c + DEP src/client/sysint/mgmt-setparam-list.d + SMC src/client/sysint/mgmt-remove-object.c + DEP src/client/sysint/mgmt-remove-object.d + SMC src/client/sysint/mgmt-remove-dirent.c + DEP src/client/sysint/mgmt-remove-dirent.d + SMC src/client/sysint/mgmt-perf-mon-list.c + DEP src/client/sysint/mgmt-perf-mon-list.d + SMC src/client/sysint/mgmt-noop.c + DEP src/client/sysint/mgmt-noop.d + DEP src/client/sysint/mgmt-misc.d + SMC src/client/sysint/mgmt-iterate-handles-list.c + DEP src/client/sysint/mgmt-iterate-handles-list.d + SMC src/client/sysint/mgmt-get-uid-list.c + DEP src/client/sysint/mgmt-get-uid-list.d + SMC src/client/sysint/mgmt-get-dirdata-handle.c + DEP src/client/sysint/mgmt-get-dirdata-handle.d + SMC src/client/sysint/mgmt-get-dfile-array.c + DEP src/client/sysint/mgmt-get-dfile-array.d + DEP src/client/sysint/mgmt-get-config.d + SMC src/client/sysint/mgmt-event-mon-list.c + DEP src/client/sysint/mgmt-event-mon-list.d + SMC src/client/sysint/mgmt-create-dirent.c + DEP src/client/sysint/mgmt-create-dirent.d + DEP src/client/sysint/initialize.d + DEP src/client/sysint/getparent.d + SMC src/client/sysint/fs-add.c + DEP src/client/sysint/fs-add.d + DEP src/client/sysint/finalize.d + DEP src/client/sysint/error-details.d + DEP src/client/sysint/client-state-machine.d + SMC src/client/sysint/client-job-timer.c + DEP src/client/sysint/client-job-timer.d + DEP src/client/sysint/acache.d + DEP src/apps/user/setmattr.d + DEP src/apps/user/getmattr.d + DEP src/apps/admin/pvfs2-xattr.d + DEP src/apps/admin/pvfs2-write.d + DEP src/apps/admin/pvfs2-viewdist.d + DEP src/apps/admin/pvfs2-validate.d + DEP src/apps/admin/pvfs2-touch.d + DEP src/apps/admin/pvfs2-statfs.d + DEP src/apps/admin/pvfs2-stat.d + DEP src/apps/admin/pvfs2-showcoll.d + DEP src/apps/admin/pvfs2-set-sync.d + DEP src/apps/admin/pvfs2-set-mode.d + DEP src/apps/admin/pvfs2-set-eventmask.d + DEP src/apps/admin/pvfs2-set-debugmask.d + DEP src/apps/admin/pvfs2-rm.d + DEP src/apps/admin/pvfs2-remove-object.d + DEP src/apps/admin/pvfs2-ping.d + DEP src/apps/admin/pvfs2-perror.d + DEP src/apps/admin/pvfs2-perf-mon-snmp.d + DEP src/apps/admin/pvfs2-perf-mon-example.d + DEP src/apps/admin/pvfs2-mkspace.d + DEP src/apps/admin/pvfs2-mkdir.d + DEP src/apps/admin/pvfs2-migrate-collection.d + DEP src/apps/admin/pvfs2-ls.d + DEP src/apps/admin/pvfs2-ln.d + DEP src/apps/admin/pvfs2-get-uid.d + DEP src/apps/admin/pvfs2-fsck.d + DEP src/apps/admin/pvfs2-fs-dump.d + DEP src/apps/admin/pvfs2-drop-caches.d + DEP src/apps/admin/pvfs2-cp.d + DEP src/apps/admin/pvfs2-chown.d + DEP src/apps/admin/pvfs2-chmod.d + DEP src/apps/admin/pvfs2-check-server.d + DEP src/apps/admin/pvfs2-check-config.d + DEP src/apps/admin/pvfs2-change-fsid.d + CC src/server/pvfs2-server-server.o + CC src/server/pvfs2-server-req-server.o + CC src/common/mgmt/pint-op-server.o + CC src/common/mgmt/pint-queue-server.o + CC src/common/mgmt/pint-mgmt-server.o + CC src/common/mgmt/pint-context-server.o + CC src/common/mgmt/pint-worker-queues-server.o + CC src/common/mgmt/pint-worker-threaded-queues-server.o + CC src/common/mgmt/pint-worker-blocking-server.o + CC src/common/mgmt/pint-worker-per-op-server.o + CC src/common/mgmt/pint-worker-pool-server.o + CC src/common/mgmt/pint-worker-external-server.o + CC src/common/misc/server-config-server.o + CC src/common/misc/server-config-mgr-server.o + CC src/common/misc/str-utils-server.o + CC src/common/misc/extent-utils-server.o + CC src/common/misc/errno-mapping-server.o + CC src/common/misc/mkspace-server.o + CC src/common/misc/pvfs2-debug-server.o + CC src/common/misc/pint-perf-counter-server.o + CC src/common/misc/pint-event-server.o + CC src/common/misc/pint-cached-config-server.o + CC src/common/misc/pint-util-server.o + CC src/common/misc/tcache-server.o + CC src/common/misc/state-machine-fns-server.o + CC src/common/misc/void-server.o + CC src/common/misc/realpath-server.o + CC src/common/misc/msgpairarray-server.o + CC src/common/misc/pint-eattr-server.o + CC src/common/misc/pint-malloc-server.o + CC src/common/misc/pint-hint-server.o + CC src/common/misc/pint-uid-mgmt-server.o + CC src/common/dotconf/dotconf-server.o + CC src/common/id-generator/id-generator-server.o + CC src/common/gossip/gossip-server.o + CC src/common/llist/llist-server.o + CC src/common/gen-locks/gen-locks-server.o + CC src/proto/PINT-reqproto-encode-server.o + CC src/proto/PINT-le-bytefield-server.o + CC src/server/request-scheduler/request-scheduler-server.o + CC src/server/pjmp-machines-server.o + CC src/server/setparam-server.o + CC src/server/lookup-server.o + CC src/server/create-server.o + CC src/server/mirror-server.o + CC src/server/create-immutable-copies-server.o + CC src/server/batch-create-server.o + CC src/server/batch-remove-server.o + CC src/server/crdirent-server.o + CC src/server/set-attr-server.o + CC src/server/mkdir-server.o + CC src/server/get-attr-server.o + CC src/server/list-attr-server.o + CC src/server/readdir-server.o + CC src/server/get-config-server.o + CC src/server/remove-server.o + CC src/server/rmdirent-server.o + CC src/server/chdirent-server.o + CC src/server/io-server.o + CC src/server/small-io-server.o + CC src/server/flush-server.o + CC src/server/truncate-server.o + CC src/server/noop-server.o + CC src/server/statfs-server.o + CC src/server/prelude-server.o + CC src/server/final-response-server.o + CC src/server/perf-update-server.o + CC src/server/perf-mon-server.o + CC src/server/iterate-handles-server.o + CC src/server/job-timer-server.o + CC src/server/proto-error-server.o + CC src/server/mgmt-remove-object-server.o + CC src/server/mgmt-remove-dirent-server.o + CC src/server/mgmt-get-dirdata-handle-server.o + CC src/server/get-eattr-server.o + CC src/server/set-eattr-server.o + CC src/server/del-eattr-server.o + CC src/server/list-eattr-server.o + CC src/server/unexpected-server.o + CC src/server/precreate-pool-refiller-server.o + CC src/server/unstuff-server.o + CC src/server/tree-communicate-server.o + CC src/server/mgmt-get-uid-server.o + CC src/io/job/job-server.o + CC src/io/job/job-desc-queue-server.o + CC src/io/job/thread-mgr-server.o + CC src/io/job/job-time-mgr-server.o + CC src/io/trove/trove-dbpf/dbpf-bstream-server.o + CC src/io/trove/trove-dbpf/dbpf-collection-server.o + CC src/io/trove/trove-dbpf/dbpf-bstream-aio-server.o + CC src/io/trove/trove-dbpf/dbpf-keyval-server.o + CC src/io/trove/trove-dbpf/dbpf-attr-cache-server.o + CC src/io/trove/trove-dbpf/dbpf-open-cache-server.o + CC src/io/trove/trove-dbpf/dbpf-dspace-server.o + CC src/io/trove/trove-dbpf/dbpf-context-server.o + CC src/io/trove/trove-dbpf/dbpf-op-server.o + CC src/io/trove/trove-dbpf/dbpf-op-queue-server.o + CC src/io/trove/trove-dbpf/dbpf-thread-server.o + CC src/io/trove/trove-dbpf/dbpf-error-server.o + CC src/io/trove/trove-dbpf/dbpf-mgmt-server.o + CC src/io/trove/trove-dbpf/dbpf-keyval-pcache-server.o + CC src/io/trove/trove-dbpf/dbpf-sync-server.o + CC src/io/trove/trove-dbpf/dbpf-alt-aio-server.o + CC src/io/trove/trove-dbpf/dbpf-null-aio-server.o + CC src/io/trove/trove-dbpf/dbpf-bstream-direct-server.o + CC src/io/trove/trove-mgmt-server.o + CC src/io/trove/trove-error-server.o + CC src/io/trove/trove-migrate-server.o + CC src/io/trove/trove-server.o + CC src/io/trove/trove-handle-mgmt/avltree-server.o + CC src/io/trove/trove-handle-mgmt/trove-extentlist-server.o + CC src/io/trove/trove-handle-mgmt/trove-ledger-server.o + CC src/io/trove/trove-handle-mgmt/trove-handle-mgmt-server.o + CC src/io/buffer/ncac-interface-server.o + CC src/io/buffer/ncac-trove-server.o + CC src/io/buffer/ncac-job-server.o + CC src/io/buffer/ncac-buf-job-server.o + CC src/io/buffer/ncac-init-server.o + CC src/io/buffer/internal-server.o + CC src/io/buffer/cache-server.o + CC src/io/buffer/ncac-lru-server.o + CC src/io/buffer/state-server.o + CC src/io/buffer/radix-server.o + CC src/io/dev/pint-dev-server.o + CC src/io/flow/flowproto-bmi-trove/flowproto-multiqueue-server.o + CC src/io/flow/flow-server.o + CC src/io/flow/flow-ref-server.o + CC src/io/flow/flowproto-bmi-cache/flowproto-bmi-cache-server-server.o + CC src/io/description/pvfs-request-server.o + CC src/io/description/pint-request-server.o + CC src/io/description/pint-distribution-server.o + CC src/io/description/pint-dist-utils-server.o + CC src/io/description/dist-basic-server.o + CC src/io/description/dist-simple-stripe-server.o + CC src/io/description/dist-varstrip-parser-server.o + CC src/io/description/dist-twod-stripe-server.o + CC src/io/description/dist-varstrip-server.o + CC src/io/bmi/bmi-server.o + CC src/io/bmi/bmi-method-support-server.o + CC src/io/bmi/op-list-server.o + CC src/io/bmi/reference-list-server.o + CC src/io/bmi/bmi_tcp/bmi-tcp-server.o + CC src/io/bmi/bmi_tcp/sockio-server.o + CC src/io/bmi/bmi_tcp/socket-collection-epoll-server.o + RANLIB lib/libpvfs2-server.a + LD src/server/pvfs2-server + CC src/client/usrint/posix-pvfs.o + CC src/client/usrint/request.o + CC src/client/usrint/iocommon.o + CC src/client/usrint/openfile-util.o + CC src/client/usrint/ucache.o + CC src/client/usrint/mmap.o + CC src/client/usrint/pvfs-path.o + CC src/client/usrint/pvfs-qualify-path.o + CC src/client/sysint/finalize.o + CC src/client/sysint/initialize.o + CC src/client/sysint/acache.o + CC src/client/sysint/ncache.o + CC src/client/sysint/pint-sysint-utils.o + CC src/client/sysint/getparent.o + CC src/client/sysint/client-state-machine.o + CC src/client/sysint/mgmt-get-config.o + CC src/client/sysint/mgmt-misc.o + CC src/client/sysint/sys-dist.o + CC src/client/sysint/error-details.o + CC src/client/sysint/osd.o + CC src/client/sysint/remove.o + CC src/client/sysint/sys-getattr.o + CC src/client/sysint/sys-setattr.o + CC src/client/sysint/sys-get-eattr.o + CC src/client/sysint/sys-set-eattr.o + CC src/client/sysint/sys-del-eattr.o + CC src/client/sysint/sys-list-eattr.o + CC src/client/sysint/sys-lookup.o + CC src/client/sysint/sys-truncate.o + CC src/client/sysint/sys-io.o + CC src/client/sysint/sys-small-io.o + CC src/client/sysint/sys-create.o + CC src/client/sysint/sys-mkdir.o + CC src/client/sysint/sys-remove.o + CC src/client/sysint/sys-flush.o + CC src/client/sysint/sys-symlink.o + CC src/client/sysint/sys-readdir.o + CC src/client/sysint/sys-readdirplus.o + CC src/client/sysint/sys-rename.o + CC src/client/sysint/sys-statfs.o + CC src/client/sysint/client-job-timer.o + CC src/client/sysint/perf-count-timer.o + CC src/client/sysint/pint-sysdev-unexp.o + CC src/client/sysint/server-get-config.o + CC src/client/sysint/fs-add.o + CC src/client/sysint/mgmt-noop.o + CC src/client/sysint/mgmt-setparam-list.o + CC src/client/sysint/mgmt-statfs-list.o + CC src/client/sysint/mgmt-perf-mon-list.o + CC src/client/sysint/mgmt-event-mon-list.o + CC src/client/sysint/mgmt-iterate-handles-list.o + CC src/client/sysint/mgmt-get-dfile-array.o + CC src/client/sysint/mgmt-remove-object.o + CC src/client/sysint/mgmt-remove-dirent.o + CC src/client/sysint/mgmt-create-dirent.o + CC src/client/sysint/mgmt-get-dirdata-handle.o + CC src/client/sysint/mgmt-get-uid-list.o + CC src/client/sysint/osdsm.o + CC src/client/sysint/sys-osd-io.o + CC src/client/sysint/sys-osd-dir.o + CC src/common/mgmt/pint-op.o + CC src/common/mgmt/pint-queue.o + CC src/common/mgmt/pint-mgmt.o + CC src/common/mgmt/pint-context.o + CC src/common/mgmt/pint-worker-queues.o + CC src/common/mgmt/pint-worker-threaded-queues.o + CC src/common/mgmt/pint-worker-blocking.o + CC src/common/mgmt/pint-worker-per-op.o + CC src/common/mgmt/pint-worker-pool.o + CC src/common/mgmt/pint-worker-external.o + CC src/common/misc/server-config.o + CC src/common/misc/server-config-mgr.o + CC src/common/misc/str-utils.o + CC src/common/misc/digest.o + CC src/common/misc/xattr-utils.o + CC src/common/misc/mmap-ra-cache.o + CC src/common/misc/extent-utils.o + CC src/common/misc/errno-mapping.o + CC src/common/misc/pvfs2-util.o + CC src/common/misc/pvfs2-debug.o + CC src/common/misc/pint-perf-counter.o + CC src/common/misc/pint-event.o + CC src/common/misc/pint-cached-config.o + CC src/common/misc/pint-util.o + CC src/common/misc/msgpairarray.o + CC src/common/misc/void.o + CC src/common/misc/realpath.o + CC src/common/misc/tcache.o + CC src/common/misc/state-machine-fns.o + CC src/common/misc/fsck-utils.o + CC src/common/misc/pint-eattr.o + CC src/common/misc/pint-hint.o + CC src/common/misc/pint-malloc.o + CC src/common/misc/pint-uid-mgmt.o + CC src/common/dotconf/dotconf.o + CC src/common/id-generator/id-generator.o + CC src/common/gossip/gossip.o + CC src/common/llist/llist.o + CC src/common/gen-locks/gen-locks.o + CC src/proto/PINT-reqproto-encode.o + CC src/proto/PINT-le-bytefield.o + CC src/server/request-scheduler/request-scheduler.o + CC src/io/job/job.o + CC src/io/job/job-desc-queue.o + CC src/io/job/thread-mgr.o + CC src/io/job/job-time-mgr.o + CC src/io/dev/pint-dev.o + CC src/io/flow/flowproto-bmi-trove/flowproto-multiqueue.o + CC src/io/flow/flow.o + CC src/io/flow/flow-ref.o + CC src/io/description/pvfs-request.o + CC src/io/description/pint-request.o + CC src/io/description/pint-distribution.o + CC src/io/description/pint-dist-utils.o + CC src/io/description/dist-basic.o + CC src/io/description/dist-simple-stripe.o + CC src/io/description/dist-varstrip-parser.o + CC src/io/description/dist-twod-stripe.o + CC src/io/description/dist-varstrip.o + CC src/io/bmi/bmi_osd/osd.o + CC src/io/bmi/bmi.o + CC src/io/bmi/bmi-method-support.o + CC src/io/bmi/op-list.o + CC src/io/bmi/reference-list.o + CC src/io/bmi/bmi_tcp/bmi-tcp.o + CC src/io/bmi/bmi_tcp/sockio.o + CC src/io/bmi/bmi_tcp/socket-collection-epoll.o + RANLIB lib/libpvfs2.a + VLIB lib/liborangefs.a + CC src/client/usrint/posix.o + CC src/client/usrint/stdio.o + CC src/client/usrint/selinux.o + CC src/client/usrint/fts.o + CC src/client/usrint/glob.o + CC src/client/usrint/error.o + RANLIB lib/libofs.a + VLIB lib/liborangefsposix.a + CC src/client/usrint/posix-pvfs-threaded.o + CC src/client/usrint/request-threaded.o + CC src/client/usrint/iocommon-threaded.o + CC src/client/usrint/openfile-util-threaded.o + CC src/client/usrint/ucache-threaded.o + CC src/client/usrint/mmap-threaded.o + CC src/client/usrint/pvfs-path-threaded.o + CC src/client/usrint/pvfs-qualify-path-threaded.o + CC src/client/sysint/finalize-threaded.o + CC src/client/sysint/initialize-threaded.o + CC src/client/sysint/acache-threaded.o + CC src/client/sysint/ncache-threaded.o + CC src/client/sysint/pint-sysint-utils-threaded.o + CC src/client/sysint/getparent-threaded.o + CC src/client/sysint/client-state-machine-threaded.o + CC src/client/sysint/mgmt-get-config-threaded.o + CC src/client/sysint/mgmt-misc-threaded.o + CC src/client/sysint/sys-dist-threaded.o + CC src/client/sysint/error-details-threaded.o + CC src/client/sysint/osd-threaded.o + CC src/client/sysint/remove-threaded.o + CC src/client/sysint/sys-getattr-threaded.o + CC src/client/sysint/sys-setattr-threaded.o + CC src/client/sysint/sys-get-eattr-threaded.o + CC src/client/sysint/sys-set-eattr-threaded.o + CC src/client/sysint/sys-del-eattr-threaded.o + CC src/client/sysint/sys-list-eattr-threaded.o + CC src/client/sysint/sys-lookup-threaded.o + CC src/client/sysint/sys-truncate-threaded.o + CC src/client/sysint/sys-io-threaded.o + CC src/client/sysint/sys-small-io-threaded.o + CC src/client/sysint/sys-create-threaded.o + CC src/client/sysint/sys-mkdir-threaded.o + CC src/client/sysint/sys-remove-threaded.o + CC src/client/sysint/sys-flush-threaded.o + CC src/client/sysint/sys-symlink-threaded.o + CC src/client/sysint/sys-readdir-threaded.o + CC src/client/sysint/sys-readdirplus-threaded.o + CC src/client/sysint/sys-rename-threaded.o + CC src/client/sysint/sys-statfs-threaded.o + CC src/client/sysint/client-job-timer-threaded.o + CC src/client/sysint/perf-count-timer-threaded.o + CC src/client/sysint/pint-sysdev-unexp-threaded.o + CC src/client/sysint/server-get-config-threaded.o + CC src/client/sysint/fs-add-threaded.o + CC src/client/sysint/mgmt-noop-threaded.o + CC src/client/sysint/mgmt-setparam-list-threaded.o + CC src/client/sysint/mgmt-statfs-list-threaded.o + CC src/client/sysint/mgmt-perf-mon-list-threaded.o + CC src/client/sysint/mgmt-event-mon-list-threaded.o + CC src/client/sysint/mgmt-iterate-handles-list-threaded.o + CC src/client/sysint/mgmt-get-dfile-array-threaded.o + CC src/client/sysint/mgmt-remove-object-threaded.o + CC src/client/sysint/mgmt-remove-dirent-threaded.o + CC src/client/sysint/mgmt-create-dirent-threaded.o + CC src/client/sysint/mgmt-get-dirdata-handle-threaded.o + CC src/client/sysint/mgmt-get-uid-list-threaded.o + CC src/client/sysint/osdsm-threaded.o + CC src/client/sysint/sys-osd-io-threaded.o + CC src/client/sysint/sys-osd-dir-threaded.o + CC src/common/mgmt/pint-op-threaded.o + CC src/common/mgmt/pint-queue-threaded.o + CC src/common/mgmt/pint-mgmt-threaded.o + CC src/common/mgmt/pint-context-threaded.o + CC src/common/mgmt/pint-worker-queues-threaded.o + CC src/common/mgmt/pint-worker-threaded-queues-threaded.o + CC src/common/mgmt/pint-worker-blocking-threaded.o + CC src/common/mgmt/pint-worker-per-op-threaded.o + CC src/common/mgmt/pint-worker-pool-threaded.o + CC src/common/mgmt/pint-worker-external-threaded.o + CC src/common/misc/server-config-threaded.o + CC src/common/misc/server-config-mgr-threaded.o + CC src/common/misc/str-utils-threaded.o + CC src/common/misc/digest-threaded.o + CC src/common/misc/xattr-utils-threaded.o + CC src/common/misc/mmap-ra-cache-threaded.o + CC src/common/misc/extent-utils-threaded.o + CC src/common/misc/errno-mapping-threaded.o + CC src/common/misc/pvfs2-util-threaded.o + CC src/common/misc/pvfs2-debug-threaded.o + CC src/common/misc/pint-perf-counter-threaded.o + CC src/common/misc/pint-event-threaded.o + CC src/common/misc/pint-cached-config-threaded.o + CC src/common/misc/pint-util-threaded.o + CC src/common/misc/msgpairarray-threaded.o + CC src/common/misc/void-threaded.o + CC src/common/misc/realpath-threaded.o + CC src/common/misc/tcache-threaded.o + CC src/common/misc/state-machine-fns-threaded.o + CC src/common/misc/fsck-utils-threaded.o + CC src/common/misc/pint-eattr-threaded.o + CC src/common/misc/pint-hint-threaded.o + CC src/common/misc/pint-malloc-threaded.o + CC src/common/misc/pint-uid-mgmt-threaded.o + CC src/common/dotconf/dotconf-threaded.o + CC src/common/id-generator/id-generator-threaded.o + CC src/common/gossip/gossip-threaded.o + CC src/common/llist/llist-threaded.o + CC src/common/gen-locks/gen-locks-threaded.o + CC src/proto/PINT-reqproto-encode-threaded.o + CC src/proto/PINT-le-bytefield-threaded.o + CC src/server/request-scheduler/request-scheduler-threaded.o + CC src/io/job/job-threaded.o + CC src/io/job/job-desc-queue-threaded.o + CC src/io/job/thread-mgr-threaded.o + CC src/io/job/job-time-mgr-threaded.o + CC src/io/dev/pint-dev-threaded.o + CC src/io/flow/flowproto-bmi-trove/flowproto-multiqueue-threaded.o + CC src/io/flow/flow-threaded.o + CC src/io/flow/flow-ref-threaded.o + CC src/io/description/pvfs-request-threaded.o + CC src/io/description/pint-request-threaded.o + CC src/io/description/pint-distribution-threaded.o + CC src/io/description/pint-dist-utils-threaded.o + CC src/io/description/dist-basic-threaded.o + CC src/io/description/dist-simple-stripe-threaded.o + CC src/io/description/dist-varstrip-parser-threaded.o + CC src/io/description/dist-twod-stripe-threaded.o + CC src/io/description/dist-varstrip-threaded.o + CC src/io/bmi/bmi_osd/osd-threaded.o + CC src/io/bmi/bmi-threaded.o + CC src/io/bmi/bmi-method-support-threaded.o + CC src/io/bmi/op-list-threaded.o + CC src/io/bmi/reference-list-threaded.o + CC src/io/bmi/bmi_tcp/bmi-tcp-threaded.o + CC src/io/bmi/bmi_tcp/sockio-threaded.o + CC src/io/bmi/bmi_tcp/socket-collection-epoll-threaded.o + RANLIBTHREADED lib/libpvfs2-threaded.a + CC src/apps/admin/pvfs2-check-config.o + LD src/apps/admin/pvfs2-check-config + CC src/apps/admin/pvfs2-set-debugmask.o + LD src/apps/admin/pvfs2-set-debugmask + CC src/apps/admin/pvfs2-set-mode.o + LD src/apps/admin/pvfs2-set-mode + CC src/apps/admin/pvfs2-set-eventmask.o + LD src/apps/admin/pvfs2-set-eventmask + CC src/apps/admin/pvfs2-set-sync.o + LD src/apps/admin/pvfs2-set-sync + CC src/apps/admin/pvfs2-ls.o + LD src/apps/admin/pvfs2-ls + CC src/apps/admin/pvfs2-ping.o + LD src/apps/admin/pvfs2-ping + CC src/apps/admin/pvfs2-rm.o + LD src/apps/admin/pvfs2-rm + CC src/apps/admin/pvfs2-stat.o + LD src/apps/admin/pvfs2-stat + CC src/apps/admin/pvfs2-statfs.o + LD src/apps/admin/pvfs2-statfs + CC src/apps/admin/pvfs2-perf-mon-example.o + LD src/apps/admin/pvfs2-perf-mon-example + CC src/apps/admin/pvfs2-perf-mon-snmp.o + LD src/apps/admin/pvfs2-perf-mon-snmp + CC src/apps/admin/pvfs2-mkdir.o + LD src/apps/admin/pvfs2-mkdir + CC src/apps/admin/pvfs2-chmod.o + LD src/apps/admin/pvfs2-chmod + CC src/apps/admin/pvfs2-chown.o + LD src/apps/admin/pvfs2-chown + CC src/apps/admin/pvfs2-fs-dump.o + LD src/apps/admin/pvfs2-fs-dump + CC src/apps/admin/pvfs2-fsck.o + LD src/apps/admin/pvfs2-fsck + CC src/apps/admin/pvfs2-validate.o + LD src/apps/admin/pvfs2-validate + CC src/apps/admin/pvfs2-cp.o + LD src/apps/admin/pvfs2-cp + CC src/apps/admin/pvfs2-write.o + LD src/apps/admin/pvfs2-write + CC src/apps/admin/pvfs2-viewdist.o + LD src/apps/admin/pvfs2-viewdist + CC src/apps/admin/pvfs2-xattr.o + LD src/apps/admin/pvfs2-xattr + CC src/apps/admin/pvfs2-touch.o + LD src/apps/admin/pvfs2-touch + CC src/apps/admin/pvfs2-remove-object.o + LD src/apps/admin/pvfs2-remove-object + CC src/apps/admin/pvfs2-ln.o + LD src/apps/admin/pvfs2-ln + CC src/apps/admin/pvfs2-perror.o + LD src/apps/admin/pvfs2-perror + CC src/apps/admin/pvfs2-check-server.o + LD src/apps/admin/pvfs2-check-server + CC src/apps/admin/pvfs2-drop-caches.o + LD src/apps/admin/pvfs2-drop-caches + CC src/apps/admin/pvfs2-get-uid.o + LD src/apps/admin/pvfs2-get-uid + CC src/apps/admin/pvfs2-mkspace.o + LD src/apps/admin/pvfs2-mkspace + CC src/apps/admin/pvfs2-migrate-collection.o + LD src/apps/admin/pvfs2-migrate-collection + CC src/apps/admin/pvfs2-change-fsid.o + LD src/apps/admin/pvfs2-change-fsid + CC src/apps/admin/pvfs2-showcoll.o + LD src/apps/admin/pvfs2-showcoll + CC src/apps/user/getmattr.o + LD src/apps/user/getmattr + CC src/apps/user/setmattr.o + LD src/apps/user/setmattr + GENCONFIG src/server/simple.conf + GENCONFIG examples/fs.conf diff --git a/examples/heartbeat/Filesystem-qla-monitor b/examples/heartbeat/Filesystem-qla-monitor deleted file mode 100644 index 86e7ba2..0000000 --- a/examples/heartbeat/Filesystem-qla-monitor +++ /dev/null @@ -1,836 +0,0 @@ -#!/bin/sh -# -# $Id: Filesystem-qla-monitor,v 1.2 2008/01/28 19:45:17 pcarns Exp $ -# -# Support: linux-ha@lists.linux-ha.org -# License: GNU General Public License (GPL) -# -# Filesystem -# Description: Manages a Filesystem on a shared storage medium. -# Original Author: Eric Z. Ayers (eric.ayers@compgen.com) -# Original Release: 25 Oct 2000 -# -# Modified to support monitoring of a QLogic adapter, 2007 -# Relies on underlying scripts named fs-instance-alarm.pl and -# fs-power-control.pl to take action in the event of monitoring failure -# -# usage: ./Filesystem {start|stop|status|monitor|validate-all|meta-data} -# -# OCF parameters are as below: -# OCF_RESKEY_device -# OCF_RESKEY_directory -# OCF_RESKEY_fstype -# OCF_RESKEY_options -# OCF_RESKEY_fsname -# OCF_RESKEY_conf_dir -# -#OCF_RESKEY_device : name of block device for the filesystem. e.g. /dev/sda1, /dev/md0 -# Or a -U or -L option for mount, or an NFS mount specification -#OCF_RESKEY_directory : the mount point for the filesystem -#OCF_RESKEY_fstype : optional name of the filesystem type. e.g. ext2 -#OCF_RESKEY_options : options to be given to the mount command via -o -#OCF_RESKEY_fsname : file system name (PVFS2) -#OCF_RESKEY_conf_dir : file system conf directory (PVFS2) -# -# -# An example usage in /etc/ha.d/haresources: -# node1 10.0.0.170 Filesystem::/dev/sda1::/data1::ext2 -# or -# node1 10.0.0.170 Filesystem::-Ldata1::/data1::ext2 -# or -# node1 10.0.0.170 Filesystem::server:/data1::/data1::nfs::ro -# -# This assumes you want to manage a filesystem on a shared (scsi) bus. -# Do not put this filesystem in /etc/fstab. This script manages all of -# that for you. -# -# If you are interested in High Availability, you will probably also want -# some sort of external hardware RAID controller in front of the actual -# disks. I don't mean a RAID controller embedded in the host controller - -# it has to be an external controller. -# -# It can also be an internal RAID controller if the controller supports -# failover. IBM's ServeRAID controller does this, and it automatically -# prohibits concurrent access too, so it's pretty cool in this application. -# -# There is a script for software RAID-1 included in this directory. Right -# now, I wouldn't recommend using software RAID (see notes in the Raid1 script) -# -# NOTE: There is no locking (such as a SCSI reservation) being done here. -# I would if the SCSI driver could properly maintain the reservation, -# which it cannot, even with the 'scsi reservation' patch submitted -# earlier this year by James Bottomley. The patch minimizes the -# bus resets caused by a RESERVATION_CONFLICT return, and helps the -# reservation stay when 2 nodes contend for a reservation, -# but it does not attempt to recover the reservation in the -# case of a bus reset. -# -# What all this means is that if 2 nodes mount the same file system -# read-write, the filesystem is going to become corrupted. -# -# As a result, you should use this together with the stonith option -# and redundant, independent communications paths. -# -# If you don't do this, don't blame us when you scramble your disk. -# -# Note: the ServeRAID controller does prohibit concurrent acess -# In this case, you don't actually need STONITH, but redundant comm is -# still an excellent idea. -# - -####################################################################### -# Initialization: - -# newer versions of heartbeat have moved the ocf-shellfuncs file -if [ -f /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs ] ; then -. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs -else -. /usr/lib/heartbeat/ocf-shellfuncs -fi - -####################################################################### - -# Utilities used by this script -MODPROBE=/sbin/modprobe -FSCK=/sbin/fsck -FUSER=/sbin/fuser -MOUNT=/bin/mount -UMOUNT=/bin/umount -BLOCKDEV=/sbin/blockdev - -check_util () { - if [ ! -x "$1" ] ; then - ocf_log err "Setup problem: Couldn't find utility $1" - exit $OCF_ERR_GENERIC - fi -} - -usage() { - cat <<-EOT - usage: $0 {start|stop|status|monitor|validate-all|meta-data} - $Id: Filesystem-qla-monitor,v 1.2 2008/01/28 19:45:17 pcarns Exp $ - EOT -} - -meta_data() { - cat < - - -1.0 - - -Resource script for Filesystem. It manages a Filesystem on a shared storage medium. - -Filesystem resource agent - - - - -The name of block device for the filesystem, or -U, -L options for mount, or NFS mount specification. - -block device - - - - - -The mount point for the filesystem. - -mount point - - - - - -Name of PVFS2 file system - -File system - - - - - -Path to file system conf directory - -File system conf directory - - - - - -The optional type of filesystem to be mounted. - -filesystem type - - - - - -Any extra options to be given as -o options to mount. - -options - - - - - -The name (UUID) of the OCFS2 cluster this filesystem is part of, -iff this is an OCFS2 resource and there's more than one cluster. You -should not need to specify this. - -OCFS2 cluster name/UUID - - - - - -Mountpoint of the cluster hierarchy below configfs. You should not -need to specify this. - -OCFS2 configfs root - - - - - - - - - - - - - - -END -} - -# -# Make sure the kernel does the right thing with the FS buffers -# This function should be called after unmounting and before mounting -# It may not be necessary in 2.4 and later kernels, but it shouldn't hurt -# anything either... -# -# It's really a bug that you have to do this at all... -# -flushbufs() { - if - [ "$BLOCKDEV" != "" -a -x "$BLOCKDEV" -a "$blockdevice" = "yes" ] - then - $BLOCKDEV --flushbufs $1 - return $? - fi - - return 0 -} - -# Take advantage of /proc/mounts if present, use portabel mount command -# otherwise. Normalize format to "dev mountpoint fstype". -list_mounts() { - if [ -f "/proc/mounts" -a -r "/proc/mounts" ]; then - cut -d' ' -f1,2,3 /dev/null) - set -- $OCFS2_CLUSTER - local n="$#" - if [ $n -gt 1 ]; then - ocf_log err "$OCFS2_CLUSTER: several clusters found." - exit $OCF_ERR_GENERIC - fi - if [ $n -eq 0 ]; then - ocf_log err "$OCFS2_CONFIGFS: no clusters found." - exit $OCF_ERR_GENERIC - fi - fi - - OCFS2_CLUSTER_ROOT="$OCFS2_CONFIGFS/$OCFS2_CLUSTER" - if [ ! -d "$OCFS2_CLUSTER_ROOT" ]; then - ocf_log err "$OCFS2_CLUSTER: Cluster doesn't exist. Maybe o2cb hasn't been run?" - exit $OCF_ERR_GENERIC - fi - - OCFS2_FS_ROOT=$OCFS2_CLUSTER_ROOT/heartbeat/$OCFS2_UUID -} - -# -# START: Start up the filesystem -# -Filesystem_start() -{ - if [ "$FSTYPE" = "ocfs2" ]; then - # "start" now has the notification data available; that - # we're being started means we didn't get the - # pre-notification, because we weren't running, so - # process the information now first. - ocf_log info "$OCFS2_UUID: Faking pre-notification on start." - OCF_RESKEY_CRM_meta_notify_type="pre" - OCF_RESKEY_CRM_meta_notify_operation="start" - Filesystem_notify - fi - - # See if the device is already mounted. - if Filesystem_status >/dev/null 2>&1 ; then - ocf_log info "Filesystem $MOUNTPOINT is already mounted." - return $OCF_SUCCESS - fi - - # Insert SCSI module - # TODO: This probably should go away. Why should the filesystem - # RA magically load a kernel module? - $MODPROBE scsi_hostadapter >/dev/null 2>&1 - - if [ -z $FSTYPE ]; then - : No $FSTYPE specified, rely on the system has the right file-system support already - else - # Insert Filesystem module - $MODPROBE $FSTYPE >/dev/null 2>&1 - grep -e "$FSTYPE"'$' /proc/filesystems >/dev/null - if [ $? != 0 ] ; then - ocf_log err "Couldn't find filesystem $FSTYPE in /proc/filesystems" - return $OCF_ERR_ARGS - fi - fi - - # Check the filesystem & auto repair. - # NOTE: Some filesystem types don't need this step... Please modify - # accordingly - - if [ $blockdevice = "yes" ]; then - if [ ! -b "$DEVICE" ] ; then - ocf_log err "Couldn't find device [$DEVICE]. Expected /dev/??? to exist" - exit $OCF_ERR_ARGS - fi - - if - case $FSTYPE in - ext3|reiserfs|reiser4|nss|xfs|jfs|vfat|fat|nfs|cifs|smbfs|ocfs2) false;; - *) true;; - esac - then - ocf_log info "Starting filesystem check on $DEVICE" - if [ -z $FSTYPE ]; then - $FSCK -a $DEVICE - else - $FSCK -t $FSTYPE -a $DEVICE - fi - - # NOTE: if any errors at all are detected, it returns non-zero - # if the error is >= 4 then there is a big problem - if - [ $? -ge 4 ] - then - ocf_log err "Couldn't sucessfully fsck filesystem for $DEVICE" - return $OCF_ERR_GENERIC - fi - fi - fi - - if [ ! -d "$MOUNTPOINT" ] ; then - ocf_log err "Couldn't find directory [$MOUNTPOINT] to use as a mount point" - exit $OCF_ERR_ARGS - fi - - flushbufs $DEVICE - # Mount the filesystem. - if [ -z $FSTYPE ]; then - $MOUNT $options $DEVICE $MOUNTPOINT - else - $MOUNT -t $FSTYPE $options $DEVICE $MOUNTPOINT - fi - - if [ $? -ne 0 ]; then - ocf_log err "Couldn't mount filesystem $DEVICE on $MOUNTPOINT" - if [ "$FSTYPE" = "ocfs2" ]; then - ocfs2_cleanup - fi - return $OCF_ERR_GENERIC - fi - - return 0 -} -# end of Filesystem_start - -Filesystem_notify() { - # Process notifications; this is the essential glue level for - # giving user-space membership events to a cluster-aware - # filesystem. Right now, only OCFS2 is supported. - # - # When we get a pre-start notification, we set up all the nodes - # which will be active in our membership for the filesystem. - # (For the resource to be started, this happens at the time of - # the actual 'start' operation.) - # - # At a post-start, actually there's nothing to do for us really, - # but no harm done in re-syncing either. - # - # pre-stop is meaningless; we can't remove any node yet, it - # first needs to unmount. - # - # post-stop: the node is removed from the membership of the - # other nodes. - # - # Note that this expects that the base cluster is already - # active; ie o2cb has been started and populated - # $OCFS2_CLUSTER_ROOT/node/ already. This can be achieved by - # simply having o2cb run on all nodes by the CRM too. This - # probably ought to be mentioned somewhere in the to be written - # documentation. ;-) - # - - if [ "$FSTYPE" != "ocfs2" ]; then - # One of the cases which shouldn't occur; it should have - # been caught much earlier. Still, you know ... - ocf_log err "$DEVICE: Notification received for non-ocfs2 mount." - return $OCF_ERR_GENERIC - fi - - local n_type="$OCF_RESKEY_CRM_meta_notify_type" - local n_op="$OCF_RESKEY_CRM_meta_notify_operation" - local n_active="$OCF_RESKEY_CRM_meta_notify_active_uname" - local n_stop="$OCF_RESKEY_CRM_meta_notify_stop_uname" - local n_start="$OCF_RESKEY_CRM_meta_notify_start_uname" - - ocf_log info "$OCFS2_UUID: notify: $n_type for $n_op" - ocf_log info "$OCFS2_UUID: notify active: $n_active" - ocf_log info "$OCFS2_UUID: notify stop: $n_stop" - ocf_log info "$OCFS2_UUID: notify start: $n_start" - - case "$n_type" in - pre) - case "$n_op" in - stop) - ocf_log info "$OCFS2_UUID: ignoring pre-notify for stop." - return $infoUCCESS - ;; - start) - # These are about to become active; prepare to - # communicate with them. - n_active="$n_active $n_start" - ;; - esac - ;; - post) - case "$n_op" in - stop) - # remove unames from notify_stop_uname; these have been - # stopped and can no longer be considered active. - for UNAME in "$n_stop"; do - n_active="${n_active//$UNAME/}" - done - ;; - start) - if [ "$n_op" = "start" ]; then - ocf_log info "$OCFS2_UUID: ignoring post-notify for start." - return $OCF_SUCCESS - fi - ;; - esac - ;; - esac - - ocf_log info "$OCFS2_UUID: post-processed active: $n_active" - - local n_myself=${HA_CURHOST:-$(uname -n | tr A-Z a-z)} - ocf_log info "$OCFS2_UUID: I am node $n_myself." - - case " $n_active " in - *" $n_myself "*) ;; - *) ocf_log err "$OCFS2_UUID: $n_myself (local) not on active list!" - return $OCF_ERR_GENERIC - ;; - esac - - if [ -d "$OCFS2_FS_ROOT" ]; then - entry_prefix=$OCFS2_FS_ROOT/ - for entry in $OCFS2_FS_ROOT/* ; do - n_fs="${entry##$entry_prefix}" -# ocf_log info "$OCFS2_UUID: Found current node $n_fs" - case " $n_active " in - *" $n_fs "*) - # Construct a list of nodes which are present - # already in the membership. - n_exists="$n_exists $n_fs" - ocf_log info "$OCFS2_UUID: Keeping node: $n_fs" - ;; - *) - # Node is in the membership currently, but not on our - # active list. Must be removed. - if [ "$n_op" = "start" ]; then - ocf_log warn "$OCFS2_UUID: Removing nodes on start" - fi - ocf_log info "$OCFS2_UUID: Removing dead node: $n_fs" - if ! rm -f $entry ; then - ocf_log err "$OCFS2_UUID: Removal of $n_fs failed!" - fi - ;; - esac - done - else - ocf_log info "$OCFS2_UUID: heartbeat directory doesn't exist yet, creating." - mkdir -p $OCFS2_FS_ROOT - fi - - ocf_log info "$OCFS2_UUID: Existing node list: $n_exists" - - # (2) - for entry in $n_active ; do -# ocf_log info "$OCFS2_UUID: Expected active node: $entry" - case " $n_exists " in - *" $entry "*) - ocf_log info "$OCFS2_UUID: Already active: $entry" - ;; - *) - if [ "$n_op" = "stop" ]; then - ocf_log warn "$OCFS2_UUID: Adding nodes on stop" - fi - ocf_log info "$OCFS2_UUID: Activating node: $entry" - if ! ln -s $OCFS2_CLUSTER_ROOT/node/$entry $OCFS2_FS_ROOT/$entry ; then - ocf_log err "$OCFS2_CLUSTER_ROOT/node/$entry: failed to link" - fi - ;; - esac - done -} - -# -# STOP: Unmount the filesystem -# -Filesystem_stop() -{ - # See if the device is currently mounted - Filesystem_status >/dev/null 2>&1 - if [ $? -ne $OCF_NOT_RUNNING ]; then - # Determine the real blockdevice this is mounted on (if - # possible) prior to unmounting. - determine_blockdevice - - # For networked filesystems, there's merit in trying -f: - case "$FSTYPE" in - nfs|cifs|smbfs) umount_force="-f" ;; - esac - - # Umount all sub-filesystems mounted under $MOUNTPOINT/ too. - for SUB in `list_submounts $MOUNTPOINT` $MOUNTPOINT; do - ocf_log info "Trying to unmount $MOUNTPOINT" - for sig in SIGTERM SIGTERM SIGTERM SIGKILL SIGKILL SIGKILL; do - if $UMOUNT $umount_force $SUB ; then - rc=$OCF_SUCCESS - ocf_log info "unmounted $SUB successfully" - break - else - rc=$OCF_ERR_GENERIC - ocf_log err "Couldn't unmount $SUB; trying cleanup with $sig" - # fuser returns a non-zero return code if none of the - # specified files is accessed or in case of a fatal - # error. - if $FUSER -$sig -m -k $SUB ; then - ocf_log info "Some processes on $SUB were signalled" - else - ocf_log info "No processes on $SUB were signalled" - fi - sleep 1 - fi - done - - if [ $rc -ne $OCF_SUCCESS ]; then - ocf_log err "Couldn't unmount $SUB, giving up!" - fi - done - else - # Already unmounted, wonderful. - rc=$OCF_SUCCESS - fi - - flushbufs $DEVICE - - if [ "$FSTYPE" = "ocfs2" ]; then - ocfs2_cleanup - fi - - return $rc -} -# end of Filesystem_stop - -# -# STATUS: is the file system mounted and the SAN path alive? -# -Filesystem_status_qla_monitor() -{ - Filesystem_status >/dev/null 2>&1 - ORIG_RET=$? - if [ $ORIG_RET -eq $OCF_SUCCESS ]; then - # the fs is mounted. Are the paths ok? - /usr/bin/qla-monitor.pl --device $DEVICE - if [ $? -ne 0 ]; then - # log as much as we can - ocf_log info "Error: $DEVICE is dead." - echo "Error: $DEVICE is dead on node `hostname`, failing over" >> /var/log/pvfs2/pvfs2-failover.log; - /usr/bin/fs-instance-alarm.pl --fs-name $fsname --ce `hostname` --type PVFS2_HA --msg "$DEVICE is dead, failing over." - /usr/bin/fs-power-control.pl --fs-name $fsname --conf-dir $conf_dir --host `hostname` --command reboot - # shoot ourselves in the head - return $OCF_ERR_GENERIC - else - return $ORIG_RET - fi - fi - return $ORIG_RET -} -# end of Filesystem_status_qla_monitor - -# -# STATUS: is the filesystem mounted or not? -# -Filesystem_status() -{ - if - list_mounts | grep -q " $MOUNTPOINT " >/dev/null 2>&1 - then - rc=$OCF_SUCCESS - msg="$MOUNTPOINT is mounted (running)" - else - rc=$OCF_NOT_RUNNING - msg="$MOUNTPOINT is unmounted (stopped)" - fi - - # TODO: For ocfs2, or other cluster filesystems, should we be - # checking connectivity to other nodes here, or the IO path to - # the storage? - - case "$OP" in - status) ocf_log info "$msg";; - esac - return $rc -} -# end of Filesystem_status - -# -# VALIDATE_ALL: Are the instance parameters valid? -# FIXME!! The only part that's useful is the return code. -# This code always returns $OCF_SUCCESS (!) -# -Filesystem_validate_all() -{ - if [ -n $MOUNTPOINT -a ! -d $MOUNTPOINT ]; then - ocf_log warn "Mountpoint $MOUNTPOINT does not exist" - fi - -# Check if the $FSTYPE is workable -# NOTE: Without inserting the $FSTYPE module, this step may be imprecise -# TODO: This is Linux specific crap. - if [ ! -z $FSTYPE ]; then - cut -f2 /proc/filesystems |grep -q ^$FSTYPE$ - if [ $? -ne 0 ]; then - modpath=/lib/modules/`uname -r` - moddep=$modpath/modules.dep - # Do we have $FSTYPE in modules.dep? - cut -d' ' -f1 $moddep |grep -q "^$modpath.*$FSTYPE\.k\?o:$" - if [ $? -ne 0 ]; then - ocf_log info "It seems we do not have $FSTYPE support" - fi - fi - fi - -#TODO: How to check the $options ? - - return $OCF_SUCCESS -} - -# Check the arguments passed to this script -if - [ $# -ne 1 ] -then - usage - exit $OCF_ERR_ARGS -fi - -if - [ -z "$OCF_RESKEY_fsname" ] -then - ocf_log err "Filesystem-qla-monitor must specify fsname!" -# usage - exit $OCF_ERR_GENERIC -fi - -if - [ -z "$OCF_RESKEY_conf_dir" ] -then - ocf_log err "Filesystem-qla-monitor must specify conf_dir!" -# usage - exit $OCF_ERR_GENERIC -fi - -# Check the OCF_RESKEY_ environment variables... -DEVICE=$OCF_RESKEY_device -FSTYPE=$OCF_RESKEY_fstype -if [ ! -z "$OCF_RESKEY_options" ]; then - options="-o $OCF_RESKEY_options" -fi -fsname=$OCF_RESKEY_fsname -conf_dir=$OCF_RESKEY_conf_dir - -OP=$1 - -# These operations do not require instance parameters -case $OP in - meta-data) meta_data - exit $OCF_SUCCESS - ;; - usage) usage - exit $OCF_SUCCESS - ;; -esac - -blockdevice=no -case $DEVICE in - "") ocf_log err "Please set OCF_RESKEY_device to the device to be managed" - exit $OCF_ERR_ARGS - ;; - -*) # Oh... An option to mount instead... Typically -U or -L - ;; - [^/]*:/*) # An NFS filesystem specification... - ;; - //[^/]*/*) # An SMB filesystem specification... - ;; - *) if [ ! -b "$DEVICE" -a "X$OP" != Xstart ] ; then - ocf_log warn "Couldn't find device [$DEVICE]. Expected /dev/??? to exist" - fi - blockdevice=yes - ;; -esac - -case $FSTYPE in - ocfs2) - ocfs2_init - ;; - nfs) - : # this is kind of safe too - ;; - *) - if [ -n "$OCF_RESKEY_CRM_meta_clone_max" ]; then - ocf_log err "DANGER! $FSTYPE on $DEVICE is NOT cluster-aware!" - ocf_log err "DO NOT RUN IT AS A CLONE!" - ocf_log err "Politely refusing to proceed to avoid data corruption." - exit $OCF_ERR_GENERIC - fi - ;; -esac - -# It is possible that OCF_RESKEY_directory has one or even multiple trailing "/". -# But the output of `mount` and /proc/mounts do not. -if [ -z $OCF_RESKEY_directory ]; then - if [ X$OP = "Xstart" -o $blockdevice = "no" ]; then - ocf_log err "Please specify the directory" - exit $OCF_ERR_ARGS - fi -else - MOUNTPOINT=$(echo $OCF_RESKEY_directory | sed 's/\/*$//') - : ${MOUNTPOINT:=/} - # At this stage, $MOUNTPOINT does not contain trailing "/" unless it is "/" - # TODO: / mounted via Filesystem sounds dangerous. On stop, we'll - # kill the whole system. Is that a good idea? -fi - -# Check to make sure the utilites are found -check_util $MODPROBE -check_util $FSCK -check_util $FUSER -check_util $MOUNT -check_util $UMOUNT - -if [ "$OP" != "monitor" ]; then - ocf_log info "Running $OP for $DEVICE on $MOUNTPOINT" -fi - -case $OP in - start) Filesystem_start - ;; - notify) Filesystem_notify - ;; - stop) Filesystem_stop - ;; - status|monitor) Filesystem_status_qla_monitor - ;; - validate-all) Filesystem_validate_all - ;; - *) usage - exit $OCF_ERR_UNIMPLEMENTED - ;; -esac -exit $? diff --git a/examples/heartbeat/PVFS2-notify b/examples/heartbeat/PVFS2-notify deleted file mode 100644 index 1cfc241..0000000 --- a/examples/heartbeat/PVFS2-notify +++ /dev/null @@ -1,261 +0,0 @@ -#!/bin/sh -# -# Resource script for PVFS2_notify -# -# Provides a generic hook for sending notifications if a PVFS2 resource is -# failed over to another node. -# -# Based on MailTo script by Alan Robertson -# -# Description: Logs a message whenever a resource group starts or stops. -# -# OCF parameters are as below: -# OCF_RESKEY_conf_dir -# OCF_RESKEY_title -# OCF_RESKEY_firsthost -# -# License: GNU General Public License (GPL) - -VARRUN=/var/run -MAILTOFILE=$VARRUN/PVFS2_notify -####################################################################### -# Initialization: - -# newer versions of heartbeat have moved the ocf-shellfuncs file -if [ -f /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs ] ; then -. /usr/lib/ocf/resource.d/heartbeat/.ocf-shellfuncs -else -. /usr/lib/heartbeat/ocf-shellfuncs -fi - -####################################################################### - -ARGS="$0 $*" - -us=`uname -n` - -usage() { - echo "Usage: $0 {start|stop|status|monitor|meta-data|validate-all}" - echo "$Id: PVFS2-notify,v 1.2 2008/01/28 19:45:17 pcarns Exp $" -} - -meta_data() { - cat < - - -1.0 - - -This is a resource agent for PVFS2_notify. It logs or performs notification when a takeover occurs. - -PVFS2_notify resource agent - - - - -Original host for this resource - -Original host for this resource - - - - - -Title/identifier for the notification. - -Subject - - - - - -Configuration directory for file system (PVFS2) - -Configuration Directory - - - - - -Name of file system (PVFS2) - -Name of file system - - - - - - - - - - - - - - -END -} - -MailProgram() { - mail -s "$1" "$email" </dev/null -# if [ $? -eq 0 ]; then -# : OK, mail to $item@localhost.localdomain -# else -# ocf_log err "Invalid email address [$email]" -# exit $OCF_ERR_ARGS -# fi -# ;; -# esac -# done - -# Any title is OK - - return $OCF_SUCCESS -} - -# -# See how we were called. -# -# The order in which heartbeat provides arguments to resource -# scripts is broken. It should be fixed. -# - -if - ( [ $# -ne 1 ] ) -then - usage - exit $OCF_ERR_GENERIC -fi - -case $1 in - meta-data) meta_data - exit $OCF_SUCCESS - ;; - # Not quite sure what to do with this one... - # We aren't a continuously running service - so it's not clear - # - status|monitor) PVFS2_notifyStatus - exit $? - ;; - usage) usage - exit $OCF_SUCCESS - ;; - *) ;; -esac - -if - [ -z "$OCF_RESKEY_conf_dir" ] -then - ocf_log err "PVFS2-notify must specify conf_dir!" -# usage - exit $OCF_ERR_GENERIC -fi - -if - [ -z "$OCF_RESKEY_fsname" ] -then - ocf_log err "PVFS2-notify must specify fsname!" -# usage - exit $OCF_ERR_GENERIC -fi - -conf_dir=$OCF_RESKEY_conf_dir -fsname=$OCF_RESKEY_fsname -title=$OCF_RESKEY_title -firsthost=$OCF_RESKEY_firsthost - -case $1 in - start) PVFS2_notifyStart - ;; - stop) PVFS2_notifyStop - ;; - validate-all) PVFS2_notifyValidateAll - ;; - *) usage - exit $OCF_ERR_UNIMPLEMENTED - ;; -esac -exit $? diff --git a/examples/heartbeat/apc-switched-pdu-hybrid-control.pl b/examples/heartbeat/apc-switched-pdu-hybrid-control.pl deleted file mode 100644 index cf4b1e3..0000000 --- a/examples/heartbeat/apc-switched-pdu-hybrid-control.pl +++ /dev/null @@ -1,138 +0,0 @@ -#!/usr/bin/perl - -# requires APC MIB file, which is available for download from APC's web site - -# this script will first attempt to use SNMP to send power control commands, -# and then fail back to using SSH - -use strict; -use Getopt::Long; -use File::Find; -use File::Path; -use POSIX qw(setsid); -use Socket; - -my $host; -my $ssh_user; -my $ssh_pass; -my $snmp_user; -my $snmp_pass; -my $outlet; -my $cmd; - -my $snmp_command; - -&process_args; - -if($cmd eq "on") -{ - $snmp_command = "snmpset -v3 -a MD5 -l authNoPriv -u $snmp_user -A $snmp_pass -m \"/var/lib/filesystems/powernet387.mib\" $host PowerNet-MIB::rPDUOutletControlOutletCommand.$outlet = 1"; -} -elsif($cmd eq "off") -{ - $snmp_command = "snmpset -v3 -a MD5 -l authNoPriv -u $snmp_user -A $snmp_pass -m \"/var/lib/filesystems/powernet387.mib\" $host PowerNet-MIB::rPDUOutletControlOutletCommand.$outlet = 2"; -} -elsif($cmd eq "reboot") -{ - $snmp_command = "snmpset -v3 -a MD5 -l authNoPriv -u $snmp_user -A $snmp_pass -m \"/var/lib/filesystems/powernet387.mib\" $host PowerNet-MIB::rPDUOutletControlOutletCommand.$outlet = 3"; -} -else -{ - die("Error: $cmd is not a valid outlet command.\n"); -} - -# try snmp first -my $snmp_output = `$snmp_command 2>&1`; -if ( $? == 0 ) -{ - exit 0; -} - -# fall back to ssh -my $ssh_command = "/usr/bin/apc-switched-pdu-ssh-control.exp $host $ssh_user $ssh_pass $outlet $cmd"; - -my $ssh_output = `$ssh_command 2>&1`; -if ( $? == 0 ) -{ - exit 0; -} - -# if we reach this point, then neither worked -print "Error: failed to contact APC unit.\n"; -print "SNMP output: $snmp_output"; -print "SSH output: $ssh_output"; - -exit 1; - -sub process_args -{ - # Parse the command line options - # For a description of the command line options see &print_help - use vars qw( $opt_help $opt_host $opt_ssh_user $opt_ssh_pass $opt_snmp_user $opt_snmp_pass $opt_outlet $opt_cmd); - - Getopt::Long::Configure( "no_ignore_case", "bundling"); - GetOptions( "help", - "host=s", - "ssh-user=s", - "ssh-pass=s", - "snmp-user=s", - "snmp-pass=s", - "outlet=i", - "cmd=s"); - - if ($opt_help) - { - &print_help; - exit(0); - } - - if(!$opt_host || !$opt_ssh_user || !$opt_ssh_pass || - !$opt_snmp_user || !$opt_snmp_pass || !$opt_outlet || !$opt_cmd) - { - &print_help; - die "Error: missing arguments.\n"; - } - - $host = $opt_host; - $ssh_user = $opt_ssh_user; - $ssh_pass = $opt_ssh_pass; - $snmp_user = $opt_snmp_user; - $snmp_pass = $opt_snmp_pass; - $outlet = $opt_outlet; - $cmd = $opt_cmd; -} - - -# --------------- print help information ------------------------------ -sub print_help { - - print < - -options: - --help print this help and exit - --host hostname of APC unit - --ssh-user ssh username for APC unit - --ssh-pass ssh password for APC unit - --snmp-user SNMP username for APC unit - --snmp-pass SNMP authentication pass phrase (MD5) for APC unit - --outlet APC outlet to control - --cmd control command to send (on, off, or reboot) - -EOF -} - -# Local variables: -# c-basic-offset: 3 -# perl-indent-level: 3 -# tab-width: 3 -# indent-tabs-mode: nil -# shiftwidth: 3 -# End: -# -# vim: ts=3 expandtab - diff --git a/examples/heartbeat/apc-switched-pdu-hybrid-monitor.pl b/examples/heartbeat/apc-switched-pdu-hybrid-monitor.pl deleted file mode 100644 index c6ea74f..0000000 --- a/examples/heartbeat/apc-switched-pdu-hybrid-monitor.pl +++ /dev/null @@ -1,116 +0,0 @@ -#!/usr/bin/perl - -# requires APC MIB file, which is available for download from APC's web site - -# this script will first attempt to use SNMP to monitor a power strip, -# and then fail back to using SSH - -use strict; -use Getopt::Long; -use File::Find; -use File::Path; -use POSIX qw(setsid); -use Socket; - -my $host; -my $ssh_user; -my $ssh_pass; -my $snmp_user; -my $snmp_pass; - -&process_args; - -# try snmp first -my $snmp_command = "snmpstatus -v3 -a MD5 -l authNoPriv -u $snmp_user -A $snmp_pass $host"; - -my $snmp_output = `$snmp_command 2>&1`; -if ( $? == 0 ) -{ - # print "Success, snmp\n"; - exit 0; -} - -# fall back to ssh -my $ssh_command = "/usr/bin/apc-switched-pdu-ssh-monitor.exp $host $ssh_user $ssh_pass"; - -my $ssh_output = `$ssh_command 2>&1`; -if ( $? == 0 ) -{ - # print "Success, ssh\n"; - exit 0; -} - -# if we reach this point, then neither worked -print "Error: failed to contact APC unit.\n"; -print "SNMP output: $snmp_output"; -print "SSH output: $ssh_output"; - -exit 1; - -sub process_args -{ - # Parse the command line options - # For a description of the command line options see &print_help - use vars qw( $opt_help $opt_host $opt_ssh_user $opt_ssh_pass $opt_snmp_user $opt_snmp_pass); - - Getopt::Long::Configure( "no_ignore_case", "bundling"); - GetOptions( "help", - "host=s", - "ssh-user=s", - "ssh-pass=s", - "snmp-user=s", - "snmp-pass=s"); - - if ($opt_help) - { - &print_help; - exit(0); - } - - if(!$opt_host || !$opt_ssh_user || !$opt_ssh_pass || - !$opt_snmp_user || !$opt_snmp_pass) - { - &print_help; - die "Error: missing arguments.\n"; - } - - $host = $opt_host; - $ssh_user = $opt_ssh_user; - $ssh_pass = $opt_ssh_pass; - $snmp_user = $opt_snmp_user; - $snmp_pass = $opt_snmp_pass; -} - - -# --------------- print help information ------------------------------ -sub print_help { - - print < - -options: - --help print this help and exit - --host hostname of APC unit - --ssh-user ssh username for APC unit - --ssh-pass ssh password for APC unit - --snmp-user SNMP username for APC unit - --snmp-pass SNMP authentication pass phrase (MD5) for APC unit - -EOF -} - -# Local variables: -# c-basic-offset: 3 -# perl-indent-level: 3 -# tab-width: 3 -# indent-tabs-mode: nil -# shiftwidth: 3 -# End: -# -# vim: ts=3 expandtab - diff --git a/examples/heartbeat/apc-switched-pdu-hybrid-outlet-status.pl b/examples/heartbeat/apc-switched-pdu-hybrid-outlet-status.pl deleted file mode 100644 index 2204f0d..0000000 --- a/examples/heartbeat/apc-switched-pdu-hybrid-outlet-status.pl +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/perl - -# requires APC MIB file, which is available for download from APC's web site - -# this script will first attempt to use SNMP to send power control commands, -# and then fail back to using SSH - -use strict; -use Getopt::Long; -use File::Find; -use File::Path; -use POSIX qw(setsid); -use Socket; - -my $host; -my $ssh_user; -my $ssh_pass; -my $snmp_user; -my $snmp_pass; -my $outlet; - -my $snmp_command; - -&process_args; - -$snmp_command = "snmpget -v3 -a MD5 -l authNoPriv -u $snmp_user -A $snmp_pass -m \"/var/lib/filesystems/powernet387.mib\" $host PowerNet-MIB::rPDUOutletControlOutletCommand.$outlet"; - -my $snmp_output = `$snmp_command 2>&1`; -if ( $? == 0 ) -{ - if($snmp_output =~ /immediateOn/) - { - print "On\n"; - } - elsif($snmp_output =~ /immediateOff/) - { - print "Off\n"; - } - else - { - print "Unknown\n"; - } - - exit 0; -} - -# no fall back to ssh implemented in this script - -print "Error: failed to contact APC unit.\n"; -print "SNMP output: $snmp_output"; -print "SSH unsupported in this utility.\n"; - -exit 1; - -sub process_args -{ - # Parse the command line options - # For a description of the command line options see &print_help - use vars qw( $opt_help $opt_host $opt_ssh_user $opt_ssh_pass $opt_snmp_user $opt_snmp_pass $opt_outlet); - - Getopt::Long::Configure( "no_ignore_case", "bundling"); - GetOptions( "help", - "host=s", - "ssh-user=s", - "ssh-pass=s", - "snmp-user=s", - "snmp-pass=s", - "outlet=i"); - - if ($opt_help) - { - &print_help; - exit(0); - } - - if(!$opt_host || !$opt_ssh_user || !$opt_ssh_pass || - !$opt_snmp_user || !$opt_snmp_pass || !$opt_outlet) - { - &print_help; - die "Error: missing arguments.\n"; - } - - $host = $opt_host; - $ssh_user = $opt_ssh_user; - $ssh_pass = $opt_ssh_pass; - $snmp_user = $opt_snmp_user; - $snmp_pass = $opt_snmp_pass; - $outlet = $opt_outlet; -} - - -# --------------- print help information ------------------------------ -sub print_help { - - print < - -options: - --help print this help and exit - --host hostname of APC unit - --ssh-user ssh username for APC unit - --ssh-pass ssh password for APC unit - --snmp-user SNMP username for APC unit - --snmp-pass SNMP authentication pass phrase (MD5) for APC unit - --outlet APC outlet to control - -EOF -} - -# Local variables: -# c-basic-offset: 3 -# perl-indent-level: 3 -# tab-width: 3 -# indent-tabs-mode: nil -# shiftwidth: 3 -# End: -# -# vim: ts=3 expandtab - diff --git a/examples/heartbeat/apc-switched-pdu-ssh-control.exp b/examples/heartbeat/apc-switched-pdu-ssh-control.exp deleted file mode 100644 index 6374f24..0000000 --- a/examples/heartbeat/apc-switched-pdu-ssh-control.exp +++ /dev/null @@ -1,217 +0,0 @@ -#!/usr/bin/expect -f - -# expect script to login to a baytech management module and control power -# to one of its outlets - -# gather command line arguments into variables -set host [lrange $argv 0 0] -set user [lrange $argv 1 1] -set password [lrange $argv 2 2] -set outlet [lrange $argv 3 3] -set command [lrange $argv 4 4] - -# complain if we don't get exactly 5 arguments -if {$argc!=5} { - send_user "Usage: apc-switched-pdu-ssh-control.exp \n" - send_user " NOTE: may be \"on\" \"off\" or \"reboot\"\n" - exit 1 -} - -set apc_command "" - -if { [string compare $command "on"] == 0 } { - set apc_command "1" -} -if { [string compare $command "off"] == 0 } { - set apc_command "2" -} -if { [string compare $command "reboot"] == 0 } { - set apc_command "3" -} - -if { [string compare $apc_command ""] == 0 } { - send_error "Error: must be one of on|off|reboot.\n" - exit 1 -} - -# use a 30 second timeout -set timeout 30 - -# this disables showing interaction on stdout. It should be commented -# if you are trying to debug this script and want to see what it is doing -log_user 0 - -# delete old log file and start a new one -#system rm -f /tmp/expect.log -#log_file -a /tmp/expect.log - -# open ssh connection. Turn off strict host checking so ssh doesn't ask us -# if it is ok to connect to this hostname -spawn ssh "-oStrictHostKeyChecking no" $user@$host - -# Look for passwod prompt -expect { - "*?assword:*" {} - default { - # password prompt never showed up - send_user "failed to ssh to host $host\n" - exit 1 - } -} - -# Send password aka $password -send -- "$password\r" - -# look for top level prompt -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: host $host failed to accept username and password\n" - exit 1 - } -} - -send -- "1\r" - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- "2\r" - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- "1\r" - -while {1} { - expect { - "*to continue*" {send -- "\r"} - "> " {break } - default {} - } -} - -send -- "$outlet\r" - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- "1\r" - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - - -send -- "$apc_command\r" - -expect { - "*to continue*" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- "YES\r" - -while {1} { - expect { - "*to continue*" {send -- "\r"} - "> " {break } - default {} - } -} - -send -- \003 - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- \003 - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- \003 - -while {1} { - expect { - "*to continue*" {send -- "\r"} - "> " {break } - default {} - } -} - -send -- \003 - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -send -- \003 - -expect { - "> *" {} - default { - # our user name and password did not work - send_user "Error: unable to control outlet\n" - exit 1 - } -} - -# send logout command -send -- "4\r" - -expect { - eof {} - default { - send_user "Error: could not log out cleanly\n" - close - wait - exit 1 - } -} - diff --git a/examples/heartbeat/apc-switched-pdu-ssh-monitor.exp b/examples/heartbeat/apc-switched-pdu-ssh-monitor.exp deleted file mode 100644 index d374312..0000000 --- a/examples/heartbeat/apc-switched-pdu-ssh-monitor.exp +++ /dev/null @@ -1,65 +0,0 @@ -#!/usr/bin/expect -f - -# expect script to login to a baytech management module and control power -# to one of its outlets - -# gather command line arguments into variables -set host [lrange $argv 0 0] -set user [lrange $argv 1 1] -set password [lrange $argv 2 2] - -# complain if we don't get exactly 5 arguments -if {$argc!=3} { - send_user "Usage: apc-switched-pdu-ssh-monitor.exp \n" - exit 1 -} - -# use a 30 second timeout -set timeout 30 - -# this disables showing interaction on stdout. It should be commented -# if you are trying to debug this script and want to see what it is doing -log_user 0 - -# delete old log file and start a new one -#system rm -f /tmp/expect.log -#log_file -a /tmp/expect.log - -# open ssh connection. Turn off strict host checking so ssh doesn't ask us -# if it is ok to connect to this hostname -spawn ssh "-oStrictHostKeyChecking no" $user@$host - -# Look for passwod prompt -expect { - "*?assword:*" {} - default { - # password prompt never showed up - send_user "failed to ssh to host $host\n" - exit 1 - } -} - -# Send password aka $password -send -- "$password\r" -# look for top level prompt -expect { - "*> *" {} - default { - # our user name and password did not work - send_user "Error: host $host failed to accept username and password\n" - exit 1 - } -} - -# send logout command -send -- "4\r" - -expect { - eof {} - default { - send_user "Error: could not log out cleanly\n" - close - wait - exit 1 - } -} diff --git a/examples/heartbeat/baytech-mgmt-control.exp b/examples/heartbeat/baytech-mgmt-control.exp deleted file mode 100644 index 8f82037..0000000 --- a/examples/heartbeat/baytech-mgmt-control.exp +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/expect -f - -# expect script to login to a baytech management module and control power -# to one of its outlets - -# gather command line arguments into variables -set host [lrange $argv 0 0] -set user [lrange $argv 1 1] -set password [lrange $argv 2 2] -set strip [lrange $argv 3 3] -set outlet [lrange $argv 4 4] -set command [lrange $argv 5 5] - -# complain if we don't get exactly 5 arguments -if {$argc!=6} { - send_user "Usage: baytech.exp \n" - send_user " NOTE: may be \"on\" \"off\" or \"reboot\"\n" - exit 1 -} - -set bay_command "" - -if { [string compare $command "on"] == 0 } { - set bay_command "On" -} -if { [string compare $command "off"] == 0 } { - set bay_command "Off" -} -if { [string compare $command "reboot"] == 0 } { - set bay_command "Reboot" -} - -if { [string compare $bay_command ""] == 0 } { - send_error "Error: must be one of on|off|reboot.\n" - exit 1 -} - -# use a 15 second timeout -set timeout 15 - -# this disables showing interaction on stdout. It should be commented -# if you are trying to debug this script and want to see what it is doing -log_user 0 - -# delete old log file and start a new one -#system rm -f /tmp/expect.log -#log_file -a /tmp/expect.log - -# open ssh connection. Turn off strict host checking so ssh doesn't ask us -# if it is ok to connect to this hostname -spawn ssh "-oStrictHostKeyChecking no" $user@$host - -# Look for passwod prompt -expect { - "*?assword:*" {} - default { - # password prompt never showed up - send_user "failed to ssh to host $host\n" - exit 1 - } -} - -# Send password aka $password -send -- "$password\r" -# look for top level prompt -expect { - "*Enter Request*" {} - default { - # our user name and password did not work - send_user "Error: host $host failed to accept username and password\n" - exit 1 - } -} - -# send strip name, wait, and then send an extra carriage return -# (for some reason the Baytech will not always continue to the next screen on -# its own) -send -- "$strip\r" -sleep 5 -send -- "\r" - -# wait for prompt for particular strip, then send command to power on -expect { - "*RPC-28A>*" {} - default { - send_user "Error: failed to select strip $strip\n" - exit 1 - } -} -send -- "$bay_command $outlet\r" - -# wait for the Y/N confirmation and send a Y -expect { - "*Y/N*" {} - default { - send_user "Error: failed to issue command for outlet $outlet\n" - exit 1 - } -} - -send -- "Y\r" - -# wait for command to complete -expect { - "*RPC-28A>*" {} - default { - send_user "Error: failed to confirm command for outlet $outlet\n" - exit 1 - } -} - -# Ordinarily we would now send some sort of "logout" command and then expect -# eof. For some reason the Baytech devices will not let us logout gracefully -# however, so we instead just close the connection and return after waiting -# for the result - -close -wait - diff --git a/examples/heartbeat/baytech-mgmt-monitor.exp b/examples/heartbeat/baytech-mgmt-monitor.exp deleted file mode 100644 index fe052bb..0000000 --- a/examples/heartbeat/baytech-mgmt-monitor.exp +++ /dev/null @@ -1,59 +0,0 @@ -#!/usr/bin/expect -f - -# expect script to login to a baytech management module and control power -# to one of its outlets - -# gather command line arguments into variables -set host [lrange $argv 0 0] -set user [lrange $argv 1 1] -set password [lrange $argv 2 2] - -# complain if we don't get exactly 5 arguments -if {$argc!=3} { - send_user "Usage: baytech.exp \n" - exit 1 -} - -# use a 15 second timeout -set timeout 15 - -# this disables showing interaction on stdout. It should be commented -# if you are trying to debug this script and want to see what it is doing -log_user 0 - -# delete old log file and start a new one -#system rm -f /tmp/expect.log -#log_file -a /tmp/expect.log - -# open ssh connection. Turn off strict host checking so ssh doesn't ask us -# if it is ok to connect to this hostname -spawn ssh "-oStrictHostKeyChecking no" $user@$host - -# Look for passwod prompt -expect { - "*?assword:*" {} - default { - # password prompt never showed up - send_user "failed to ssh to host $host\n" - exit 1 - } -} - -# Send password aka $password -send -- "$password\r" -# look for top level prompt -expect { - "*Enter Request*" {} - default { - # our user name and password did not work - send_user "Error: host $host failed to accept username and password\n" - exit 1 - } -} - -# send logout command -send -- "T\r" - -close -wait - diff --git a/examples/heartbeat/pvfs2-stonith-plugin b/examples/heartbeat/pvfs2-stonith-plugin deleted file mode 100644 index b746a4e..0000000 --- a/examples/heartbeat/pvfs2-stonith-plugin +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -# -# External STONITH module for power control of PVFS2 servers - -case $1 in -gethosts) - /usr/bin/fs-power-gethosts.pl --fs-name $fs_name - exit 0 - ;; -on) - /usr/bin/fs-power-control.pl --fs-name $fs_name --conf-dir $fs_conf_dir --host $2 --command on - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1 - fi - exit 0 - ;; -off) - /usr/bin/fs-power-control.pl --fs-name $fs_name --conf-dir $fs_conf_dir --host $2 --command off - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1 - fi - exit 0 - ;; -reset) - /usr/bin/fs-power-control.pl --fs-name $fs_name --conf-dir $fs_conf_dir --host $2 --command reboot - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1 - fi - exit 0 - ;; -status) - /usr/bin/fs-power-monitor.pl --conf-dir $fs_conf_dir --fs-name $fs_name - RETVAL=$? - if [ $RETVAL -ne 0 ]; then - exit 1 - fi - exit 0 - ;; -getconfignames) - echo "fs_name" - echo "fs_conf_dir" - exit 0 - ;; -getinfo-devid) - echo "PVFS2 stonith device" - exit 0 - ;; -getinfo-devname) - echo "PVFS2 stonith device" - exit 0 - ;; -getinfo-devdescr) - echo "Power control for PVFS2 servers" - exit 0 - ;; -getinfo-devurl) - echo "NONE" - exit 0 - ;; -getinfo-xml) - cat << XML - - - - -file system name - - -Name of the file system that this device is being used with - - - - - -file system configuration directory - - -Path to the shared configuration directory for the file system - - - -XML - exit 0 - ;; -*) - exit 1 - ;; -esac diff --git a/examples/heartbeat/qla-monitor.pl b/examples/heartbeat/qla-monitor.pl deleted file mode 100644 index 69129d9..0000000 --- a/examples/heartbeat/qla-monitor.pl +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/perl - -use strict; -use Getopt::Long; -use File::Find; -use File::Path; -use POSIX qw(setsid); -use Socket; - -my $device = undef; -my $mon_device = undef; - -&process_args; - -# strip path and partition off of device name -if($device =~ /\/+dev\/+([a-zA-Z]+)[1234567890]*/) -{ - $mon_device = $1; -} -else -{ - print "Error: poorly formated device name.\n"; - exit 1; -} - -my $devcount = `powermt display dev=$mon_device 2>&1 |grep -c -E "(qla)|(lpfc)"`; -if ($devcount < 1) -{ - print "Error: could not find device $mon_device.\n"; - exit 1; -} -chomp($devcount); - -my $deadcount = `powermt display dev=$mon_device 2>&1 |grep -E "(qla)|(lpfc)" | grep -c dead`; -chomp($deadcount); - -if($devcount == $deadcount) -{ - print "Error: all paths for device $device are dead.\n"; - exit 1; -} - -exit 0; - -sub process_args -{ - # Parse the command line options - # For a description of the command line options see &print_help - use vars qw( $opt_help $opt_device); - - Getopt::Long::Configure( "no_ignore_case", "bundling"); - GetOptions( "help", - "device=s"); - - if ($opt_help) - { - &print_help; - exit(0); - } - - if($opt_device) - { - $device = $opt_device; - } - else - { - &print_help; - die "Error: must specify device.\n"; - } -} - -# --------------- print help information ------------------------------ -sub print_help { - - print < - -options: - --help Print this help and exit. - --device SAN device (such as /dev/emcpowera1). - -EOF -} - -# Local variables: -# c-basic-offset: 3 -# perl-indent-level: 3 -# tab-width: 3 -# indent-tabs-mode: nil -# shiftwidth: 3 -# End: -# -# vim: ts=3 expandtab - diff --git a/examples/pvfs2-server.rc.in b/examples/pvfs2-server.rc.in old mode 100644 new mode 100755 diff --git a/include/pvfs2-hint.h b/include/pvfs2-hint.h index 390a68d..726ebf3 100644 --- a/include/pvfs2-hint.h +++ b/include/pvfs2-hint.h @@ -21,7 +21,7 @@ #define PVFS_HINT_DFILE_COUNT_NAME "pvfs.hint.dfile_count" #define PVFS_HINT_LAYOUT_NAME "pvfs.hint.layout" #define PVFS_HINT_SERVERLIST_NAME "pvfs.hint.serverlist" -#define PVFS_HINT_NOCACHE_NAME "pvfs.hint.nocache" +#define PVFS_HINT_CACHE_NAME "pvfs.hint.cache" typedef struct PVFS_hint_s *PVFS_hint; diff --git a/include/pvfs2-sysint.h b/include/pvfs2-sysint.h index b4d10b6..ae2186c 100644 --- a/include/pvfs2-sysint.h +++ b/include/pvfs2-sysint.h @@ -48,7 +48,7 @@ struct PVFS_sys_attr_s PVFS_size size; PVFS_handle cid; PVFS2_ALIGN_VAR(char *, link_target);/**< NOTE: caller must free if valid */ - PVFS2_ALIGN_VAR(int32_t, dfile_count); /* Changed to int32_t so that size of structure does not change */ + PVFS2_ALIGN_VAR(int32_t, dfile_count); PVFS2_ALIGN_VAR(uint32_t, mirror_copies_count); PVFS2_ALIGN_VAR(char*, dist_name); /**< NOTE: caller must free if valid */ PVFS2_ALIGN_VAR(char*, dist_params); /**< NOTE: caller must free if valid */ @@ -63,15 +63,14 @@ typedef struct PVFS_sys_attr_s PVFS_sys_attr; /** Describes a PVFS2 file system. */ struct PVFS_sys_mntent { - char **pvfs_config_servers; /**< addresses of servers with config info */ - int32_t num_pvfs_config_servers; /**< changed to int32_t so that size of structure does not change */ + char **pvfs_config_servers; /**< addresses of servers with config info */ + int32_t num_pvfs_config_servers; char *the_pvfs_config_server; /**< first of the entries above that works */ - char *pvfs_fs_name; /**< name of PVFS2 file system */ + char *pvfs_fs_name; /**< name of PVFS2 file system */ enum PVFS_flowproto_type flowproto; /**< flow protocol */ enum PVFS_encoding_type encoding; /**< wire data encoding */ PVFS_fs_id fs_id; /**< fs id, filled in by system interface when it looks up the fs */ - /* int32_t for portable, fixed size structure */ - int32_t default_num_dfiles; /**< Default number of dfiles mount option value */ + int32_t default_num_dfiles; /**< Default number of dfiles mount option */ int32_t integrity_check; /**< Check to determine whether the mount process must perform the integrity checks on the config files */ /* the following fields are included for convenience; * useful if the file system is "mounted" */ @@ -161,7 +160,7 @@ struct PVFS_sysresp_readdir_s { PVFS_ds_position token; PVFS_dirent *dirent_array; - uint32_t pvfs_dirent_outcount; /* uint32_t for portable, fixed size structure */ + uint32_t pvfs_dirent_outcount; uint64_t directory_version; }; typedef struct PVFS_sysresp_readdir_s PVFS_sysresp_readdir; @@ -174,7 +173,7 @@ struct PVFS_sysresp_readdirplus_s { PVFS_ds_position token; PVFS_dirent *dirent_array; - uint32_t pvfs_dirent_outcount; /**< uint32_t for portable, fixed size structure */ + uint32_t pvfs_dirent_outcount; uint64_t directory_version; PVFS_error *stat_err_array; PVFS_sys_attr *attr_array; @@ -188,7 +187,7 @@ typedef struct PVFS_sysresp_readdirplus_s PVFS_sysresp_readdirplus; struct PVFS_sysresp_statfs_s { PVFS_statfs statfs_buf; - int32_t server_count; /* int32_t for portable, fixed size structure */ + int32_t server_count; }; typedef struct PVFS_sysresp_statfs_s PVFS_sysresp_statfs; diff --git a/include/pvfs2-usrint.h b/include/pvfs2-usrint.h index 08ae3dc..6fb6b8a 100644 --- a/include/pvfs2-usrint.h +++ b/include/pvfs2-usrint.h @@ -13,21 +13,25 @@ #ifndef PVFS_USRINT_H #define PVFS_USRINT_H 1 +/* This should turn on all but the FILE_OFFSET_BITS but we keep */ +/* the others as documentation of what is needed for usrint */ #ifndef _GNU_SOURCE #define _GNU_SOURCE 1 #endif #ifndef _ATFILE_SOURCE #define _ATFILE_SOURCE 1 #endif -#ifndef _LARGEFILE_SOURCE +/* Must have LARGEFILE and LARGEFILE64 for PVFS usrint */ +#ifdef _LARGEFILE_SOURCE +#undef _LARGEFILE_SOURCE #define _LARGEFILE_SOURCE 1 #endif -#ifndef _LARGEFILE64_SOURCE +#ifdef _LARGEFILE64_SOURCE +#undef _LARGEFILE64_SOURCE #define _LARGEFILE64_SOURCE 1 #endif -#ifndef _USE_FILE_OFFSET64 -#define _USE_FILE_OFFSET64 1 -#endif +/* If programmer didn't specify this, force it to 64bit */ +/* This only affects the default interface */ #ifndef _FILE_OFFSET_BITS #define _FILE_OFFSET_BITS 64 #endif @@ -215,7 +219,7 @@ extern int pvfs_linkat (int olddirfd, const char *oldpath, /* this reads exactly one dirent, count is ignored */ extern int pvfs_readdir(unsigned int fd, struct dirent *dirp, unsigned int count); -/* this reads multiple dirents, up to count */ +/* this reads multiple dirents, count is buffer size */ extern int pvfs_getdents(unsigned int fd, struct dirent *dirp, unsigned int count); extern int pvfs_getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int count); diff --git a/include/pvfs2-util.h b/include/pvfs2-util.h index ff314c0..68f9250 100644 --- a/include/pvfs2-util.h +++ b/include/pvfs2-util.h @@ -74,10 +74,7 @@ int PVFS_util_resolve( char* out_fs_path, int out_fs_path_max); int PVFS_util_resolve_absolute( - const char* local_path, - PVFS_fs_id* out_fs_id, - char* out_fs_path, - int out_fs_path_max); + const char* local_path); int PVFS_util_get_default_fsid( PVFS_fs_id* out_fs_id); diff --git a/include/pvfs2.h b/include/pvfs2.h index 842da60..e7500bc 100644 --- a/include/pvfs2.h +++ b/include/pvfs2.h @@ -15,7 +15,7 @@ #ifndef PVFS2_VERSION_MAJOR #define PVFS2_VERSION_MAJOR 2 #define PVFS2_VERSION_MINOR 8 -#define PVFS2_VERSION_SUB 6 +#define PVFS2_VERSION_SUB 8 #endif #include "pvfs2-types.h" diff --git a/include/windows/memleaks.h b/include/windows/memleaks.h new file mode 100644 index 0000000..a3b773b --- /dev/null +++ b/include/windows/memleaks.h @@ -0,0 +1,19 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Windows memory leak header -- included with Force Include Files option + * in OrangeFS MemLeaks target + */ + +#ifndef __MEMLEAKS_H +#define __MEMLEAKS_H + +#define _CRTDBG_MAP_ALLOC +#include +#include + +#endif diff --git a/include/windows/pvfs2-config.h b/include/windows/pvfs2-config.h new file mode 100644 index 0000000..80ba621 --- /dev/null +++ b/include/windows/pvfs2-config.h @@ -0,0 +1,506 @@ +/* pvfs2-config.h. Generated from pvfs2-config.h.in by configure. */ +/* pvfs2-config.h.in. Generated from configure.in by autoheader. */ + +/* Define if building universal (internal helper macro) */ +/* #undef AC_APPLE_UNIVERSAL_BUILD */ + +/* Define if berkeley db error reporting was enabled */ +/* #undef BERKDB_ERROR_REPORTING */ + +/* Define if kernel has aio support */ +/* #undef HAVE_AIO */ + +/* Define if aiocb->__error_code exists */ +/* #define HAVE_AIOCB_ERROR_CODE 1 */ + +/* Define if aiocb->__return_value exists */ +/* #define HAVE_AIOCB_RETURN_VALUE 1 */ + +/* Define if VFS AIO support in kernel has a new prototype */ +/* #undef HAVE_AIO_NEW_AIO_SIGNATURE */ + +/* Define if we are enabling VFS AIO support in kernel */ +/* #undef HAVE_AIO_VFS_SUPPORT */ + +/* Define if read_descriptor_t has an arg member */ +/* #undef HAVE_ARG_IN_READ_DESCRIPTOR_T */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_ARPA_INET_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ASM_IOCTL32_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ATTR_XATTR_H */ + +/* Define if kernel backing_dev_info struct has a name field */ +/* #undef HAVE_BACKING_DEV_INFO_NAME */ + +/* Define if bdi_init function is present */ +/* #undef HAVE_BDI_INIT */ + +/* Define if struct backing_dev_info in kernel has memory_backed */ +/* #undef HAVE_BDI_MEMORY_BACKED */ + +/* Define if struct file_operations has combined aio_read and readv functions + */ +/* #undef HAVE_COMBINED_AIO_AND_VECTOR */ + +/* Define if there exists a compat_ioctl member in file_operations */ +/* #undef HAVE_COMPAT_IOCTL_HANDLER */ + +/* Define if third param (message) to DB error callback function is const */ +#define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 + +/* Define if cred.h contains current_fsuid */ +/* #undef HAVE_CURRENT_FSUID */ + +/* Define if DB error callback function takes dbenv parameter */ +#define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 + +/* Define if db library has DB_BUFFER_SMALL error */ +#define HAVE_DB_BUFFER_SMALL 1 + +/* Define if db library has DB_DIRTY_READ flag */ +#define HAVE_DB_DIRTY_READ 1 + +/* Define if DB has get_pagesize function */ +#define HAVE_DB_GET_PAGESIZE 1 + +/* Define if super_operations statfs has dentry argument */ +/* #undef HAVE_DENTRY_STATFS_SOP */ + +/* Define if kernel super_operations contains drop_inode field */ +/* #undef HAVE_DROP_INODE */ + +/* Define if dcache.h contains d_alloc_annon */ +/* #undef HAVE_D_ALLOC_ANON */ + +/* Define if export_operations has an encode_fh member */ +/* #undef HAVE_ENCODEFH_EXPORT_OPERATIONS */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_EXECINFO_H 1 */ + +/* Define to 1 if you have the `fgetxattr' function. */ +/* #define HAVE_FGETXATTR 1 */ + +/* Define if fgetxattr takes position and option arguments */ +/* #undef HAVE_FGETXATTR_EXTRA_ARGS */ + +/* Define if system provides fgtxattr prototype */ +/* #define HAVE_FGETXATTR_PROTOTYPE 1 */ + +/* Define if export_operations has an fh_to_dentry member */ +/* #undef HAVE_FHTODENTRY_EXPORT_OPERATIONS */ + +/* Define if struct inode_operations in kernel has fill_handle callback */ +/* #undef HAVE_FILL_HANDLE_INODE_OPERATIONS */ + +/* Define if struct super_operations in kernel has find_inode_handle callback + */ +/* #undef HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS */ + +/* Define to 1 if you have the `fsetxattr' function. */ +/* #define HAVE_FSETXATTR 1 */ + +/* Define if fsetxattr takes position and option arguments */ +/* #undef HAVE_FSETXATTR_EXTRA_ARGS */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_FSTAB_H 1 */ + +/* Define if kernel has generic_file_readv */ +/* #undef HAVE_GENERIC_FILE_READV */ + +/* Define if kernel has generic_getxattr */ +/* #undef HAVE_GENERIC_GETXATTR */ + +/* Define if kernel has generic_permission */ +/* #undef HAVE_GENERIC_PERMISSION */ + +/* Define if struct inode_operations in kernel has getattr_lite callback */ +/* #undef HAVE_GETATTR_LITE_INODE_OPERATIONS */ + +/* Define if gethostbyaddr function exists */ +#define HAVE_GETHOSTBYADDR 1 + +/* Define if gethostbyname function exists */ +#define HAVE_GETHOSTBYNAME 1 + +/* Define to 1 if you have the `getmntent' function. */ +/* #define HAVE_GETMNTENT 1 */ + +/* Define if pwd.h exists */ +/* #define HAVE_GETPWUID 1 */ + +/* Define if struct super_operations in kernel has get_fs_key callback */ +/* #undef HAVE_GET_FS_KEY_SUPER_OPERATIONS */ + +/* Define if strerror_r is GNU-specific */ +/* #undef HAVE_GNU_STRERROR_R */ + +/* Define if libibverbs has reregister event */ +/* #undef HAVE_IBV_EVENT_CLIENT_REREGISTER */ + +/* Define if libibverbs has ibv_get_devices */ +/* #undef HAVE_IBV_GET_DEVICES */ + +/* Define if IB wrap_common.h exists. */ +/* #undef HAVE_IB_WRAP_COMMON_H */ + +/* Define if kernel has iget4_locked */ +/* #undef HAVE_IGET4_LOCKED */ + +/* Define if kernel has iget5_locked */ +/* #undef HAVE_IGET5_LOCKED */ + +/* Define if kernel has iget_locked */ +/* #undef HAVE_IGET_LOCKED */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_INTTYPES_H 1 */ + +/* Define if sceond argument to releasepage in address_space_operations is + type int */ +/* #undef HAVE_INT_ARG2_ADDRESS_SPACE_OPERATIONS_RELEASEPAGE */ + +/* Define if return type of invalidatepage should be int */ +/* #undef HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE */ + +/* Define if return value from follow_link in inode_operations is type int */ +/* #undef HAVE_INT_RETURN_INODE_OPERATIONS_FOLLOW_LINK */ + +/* Define if return value from kmem_cache_destroy is type int */ +/* #undef HAVE_INT_RETURN_KMEM_CACHE_DESTROY */ + +/* Define if struct inode in kernel has i_blksize member */ +/* #undef HAVE_I_BLKSIZE_IN_STRUCT_INODE */ + +/* Define if struct inode in kernel has i_sem member */ +/* #undef HAVE_I_SEM_IN_STRUCT_INODE */ + +/* Define if kernel has i_size_read */ +/* #undef HAVE_I_SIZE_READ */ + +/* Define if kernel has i_size_write */ +/* #undef HAVE_I_SIZE_WRITE */ + +/* Define if kernel has device classes */ +/* #undef HAVE_KERNEL_DEVICE_CLASSES */ + +/* Define if kernel kmem_cache_create constructor has newer-style + one-parameter form */ +/* #undef HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM */ + +/* Define if kernel kmem_cache_create constructor has new-style two-parameter + form */ +/* #undef HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM */ + +/* Define if kernel kmem_cache_create has destructor param */ +/* #undef HAVE_KMEM_CACHE_CREATE_DESTRUCTOR_PARAM */ + +/* Define if kmem_cache_destroy returns int */ +/* #undef HAVE_KMEM_CACHE_DESTROY_INT_RETURN */ + +/* Define if kzalloc exists */ +/* #undef HAVE_KZALLOC */ + +/* Define to 1 if you have the `efence' library (-lefence). */ +/* #undef HAVE_LIBEFENCE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_COMPAT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_EXPORTFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_IOCTL32_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_MOUNT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_POSIX_ACL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_POSIX_ACL_XATTR_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_SYSCALLS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LINUX_XATTR_ACL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MALLOC_H 1 + +/* Define if kernel defines mapping_nrpages macro -- defined by RT linux */ +/* #undef HAVE_MAPPING_NRPAGES_MACRO */ + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_MNTENT_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_MNTENT_H_ */ + +/* Define if mount.h contains MNT_NOATIME flags */ +/* #undef HAVE_MNT_NOATIME */ + +/* Define if mount.h contains MNT_NODIRATIME flags */ +/* #undef HAVE_MNT_NODIRATIME */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_NETDB_H 1 */ + +/* Define if including linux/config.h gives no warnings */ +/* #undef HAVE_NOWARNINGS_WHEN_INCLUDING_LINUX_CONFIG_H */ + +/* Define if FS_IOC flags missing from fs.h */ +/* #undef HAVE_NO_FS_IOC_FLAGS */ + +/* Define if struct page defines a count member without leading underscore */ +/* #undef HAVE_OBSOLETE_STRUCT_PAGE_COUNT_NO_UNDERSCORE */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENSSL_CRYPTO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_OPENSSL_EVP_H */ + +/* Define if sysctl proc handlers have 6th argument */ +/* #undef HAVE_PROC_HANDLER_FILE_ARG */ + +/* Define if sysctl proc handlers have ppos argument */ +/* #undef HAVE_PROC_HANDLER_PPOS_ARG */ + +/* Define if have PtlACEntry with jid argument. */ +/* #undef HAVE_PTLACENTRY_JID */ + +/* Define to 1 if you have the `PtlErrorStr' function. */ +/* #undef HAVE_PTLERRORSTR */ + +/* Define to 1 if you have the `PtlEventKindStr' function. */ +/* #undef HAVE_PTLEVENTKINDSTR */ + +/* Define if kernel super_operations contains put_inode field */ +/* #undef HAVE_PUT_INODE */ + +/* Define if struct file_operations in kernel has readdirplus_lite callback */ +/* #undef HAVE_READDIRPLUSLITE_FILE_OPERATIONS */ + +/* Define if struct file_operations in kernel has readdirplus callback */ +/* #undef HAVE_READDIRPLUS_FILE_OPERATIONS */ + +/* Define if struct file_operations in kernel has readv callback */ +/* #undef HAVE_READV_FILE_OPERATIONS */ + +/* Define if struct file_operations in kernel has readx callback */ +/* #undef HAVE_READX_FILE_OPERATIONS */ + +/* Define if kernel super_operations contains read_inode field */ +/* #undef HAVE_READ_INODE */ + +/* Define if kernel has register_ioctl32_conversion */ +/* #undef HAVE_REGISTER_IOCTL32_CONVERSION */ + +/* Define if kernel address_space struct has a spin_lock for private data + instead of rw_lock -- used by RT linux */ +/* #undef HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT */ + +/* Define if kernel address_space struct has a rw_lock_t member named + tree_lock */ +/* #undef HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT */ + +/* Define if struct super_block has s_dirty list */ +/* #undef HAVE_SB_DIRTY_LIST */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SDL_SDL_TTF_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SDL_TTF_H */ + +/* Define if struct file_operations in kernel has sendfile callback */ +/* #undef HAVE_SENDFILE_VFS_SUPPORT */ + +/* Define if kernel setxattr has const void* argument */ +/* #undef HAVE_SETXATTR_CONST_ARG */ + +/* Define if SLAB_KERNEL is defined in kernel */ +/* #undef HAVE_SLAB_KERNEL */ + +/* Define if kernel address_space struct has a spin_lock member named + page_lock instead of rw_lock */ +/* #undef HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT */ + +/* Define if kernel address_space struct has a spin_lock_t member named + tree_lock */ +/* #undef HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT */ + +/* Define if struct super_operations in kernel has statfs_lite callback */ +/* #undef HAVE_STATFS_LITE_SUPER_OPERATIONS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDARG_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strnlen' function. */ +#define HAVE_STRNLEN 1 + +/* Define to 1 if you have the `strstr' function. */ +#define HAVE_STRSTR 1 + +/* Define to 1 if you have the `strtoull' function. */ +#define HAVE_STRTOULL 1 + +/* Define if struct kmem_cache is defined in kernel */ +/* #undef HAVE_STRUCT_KMEM_CACHE */ + +/* Define if struct xtvec is defined in the kernel */ +/* #undef HAVE_STRUCT_XTVEC */ + +/* Define if sysinfo.h is present */ +/* #define HAVE_SYSINFO 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_EPOLL_H 1 */ + +/* Define if sys/mount.h exists */ +/* #define HAVE_SYS_MOUNT_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_SOCKET_H 1 */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if sys/vfs.h exists */ +/* #define HAVE_SYS_VFS_H 1 */ + +/* Define to 1 if you have the header file. */ +/* #define HAVE_SYS_XATTR_H 1 */ + +/* Define if TAU library is used */ +/* #undef HAVE_TAU */ + +/* Define if register_sysctl_table takes two arguments */ +/* #undef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE */ + +/* Define if kernel's inode_operations has two parameters permission function + */ +/* #undef HAVE_TWO_PARAM_PERMISSION */ + +/* Define if DB open function takes a txnid parameter */ +#define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 + +/* Define if DB stat function takes txnid parameter */ +#define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 + +/* Define to 1 if you have the header file. */ +/* #define HAVE_UNISTD_H 1 */ + +/* Define if DB stat function takes malloc function ptr */ +/* #undef HAVE_UNKNOWN_PARAMETER_TO_DB_STAT */ + +/* Define if include file valgrind.h exists */ +/* #undef HAVE_VALGRIND_H */ + +/* Define if file_system_type get_sb has vfsmount argument */ +/* #undef HAVE_VFSMOUNT_GETSB */ + +/* Define if struct file_operations in kernel has writev callback */ +/* #undef HAVE_WRITEV_FILE_OPERATIONS */ + +/* Define if struct file_operations in kernel has writex callback */ +/* #undef HAVE_WRITEX_FILE_OPERATIONS */ + +/* Define if kernel has xattr support */ +/* #undef HAVE_XATTR */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "" + +/* major version number */ +#define PVFS2_VERSION_MAJOR 2 + +/* minor version number */ +#define PVFS2_VERSION_MINOR 8 + +/* sub version number */ +#define PVFS2_VERSION_SUB 4 + +/* The size of `long int', as computed by sizeof. */ +#define SIZEOF_LONG_INT 4 /* 4 on Windows */ + +/* The size of `void *', as computed by sizeof. */ +#ifdef _WIN64 +#define SIZEOF_VOID_P 8 +#else +#define SIZEOF_VOID_P 4 +#endif + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if on darwin */ +/* #undef TARGET_OS_DARWIN */ + +/* Define if on linux */ +/* #define TARGET_OS_LINUX 1 */ + + +/* Define to build for linux kernel module userspace helper. */ +/* #undef WITH_LINUX_KMOD */ + +/* Define if mtrace memory leak detection was enabled */ +/* #undef WITH_MTRACE */ + +/* Define if openssl exists */ +/* #undef WITH_OPENSSL */ + +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +/* # undef WORDS_BIGENDIAN */ +# endif +#endif diff --git a/include/windows/pvfs2.h b/include/windows/pvfs2.h new file mode 100644 index 0000000..12f9e29 --- /dev/null +++ b/include/windows/pvfs2.h @@ -0,0 +1,36 @@ +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/* This is the master header file for pvfs2. It pulls in all header + * files needed by client side for software that operates at or above + * the system interface level. + */ + +#ifndef __PVFS2_H +#define __PVFS2_H + +#ifndef PVFS2_VERSION_MAJOR +#define PVFS2_VERSION_MAJOR 2 +#define PVFS2_VERSION_MINOR 8 +#define PVFS2_VERSION_SUB 4 +#endif + +#include "pvfs2-types.h" +#include "pvfs2-sysint.h" +#include "pvfs2-debug.h" +#include "pvfs2-util.h" +#include "pvfs2-request.h" + +#endif /* __PVFS2_H */ + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/maint/TEMPLATE_COPYRIGHT_HEADER.txt b/maint/TEMPLATE_COPYRIGHT_HEADER.txt old mode 100755 new mode 100644 diff --git a/maint/TEMPLATE_FORMAT_TRAILER.txt b/maint/TEMPLATE_FORMAT_TRAILER.txt old mode 100755 new mode 100644 diff --git a/maint/build/mpich2-build.py b/maint/build/mpich2-build.py old mode 100644 new mode 100755 diff --git a/maint/build/pvfs2-build-tests.sh b/maint/build/pvfs2-build-tests.sh old mode 100644 new mode 100755 diff --git a/maint/build/pvfs2-build.sh b/maint/build/pvfs2-build.sh old mode 100644 new mode 100755 index def0b8c..a02780d --- a/maint/build/pvfs2-build.sh +++ b/maint/build/pvfs2-build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#/bin/sh # # requires: # cvs (if pulling from CVS @@ -12,7 +12,8 @@ tarballurl=http://www.mcs.anl.gov/hpio/pvfs2-0.0.6.tar.gz cvsroot=:pserver:anonymous@cvs.parl.clemson.edu:/anoncvs # specify extra configure options here; for now we disable karma because # of all the gtk warnings -configureopts="$PVFS2_CONFIGOPTS --enable-strict --disable-karma" +configureopts="$PVFS2_CONFIGOPTS --enable-shared --enable-ucache --enable-strict --disable-karma --with-db=/opt/db4" +#configureopts="$PVFS2_CONFIGOPTS --enable-strict --disable-karma --with-db=/opt/db4" # @@ -43,12 +44,23 @@ get_dist() { # pulls from CVS the tag or branch specified by the first argument. returns # nonzero on error. get_cvs() { - cvs -Q -d $cvsroot co -r $1 pvfs2 + #cvs -Q -d $cvsroot co -r $1 pvfs2 + + echo "Current directory is `pwd`" + svn export --force -q http://www.orangefs.org/svn/orangefs/$1/ if [ $? -ne 0 ] ; then - echo "Pulling PVFS2 from $cvsroot failed." + echo "Pulling PVFS2 from http://www.orangefs.org/svn/orangefs/$1/ failed." exit 1 fi - mv pvfs2 pvfs2-$1 + #ls -l + + #mv pvfs2 pvfs2-$1 + #split off last element in path + BRANCH=`echo $1 | awk -F"/" '{print $NF}'` + + echo "Branch is ${BRANCH}" + + mv $BRANCH pvfs2-$BRANCH } # end of user defines @@ -81,13 +93,16 @@ do k) build_kernel="true"; kerneldir="$OPTARG";; r) rootdir="$OPTARG";; t) build_tests="true";; - v) cvs_tag="$OPTARG";; + v) full_cvs_tag="$OPTARG";; \?) usage; exit 1;; esac done echo "PVFS2 will be built in ${rootdir}." +#cvs tag is final element of full cvs tag +cvs_tag=`echo $full_cvs_tag | awk -F"/" '{print $NF}'` + if [ ! -d $rootdir ] ; then mkdir $rootdir fi @@ -96,7 +111,8 @@ date=`date "+%Y-%m-%d-%H-%M"` host=`uname -n` srcdir=$rootdir/pvfs2-$cvs_tag -builddir=$rootdir/BUILD-pvfs2-$cvs_tag +#builddir=$rootdir/BUILD-pvfs2-$cvs_tag +builddir=$srcdir installdir=$rootdir/INSTALL-pvfs2-$cvs_tag # clean up src, build, install directories @@ -109,18 +125,22 @@ rm -rf $rootdir/pvfs2 cd $rootdir # could make this some sort of command line option... -get_cvs $cvs_tag || exit 1 +get_cvs $full_cvs_tag || exit 1 # create build and install directories, configure -mkdir $builddir +#mkdir $builddir mkdir $installdir -cd $builddir +cd $srcdir +$srcdir/prepare > prepare.out +#cd $builddir +#ls $srcdir +#$srcdir/prepare > prepare.out if [ $build_kernel = "true" ] ; then - $srcdir/configure $configureopts --with-kernel=$kerneldir --prefix=$installdir > $rootdir/configure-${cvs_tag}.log 2>&1 + $srcdir/configure $configureopts --with-kernel=$kerneldir --prefix=$installdir > $rootdir/configure-${cvs_tag}.log 2>&1 make_targets="all kmod" else - $srcdir/configure $configureopts --prefix=$installdir > $rootdir/configure-${cvs_tag}.log 2>&1 + $srcdir/configure $configureopts --prefix=$installdir > $rootdir/configure-${cvs_tag}.log 2>&1 make_targets="all" fi diff --git a/maint/build/pvfs2-buildandrun.sh b/maint/build/pvfs2-buildandrun.sh old mode 100644 new mode 100755 diff --git a/maint/build/pvfs2-extract-make-msgs.pl b/maint/build/pvfs2-extract-make-msgs.pl old mode 100644 new mode 100755 diff --git a/maint/config/bdb.m4 b/maint/config/bdb.m4 index 239e0f1..9f878b9 100644 --- a/maint/config/bdb.m4 +++ b/maint/config/bdb.m4 @@ -17,14 +17,14 @@ AC_DEFUN([AX_BERKELEY_DB], oldcflags=$CFLAGS for dbheader in db4 db3 notfound; do AC_COMPILE_IFELSE( - [#include "$dbpath/include/$dbheader/db.h"], + [AC_LANG_SOURCE([[#include "$dbpath/include/$dbheader/db.h"]])], [DB_CFLAGS="-I$dbpath/include/$dbheader/" break]) done if test "x$dbheader" = "xnotfound"; then AC_COMPILE_IFELSE( - [#include "$dbpath/include/db.h"], + [AC_LANG_SOURCE([[#include "$dbpath/include/db.h"]])], [DB_CFLAGS="-I$dbpath/include/"], [AC_MSG_FAILURE( Invalid libdb path specified. No db.h found.)]) @@ -43,6 +43,62 @@ AC_DEFUN([AX_BERKELEY_DB], CFLAGS=$oldcflags else + dnl Typically a distro's db-devel package (or whatever + dnl they might call it) includes /usr/include/db.h. + dnl Sometimes /usr/include/db.h is just a sym-link to + dnl the real db.h, which might be in /usr/include/xyzzy/db.h + dnl or somesuch. Sometimes /usr/include/db.h is a real file + dnl that contains a single line: #include . + dnl Sometimes /usr/include/db.h is the actual db include + dnl file. + dnl + dnl In the Schrödinger’s Cat release of Fedora (relase 19), + dnl the db-devel package (libdb4-devel-4.8.30-10.fc19.x86_64) + dnl has no /usr/include/db.h, only /usr/include/libdb4/db.h. + dnl + dnl And libdb.so is not in /usr/lib(64), rather it is in + dnl /usr/lib(64)/libdb4... + dnl + dnl The next few lines try to find db.h and libdb.so where ever + dnl they might be stashed below /usr/include and /usr/lib(64) + dnl and add those locations to CFLAGS and LDFLAGS. + DBDOTH="" + for i in `find /usr/include -name db.h` + do + if test "$i" = "/usr/include/db.h" + then + DBDOTH="" + break + else + DBDOTH="$i" + fi + done + if test "$DBDOTH" != "" + then + DB_CFLAGS="-I `dirname $DBDOTH`" + CFLAGS="$CFLAGS $DB_CFLAGS" + DBPACKAGE=`rpm -qf $DBDOTH` + else + DBPACKAGE="" + fi + + strings /etc/ld.so.cache | grep -q /lib64 + if test "$?" = "0" + then + LIBPATH="/usr/lib64" + else + LIBPATH="/usr/lib" + fi + + for i in `find "$LIBPATH" -name libdb.so` + do + LIBPACKAGE=`rpm -qf $i` + if test "$DBPACKAGE" = "$LIBPACKAGE" + then + LDFLAGS="$LDFLAGS -L"`dirname $i` + fi + done + for lib in db4 db3 db notfound; do LIBS="${oldlibs} -l$lib -lpthread" DB_LIB="-l$lib" diff --git a/maint/config/config.guess b/maint/config/config.guess old mode 100644 new mode 100755 diff --git a/maint/config/config.sub b/maint/config/config.sub old mode 100644 new mode 100755 diff --git a/maint/config/install-sh b/maint/config/install-sh old mode 100644 new mode 100755 diff --git a/maint/config/kernel.m4 b/maint/config/kernel.m4 index 7f7e029..5b04e84 100644 --- a/maint/config/kernel.m4 +++ b/maint/config/kernel.m4 @@ -66,14 +66,91 @@ AC_DEFUN([AX_KERNEL_FEATURES], CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include -I$lk_src_source/arch/${ARCH}/include/asm/mach-default" fi - - dnl if there are two different include paths (lk_src/include and - dnl lk_src_source/include) add the lk_src/include path to the CFLAGS - dnl here. - if test "$lk_src" != "$lk_src_source"; then - CFLAGS="$CFLAGS -I$lk_src/include" + + dnl After the "UAPI header file split" in linux-3.9.7, the + dnl uapi header file locations need to be added to CFLAGS. + if test -n "${ARCH}" && + test -d $lk_src_source/arch/${ARCH}/include/uapi; then + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include/uapi" + CFLAGS="$CFLAGS -I$lk_src_source/arch/${ARCH}/include/generated/uapi" + fi + if test -d $lk_src_source/include/uapi; then + CFLAGS="$CFLAGS -I$lk_src_source/include/uapi" fi + dnl directories named "generated" under $lk_src are in paths that + dnl need to be searched for include files + for i in `find "$lk_src" -follow -name generated` + do + addThis="`echo $i | sed 's/generated.*$//'`" + addThisToo="`echo $i | sed 's/generated.*$/generated/'`" + CFLAGS="$CFLAGS -I$addThis -I$addThisToo" + done + + dnl Check for kconfig.h... at some revision levels, many + dnl tests use IS_ENABLED indirectly through includes... + AC_MSG_CHECKING(for kconfig.h) + AC_TRY_COMPILE([ + #include + ], [ + ; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KCONFIG, 1, Define if kconfig.h exists), + AC_MSG_RESULT(no) + ) + + dnl Check for vmtruncate. vmtruncate has been deprecated for + dnl a while, it is gone by 3.8. + dnl "The whole truncate sequence needs to be implemented in ->setattr" + dnl ./Documentation/filesystems/porting + dnl google "__kfree_rcu breaks third-party kernel code" to learn + dnl why -O2 is needed in CFLAGS for this test... + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -O2" + AC_MSG_CHECKING(for vmtruncate) + AC_TRY_COMPILE([ + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + ], [ + struct iattr *iattr; + struct inode *inode; + vmtruncate(inode, iattr->ia_size); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_VMTRUNCATE, 1, Define if vmtruncate exists), + AC_MSG_RESULT(no) + ) + CFLAGS=$tmp_cflags + + dnl in 3.8 a "user namespace" parameter was added to + dnl posix_acl_from_xattr... + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -O2" + AC_MSG_CHECKING(for namespace parameter in posix_acl_from_xattr) + AC_TRY_COMPILE([ + #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif + #include + #include + ], [ + int i; + char *c; + posix_acl_from_xattr(&init_user_ns, c, i); + + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_POSIX_ACL_USER_NAMESPACE, 1, Define if the user namespace has been added to posix_acl_from_xattr and posix_acl_to_xattr), + AC_MSG_RESULT(no) + ) + CFLAGS=$tmp_cflags + dnl in 2.6.40 (maybe .39 too) inclusion of linux/fs.h breaks unless dnl optimization flag of some sort is set. To complicate matters dnl checks in earlier versions break when optimization is turned on. @@ -91,6 +168,218 @@ AC_DEFUN([AX_KERNEL_FEATURES], CFLAGS="-Os $CFLAGS" fi + dnl by 3.4 create's third argument changed from int to umode_t. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([if kernel inode ops create uses umode_t]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + extern int mycreate(struct inode *, + struct dentry *, + umode_t, + struct nameidata *); + ], [ + static struct inode_operations in_op = { + .create = mycreate + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_CREATE_USES_UMODE_T, 1, + [Define if kernel inode ops create uses umode_t not int]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + + dnl by 3.4 mkdir's third argument changed from int to umode_t. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([if kernel inode ops mkdir uses umode_t]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + extern int mymkdir(struct inode *, + struct dentry *, + umode_t); + ], [ + static struct inode_operations in_op = { + .mkdir = mymkdir + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_MKDIR_USES_UMODE_T, 1, + [Define if kernel inode ops mkdir uses umode_t not int]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + + dnl by 3.4 mknod's third argument changed from int to umode_t. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([if kernel inode ops mknod uses umode_t]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + extern int mymknod(struct inode *, + struct dentry *, + umode_t, + dev_t); + ], [ + static struct inode_operations in_op = { + .mknod = mymknod + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_MKNOD_USES_UMODE_T, 1, + [Define if kernel inode ops mknod uses umode_t not int]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + dnl between 3.6 and 3.9 create() lookup() and d_revalidate() lose + dnl their struct nameidata argument. d_revalidate seems to be + dnl handled be we will test for the other two check create. + dnl Create args for different versions: + dnl 3.2: (struct inode *,struct dentry *,int, struct nameidata *); + dnl 3.4: (struct inode *,struct dentry *,umode_t,struct nameidata *) + dnl 3.6: (struct inode *,struct dentry *, umode_t, bool); + dnl a previous test (if kernel inode ops create uses umode_t) sets + dnl a define that helps us in this test. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([if kernel inode ops create takes nameidata]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + extern int mycreate(struct inode *, + struct dentry *, + #ifdef PVFS_KMOD_CREATE_USES_UMODE_T + umode_t mode, + #else + int, + #endif + struct nameidata *); + ], [ + static struct inode_operations in_op = { + .create = mycreate + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_CREATE_TAKES_NAMEIDATA, 1, + [Define if kernel inode ops create takes nameidata not bool]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + dnl check lookup + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([if kernel inode ops lookup takes nameidata]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + extern struct dentry *mylookup(struct inode *, + struct dentry *, + struct nameidata *); + ], [ + static struct inode_operations in_op = { + .lookup = mylookup + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_LOOKUP_TAKES_NAMEIDATA, 1, + [Define if kernel inode ops lookup takes nameidata]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + dnl check revalidate + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING([for if kernel dentry ops d_revalidate takes nameidata]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + #include + extern int myreval(struct dentry *, struct nameidata *); + ], [ + static struct dentry_operations dc_op = { + .d_revalidate = myreval + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_D_REVALIDATE_TAKES_NAMEIDATA, 1, + [Define if kernel dentry ops d_revalidate takes nameidata]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + + dnl kernel 3.6-3.9 added get_acl as a method rather than using + dnl check_acl passed into generic_permissions + AC_MSG_CHECKING([if kernel inode ops has get_acl ]) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + ], [ + static struct inode_operations in_op = { + .get_acl = NULL + }; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_KMOD_HAVE_GET_ACL, 1, + [Define if kernel inode ops has get_acl]) + ], [ + AC_MSG_RESULT(no) + ] + ) + + dnl if there are two different include paths (lk_src/include and + dnl lk_src_source/include) add the lk_src/include path to the CFLAGS + dnl here. + if test "$lk_src" != "$lk_src_source"; then + CFLAGS="$CFLAGS -I$lk_src/include" + fi + +dnl newer 3.3 kernels and above use d_make_root instead of d_alloc_root + AC_MSG_CHECKING(for d_alloc_root) + AC_TRY_COMPILE( + [ + #define __KERNEL__ + #include + ], [ + struct inode *root_inode; + struct dentry *root_dentry; + root_dentry=d_alloc_root(root_inode); + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_D_ALLOC_ROOT, 1, [Define if kernel defines + d_alloc_root]) + ], [ + AC_MSG_RESULT(no) + ] + ) + AC_MSG_CHECKING(for i_size_write in kernel) dnl if this test passes, the kernel does not have it dnl if this test fails, the kernel already defined it @@ -172,6 +461,22 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_IGET5_LOCKED, 1, Define if kernel has iget5_locked), ) + AC_MSG_CHECKING(for d_set_d_op function in kernel) + dnl if this test passes, the kernel does not have it + dnl if this test fails, the kernel already defined it + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + loff_t d_set_d_op(struct dentry *dentry, const struct dentry_operations *op) + { + return 0; + } + ], [], + AC_MSG_RESULT(no), + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_D_SET_D_OP, 1, Define if kernel has d_set_d_op), + ) + dnl Check if the kernel defines the xtvec structure. dnl This is part of a POSIX extension. AC_MSG_CHECKING(for struct xtvec in kernel) @@ -199,6 +504,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for struct kmem_cache in kernel) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include @@ -217,6 +525,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for SLAB_KERNEL flag in kernel) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include static int flags = SLAB_KERNEL; ], [], @@ -230,6 +541,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for memory_backed in struct backing_dev_info in kernel) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include static struct backing_dev_info bdi = { @@ -382,6 +696,21 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(no) ) + dnl checking if we have a readdir callback in file_operations + AC_MSG_CHECKING(for readdir member in file_operations structure) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + ], [ + struct file_operations filop = { + .readdir = NULL + }; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_READDIR_FILE_OPERATIONS, 1, Define if struct file_operations in kernel has readdir callback), + AC_MSG_RESULT(no) + ) + dnl checking if we have a readdirplus callback in file_operations AC_MSG_CHECKING(for readdirplus member in file_operations structure) AC_TRY_COMPILE([ @@ -477,6 +806,77 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(no) ) + AC_MSG_CHECKING(for kiocbSetCancelled) + dnl kiocbSetCancelled is gone by 3.11... + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + ], + [ + struct kiocb *iocb; + kiocbSetCancelled(iocb); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KIOCBSETCANCELLED, 1, Define if kiocbSetCancelled exists), + AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING(for atomic ki_users) + dnl ki_users member in struct kiocb is atomic_t (not int) + dnl in 3.11 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + ], + [ + struct kiocb *iocb; + atomic_dec(&iocb->ki_users); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(KI_USERS_ATOMIC, 1, Define if ki_users is atomic), + AC_MSG_RESULT(no) + ) + tmp_cflags=$CFLAGS + + AC_MSG_CHECKING(for aio_put_req returns int) + dnl aio_put_req is void by 3.11 + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + ], + [ + struct kiocb *iocb; + int r; + r = aio_put_req(iocb); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(AIO_PUT_REQ_RETURNS_INT, 1, Define if aio_put_req returns int), + AC_MSG_RESULT(no) + ) + + AC_MSG_CHECKING(for kiocb_set_cancel_fn) + dnl by 3.11 there's a function for setting the ki_cancel + dnl member in a struct of type kiocb. + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + ], + [ + struct kiocb *iocb; + int (*aio_cancel)(struct kiocb *, struct io_event *); + kiocb_set_cancel_fn(iocb, aio_cancel); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_KIOCB_SET_CANCEL_FN, 1, Define if we have kiocb_set_cancel_fn), + AC_MSG_RESULT(no) + ) + tmp_cflags=$CFLAGS dnl if this test passes, the signature of aio_read has changed to the new one CFLAGS="$CFLAGS -Werror" @@ -497,6 +897,7 @@ AC_DEFUN([AX_KERNEL_FEATURES], fi + tmp_cflags=$CFLAGS CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for dentry argument in kernel super_operations statfs) dnl Rely on the fact that there is an external vfs_statfs that is @@ -722,8 +1123,12 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(no) ) + AC_CHECK_HEADERS([linux/posix_acl.h], [], [], [#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #ifdef HAVE_XATTR #include @@ -732,6 +1137,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_CHECK_HEADERS([linux/posix_acl_xattr.h], [], [], [#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #ifdef HAVE_XATTR #include @@ -741,6 +1149,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], dnl linux-2.6.11 had xattr_acl.h, but 2.6.12 did not! AC_CHECK_HEADERS([linux/xattr_acl.h], [], [], [#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #ifdef HAVE_XATTR #include @@ -757,10 +1168,16 @@ AC_DEFUN([AX_KERNEL_FEATURES], ] ) AC_CHECK_HEADERS([linux/compat.h], [], [], [#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ] ) AC_CHECK_HEADERS([linux/syscalls.h], [], [], [#define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ] ) AC_CHECK_HEADERS([asm/ioctl32.h], [], [], @@ -817,8 +1234,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl generic_permission in < 2.6.38 has three parameters - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for three-param generic_permission) AC_TRY_COMPILE([ #define __KERNEL__ @@ -834,8 +1251,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl generic_permission in >= 2.6.38 and 3.0.x has four parameters - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for four-param generic_permission) AC_TRY_COMPILE([ #define __KERNEL__ @@ -851,8 +1268,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl generic_permission in >= 3.1.x has two parameters - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for two-param generic_permission) AC_TRY_COMPILE([ #define __KERNEL__ @@ -868,8 +1285,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl set_nlink is defined in 3.2.x - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for set_nlink) AC_TRY_COMPILE([ #define __KERNEL__ @@ -885,8 +1302,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl inc_nlink is defined in 3.2.x - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for inc_nlink) AC_TRY_COMPILE([ #define __KERNEL__ @@ -902,8 +1319,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl drop_nlink is defined in 3.2.x - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for drop_nlink) AC_TRY_COMPILE([ #define __KERNEL__ @@ -919,8 +1336,8 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl clear_nlink is defined in 3.2.x - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for clear_nlink) AC_TRY_COMPILE([ #define __KERNEL__ @@ -941,6 +1358,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for posix_acl_equiv_mode umode_t) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include struct posix_acl *acl; @@ -953,13 +1373,17 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T, 1, [Define if posix_acl_equiv_mode accepts umode_t type]), AC_MSG_RESULT(no) ) + CFLAGS=$tmp_cflags dnl check for posix_acl_create - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for posix_acl_create) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include struct posix_acl *acl; @@ -974,11 +1398,14 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) dnl check for posix_acl_chmod - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for posix_acl_chmod) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include struct posix_acl *acl; @@ -995,11 +1422,14 @@ AC_DEFUN([AX_KERNEL_FEATURES], dnl check for posix_acl_clone - tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror" + dnl tmp_cflags=$CFLAGS + dnl CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for posix_acl_clone) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include struct posix_acl *acl; @@ -1035,6 +1465,7 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_FSYNC_LOFF_T_PARAMS, 1, [Define if fsync has loff_t params]), AC_MSG_RESULT(no) ) + CFLAGS=$tmp_cflags AC_MSG_CHECKING(for generic_getxattr api in kernel) @@ -1042,6 +1473,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], dnl if this test fails, the kernel has it defined AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include int generic_getxattr(struct inode *inode) @@ -1093,6 +1527,33 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(no) ) + dnl between 3.4 and 3.6 the encode_fh function in + dnl "struct export_operations" stopped having a dentry pointer + dnl and a connectable flag as arguments, intead encode_fh + dnl has both the child and parent inodes as arguments. + tmp_cflags=${CFLAGS} + CFLAGS="${CFLAGS} -Werror" + AC_MSG_CHECKING([if kernel export ops get inode from dentry]) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + extern int myencode(struct dentry *, + __u32 *, + int *, + int); + ], [ + static struct export_operations ex_op = {.encode_fh = myencode}; + ], [ + AC_MSG_RESULT(yes) + AC_DEFINE(PVFS_ENCODE_FS_USES_DENTRY, 1, + [Define if kernel export ops encode_fh has dentry arg]) + ], [ + AC_MSG_RESULT(no) + ] + ) + CFLAGS=$tmp_cflags + dnl Using -Werror is not an option, because some arches throw lots of dnl warnings that would trigger false negatives. We know that the dnl change to the releasepage() function signature was accompanied by @@ -1103,6 +1564,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for second arg type int in address_space_operations releasepage) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include extern int try_to_release_page(struct page *page, int gfp_mask); ], [], @@ -1130,6 +1594,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for int return in kmem_cache_destroy) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include extern int kmem_cache_destroy(kmem_cache_t *); ], [], @@ -1162,6 +1629,26 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_RESULT(NO) ) + dnl by 3.11 the invalidatepage address_space_operation has three + dnl has three arguments. + AC_MSG_CHECKING(for three argument invalidatepage function) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + ], + [ + struct address_space_operations aso; + + struct page *p; + unsigned int i,j; + + aso.invalidatepage(p,i,j); + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_THREE_ARGUMENT_INVALIDATEPAGE, 1, Define if invalidatepage function has three arguments), + AC_MSG_RESULT(NO) + ) + dnl In 2.6.18.1 and newer, including will throw off a dnl warning tmp_cflags=${CFLAGS} @@ -1214,6 +1701,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for int return value of kmem_cache_destroy) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ], [ int i = kmem_cache_destroy(NULL); @@ -1243,6 +1733,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for kzalloc) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ], [ void * a; @@ -1257,6 +1750,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for two arguments to register_sysctl_table) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include ], [ @@ -1287,6 +1783,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for obsolete struct page count without underscore) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ], [ struct page *p; @@ -1318,6 +1817,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for destructor param to kmem_cache_create) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include ], [ kmem_cache_create("config-test", 0, 0, 0, NULL, NULL); @@ -1338,6 +1840,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for one-param kmem_cache_create constructor) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include void ctor(void *req) @@ -1352,16 +1857,14 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) CFLAGS=$tmp_cflags - dnl 2.6.27 changed the parameter signature of - dnl inode_operations->permission. Check for this newer two-param style - dnl If they don't match, gcc complains about - dnl passing argument ... from incompatible pointer type, hence the - dnl need for the -Werror and -Wall. tmp_cflags=$CFLAGS - CFLAGS="$CFLAGS -Werror -Wall" + CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for two param permission) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include #include @@ -1381,7 +1884,6 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) CFLAGS=$tmp_cflags - dnl 2.6.24 changed the constructor parameter signature of dnl kmem_cache_create. Check for this newer two-param style and dnl if not, assume it is old. Note we can get away with just @@ -1394,6 +1896,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for two-param kmem_cache_create constructor) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include void ctor(struct kmem_cache *cachep, void *req) @@ -1584,6 +2089,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for current_fsuid) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include ], [ @@ -1599,6 +2107,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(if kernel backing_dev_info struct has a name field) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include ], [ @@ -1618,6 +2129,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for bdi_init) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include ], [ @@ -1644,8 +2158,11 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_CTL_NAME, 1, Define if struct ctl_table has ctl_name member), AC_MSG_RESULT(no) ) + CFLAGS=$tmp_cflags dnl Removed .strategy from struct ctl_table. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING([whether struct ctl_table has strategy]) AC_TRY_COMPILE([ #define __KERNEL__ @@ -1667,6 +2184,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for five-param xattr_handler.get) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include static struct xattr_handler x; @@ -1681,6 +2201,7 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_XATTR_HANDLER_GET_FIVE_PARAM, 1, [Define if kernel xattr_handle get function has dentry as first parameter and a fifth parameter]), AC_MSG_RESULT(no) ) + CFLAGS=$tmp_cflags dnl 2.6.33 changed the parameter signature of xattr_handler set dnl member functions to have a sixth argument and changed the first @@ -1691,6 +2212,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for six-param xattr_handler.set) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include static struct xattr_handler x; @@ -1713,6 +2237,9 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_MSG_CHECKING(for const s_xattr member in super_block struct) AC_TRY_COMPILE([ #define __KERNEL__ + #ifdef HAVE_KCONFIG + #include + #endif #include #include struct super_block sb; @@ -1826,6 +2353,30 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) CFLAGS=$tmp_cflags + dnl in 3.11 dentry operations struct d_hash function went back to just + dnl having 2 parameters, similar to the way is was back in 2.6, + dnl only the first parameter is "const struct dentry *" instead of + dnl "struct dentry *"... + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for two-param dentry_operations.d_hash with const) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_hash_t(const struct dentry *d, + struct qstr * q) + { return 0; } + ], + [ + d.d_hash = d_hash_t; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TWO_PARAM_D_HASH_WITH_CONST, 1, [Define if d_hash member of dentry_operations has two params, where the first param is a const ]), + AC_MSG_RESULT(no) + ) + CFLAGS=$tmp_cflags dnl dentry operations struct d_compare function has a different dnl signature in 2.6.38 and newer, split out dentry/inodes, string and @@ -1856,6 +2407,31 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) CFLAGS=$tmp_cflags + dnl dentry operations struct d_compare function has five parameters + dnl in 3.11 + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for five-param dentry_operations.d_compare) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + static struct dentry_operations d; + static int d_compare_t(const struct dentry *d1, + const struct dentry *d2, + unsigned int len, + const char *str, + const struct qstr *qstr) + { return 0; } + ], + [ + d.d_compare = d_compare_t; + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_FIVE_PARAM_D_COMPARE, 1, [Define if d_compare member of dentry_operations has five params]), + AC_MSG_RESULT(no) + ) + CFLAGS=$tmp_cflags dnl dentry operations struct d_delete argumentis constified in dnl 2.6.38 and newer @@ -1900,6 +2476,28 @@ AC_DEFUN([AX_KERNEL_FEATURES], ) CFLAGS=$tmp_cflags + dnl in 3.11 struct dentry no longer has a d_count member, + dnl the ref count is in its own structure, and that structure + dnl (struct lockref d_lockref) contains the ref count. + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" + AC_MSG_CHECKING(for dentry with lockref struct) + AC_TRY_COMPILE([ + #define __KERNEL__ + #include + #include + struct dentry d; + unsigned int x; + ], + [ + x = d.d_lockref.count + ], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_DENTRY_LOCKREF_STRUCT, 1, [Define if dentry struct has a lockref struct member]), + AC_MSG_RESULT(no) + ) + CFLAGS=$tmp_cflags + dnl permission function pointer in the inode_operations struct now dnl takes three params with the third being an unsigned int (circa dnl 2.6.38 @@ -1976,7 +2574,10 @@ AC_DEFUN([AX_KERNEL_FEATURES], AC_DEFINE(HAVE_GET_SB_MEMBER_FILE_SYSTEM_TYPE, 1, [Define if get_sb is a member of file_system_type struct]), AC_MSG_RESULT(no) ) + CFLAGS=$tmp_cflags + tmp_cflags=$CFLAGS + CFLAGS="$CFLAGS -Werror" AC_MSG_CHECKING(for dirty_inode flag) AC_TRY_COMPILE([ #define __KERNEL__ diff --git a/maint/config/missing b/maint/config/missing old mode 100644 new mode 100755 diff --git a/maint/config/openssl.m4 b/maint/config/openssl.m4 index d04fddb..65061e7 100644 --- a/maint/config/openssl.m4 +++ b/maint/config/openssl.m4 @@ -15,7 +15,7 @@ AC_DEFUN([AX_OPENSSL], LIBS="$LIBS -lcrypto -lssl" AC_COMPILE_IFELSE( - [#include "openssl/bio.h"], + [AC_LANG_SOURCE([[#include "openssl/bio.h"]])], [], [AC_MSG_ERROR(Invalid openssl path specified. No openssl/bio.h found.)]) @@ -40,7 +40,7 @@ AC_DEFUN([AX_OPENSSL_OPTIONAL], LIBS="$LIBS -lcrypto -lssl" AC_COMPILE_IFELSE( - [#include "openssl/bio.h"], + [AC_LANG_SOURCE([[#include "openssl/bio.h"]])], [], [AC_MSG_WARN(No openssl headers found.)]) diff --git a/maint/config/rt.m4 b/maint/config/rt.m4 index 5a03c2c..fd2eca0 100644 --- a/maint/config/rt.m4 +++ b/maint/config/rt.m4 @@ -24,3 +24,26 @@ AC_TRY_LINK( LIBS=$oldlibs ]) ]) + +AC_DEFUN([AX_CHECK_LIB_NEEDS_LIBRT], +[ + +AC_MSG_CHECKING([if user library needs -lrt]) +AC_TRY_LINK( + [#include ], + [shm_open("foo", 0, 0);], + [AC_MSG_RESULT(no)], + [ + oldlibs=$LIBS + LIBS="$LIBS -lrt" + AC_TRY_LINK( + [#include ], + [shm_open("foo", 0, 0);], + [LIB_NEEDS_LIBRT=1 + AC_SUBST(LIB_NEEDS_LIBRT) + AC_MSG_RESULT(yes)], + [AC_MSG_ERROR(failed attempting to link shm_open)]) + LIBS=$oldlibs + ]) +]) + diff --git a/maint/make-dist.sh b/maint/make-dist.sh old mode 100755 new mode 100644 diff --git a/projects/OrangeFS/OrangeFS.sln b/projects/OrangeFS/OrangeFS.sln new file mode 100755 index 0000000..6e601cf --- /dev/null +++ b/projects/OrangeFS/OrangeFS.sln @@ -0,0 +1,354 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi_wintcp", "bmi_wintcp\bmi_wintcp.vcxproj", "{62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-locks", "gen-locks\gen-locks.vcxproj", "{9138ABF9-041F-4A55-9E87-0F433719F4FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi_misc", "bmi_misc\bmi_misc.vcxproj", "{A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gossip", "gossip\gossip.vcxproj", "{9C95DF0D-5B60-4E94-94ED-000861C651B4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "id-generator", "id-generator\id-generator.vcxproj", "{0CBAD436-373C-4F35-A620-2D46C12D8FE0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi", "bmi\bmi.vcxproj", "{B7F1BEBC-F833-448A-829A-3505019C8169}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "job", "job\job.vcxproj", "{C0F175D2-0285-4C14-8362-98CEBF0C306F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "misc", "misc\misc.vcxproj", "{7506190B-64BE-4D64-95A4-4C22D48E0994}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flow", "flow\flow.vcxproj", "{9B1C78DC-D1F2-4857-85D0-A649D9515B40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dev", "dev\dev.vcxproj", "{BC214BA7-319E-47E3-8F00-E0355A7E1F51}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "request-scheduler", "request-scheduler\request-scheduler.vcxproj", "{AB729944-B3C0-44B4-8A63-ADB6C2CDA177}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sysint-client", "sysint-client\sysint-client.vcxproj", "{CD20A8BE-CC52-465E-9F40-A97A3912ED14}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proto", "proto\proto.vcxproj", "{2F406AB6-D010-4196-A523-FAE6F2B1585F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client-service", "client-service\client-service.vcxproj", "{61019A9A-D6E0-4E04-B163-EADB88766C9E}" + ProjectSection(ProjectDependencies) = postProject + {7506190B-64BE-4D64-95A4-4C22D48E0994} = {7506190B-64BE-4D64-95A4-4C22D48E0994} + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} = {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} = {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + {36810FAE-CC16-4F63-90E4-8AEF095B58D8} = {36810FAE-CC16-4F63-90E4-8AEF095B58D8} + {2F406AB6-D010-4196-A523-FAE6F2B1585F} = {2F406AB6-D010-4196-A523-FAE6F2B1585F} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {CD20A8BE-CC52-465E-9F40-A97A3912ED14} = {CD20A8BE-CC52-465E-9F40-A97A3912ED14} + {C0F175D2-0285-4C14-8362-98CEBF0C306F} = {C0F175D2-0285-4C14-8362-98CEBF0C306F} + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} = {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "orangefs-app - VS2012", "orangefs-app\orangefs-app - VS2012.vcxproj", "{770B6DB7-2AC1-42A0-9A20-A49121694A42}" + ProjectSection(ProjectDependencies) = postProject + {7506190B-64BE-4D64-95A4-4C22D48E0994} = {7506190B-64BE-4D64-95A4-4C22D48E0994} + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} = {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} = {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + {2F406AB6-D010-4196-A523-FAE6F2B1585F} = {2F406AB6-D010-4196-A523-FAE6F2B1585F} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {CD20A8BE-CC52-465E-9F40-A97A3912ED14} = {CD20A8BE-CC52-465E-9F40-A97A3912ED14} + {C0F175D2-0285-4C14-8362-98CEBF0C306F} = {C0F175D2-0285-4C14-8362-98CEBF0C306F} + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} = {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + {334A80F7-0F06-4C17-9A32-975C4ABA30AA} = {334A80F7-0F06-4C17-9A32-975C4ABA30AA} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "orangefs-client-library", "client-library\client-library - VS2012.vcxproj", "{334A80F7-0F06-4C17-9A32-975C4ABA30AA}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "description", "description\description.vcxproj", "{36810FAE-CC16-4F63-90E4-8AEF095B58D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + DLL Debug|Win32 = DLL Debug|Win32 + DLL Debug|x64 = DLL Debug|x64 + MemLeaks|Win32 = MemLeaks|Win32 + MemLeaks|x64 = MemLeaks|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|Win32.Build.0 = Debug|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|x64.ActiveCfg = Debug|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|x64.Build.0 = Debug|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.DLL Debug|Win32.Build.0 = Debug|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.DLL Debug|x64.ActiveCfg = Debug|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.DLL Debug|x64.Build.0 = Debug|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|Win32.ActiveCfg = Release|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|Win32.Build.0 = Release|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|x64.ActiveCfg = Release|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|x64.Build.0 = Release|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|Win32.Build.0 = Debug|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|x64.ActiveCfg = Debug|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|x64.Build.0 = Debug|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.DLL Debug|Win32.Build.0 = Debug|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.DLL Debug|x64.ActiveCfg = Debug|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.DLL Debug|x64.Build.0 = Debug|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|Win32.ActiveCfg = Release|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|Win32.Build.0 = Release|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|x64.ActiveCfg = Release|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|x64.Build.0 = Release|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|Win32.Build.0 = Debug|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|x64.ActiveCfg = Debug|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|x64.Build.0 = Debug|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.DLL Debug|Win32.Build.0 = Debug|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.DLL Debug|x64.ActiveCfg = Debug|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.DLL Debug|x64.Build.0 = Debug|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|Win32.ActiveCfg = Release|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|Win32.Build.0 = Release|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|x64.ActiveCfg = Release|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|x64.Build.0 = Release|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|Win32.Build.0 = Debug|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|x64.ActiveCfg = Debug|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|x64.Build.0 = Debug|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.DLL Debug|Win32.Build.0 = Debug|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.DLL Debug|x64.ActiveCfg = Debug|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.DLL Debug|x64.Build.0 = Debug|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|Win32.ActiveCfg = Release|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|Win32.Build.0 = Release|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|x64.ActiveCfg = Release|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|x64.Build.0 = Release|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|Win32.Build.0 = Debug|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|x64.ActiveCfg = Debug|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|x64.Build.0 = Debug|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.DLL Debug|Win32.Build.0 = Debug|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.DLL Debug|x64.ActiveCfg = Debug|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.DLL Debug|x64.Build.0 = Debug|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|Win32.ActiveCfg = Release|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|Win32.Build.0 = Release|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|x64.ActiveCfg = Release|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|x64.Build.0 = Release|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|Win32.Build.0 = Debug|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|x64.ActiveCfg = Debug|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|x64.Build.0 = Debug|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.DLL Debug|Win32.Build.0 = Debug|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.DLL Debug|x64.ActiveCfg = Debug|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.DLL Debug|x64.Build.0 = Debug|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|Win32.ActiveCfg = Release|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|Win32.Build.0 = Release|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|x64.ActiveCfg = Release|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|x64.Build.0 = Release|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|Win32.Build.0 = Debug|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|x64.ActiveCfg = Debug|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|x64.Build.0 = Debug|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.DLL Debug|Win32.Build.0 = Debug|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.DLL Debug|x64.ActiveCfg = Debug|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.DLL Debug|x64.Build.0 = Debug|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|Win32.ActiveCfg = Release|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|Win32.Build.0 = Release|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|x64.ActiveCfg = Release|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|x64.Build.0 = Release|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|Win32.ActiveCfg = Debug|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|Win32.Build.0 = Debug|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|x64.ActiveCfg = Debug|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|x64.Build.0 = Debug|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.DLL Debug|Win32.Build.0 = Debug|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.DLL Debug|x64.ActiveCfg = Debug|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.DLL Debug|x64.Build.0 = Debug|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|Win32.ActiveCfg = Release|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|Win32.Build.0 = Release|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|x64.ActiveCfg = Release|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|x64.Build.0 = Release|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|Win32.Build.0 = Debug|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|x64.ActiveCfg = Debug|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|x64.Build.0 = Debug|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.DLL Debug|Win32.Build.0 = Debug|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.DLL Debug|x64.ActiveCfg = Debug|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.DLL Debug|x64.Build.0 = Debug|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|Win32.ActiveCfg = Release|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|Win32.Build.0 = Release|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|x64.ActiveCfg = Release|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|x64.Build.0 = Release|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|Win32.ActiveCfg = Debug|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|Win32.Build.0 = Debug|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|x64.ActiveCfg = Debug|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|x64.Build.0 = Debug|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.DLL Debug|Win32.Build.0 = Debug|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.DLL Debug|x64.ActiveCfg = Debug|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.DLL Debug|x64.Build.0 = Debug|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|Win32.ActiveCfg = Release|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|Win32.Build.0 = Release|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|x64.ActiveCfg = Release|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|x64.Build.0 = Release|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|Win32.ActiveCfg = Debug|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|Win32.Build.0 = Debug|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|x64.ActiveCfg = Debug|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|x64.Build.0 = Debug|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.DLL Debug|Win32.Build.0 = Debug|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.DLL Debug|x64.ActiveCfg = Debug|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.DLL Debug|x64.Build.0 = Debug|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|Win32.ActiveCfg = Release|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|Win32.Build.0 = Release|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|x64.ActiveCfg = Release|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|x64.Build.0 = Release|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|Win32.Build.0 = Debug|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|x64.ActiveCfg = Debug|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|x64.Build.0 = Debug|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.DLL Debug|Win32.Build.0 = Debug|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.DLL Debug|x64.ActiveCfg = Debug|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.DLL Debug|x64.Build.0 = Debug|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|Win32.ActiveCfg = Release|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|Win32.Build.0 = Release|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|x64.ActiveCfg = Release|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|x64.Build.0 = Release|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|Win32.Build.0 = Debug|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|x64.ActiveCfg = Debug|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|x64.Build.0 = Debug|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.DLL Debug|Win32.Build.0 = Debug|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.DLL Debug|x64.ActiveCfg = Debug|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.DLL Debug|x64.Build.0 = Debug|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|Win32.ActiveCfg = Release|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|Win32.Build.0 = Release|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|x64.ActiveCfg = Release|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|x64.Build.0 = Release|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Debug|Win32.ActiveCfg = Debug|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Debug|Win32.Build.0 = Debug|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Debug|x64.ActiveCfg = Debug|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.DLL Debug|Win32.Build.0 = Debug|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.DLL Debug|x64.ActiveCfg = Debug|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.DLL Debug|x64.Build.0 = Debug|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Release|Win32.ActiveCfg = Release|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Release|Win32.Build.0 = Release|Win32 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Release|x64.ActiveCfg = Release|x64 + {61019A9A-D6E0-4E04-B163-EADB88766C9E}.Release|x64.Build.0 = Release|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.Debug|Win32.ActiveCfg = Debug|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.Debug|x64.ActiveCfg = Debug|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.DLL Debug|Win32.ActiveCfg = DLL Debug|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.DLL Debug|Win32.Build.0 = DLL Debug|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.DLL Debug|x64.ActiveCfg = DLL Debug|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.DLL Debug|x64.Build.0 = DLL Debug|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.MemLeaks|Win32.ActiveCfg = Release|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.MemLeaks|Win32.Build.0 = Release|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.MemLeaks|x64.ActiveCfg = Release|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.MemLeaks|x64.Build.0 = Release|x64 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.Release|Win32.ActiveCfg = Release|Win32 + {770B6DB7-2AC1-42A0-9A20-A49121694A42}.Release|x64.ActiveCfg = Release|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.Debug|Win32.ActiveCfg = Debug|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.Debug|x64.ActiveCfg = Debug|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.DLL Debug|Win32.Build.0 = Debug|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.DLL Debug|x64.ActiveCfg = Debug|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.DLL Debug|x64.Build.0 = Debug|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.MemLeaks|Win32.ActiveCfg = Release|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.MemLeaks|Win32.Build.0 = Release|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.MemLeaks|x64.ActiveCfg = Release|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.MemLeaks|x64.Build.0 = Release|x64 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.Release|Win32.ActiveCfg = Release|Win32 + {334A80F7-0F06-4C17-9A32-975C4ABA30AA}.Release|x64.ActiveCfg = Release|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|Win32.Build.0 = Debug|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|x64.ActiveCfg = Debug|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|x64.Build.0 = Debug|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.DLL Debug|Win32.ActiveCfg = Debug|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.DLL Debug|Win32.Build.0 = Debug|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.DLL Debug|x64.ActiveCfg = Debug|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.DLL Debug|x64.Build.0 = Debug|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.MemLeaks|Win32.ActiveCfg = MemLeaks|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.MemLeaks|Win32.Build.0 = MemLeaks|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.MemLeaks|x64.ActiveCfg = MemLeaks|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.MemLeaks|x64.Build.0 = MemLeaks|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|Win32.ActiveCfg = Release|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|Win32.Build.0 = Release|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|x64.ActiveCfg = Release|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/OrangeFS/bmi/bmi-vs2012.vcxproj b/projects/OrangeFS/bmi/bmi-vs2012.vcxproj new file mode 100644 index 0000000..b75dac4 --- /dev/null +++ b/projects/OrangeFS/bmi/bmi-vs2012.vcxproj @@ -0,0 +1,196 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {B7F1BEBC-F833-448A-829A-3505019C8169} + bmi + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + bmi + + + bmi + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi/bmi.vcxproj b/projects/OrangeFS/bmi/bmi.vcxproj new file mode 100755 index 0000000..7bd967e --- /dev/null +++ b/projects/OrangeFS/bmi/bmi.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {B7F1BEBC-F833-448A-829A-3505019C8169} + bmi + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\gen-locks;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_MBCS;__STATIC_METHOD_BMI_TCP__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi/bmi.vcxproj.filters b/projects/OrangeFS/bmi/bmi.vcxproj.filters new file mode 100755 index 0000000..6e15919 --- /dev/null +++ b/projects/OrangeFS/bmi/bmi.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_misc/bmi_misc-vs2012.vcxproj b/projects/OrangeFS/bmi_misc/bmi_misc-vs2012.vcxproj new file mode 100644 index 0000000..213ed46 --- /dev/null +++ b/projects/OrangeFS/bmi_misc/bmi_misc-vs2012.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + bmi_common + bmi_misc + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + bmi_misc + + + bmi_misc + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj b/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj new file mode 100755 index 0000000..d47986e --- /dev/null +++ b/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + bmi_common + bmi_misc + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\misc;..\..\..\src\common\windows;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\client\usrint + WIN32;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj.filters b/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj.filters new file mode 100755 index 0000000..43c4f59 --- /dev/null +++ b/projects/OrangeFS/bmi_misc/bmi_misc.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_wintcp/bmi_wintcp-vs2012.vcxproj b/projects/OrangeFS/bmi_wintcp/bmi_wintcp-vs2012.vcxproj new file mode 100644 index 0000000..19b3614 --- /dev/null +++ b/projects/OrangeFS/bmi_wintcp/bmi_wintcp-vs2012.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + bmi_wintcp + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + bmi_wintcp + + + bmi_wintcp + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj b/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj new file mode 100755 index 0000000..55b50b8 --- /dev/null +++ b/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + bmi_wintcp + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\gen-locks;..\..\..\src\common\quickhash;..\..\..\src\common\quicklist;..\..\..\src\common\windows + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj.filters b/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj.filters new file mode 100755 index 0000000..340924c --- /dev/null +++ b/projects/OrangeFS/bmi_wintcp/bmi_wintcp.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-library/client-library - VS2012.vcxproj b/projects/OrangeFS/client-library/client-library - VS2012.vcxproj new file mode 100644 index 0000000..b73d1eb --- /dev/null +++ b/projects/OrangeFS/client-library/client-library - VS2012.vcxproj @@ -0,0 +1,160 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + {334A80F7-0F06-4C17-9A32-975C4ABA30AA} + Win32Proj + clientlibrary + orangefs-client-library + + + + DynamicLibrary + true + Unicode + v110 + + + DynamicLibrary + true + MultiByte + v110 + + + DynamicLibrary + false + true + Unicode + v110 + + + DynamicLibrary + false + true + Unicode + v110 + + + + + + + + + + + + + + + + + + + true + orangefs-client-library + + + false + orangefs-client + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\..;..\..\..\openssl\include;..\..\..\ldap\Win64\inc;..\..\..\..\src\common\security;..\..\..\..\src\client\windows\client-service + + + Windows + true + $(TargetDir);..\..\..\ldap\Win64\lib;..\..\..\openssl\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;security.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;ORANGEFS_DEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\trove;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc;..\..\..\src\common\security;..\..\..\src\client\windows\client-service + + + Windows + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + $(OutDir)orangefs-client$(TargetExt) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-library/client-library.vcxproj b/projects/OrangeFS/client-library/client-library.vcxproj new file mode 100644 index 0000000..4865302 --- /dev/null +++ b/projects/OrangeFS/client-library/client-library.vcxproj @@ -0,0 +1,155 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {334A80F7-0F06-4C17-9A32-975C4ABA30AA} + Win32Proj + clientlibrary + orangefs-client-library + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + true + MultiByte + + + DynamicLibrary + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + + + + + + true + + + false + orangefs-client + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\..\include\windows;..\..\..\dokan\include;..\..\..\..\src\common\misc;..\..\..\..\src\common\gen-locks;..\..\..\..\src\io\bmi;..\..\..\..\src\io\trove;..\..\..\..\src\common\gossip;..\..\..\..\src\common\id-generator;..\..\..\..\src\common\windows;..\..\..\..\src\common\quicklist;..\..\..\..\src\common\quickhash;..\..\..\..\src\io\description;..\..\..\..\src\proto;..\..\..\..\src\io\dev;..\..\..\..\src\io\job;..\..\..\..\include;..\..\..\..;..\..\..\openssl\include;..\..\..\ldap\Win64\inc;..\..\..\..\src\common\security;..\..\..\..\src\client\windows\client-service; + + + Windows + true + $(TargetDir);..\..\..\ldap\Win64\lib;..\..\..\openssl\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;security.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;ORANGEFS_DEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + ..\..\..\..\include\windows;..\..\..\dokan\include;..\..\..\..\src\common\misc;..\..\..\..\src\common\gen-locks;..\..\..\..\src\io\bmi;..\..\..\..\src\io\trove;..\..\..\..\src\common\gossip;..\..\..\..\src\common\id-generator;..\..\..\..\src\common\windows;..\..\..\..\src\common\quicklist;..\..\..\..\src\common\quickhash;..\..\..\..\src\io\description;..\..\..\..\src\proto;..\..\..\..\src\io\dev;..\..\..\..\src\io\job;..\..\..\..\include;..\..\..\..;..\..\..\openssl\include;..\..\..\ldap\Win64\inc;..\..\..\..\src\common\security;..\..\..\..\src\client\windows\client-service; + + + Windows + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap\Win64\lib;..\..\..\openssl\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;security.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + $(OutDir)orangefs-client$(TargetExt) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;CLIENTLIBRARY_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-library/client-library.vcxproj.filters b/projects/OrangeFS/client-library/client-library.vcxproj.filters new file mode 100644 index 0000000..481cc19 --- /dev/null +++ b/projects/OrangeFS/client-library/client-library.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-service/client-service-vs2012.vcxproj b/projects/OrangeFS/client-service/client-service-vs2012.vcxproj new file mode 100644 index 0000000..55fed62 --- /dev/null +++ b/projects/OrangeFS/client-service/client-service-vs2012.vcxproj @@ -0,0 +1,243 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + Document + + + + + + + {61019A9A-D6E0-4E04-B163-EADB88766C9E} + dokanservice + client-service + + + + Application + true + MultiByte + v110 + + + Application + true + MultiByte + v110 + + + Application + true + MultiByte + v110 + + + Application + true + MultiByte + v110 + + + Application + false + true + MultiByte + v110 + + + Application + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\release + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\release + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-service/client-service.vcxproj b/projects/OrangeFS/client-service/client-service.vcxproj new file mode 100755 index 0000000..ca8b746 --- /dev/null +++ b/projects/OrangeFS/client-service/client-service.vcxproj @@ -0,0 +1,237 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + + Document + + + + + + + {61019A9A-D6E0-4E04-B163-EADB88766C9E} + dokanservice + client-service + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + orangefs-client + false + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + memleaks.h + + + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\debug + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win32\inc + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);..\..\..\dokan\lib;..\..\..\ldap-windows\Win32\lib\mscvc;..\..\..\openssl-windows\lib\release + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\dokan\include;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..\src\common\misc;..\..\..\;..\..\..\openssl-windows\include;..\..\..\ldap-windows\Win64\inc + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);..\..\..\dokan\lib64;..\..\..\ldap-windows\Win64\lib;..\..\..\openssl-windows\lib64\release + kernel32.lib;user32.lib;advapi32.lib;ws2_32.lib;netapi32.lib;userenv.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;dokan.lib;libeay32.lib;ssleay32.lib;ldapsdk.lib;ldapssl.lib;ldapx.lib;%(AdditionalDependencies) + false + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/client-service/client-service.vcxproj.filters b/projects/OrangeFS/client-service/client-service.vcxproj.filters new file mode 100755 index 0000000..deedad9 --- /dev/null +++ b/projects/OrangeFS/client-service/client-service.vcxproj.filters @@ -0,0 +1,74 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Resource Files + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/description/description-vs2012.vcxproj b/projects/OrangeFS/description/description-vs2012.vcxproj new file mode 100644 index 0000000..73ce04a --- /dev/null +++ b/projects/OrangeFS/description/description-vs2012.vcxproj @@ -0,0 +1,197 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {36810FAE-CC16-4F63-90E4-8AEF095B58D8} + description + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + description + + + description + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/description/description.vcxproj b/projects/OrangeFS/description/description.vcxproj new file mode 100755 index 0000000..0ef2028 --- /dev/null +++ b/projects/OrangeFS/description/description.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {36810FAE-CC16-4F63-90E4-8AEF095B58D8} + description + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\..;..\..\..\src\io\buffer + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/description/description.vcxproj.filters b/projects/OrangeFS/description/description.vcxproj.filters new file mode 100755 index 0000000..abb2f59 --- /dev/null +++ b/projects/OrangeFS/description/description.vcxproj.filters @@ -0,0 +1,63 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/dev/dev-vs2012.vcxproj b/projects/OrangeFS/dev/dev-vs2012.vcxproj new file mode 100644 index 0000000..9aa9910 --- /dev/null +++ b/projects/OrangeFS/dev/dev-vs2012.vcxproj @@ -0,0 +1,186 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + dev + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + dev + + + dev + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/dev/dev.vcxproj b/projects/OrangeFS/dev/dev.vcxproj new file mode 100755 index 0000000..9c78fa9 --- /dev/null +++ b/projects/OrangeFS/dev/dev.vcxproj @@ -0,0 +1,175 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + dev + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/dev/dev.vcxproj.filters b/projects/OrangeFS/dev/dev.vcxproj.filters new file mode 100755 index 0000000..954e2ce --- /dev/null +++ b/projects/OrangeFS/dev/dev.vcxproj.filters @@ -0,0 +1,30 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj b/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj new file mode 100755 index 0000000..2c45792 --- /dev/null +++ b/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj @@ -0,0 +1,140 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {3F8422F7-8EC5-4FF0-BCEF-F6CB35742290} + driverbwmulti + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gossip;..\..\..\src\io\bmi;..\..\..\include;..\..\..;..\..\..\src\common\windows;c:\Program Files (x86)\MPICH2\include + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(TargetDir);C:\Program Files (x86)\MPICH2\lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;mpi.lib;%(AdditionalDependencies) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gossip;..\..\..\src\io\bmi;..\..\..\include;..\..\..;..\..\..\src\common\windows;c:\Program Files (x86)\MPICH2\include + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(TargetDir);C:\Program Files (x86)\MPICH2\lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;mpi.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gossip;..\..\..\src\io\bmi;..\..\..\include;..\..\..;..\..\..\src\common\windows;c:\Program Files (x86)\MPICH2\include + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);C:\Program Files (x86)\MPICH2\lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;mpi.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gossip;..\..\..\src\io\bmi;..\..\..\include;..\..\..;..\..\..\src\common\windows;c:\Program Files (x86)\MPICH2\include + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir);C:\Program Files (x86)\MPICH2\lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;mpi.lib;%(AdditionalDependencies) + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj.filters b/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj.filters new file mode 100755 index 0000000..e5d550b --- /dev/null +++ b/projects/OrangeFS/driver-bw-multi/driver-bw-multi.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/eventlog32.reg b/projects/OrangeFS/eventlog32.reg new file mode 100755 index 0000000000000000000000000000000000000000..4b1779369fea1c822af2f14cb9235913186cb609 GIT binary patch literal 1056 zcmah|+e*Vg5IxU={}A$|P(;&aqk<15D2i6WiXuizFfj&7D@ncd=hZVCw>!lLS=!9b z?VOp}`Tn{?jTs8e@qrcru2G_*uEhckmed^6TJtvNJ-{vP4XrirGu~tDV3%hT8}|2r zQ=BvA9ur*P3Mq#CPB7v(rR@xtv}PF7V~iWhBi>THF>AxzGa{unx8Tn)rB_K^Mod9| zC-M`emYR~cE@Dd0ikcx_d8XDUXH>^BBaa3-b64~~Va9+M;?+ezTIM0SxO^j8TAutj zqNaC=5J!07_Y+%)u#H0u&_~bK-=mbT@T}xyC9nJJQJ-0U0a;6@ zdoY}c%Mz*V16rKk;6TZqjp4+cPomiCJQ4PlkC*#O-&a_kU!+iV4+g5%zxBDQ$`z`C z?}uirD~uI;jivkAVR?QINxJIf|51&qb-ibP4o0ytYWnMQ@Vz&DM~;K%m+(b7ZKOPO w4-z#6t?%lQf7!*5yS3yl$U7c$yJRn9gBR2k_9YkGc+nJm#}egFVlzmVA6;C8RsaA1 literal 0 HcmV?d00001 diff --git a/projects/OrangeFS/eventlog64.reg b/projects/OrangeFS/eventlog64.reg new file mode 100755 index 0000000000000000000000000000000000000000..23f01c675fb69255d0d8c298906928f0c7132c2a GIT binary patch literal 974 zcma)5T}#725S(Yh{}A$|P()*LQNf226h&*nh$2QxFfj&7D@pz6pI7HDUT%vN3g_kykWGaKcgRE2fJLG*f75b zoZ*5s_n6=kVQAdNE+!gar$>_0%&g!ZkjdGt_EZ>NcmMj0Q zsF_{D$1z^`{lpdmY~u(a_AxN~AJEEsJEBI5M~quLW}USao`oIv_G-=^@yzJ+s9H~Y z0L2rrEP-GT8L_y+p|G7A#S^nRu~07+heFw3HC98}^EiD9ZXdFfR2Hr2D(CT^uIqX! zF@w*`^H+`EGBQzHd$ovv~#HVm5O2k|O=*#H0l literal 0 HcmV?d00001 diff --git a/projects/OrangeFS/flow/flow-vs2012.vcxproj b/projects/OrangeFS/flow/flow-vs2012.vcxproj new file mode 100644 index 0000000..46e771d --- /dev/null +++ b/projects/OrangeFS/flow/flow-vs2012.vcxproj @@ -0,0 +1,189 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + flow + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + flow + + + flow + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/flow/flow.vcxproj b/projects/OrangeFS/flow/flow.vcxproj new file mode 100755 index 0000000..208c42e --- /dev/null +++ b/projects/OrangeFS/flow/flow.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + flow + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\description;..\..\..\src\io\trove;..\..\..\src\common\misc;..\..\..\src\common\gossip;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\src\proto;..\..\..\include;..\..\.. + WIN32;_MBCS;__STATIC_FLOWPROTO_MULTIQUEUE__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/flow/flow.vcxproj.filters b/projects/OrangeFS/flow/flow.vcxproj.filters new file mode 100755 index 0000000..02552bf --- /dev/null +++ b/projects/OrangeFS/flow/flow.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/gen-locks-test/gen-locks-test.vcxproj b/projects/OrangeFS/gen-locks-test/gen-locks-test.vcxproj new file mode 100755 index 0000000..79f3c55 --- /dev/null +++ b/projects/OrangeFS/gen-locks-test/gen-locks-test.vcxproj @@ -0,0 +1,145 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + true + true + + + true + true + + + true + true + + + true + true + + + + {0217A4B0-3C9A-4892-9ACB-984653820AC3} + genlockstest + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(SolutionDir)Debug + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;gen-locks.lib;%(AdditionalDependencies) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(SolutionDir)Debug + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;gen-locks.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gen-locks + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;gen-locks.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gen-locks + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;gen-locks.lib;%(AdditionalDependencies) + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/gen-locks/gen-locks-vs2012.vcxproj b/projects/OrangeFS/gen-locks/gen-locks-vs2012.vcxproj new file mode 100644 index 0000000..f818596 --- /dev/null +++ b/projects/OrangeFS/gen-locks/gen-locks-vs2012.vcxproj @@ -0,0 +1,181 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9138ABF9-041F-4A55-9E87-0F433719F4FC} + genlocks + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + gen-locks + + + gen-locks + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + ..\..\..\include\windows + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/gen-locks/gen-locks.vcxproj b/projects/OrangeFS/gen-locks/gen-locks.vcxproj new file mode 100755 index 0000000..8b982a0 --- /dev/null +++ b/projects/OrangeFS/gen-locks/gen-locks.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9138ABF9-041F-4A55-9E87-0F433719F4FC} + genlocks + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + ..\..\..\include\windows;..\..\..\src\common\misc + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/gen-locks/gen-locks.vcxproj.filters b/projects/OrangeFS/gen-locks/gen-locks.vcxproj.filters new file mode 100755 index 0000000..0449596 --- /dev/null +++ b/projects/OrangeFS/gen-locks/gen-locks.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/gossip/gossip-vs2012.vcxproj b/projects/OrangeFS/gossip/gossip-vs2012.vcxproj new file mode 100644 index 0000000..ba41f8f --- /dev/null +++ b/projects/OrangeFS/gossip/gossip-vs2012.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9C95DF0D-5B60-4E94-94ED-000861C651B4} + gossip + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + gossip + + + gossip + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/gossip/gossip.vcxproj b/projects/OrangeFS/gossip/gossip.vcxproj new file mode 100755 index 0000000..7fec9ee --- /dev/null +++ b/projects/OrangeFS/gossip/gossip.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {9C95DF0D-5B60-4E94-94ED-000861C651B4} + gossip + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/gossip/gossip.vcxproj.filters b/projects/OrangeFS/gossip/gossip.vcxproj.filters new file mode 100755 index 0000000..8c2de44 --- /dev/null +++ b/projects/OrangeFS/gossip/gossip.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/id-generator/id-generator-vs2012.vcxproj b/projects/OrangeFS/id-generator/id-generator-vs2012.vcxproj new file mode 100644 index 0000000..bb9d56a --- /dev/null +++ b/projects/OrangeFS/id-generator/id-generator-vs2012.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + idgenerator + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + id-generator + + + id-generator + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/id-generator/id-generator.vcxproj b/projects/OrangeFS/id-generator/id-generator.vcxproj new file mode 100755 index 0000000..412bc68 --- /dev/null +++ b/projects/OrangeFS/id-generator/id-generator.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + idgenerator + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..;..\..\..\include;..\..\..\src\common\quickhash;..\..\..\src\common\gen-locks;..\..\..\src\common\windows;..\..\..\src\common\misc + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/id-generator/id-generator.vcxproj.filters b/projects/OrangeFS/id-generator/id-generator.vcxproj.filters new file mode 100755 index 0000000..b43239c --- /dev/null +++ b/projects/OrangeFS/id-generator/id-generator.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/job/job-vs2012.vcxproj b/projects/OrangeFS/job/job-vs2012.vcxproj new file mode 100644 index 0000000..18ce15a --- /dev/null +++ b/projects/OrangeFS/job/job-vs2012.vcxproj @@ -0,0 +1,191 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {C0F175D2-0285-4C14-8362-98CEBF0C306F} + job + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + job + + + job + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/job/job.vcxproj b/projects/OrangeFS/job/job.vcxproj new file mode 100755 index 0000000..924a081 --- /dev/null +++ b/projects/OrangeFS/job/job.vcxproj @@ -0,0 +1,180 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {C0F175D2-0285-4C14-8362-98CEBF0C306F} + job + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/job/job.vcxproj.filters b/projects/OrangeFS/job/job.vcxproj.filters new file mode 100755 index 0000000..0231fcb --- /dev/null +++ b/projects/OrangeFS/job/job.vcxproj.filters @@ -0,0 +1,45 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/misc/misc-vs2012.vcxproj b/projects/OrangeFS/misc/misc-vs2012.vcxproj new file mode 100644 index 0000000..bacada0 --- /dev/null +++ b/projects/OrangeFS/misc/misc-vs2012.vcxproj @@ -0,0 +1,285 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {7506190B-64BE-4D64-95A4-4C22D48E0994} + misc + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + misc + + + misc + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document + + + Document + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/misc/misc.vcxproj b/projects/OrangeFS/misc/misc.vcxproj new file mode 100755 index 0000000..b8b822a --- /dev/null +++ b/projects/OrangeFS/misc/misc.vcxproj @@ -0,0 +1,274 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {7506190B-64BE-4D64-95A4-4C22D48E0994} + misc + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\proto;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Document + + + Document + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/misc/misc.vcxproj.filters b/projects/OrangeFS/misc/misc.vcxproj.filters new file mode 100755 index 0000000..59e2951 --- /dev/null +++ b/projects/OrangeFS/misc/misc.vcxproj.filters @@ -0,0 +1,152 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {d019f619-8505-4da8-a861-33e8c52f79e7} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + SM Files + + + SM Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/orangefs-app/OrangeFS_LOGO.png b/projects/OrangeFS/orangefs-app/OrangeFS_LOGO.png new file mode 100644 index 0000000000000000000000000000000000000000..0cf24bc0361854da2b2694c263ec5d14e8923b1e GIT binary patch literal 2036 zcmVmK4m<;SvhD;ZYFPI<@qpo1a`=})$CP;*s zg~&^c8jS{tZ*j~`HZ;Q-f{3X2HU*Ial?kjOWXo2%wy?f%Z`YUGdwPuy}kEL07NsFMy3+bMv1d2 zM$peFVi7pYB}H;0Vhvz2WdJCs*1Rr~NSkTG;4x?Zpqw@UEg&$<=9fE1Z}F~K2i8F% z%gXazObWpK)IjC7{+C%4ZN7PZ^92Meo`s=9UEh2$b9McSkW8E#0p?^BCc7(lo;7l2 z>xR~Vr2$NZ!9&k|=Rnbn#Tf#ecK&T=C7e40z+&Y`^ZCEOdg0I0X36!)96+S7zwF1o zM;F>QuDh+i#Q7Gy31D<;{F#CM-#fOLpJ*wDUfK-06_7lA<+#f&BXpfr#x^Ci~<55I!|Kv)7uOA=-!SP(KNxe`NZ%)Fn@#6kp__fmyEO6O>nqd8$C3un z+ufUiz41E=U@nH+n=Xx6=pbO*+Q@%tl0kA0Rt`U zk+&>?wc+0^YkHp-la)Jry1iqKNt=sup<$8SwU9_K);OolfI}LR3J=~1F4Nw)DI-@t zIW_)R?fu6F-ZFqUu579sO>={!YfL&Ye0AN;7zPAHkP#LYC&@5u=1e5)OC60LFx>5+ z)#+5}eB?%BvnRcDNU)E< zz9=d*Ogo3++i8}WbBLM_!V6A1)+;T31GE}3$AN?ZR|JwHUAl}_^_WC zekM2D14COH)_Ui^Ca24aWt*vo9m4WgR&GDqndxX;g;+(9d8b0TO+C}xb8rt?KQi)=*l~Qk!!1}qsZTk7C6U(nLQDC zy;l6`E|>XVI=P3;bl*_y*LugNyrR80JycM%b4XP!+Dn{|$2tvuWZ2}w2jK7!R!2(fiT~TN?oOWA?n@Up_=REW82i zH{*GX{RQ*0jH`C{4Vi`AnDx%RTap7V-c)yFZA6IH1n1Vz6$CR7yl5`}hdF{_{S#9U zC}j@=JTi1{)sBJl2B%`)NXEH;gnT?Im#`x*l+RPg@qzr)W$#JuLv|HNCq|&^OVEZ0 z@m`>MffATm*uPBu{qu_V!0ThcSmV0e>Qi1@kvk(5nTh1%2XiIg;-$M!T3+fO?VmW_ z-t=rhp92ywJBU5FHIbQCN;s*=d>XMChjm|3W)~vqV=tFnFX3HFu!tr0zX|3BZ^#vq>O_+|>V)a<4E27BG;V@MR_+$-)@sm>YzF zH&gXeI)1R^_&{@9z16%*0Yb?4(fy4jgD_Mjl+Y~o*)N$$j>AA~^HfpZaAyx(Ra;82 z?(@;LEq@Sx|8@qMwc)e)bAXi1cW#&+au(v342Dilo2@HJ`qliO7_4ZlmGr?G%{lSR zEgR6YF65(^fu|NG+N5UZqR(2#bmzVc7%1WO8Q=m@R5?vQbBwOe%<>oAvipy`X@mz2 zJ2t-&72({qnRsQJz0JL0Au{a^pOEx@=zi7h`-_UrO;FYH~Bub+@kggYs zY>tIsAXwOCR@hUW>FZwX-x9!ctt3{r)-?wbZ4P&x!Rf`Nc2>&s7Hn4>=f1jp$H0-3 zRUq609>ey(-9s0&2hoC$mzU*&U8|ZVP&8Q14IriBU4`>ylk;vaEZc!$|Fa6 z7BYTUYx!(K@5IsFkjj>X(p)-9mMOT22}mWT3gtdO$;imWU3)3q&EkveV)!rP0d%c_ SqomFN0000 c #F3F3F3", +", c #F0F0F0", +"' c #EDEDED", +") c #EBEBEB", +"! c #EAEAEA", +"................", +"..........+.....", +"..........@#....", +"..........$%&...", +"................", +"................", +"..***********...", +"..===========...", +"..-----------...", +"..;;;;;;;;;;;...", +"..>>>>>>>>>>>...", +"..,,,,,,,,,,,...", +"..'''''''''''...", +"..)))))))))))...", +"..!!!!!!!!!!!...", +"................"}; diff --git a/projects/OrangeFS/orangefs-app/folder_icon.xpm b/projects/OrangeFS/orangefs-app/folder_icon.xpm new file mode 100644 index 0000000..bcbb2f1 --- /dev/null +++ b/projects/OrangeFS/orangefs-app/folder_icon.xpm @@ -0,0 +1,159 @@ +/* XPM */ +static char * C:\source\windows\projects\OrangeFS\x64\Debug\folder_icon_xpm[] = { +"16 16 140 2", +" c None", +". c #FFFFFF", +"+ c #FEFEFE", +"@ c #FFFFFD", +"# c #FDF9E6", +"$ c #F4E295", +"% c #F3D68D", +"& c #FADF9D", +"* c #FCE6B0", +"= c #FDEBC1", +"- c #FDF1D2", +"; c #FEF6E3", +"> c #FEFBF3", +", c #FDF9E7", +"' c #FDEC95", +") c #FEF199", +"! c #F8E293", +"~ c #F9D787", +"{ c #FAD786", +"] c #FAD787", +"^ c #F8D78D", +"/ c #FCE891", +"( c #FEEB94", +"_ c #FFEC93", +": c #D9BE78", +"< c #F9D785", +"[ c #FBD887", +"} c #F8D78A", +"| c #FDF8E5", +"1 c #FCE48F", +"2 c #FEE992", +"3 c #FFE992", +"4 c #B89F60", +"5 c #B09556", +"6 c #FCD988", +"7 c #F8D68A", +"8 c #FDF7E5", +"9 c #FADF8D", +"0 c #FEE48F", +"a c #FFE48F", +"b c #B69D5E", +"c c #A78C4D", +"d c #FBD886", +"e c #F6D689", +"f c #FDF6E4", +"g c #FADB88", +"h c #FEE08B", +"i c #FFE18C", +"j c #B49A5D", +"k c #A3884B", +"l c #F7D485", +"m c #F8D686", +"n c #F6D488", +"o c #FCF5E3", +"p c #FDDC89", +"q c #FFDE89", +"r c #B1975A", +"s c #A1874B", +"t c #F2D081", +"u c #F4D182", +"v c #F5D383", +"w c #F1D085", +"x c #FBF4E3", +"y c #F4D282", +"z c #FAD785", +"A c #FBD885", +"B c #AD9558", +"C c #9D8448", +"D c #EDCD7E", +"E c #EECD7F", +"F c #F0CF80", +"G c #EBCC82", +"H c #FAF3E2", +"I c #EFCD7E", +"J c #F4D281", +"K c #F7D484", +"L c #A68C4E", +"M c #9A8045", +"N c #E9C87B", +"O c #E9C97B", +"P c #EAC97B", +"Q c #E8C97C", +"R c #FBF5E7", +"S c #F9F1E1", +"T c #E9C77A", +"U c #CDAF68", +"V c #8F773E", +"W c #B09454", +"X c #E3C477", +"Y c #E4C478", +"Z c #E5C579", +"` c #E5C577", +" . c #E1CA93", +".. c #F7F0E0", +"+. c #E2C276", +"@. c #C8AB65", +"#. c #8A723A", +"$. c #CDAE67", +"%. c #DEBE73", +"&. c #DFBF74", +"*. c #E0C075", +"=. c #DFBE6F", +"-. c #E7E0D1", +";. c #E6E6E6", +">. c #EBEBEB", +",. c #F6F6F6", +"'. c #F5EEDD", +"). c #DABB71", +"!. c #E2C376", +"~. c #C2A561", +"{. c #866E38", +"]. c #C7A964", +"^. c #D8B970", +"/. c #DABA70", +"(. c #DCBC72", +"_. c #DCBB6C", +":. c #D4CCBA", +"<. c #CBCBCB", +"[. c #CECECE", +"}. c #F8F8F8", +"|. c #DEBF74", +"1. c #C2A86A", +"2. c #93835E", +"3. c #C2A562", +"4. c #D2B46C", +"5. c #D4B56D", +"6. c #D5B76E", +"7. c #D9B768", +"8. c #9BAEC6", +"9. c #C6C6C6", +"0. c #E1E1E1", +"a. c #E5D1A0", +"b. c #C1A970", +"c. c #F7F3E8", +"d. c #EADDBE", +"e. c #DDC794", +"f. c #CAAD66", +"g. c #C8BDA3", +"h. c #DDDDDD", +"i. c #E5DCC6", +". . + @ . . . . . . . . . . . . ", +". . # $ % & * = - ; > . . . . . ", +". . , ' ) ! ~ { { { ] ^ . . . . ", +". . # / ( _ : < { [ [ } . . . . ", +". . | 1 2 3 4 5 6 [ [ 7 . . . . ", +". . 8 9 0 a b c [ d [ e . . . . ", +". . f g h i j k l m ~ n . . . . ", +". . o < p q r s t u v w . . . . ", +". . x y z A B C D E F G . . . . ", +". . H I J K L M N O P Q R . . . ", +". . S T I U V W X Y Z ` .. . . ", +". . ..+.N @.#.$.%.&.*.=.-.;.>.,.", +". . '.).!.~.{.].^./.(._.:.<.[.}.", +". . . .|.1.2.3.4.5.6.7.8.9.0.. ", +". . . . a.b.;.. c.d.e.f.g.h.. . ", +". . . . . i.. . . . . . . . . . "}; diff --git a/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj new file mode 100644 index 0000000..7ac3d55 --- /dev/null +++ b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj @@ -0,0 +1,182 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + + + + + + + + + + + {770B6DB7-2AC1-42A0-9A20-A49121694A42} + Win32Proj + testorangefsapp + + + + Application + true + MultiByte + v110 + + + Application + true + MultiByte + v110 + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + true + orangefs-app + $(SolutionDir)\$(Platform)\$(Configuration)\ + $(Platform)\$(Configuration)\ + + + true + $(SolutionDir)\$(Platform)\$(Configuration)\ + orangefs-app + + + false + + + false + + + + + + Level3 + Disabled + WIN32;ORANGEFS_DEBUG;_CRT_SECURE_NO_WARNINGS;_DEBUG;__WXMSW__;_CRT_SECURE_NO_DEPRECATE_;__WXDEBUG__;wxUSE_GUI=1;WXUSINGDLL;%(PreprocessorDefinitions) + C:\Program Files %28x86%29\Visual Leak Detector\include;..\..\..\src\client\cp-library;..\..\..\openssl-windows\include;..\..\..\wxWidgets-windows\include\mswd;..\..\..\wxWidgets-windows\include\msvc;..\..\..\wxWidgets-windows\include;%(AdditionalIncludeDirectories) + false + + + Console + true + C:\Program Files %28x86%29\Visual Leak Detector\lib\Win64;..\..\..\openssl-windows\lib64\debug;..\..\..\wxWidgets-windows\lib;%(AdditionalLibraryDirectories) + ssleay32.lib;libeay32.lib;orangefs-client.lib;wxmsw28d_core.lib;wxbase28d.lib;comctl32.lib;rpcrt4.lib;winmm.lib;advapi32.lib;wsock32.lib;wxpngd.lib;wxzlibd.lib;wxjpegd.lib;wxtiffd.lib;vld.lib;%(AdditionalDependencies) + + + + + NotUsing + Level3 + Disabled + WIN32;ORANGEFS_DEBUG;_CRT_SECURE_NO_WARNINGS;_DEBUG;__WXMSW__;_CRT_SECURE_NO_DEPRECATE_;__WXDEBUG__;wxUSE_GUI=1;WXUSINGDLL;%(PreprocessorDefinitions) + ..\..\..\src\common\misc;C:\Program Files %28x86%29\Visual Leak Detector\include;..\..\..\wxWidgets-windows\include\;..\..\..\wxWidgets-windows\include\msvc\;..\..\..\wxWidgets-windows\include\mswd\;..\..\..\openssl-windows\include\;..\..\..\src\client\cp-library\;%(AdditionalIncludeDirectories) + false + true + + + Windows + true + C:\Program Files %28x86%29\Visual Leak Detector\lib\Win64;..\..\..\openssl-windows\lib64\debug;..\x64\Debug\;..\..\..\wxWidgets-windows\lib;%(AdditionalLibraryDirectories) + ssleay32.lib;libeay32.lib;orangefs-client.lib;wxmsw28d_core.lib;wxbase28d.lib;comctl32.lib;rpcrt4.lib;winmm.lib;advapi32.lib;wsock32.lib;wxpngd.lib;wxzlibd.lib;wxjpegd.lib;wxtiffd.lib;vld.lib;%(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.filters b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.filters new file mode 100644 index 0000000..a4bd6a9 --- /dev/null +++ b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.filters @@ -0,0 +1,66 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.user b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/projects/OrangeFS/orangefs-app/orangefs-app - VS2012.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/projects/OrangeFS/pingpong/pingpong.vcxproj b/projects/OrangeFS/pingpong/pingpong.vcxproj new file mode 100755 index 0000000..75ef5fd --- /dev/null +++ b/projects/OrangeFS/pingpong/pingpong.vcxproj @@ -0,0 +1,134 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {FFC13E16-9EC8-44CA-87CC-ACE877DC3A95} + pingpong + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/pingpong/pingpong.vcxproj.filters b/projects/OrangeFS/pingpong/pingpong.vcxproj.filters new file mode 100755 index 0000000..b99eae6 --- /dev/null +++ b/projects/OrangeFS/pingpong/pingpong.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + + + Source Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/proto/proto-vs2012.vcxproj b/projects/OrangeFS/proto/proto-vs2012.vcxproj new file mode 100644 index 0000000..215ff03 --- /dev/null +++ b/projects/OrangeFS/proto/proto-vs2012.vcxproj @@ -0,0 +1,189 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {2F406AB6-D010-4196-A523-FAE6F2B1585F} + proto + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + proto + + + proto + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/proto/proto.vcxproj b/projects/OrangeFS/proto/proto.vcxproj new file mode 100755 index 0000000..319ec41 --- /dev/null +++ b/projects/OrangeFS/proto/proto.vcxproj @@ -0,0 +1,178 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {2F406AB6-D010-4196-A523-FAE6F2B1585F} + proto + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + memleaks.h + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MEMLEAKS;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\job;..\..\..\src\common\gossip;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\common\id-generator;..\..\..\src\common\misc;..\..\..\src\io\trove;..\..\..\src\io\description;..\..\..\src\io\dev;..\..\..\src\common\windows;..\..\..\src\client\sysint;..\..\..\src\server;..\..\..\;..\..\..\include + + + true + true + true + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/proto/proto.vcxproj.filters b/projects/OrangeFS/proto/proto.vcxproj.filters new file mode 100755 index 0000000..e2d1f09 --- /dev/null +++ b/projects/OrangeFS/proto/proto.vcxproj.filters @@ -0,0 +1,39 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj b/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj new file mode 100755 index 0000000..f8a7ec7 --- /dev/null +++ b/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj @@ -0,0 +1,76 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {09F8C9E4-1E99-4EBB-88E6-2A2CA290D718} + pvfs2ls + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj.filters b/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj.filters new file mode 100755 index 0000000..0a23e0f --- /dev/null +++ b/projects/OrangeFS/pvfs2-ls/pvfs2-ls.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/request-scheduler/request-scheduler-vs2012.vcxproj b/projects/OrangeFS/request-scheduler/request-scheduler-vs2012.vcxproj new file mode 100644 index 0000000..082b7ab --- /dev/null +++ b/projects/OrangeFS/request-scheduler/request-scheduler-vs2012.vcxproj @@ -0,0 +1,185 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + requestscheduler + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + request-scheduler + + + request-scheduler + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj b/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj new file mode 100755 index 0000000..60680b7 --- /dev/null +++ b/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj @@ -0,0 +1,174 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + requestscheduler + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MEMLEAKS;_MBCS;%(PreprocessorDefinitions) + memleaks.h + + + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj.filters b/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj.filters new file mode 100755 index 0000000..5180321 --- /dev/null +++ b/projects/OrangeFS/request-scheduler/request-scheduler.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/sysint-client/sysint-client-vs2012.vcxproj b/projects/OrangeFS/sysint-client/sysint-client-vs2012.vcxproj new file mode 100644 index 0000000..b4c60e8 --- /dev/null +++ b/projects/OrangeFS/sysint-client/sysint-client-vs2012.vcxproj @@ -0,0 +1,396 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {CD20A8BE-CC52-465E-9F40-A97A3912ED14} + sysintclient + + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + StaticLibrary + false + true + MultiByte + v110 + + + + + + + + + + + + + + + + + + + + + + + + + sysint-client + + + sysint-client + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + Document + + + + + Document + + + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + + + Document + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/sysint-client/sysint-client.vcxproj b/projects/OrangeFS/sysint-client/sysint-client.vcxproj new file mode 100755 index 0000000..c70c06a --- /dev/null +++ b/projects/OrangeFS/sysint-client/sysint-client.vcxproj @@ -0,0 +1,385 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + MemLeaks + Win32 + + + MemLeaks + x64 + + + Release + Win32 + + + Release + x64 + + + + {CD20A8BE-CC52-465E-9F40-A97A3912ED14} + sysintclient + + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + StaticLibrary + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_DEBUG;_MEMLEAKS;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + memleaks.h + + + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\..;..\..\..\src\client\usrint + WIN32;_MBCS;__PVFS2_CLIENT__;%(PreprocessorDefinitions) + 4047;4133 + + + true + true + true + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + %(RootDir)%(Directory)%(FileName).c + ..\..\pvfscommon\Release\statecomp %(FullPath) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + ..\..\pvfscommon\Release\statecomp %(FullPath) + Document + + + + + Document + + + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + Document + + + + + Document + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/sysint-client/sysint-client.vcxproj.filters b/projects/OrangeFS/sysint-client/sysint-client.vcxproj.filters new file mode 100755 index 0000000..4559eb1 --- /dev/null +++ b/projects/OrangeFS/sysint-client/sysint-client.vcxproj.filters @@ -0,0 +1,293 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {8095f4e0-25ea-46b8-8c62-ca8fbd151bad} + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + SM Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj b/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj new file mode 100755 index 0000000..491fe18 --- /dev/null +++ b/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj @@ -0,0 +1,146 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {490C6444-6931-4D69-9EC0-B104920591ED} + testbmiclient + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + true + true + + + true + true + true + true + + + true + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj.filters b/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj.filters new file mode 100755 index 0000000..f9a8cfb --- /dev/null +++ b/projects/OrangeFS/test-bmi-client/test-bmi-client.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj b/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj new file mode 100755 index 0000000..8b23c8c --- /dev/null +++ b/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj @@ -0,0 +1,146 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {AC842F24-4342-42D1-928D-19176B22917C} + testbmiserver + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(SolutionDir)$(Configuration) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(SolutionDir)$(Configuration) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\;..\..\..\include;..\..\..\src\io\bmi;..\..\..\src\common\gossip;..\..\..\src\common\windows + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;gen-locks.lib;gossip.lib;id-generator.lib;%(AdditionalDependencies) + + + + + true + true + + + true + true + true + true + + + true + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj.filters b/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj.filters new file mode 100755 index 0000000..6b5f70a --- /dev/null +++ b/projects/OrangeFS/test-bmi-server/test-bmi-server.vcxproj.filters @@ -0,0 +1,33 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-client/test-client.vcxproj b/projects/OrangeFS/test-client/test-client.vcxproj new file mode 100755 index 0000000..7030a16 --- /dev/null +++ b/projects/OrangeFS/test-client/test-client.vcxproj @@ -0,0 +1,134 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {59933D52-BFFA-404B-9613-B2474CB863E1} + testclient + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + + + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;sysint-client.lib;proto.lib;%(AdditionalDependencies) + $(TargetDir) + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-client/test-client.vcxproj.filters b/projects/OrangeFS/test-client/test-client.vcxproj.filters new file mode 100755 index 0000000..aa628fe --- /dev/null +++ b/projects/OrangeFS/test-client/test-client.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-job-client/test-job-client.vcxproj b/projects/OrangeFS/test-job-client/test-job-client.vcxproj new file mode 100755 index 0000000..f8ed586 --- /dev/null +++ b/projects/OrangeFS/test-job-client/test-job-client.vcxproj @@ -0,0 +1,76 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {D6CACA33-BA60-4B05-B84C-1D2BA72F0018} + testjob + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;%(AdditionalDependencies) + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-job-client/test-job-client.vcxproj.filters b/projects/OrangeFS/test-job-client/test-job-client.vcxproj.filters new file mode 100755 index 0000000..6a67cc1 --- /dev/null +++ b/projects/OrangeFS/test-job-client/test-job-client.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-job-server/test-job-server.vcxproj b/projects/OrangeFS/test-job-server/test-job-server.vcxproj new file mode 100755 index 0000000..80135bd --- /dev/null +++ b/projects/OrangeFS/test-job-server/test-job-server.vcxproj @@ -0,0 +1,76 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {049B9EB5-0CA0-417E-9D63-651C81997898} + testjobserver + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + ..\..\..\include\windows;..\..\..\src\common\misc;..\..\..\src\common\gen-locks;..\..\..\src\io\bmi;..\..\..\src\io\trove;..\..\..\src\common\gossip;..\..\..\src\common\id-generator;..\..\..\src\common\windows;..\..\..\src\common\quicklist;..\..\..\src\common\quickhash;..\..\..\src\io\description;..\..\..\src\proto;..\..\..\src\io\dev;..\..\..\src\io\job;..\..\..\include;..\..\.. + WIN32;_MBCS;%(PreprocessorDefinitions) + + + true + true + true + $(TargetDir) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;ws2_32.lib;bmi.lib;bmi_misc.lib;bmi_wintcp.lib;description.lib;dev.lib;flow.lib;gen-locks.lib;gossip.lib;id-generator.lib;job.lib;misc.lib;request-scheduler.lib;%(AdditionalDependencies) + + + + + + + + + \ No newline at end of file diff --git a/projects/OrangeFS/test-job-server/test-job-server.vcxproj.filters b/projects/OrangeFS/test-job-server/test-job-server.vcxproj.filters new file mode 100755 index 0000000..c65f18d --- /dev/null +++ b/projects/OrangeFS/test-job-server/test-job-server.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/projects/TestOrangeFS/TestOrangeFS.sln b/projects/TestOrangeFS/TestOrangeFS.sln new file mode 100755 index 0000000..2731dcf --- /dev/null +++ b/projects/TestOrangeFS/TestOrangeFS.sln @@ -0,0 +1,240 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi_wintcp", "..\OrangeFS\bmi_wintcp\bmi_wintcp.vcxproj", "{62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-locks", "..\OrangeFS\gen-locks\gen-locks.vcxproj", "{9138ABF9-041F-4A55-9E87-0F433719F4FC}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gen-locks-test", "..\OrangeFS\gen-locks-test\gen-locks-test.vcxproj", "{0217A4B0-3C9A-4892-9ACB-984653820AC3}" + ProjectSection(ProjectDependencies) = postProject + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi_misc", "..\OrangeFS\bmi_misc\bmi_misc.vcxproj", "{A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gossip", "..\OrangeFS\gossip\gossip.vcxproj", "{9C95DF0D-5B60-4E94-94ED-000861C651B4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "id-generator", "..\OrangeFS\id-generator\id-generator.vcxproj", "{0CBAD436-373C-4F35-A620-2D46C12D8FE0}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bmi", "..\OrangeFS\bmi\bmi.vcxproj", "{B7F1BEBC-F833-448A-829A-3505019C8169}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-bmi-client", "..\OrangeFS\test-bmi-client\test-bmi-client.vcxproj", "{490C6444-6931-4D69-9EC0-B104920591ED}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-bmi-server", "..\OrangeFS\test-bmi-server\test-bmi-server.vcxproj", "{AC842F24-4342-42D1-928D-19176B22917C}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pingpong", "..\OrangeFS\pingpong\pingpong.vcxproj", "{FFC13E16-9EC8-44CA-87CC-ACE877DC3A95}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver-bw-multi", "..\OrangeFS\driver-bw-multi\driver-bw-multi.vcxproj", "{3F8422F7-8EC5-4FF0-BCEF-F6CB35742290}" + ProjectSection(ProjectDependencies) = postProject + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "job", "..\OrangeFS\job\job.vcxproj", "{C0F175D2-0285-4C14-8362-98CEBF0C306F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "misc", "..\OrangeFS\misc\misc.vcxproj", "{7506190B-64BE-4D64-95A4-4C22D48E0994}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "flow", "..\OrangeFS\flow\flow.vcxproj", "{9B1C78DC-D1F2-4857-85D0-A649D9515B40}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dev", "..\OrangeFS\dev\dev.vcxproj", "{BC214BA7-319E-47E3-8F00-E0355A7E1F51}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "request-scheduler", "..\OrangeFS\request-scheduler\request-scheduler.vcxproj", "{AB729944-B3C0-44B4-8A63-ADB6C2CDA177}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "description", "..\OrangeFS\description\description.vcxproj", "{36810FAE-CC16-4F63-90E4-8AEF095B58D8}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-job-client", "..\OrangeFS\test-job-client\test-job-client.vcxproj", "{D6CACA33-BA60-4B05-B84C-1D2BA72F0018}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-job-server", "..\OrangeFS\test-job-server\test-job-server.vcxproj", "{049B9EB5-0CA0-417E-9D63-651C81997898}" + ProjectSection(ProjectDependencies) = postProject + {7506190B-64BE-4D64-95A4-4C22D48E0994} = {7506190B-64BE-4D64-95A4-4C22D48E0994} + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} = {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} = {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + {36810FAE-CC16-4F63-90E4-8AEF095B58D8} = {36810FAE-CC16-4F63-90E4-8AEF095B58D8} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {C0F175D2-0285-4C14-8362-98CEBF0C306F} = {C0F175D2-0285-4C14-8362-98CEBF0C306F} + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} = {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sysint-client", "..\OrangeFS\sysint-client\sysint-client.vcxproj", "{CD20A8BE-CC52-465E-9F40-A97A3912ED14}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test-client", "..\OrangeFS\test-client\test-client.vcxproj", "{59933D52-BFFA-404B-9613-B2474CB863E1}" + ProjectSection(ProjectDependencies) = postProject + {7506190B-64BE-4D64-95A4-4C22D48E0994} = {7506190B-64BE-4D64-95A4-4C22D48E0994} + {9C95DF0D-5B60-4E94-94ED-000861C651B4} = {9C95DF0D-5B60-4E94-94ED-000861C651B4} + {0CBAD436-373C-4F35-A620-2D46C12D8FE0} = {0CBAD436-373C-4F35-A620-2D46C12D8FE0} + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} = {AB729944-B3C0-44B4-8A63-ADB6C2CDA177} + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} = {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1} + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} = {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D} + {BC214BA7-319E-47E3-8F00-E0355A7E1F51} = {BC214BA7-319E-47E3-8F00-E0355A7E1F51} + {36810FAE-CC16-4F63-90E4-8AEF095B58D8} = {36810FAE-CC16-4F63-90E4-8AEF095B58D8} + {2F406AB6-D010-4196-A523-FAE6F2B1585F} = {2F406AB6-D010-4196-A523-FAE6F2B1585F} + {B7F1BEBC-F833-448A-829A-3505019C8169} = {B7F1BEBC-F833-448A-829A-3505019C8169} + {CD20A8BE-CC52-465E-9F40-A97A3912ED14} = {CD20A8BE-CC52-465E-9F40-A97A3912ED14} + {C0F175D2-0285-4C14-8362-98CEBF0C306F} = {C0F175D2-0285-4C14-8362-98CEBF0C306F} + {9B1C78DC-D1F2-4857-85D0-A649D9515B40} = {9B1C78DC-D1F2-4857-85D0-A649D9515B40} + {9138ABF9-041F-4A55-9E87-0F433719F4FC} = {9138ABF9-041F-4A55-9E87-0F433719F4FC} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "proto", "..\OrangeFS\proto\proto.vcxproj", "{2F406AB6-D010-4196-A523-FAE6F2B1585F}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pvfs2-ls", "..\OrangeFS\pvfs2-ls\pvfs2-ls.vcxproj", "{09F8C9E4-1E99-4EBB-88E6-2A2CA290D718}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "client-test", "client-test\client-test.vcxproj", "{28761587-FE68-4AEB-8BF0-AB73484A0AD4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "posix-test", "posix-test\posix-test.vcxproj", "{D3738B06-0CF0-438F-856D-AA92B07F584E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Debug|x64.ActiveCfg = Debug|x64 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|Win32.ActiveCfg = Release|Win32 + {62A89A5C-1B78-40B7-BB6A-6E5A06DB06E1}.Release|x64.ActiveCfg = Release|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|Win32.ActiveCfg = Debug|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Debug|x64.ActiveCfg = Debug|x64 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|Win32.ActiveCfg = Release|Win32 + {9138ABF9-041F-4A55-9E87-0F433719F4FC}.Release|x64.ActiveCfg = Release|x64 + {0217A4B0-3C9A-4892-9ACB-984653820AC3}.Debug|Win32.ActiveCfg = Debug|Win32 + {0217A4B0-3C9A-4892-9ACB-984653820AC3}.Debug|x64.ActiveCfg = Debug|x64 + {0217A4B0-3C9A-4892-9ACB-984653820AC3}.Release|Win32.ActiveCfg = Release|Win32 + {0217A4B0-3C9A-4892-9ACB-984653820AC3}.Release|x64.ActiveCfg = Release|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|Win32.ActiveCfg = Debug|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Debug|x64.ActiveCfg = Debug|x64 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|Win32.ActiveCfg = Release|Win32 + {A7C0F968-DACA-4BFE-B36F-46FDAEB8EF1D}.Release|x64.ActiveCfg = Release|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Debug|x64.ActiveCfg = Debug|x64 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|Win32.ActiveCfg = Release|Win32 + {9C95DF0D-5B60-4E94-94ED-000861C651B4}.Release|x64.ActiveCfg = Release|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|Win32.ActiveCfg = Debug|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Debug|x64.ActiveCfg = Debug|x64 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|Win32.ActiveCfg = Release|Win32 + {0CBAD436-373C-4F35-A620-2D46C12D8FE0}.Release|x64.ActiveCfg = Release|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|Win32.ActiveCfg = Debug|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Debug|x64.ActiveCfg = Debug|x64 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|Win32.ActiveCfg = Release|Win32 + {B7F1BEBC-F833-448A-829A-3505019C8169}.Release|x64.ActiveCfg = Release|x64 + {490C6444-6931-4D69-9EC0-B104920591ED}.Debug|Win32.ActiveCfg = Debug|Win32 + {490C6444-6931-4D69-9EC0-B104920591ED}.Debug|x64.ActiveCfg = Debug|x64 + {490C6444-6931-4D69-9EC0-B104920591ED}.Release|Win32.ActiveCfg = Release|Win32 + {490C6444-6931-4D69-9EC0-B104920591ED}.Release|x64.ActiveCfg = Release|x64 + {AC842F24-4342-42D1-928D-19176B22917C}.Debug|Win32.ActiveCfg = Debug|Win32 + {AC842F24-4342-42D1-928D-19176B22917C}.Debug|x64.ActiveCfg = Debug|x64 + {AC842F24-4342-42D1-928D-19176B22917C}.Release|Win32.ActiveCfg = Release|Win32 + {AC842F24-4342-42D1-928D-19176B22917C}.Release|x64.ActiveCfg = Release|x64 + {FFC13E16-9EC8-44CA-87CC-ACE877DC3A95}.Debug|Win32.ActiveCfg = Debug|Win32 + {FFC13E16-9EC8-44CA-87CC-ACE877DC3A95}.Debug|x64.ActiveCfg = Debug|x64 + {FFC13E16-9EC8-44CA-87CC-ACE877DC3A95}.Release|Win32.ActiveCfg = Release|Win32 + {FFC13E16-9EC8-44CA-87CC-ACE877DC3A95}.Release|x64.ActiveCfg = Release|x64 + {3F8422F7-8EC5-4FF0-BCEF-F6CB35742290}.Debug|Win32.ActiveCfg = Debug|Win32 + {3F8422F7-8EC5-4FF0-BCEF-F6CB35742290}.Debug|x64.ActiveCfg = Debug|x64 + {3F8422F7-8EC5-4FF0-BCEF-F6CB35742290}.Release|Win32.ActiveCfg = Release|Win32 + {3F8422F7-8EC5-4FF0-BCEF-F6CB35742290}.Release|x64.ActiveCfg = Release|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|Win32.ActiveCfg = Debug|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Debug|x64.ActiveCfg = Debug|x64 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|Win32.ActiveCfg = Release|Win32 + {C0F175D2-0285-4C14-8362-98CEBF0C306F}.Release|x64.ActiveCfg = Release|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|Win32.ActiveCfg = Debug|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Debug|x64.ActiveCfg = Debug|x64 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|Win32.ActiveCfg = Release|Win32 + {7506190B-64BE-4D64-95A4-4C22D48E0994}.Release|x64.ActiveCfg = Release|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Debug|x64.ActiveCfg = Debug|x64 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|Win32.ActiveCfg = Release|Win32 + {9B1C78DC-D1F2-4857-85D0-A649D9515B40}.Release|x64.ActiveCfg = Release|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|Win32.ActiveCfg = Debug|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Debug|x64.ActiveCfg = Debug|x64 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|Win32.ActiveCfg = Release|Win32 + {BC214BA7-319E-47E3-8F00-E0355A7E1F51}.Release|x64.ActiveCfg = Release|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|Win32.ActiveCfg = Debug|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Debug|x64.ActiveCfg = Debug|x64 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|Win32.ActiveCfg = Release|Win32 + {AB729944-B3C0-44B4-8A63-ADB6C2CDA177}.Release|x64.ActiveCfg = Release|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|Win32.ActiveCfg = Debug|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Debug|x64.ActiveCfg = Debug|x64 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|Win32.ActiveCfg = Release|Win32 + {36810FAE-CC16-4F63-90E4-8AEF095B58D8}.Release|x64.ActiveCfg = Release|x64 + {D6CACA33-BA60-4B05-B84C-1D2BA72F0018}.Debug|Win32.ActiveCfg = Debug|Win32 + {D6CACA33-BA60-4B05-B84C-1D2BA72F0018}.Debug|x64.ActiveCfg = Debug|Win32 + {D6CACA33-BA60-4B05-B84C-1D2BA72F0018}.Release|Win32.ActiveCfg = Release|Win32 + {D6CACA33-BA60-4B05-B84C-1D2BA72F0018}.Release|x64.ActiveCfg = Release|Win32 + {049B9EB5-0CA0-417E-9D63-651C81997898}.Debug|Win32.ActiveCfg = Debug|Win32 + {049B9EB5-0CA0-417E-9D63-651C81997898}.Debug|x64.ActiveCfg = Debug|Win32 + {049B9EB5-0CA0-417E-9D63-651C81997898}.Release|Win32.ActiveCfg = Release|Win32 + {049B9EB5-0CA0-417E-9D63-651C81997898}.Release|x64.ActiveCfg = Release|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|Win32.ActiveCfg = Debug|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Debug|x64.ActiveCfg = Debug|x64 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|Win32.ActiveCfg = Release|Win32 + {CD20A8BE-CC52-465E-9F40-A97A3912ED14}.Release|x64.ActiveCfg = Release|x64 + {59933D52-BFFA-404B-9613-B2474CB863E1}.Debug|Win32.ActiveCfg = Debug|Win32 + {59933D52-BFFA-404B-9613-B2474CB863E1}.Debug|x64.ActiveCfg = Debug|x64 + {59933D52-BFFA-404B-9613-B2474CB863E1}.Release|Win32.ActiveCfg = Release|Win32 + {59933D52-BFFA-404B-9613-B2474CB863E1}.Release|x64.ActiveCfg = Release|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|Win32.ActiveCfg = Debug|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Debug|x64.ActiveCfg = Debug|x64 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|Win32.ActiveCfg = Release|Win32 + {2F406AB6-D010-4196-A523-FAE6F2B1585F}.Release|x64.ActiveCfg = Release|x64 + {09F8C9E4-1E99-4EBB-88E6-2A2CA290D718}.Debug|Win32.ActiveCfg = Debug|Win32 + {09F8C9E4-1E99-4EBB-88E6-2A2CA290D718}.Debug|x64.ActiveCfg = Debug|Win32 + {09F8C9E4-1E99-4EBB-88E6-2A2CA290D718}.Release|Win32.ActiveCfg = Release|Win32 + {09F8C9E4-1E99-4EBB-88E6-2A2CA290D718}.Release|x64.ActiveCfg = Release|Win32 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Debug|Win32.ActiveCfg = Debug|Win32 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Debug|Win32.Build.0 = Debug|Win32 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Debug|x64.ActiveCfg = Debug|x64 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Debug|x64.Build.0 = Debug|x64 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Release|Win32.ActiveCfg = Release|Win32 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Release|Win32.Build.0 = Release|Win32 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Release|x64.ActiveCfg = Release|x64 + {28761587-FE68-4AEB-8BF0-AB73484A0AD4}.Release|x64.Build.0 = Release|x64 + {D3738B06-0CF0-438F-856D-AA92B07F584E}.Debug|Win32.ActiveCfg = Debug|Win32 + {D3738B06-0CF0-438F-856D-AA92B07F584E}.Debug|x64.ActiveCfg = Debug|Win32 + {D3738B06-0CF0-438F-856D-AA92B07F584E}.Release|Win32.ActiveCfg = Release|Win32 + {D3738B06-0CF0-438F-856D-AA92B07F584E}.Release|x64.ActiveCfg = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/TestOrangeFS/client-test/client-test.vcxproj b/projects/TestOrangeFS/client-test/client-test.vcxproj new file mode 100755 index 0000000..0036723 --- /dev/null +++ b/projects/TestOrangeFS/client-test/client-test.vcxproj @@ -0,0 +1,141 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {28761587-FE68-4AEB-8BF0-AB73484A0AD4} + clienttest + + + + Application + true + MultiByte + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + Disabled + WIN32;_DEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + Level3 + MaxSpeed + true + true + WIN32;NDEBUG;_MBCS;_CRT_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) + + + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/projects/TestOrangeFS/client-test/client-test.vcxproj.filters b/projects/TestOrangeFS/client-test/client-test.vcxproj.filters new file mode 100755 index 0000000..54dc5e7 --- /dev/null +++ b/projects/TestOrangeFS/client-test/client-test.vcxproj.filters @@ -0,0 +1,84 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/projects/TestOrangeFS/posix-test/posix-test.vcxproj b/projects/TestOrangeFS/posix-test/posix-test.vcxproj new file mode 100755 index 0000000..3bfd167 --- /dev/null +++ b/projects/TestOrangeFS/posix-test/posix-test.vcxproj @@ -0,0 +1,72 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {D3738B06-0CF0-438F-856D-AA92B07F584E} + posixtest + + + + Application + true + MultiByte + + + Application + false + true + MultiByte + + + + + + + + + + + + + + + Level3 + Disabled + C:\Program Files (x86)\MPICH2\include;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_MBCS;%(PreprocessorDefinitions) + + + true + C:\Program Files (x86)\MPICH2\lib;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;mpi.lib;%(AdditionalDependencies) + + + + + Level3 + MaxSpeed + true + true + + + true + true + true + + + + + + + + + \ No newline at end of file diff --git a/projects/TestOrangeFS/posix-test/posix-test.vcxproj.filters b/projects/TestOrangeFS/posix-test/posix-test.vcxproj.filters new file mode 100755 index 0000000..ef5adb3 --- /dev/null +++ b/projects/TestOrangeFS/posix-test/posix-test.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/projects/pvfscommon/pvfscommon.sln b/projects/pvfscommon/pvfscommon.sln new file mode 100755 index 0000000..e166ae9 --- /dev/null +++ b/projects/pvfscommon/pvfscommon.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "statecomp", "statecomp\statecomp.vcxproj", "{CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD}.Debug|Win32.ActiveCfg = Debug|Win32 + {CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD}.Debug|Win32.Build.0 = Debug|Win32 + {CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD}.Release|Win32.ActiveCfg = Release|Win32 + {CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/projects/pvfscommon/statecomp/statecomp.vcxproj b/projects/pvfscommon/statecomp/statecomp.vcxproj new file mode 100755 index 0000000..9992bad --- /dev/null +++ b/projects/pvfscommon/statecomp/statecomp.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {CDB2E5EB-EE62-4018-92AA-79CB47A2A8BD} + statecomp + + + + Application + MultiByte + true + + + Application + MultiByte + + + + + + + + + + + + <_ProjectFileVersion>10.0.30319.1 + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + + + + Disabled + true + EnableFastChecks + MultiThreadedDebugDLL + Level3 + EditAndContinue + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\include;..\..\..\src\common\windows;..\..\..\src\common\misc + + + + + MaxSpeed + true + MultiThreadedDLL + true + Level3 + ProgramDatabase + WIN32;_MBCS;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_DEPRECATE;%(PreprocessorDefinitions) + ..\..\..\include\windows;..\..\..\include;..\..\..\src\common\windows;..\..\..\src\common\misc + + + true + true + true + MachineX86 + + + + + + + + + + + Document + bison -d %(FullPath) -o %(RootDir)%(Directory)%(Filename).c + bison -d %(FullPath) -o %(RootDir)%(Directory)%(Filename).c + %(FileName).c + bison -d %(FullPath) -o %(RootDir)%(Directory)%(Filename).c + bison -d %(FullPath) -o %(RootDir)%(Directory)%(Filename).c + %(FileName).c + + + + + Document + flex -o%(RootDir)%(Directory)%(Filename).c %(FullPath) + %(RootDir)%(Directory)%(Filename).c + flex -o%(RootDir)%(Directory)%(Filename).c %(FullPath) + flex -o%(RootDir)%(Directory)%(Filename).c %(FullPath) + flex -o%(RootDir)%(Directory)%(Filename).c %(FullPath) + %(FileName).c + + + + + + + + + \ No newline at end of file diff --git a/projects/pvfscommon/statecomp/statecomp.vcxproj.filters b/projects/pvfscommon/statecomp/statecomp.vcxproj.filters new file mode 100755 index 0000000..7f7589b --- /dev/null +++ b/projects/pvfscommon/statecomp/statecomp.vcxproj.filters @@ -0,0 +1,47 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/pvfs2-config.h.in b/pvfs2-config.h.in index 98bc2dc..a6389f3 100644 --- a/pvfs2-config.h.in +++ b/pvfs2-config.h.in @@ -1,8 +1,20 @@ -/* pvfs2-config.h.in. Generated from configure.in by autoheader. */ +/* pvfs2-config.h.in. Generated from configure.ac by autoheader. */ + +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + +/* Define if aio_put_req returns int */ +#undef AIO_PUT_REQ_RETURNS_INT /* Define if berkeley db error reporting was enabled */ #undef BERKDB_ERROR_REPORTING +/* Define if __bswap_64 is a function */ +#undef BSWAP_64_IS_A_FUNC + +/* Define if gets is gone from stdio.h */ +#undef GETS_IS_GONE + /* Define if kernel has aio support */ #undef HAVE_AIO @@ -27,6 +39,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_ASM_IOCTL32_H +/* Define if assert.h exists */ +#undef HAVE_ASSERT_H + /* Define if attr/xattr.h exists */ #undef HAVE_ATTR_XATTR_H @@ -70,24 +85,42 @@ /* Define if DB has get_pagesize function */ #undef HAVE_DB_GET_PAGESIZE +/* Define if have strerror_r */ +#undef HAVE_DECL_STRERROR_R + /* Define if d_count member of dentry is of type atomic_t */ #undef HAVE_DENTRY_D_COUNT_ATOMIC +/* Define if dentry struct has a lockref struct member */ +#undef HAVE_DENTRY_LOCKREF_STRUCT + /* Define if super_operations statfs has dentry argument */ #undef HAVE_DENTRY_STATFS_SOP +/* Define if dirent.h exists */ +#undef HAVE_DIRENT_H + /* Define if dirty_inode takes a flag argument */ #undef HAVE_DIRTY_INODE_FLAGS +/* Define if dlfcn.h exists */ +#undef HAVE_DLFCN_H + /* Define if kernel super_operations contains drop_inode field */ #undef HAVE_DROP_INODE /* Define if dcache.h contains d_alloc_annon */ #undef HAVE_D_ALLOC_ANON +/* Define if kernel defines d_alloc_root */ +#undef HAVE_D_ALLOC_ROOT + /* Define if d_delete member of dentry_operations has a const dentry param */ #undef HAVE_D_DELETE_CONST +/* Define if kernel has d_set_d_op */ +#undef HAVE_D_SET_D_OP + /* Define if export_operations has an encode_fh member */ #undef HAVE_ENCODEFH_EXPORT_OPERATIONS @@ -97,6 +130,9 @@ /* Define if system defines F_NOCACHE fcntl */ #undef HAVE_FCNTL_F_NOCACHE +/* Define if fcntl.h exists */ +#undef HAVE_FCNTL_H + /* Define if features.h exists */ #undef HAVE_FEATURES_H @@ -119,6 +155,9 @@ */ #undef HAVE_FIND_INODE_HANDLE_SUPER_OPERATIONS +/* Define if d_compare member of dentry_operations has five params */ +#undef HAVE_FIVE_PARAM_D_COMPARE + /* Define if generic_permission takes four parameters */ #undef HAVE_FOUR_PARAM_GENERIC_PERMISSION @@ -241,9 +280,21 @@ /* Define if kernel has i_size_write */ #undef HAVE_I_SIZE_WRITE +/* Define if jni.h exists at the path given with --with-jdk */ +#undef HAVE_JNI_H + +/* Define if kconfig.h exists */ +#undef HAVE_KCONFIG + /* Define if kernel has device classes */ #undef HAVE_KERNEL_DEVICE_CLASSES +/* Define if kiocbSetCancelled exists */ +#undef HAVE_KIOCBSETCANCELLED + +/* Define if we have kiocb_set_cancel_fn */ +#undef HAVE_KIOCB_SET_CANCEL_FN + /* Define if kernel kmem_cache_create constructor has newer-style one-parameter form */ #undef HAVE_KMEM_CACHE_CREATE_CTOR_ONE_PARAM @@ -264,6 +315,9 @@ /* Define to 1 if you have the `efence' library (-lefence). */ #undef HAVE_LIBEFENCE +/* Define if libgen.h exists */ +#undef HAVE_LIBGEN_H + /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_COMPAT_H @@ -336,6 +390,9 @@ /* Define if system defines O_DIRECT fcntl */ #undef HAVE_OPEN_O_DIRECT +/* Define if open() has O_CLOEXEC flag */ +#undef HAVE_O_CLOEXEC + /* Define if posix_acl_chmod exists */ #undef HAVE_POSIX_ACL_CHMOD @@ -348,6 +405,10 @@ /* Define if posix_acl_equiv_mode accepts umode_t type */ #undef HAVE_POSIX_ACL_EQUIV_MODE_UMODE_T +/* Define if the user namespace has been added to posix_acl_from_xattr and + posix_acl_to_xattr */ +#undef HAVE_POSIX_ACL_USER_NAMESPACE + /* Define if sysctl proc handlers have 6th argument */ #undef HAVE_PROC_HANDLER_FILE_ARG @@ -375,6 +436,9 @@ /* Define if struct file_operations in kernel has readdirplus callback */ #undef HAVE_READDIRPLUS_FILE_OPERATIONS +/* Define if struct file_operations in kernel has readdir callback */ +#undef HAVE_READDIR_FILE_OPERATIONS + /* Define if struct file_operations in kernel has readv callback */ #undef HAVE_READV_FILE_OPERATIONS @@ -404,6 +468,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SDL_TTF_H +/* Define if selinux/selinux.h exists */ +#undef HAVE_SELINUX_H + /* Define if struct file_operations in kernel has sendfile callback */ #undef HAVE_SENDFILE_VFS_SUPPORT @@ -439,16 +506,22 @@ /* Define if stdint.h exists */ #undef HAVE_STDINT_H +/* Define if stdio.h exists */ +#undef HAVE_STDIO_H + /* Define if stdlib.h exists */ #undef HAVE_STDLIB_H /* Define if struct ctl_table has strategy member */ #undef HAVE_STRATEGY_NAME +/* Define if have strerror_r */ +#undef HAVE_STRERROR_R + /* Define if strings.h exists */ #undef HAVE_STRINGS_H -/* Define to 1 if you have the header file. */ +/* Define if string.h exists */ #undef HAVE_STRING_H /* Define to 1 if you have the `strnlen' function. */ @@ -472,6 +545,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_EPOLL_H +/* Define if sys/mman.h exists */ +#undef HAVE_SYS_MMAN_H + /* Define if sys/mount.h exists */ #undef HAVE_SYS_MOUNT_H @@ -481,12 +557,21 @@ /* Define if sys/socket.h exists */ #undef HAVE_SYS_SOCKET_H +/* Define if sys/statvfs.h exists */ +#undef HAVE_SYS_STATVFS_H + /* Define if sys/stat.h exists */ #undef HAVE_SYS_STAT_H +/* Define if sys/time.h exists */ +#undef HAVE_SYS_TIME_H + /* Define if sys/types.h exists */ #undef HAVE_SYS_TYPES_H +/* Define if sys/uio.h exists */ +#undef HAVE_SYS_UIO_H + /* Define if sys/vfs.h exists */ #undef HAVE_SYS_VFS_H @@ -496,6 +581,9 @@ /* Define if TAU library is used */ #undef HAVE_TAU +/* Define if invalidatepage function has three arguments */ +#undef HAVE_THREE_ARGUMENT_INVALIDATEPAGE + /* Define if acl_check param of generic_permission function has three parameters */ #undef HAVE_THREE_PARAM_ACL_CHECK @@ -511,12 +599,19 @@ parameters and the third parameter is for flags (unsigned int) */ #undef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG +/* Define if time.h exists */ +#undef HAVE_TIME_H + /* Define if kernel stddef has true/false enum */ #undef HAVE_TRUE_FALSE_ENUM /* Define if register_sysctl_table takes two arguments */ #undef HAVE_TWO_ARG_REGISTER_SYSCTL_TABLE +/* Define if d_hash member of dentry_operations has two params, where the + first param is a const */ +#undef HAVE_TWO_PARAM_D_HASH_WITH_CONST + /* Define if generic_permission takes two parameters */ #undef HAVE_TWO_PARAM_GENERIC_PERMISSION @@ -539,12 +634,18 @@ /* Define if file_operations struct has unlocked_ioctl member */ #undef HAVE_UNLOCKED_IOCTL_HANDLER +/* Define if utime.h exists */ +#undef HAVE_UTIME_H + /* Define if include file valgrind.h exists */ #undef HAVE_VALGRIND_H /* Define if file_system_type get_sb has vfsmount argument */ #undef HAVE_VFSMOUNT_GETSB +/* Define if vmtruncate exists */ +#undef HAVE_VMTRUNCATE + /* Define if struct file_operations in kernel has writev callback */ #undef HAVE_WRITEV_FILE_OPERATIONS @@ -562,6 +663,9 @@ and a sixth parameter */ #undef HAVE_XATTR_HANDLER_SET_SIX_PARAM +/* Define if ki_users is atomic */ +#undef KI_USERS_ATOMIC + /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT @@ -586,12 +690,57 @@ /* sub version number */ #undef PVFS2_VERSION_SUB +/* Define if kernel export ops encode_fh has dentry arg */ +#undef PVFS_ENCODE_FS_USES_DENTRY + +/* Should we enable OrangeFS extensions of Hadoop classes. */ +#undef PVFS_HADOOP_ENABLE + /* Should we build user interface acl routines. */ #undef PVFS_HAVE_ACL_INCLUDES +/* Should we enable PVFS Client JNI. */ +#undef PVFS_JNI_ENABLE + +/* Define if kernel inode ops create takes nameidata not bool */ +#undef PVFS_KMOD_CREATE_TAKES_NAMEIDATA + +/* Define if kernel inode ops create uses umode_t not int */ +#undef PVFS_KMOD_CREATE_USES_UMODE_T + +/* Define if kernel dentry ops d_revalidate takes nameidata */ +#undef PVFS_KMOD_D_REVALIDATE_TAKES_NAMEIDATA + +/* Define if kernel inode ops has get_acl */ +#undef PVFS_KMOD_HAVE_GET_ACL + +/* Define if kernel inode ops lookup takes nameidata */ +#undef PVFS_KMOD_LOOKUP_TAKES_NAMEIDATA + +/* Define if kernel inode ops mkdir uses umode_t not int */ +#undef PVFS_KMOD_MKDIR_USES_UMODE_T + +/* Define if kernel inode ops mknod uses umode_t not int */ +#undef PVFS_KMOD_MKNOD_USES_UMODE_T + +/* Should we have malloc zero freed memory. */ +#undef PVFS_MALLOC_FREE_ZERO + +/* Should we have malloc check a magic number. */ +#undef PVFS_MALLOC_MAGIC + +/* Should we redefine malloc. */ +#undef PVFS_MALLOC_REDEF + +/* Should we have malloc zero new memory. */ +#undef PVFS_MALLOC_ZERO + /* scandir compare arg takes void pointers. */ #undef PVFS_SCANDIR_VOID +/* Should we redefine stdin stdout stderr as PVFS streams. */ +#undef PVFS_STDIO_REDEFSTREAM + /* Should we enable user interface data cache. */ #undef PVFS_UCACHE_ENABLE @@ -604,15 +753,18 @@ /* Should user interface assume FS is mounted. */ #undef PVFS_USRINT_KMOUNT -/* The size of a `long int', as computed by sizeof. */ +/* The size of `long int', as computed by sizeof. */ #undef SIZEOF_LONG_INT -/* The size of a `void *', as computed by sizeof. */ +/* The size of `void *', as computed by sizeof. */ #undef SIZEOF_VOID_P /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* Define if strerror_r return char ptr */ +#undef STRERROR_R_CHAR_P + /* Define if on darwin */ #undef TARGET_OS_DARWIN @@ -628,6 +780,14 @@ /* Define if openssl exists */ #undef WITH_OPENSSL -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif diff --git a/src/apps/admin/module.mk.in b/src/apps/admin/module.mk.in old mode 100755 new mode 100644 index 5bec602..5fc00e2 --- a/src/apps/admin/module.mk.in +++ b/src/apps/admin/module.mk.in @@ -20,6 +20,7 @@ ADMINSRC := \ $(DIR)/pvfs2-fsck.c\ $(DIR)/pvfs2-validate.c\ $(DIR)/pvfs2-cp.c \ + $(DIR)/pvfs2-write.c \ $(DIR)/pvfs2-viewdist.c \ $(DIR)/pvfs2-xattr.c \ $(DIR)/pvfs2-touch.c \ @@ -27,9 +28,8 @@ ADMINSRC := \ $(DIR)/pvfs2-ln.c \ $(DIR)/pvfs2-perror.c \ $(DIR)/pvfs2-check-server.c \ - $(DIR)/pvfs2-drop-caches.c -#don't build in 2.8.5 release -# $(DIR)/pvfs2-get-uid.c + $(DIR)/pvfs2-drop-caches.c \ + $(DIR)/pvfs2-get-uid.c ADMINSRC_SERVER := \ $(DIR)/pvfs2-mkspace.c \ diff --git a/src/apps/admin/pvfs2-change-fsid.c b/src/apps/admin/pvfs2-change-fsid.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-check-config.c b/src/apps/admin/pvfs2-check-config.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-check-server.c b/src/apps/admin/pvfs2-check-server.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-chmod.c b/src/apps/admin/pvfs2-chmod.c old mode 100755 new mode 100644 index 0f95ee5..f0a2a01 --- a/src/apps/admin/pvfs2-chmod.c +++ b/src/apps/admin/pvfs2-chmod.c @@ -155,7 +155,7 @@ int pvfs2_chmod (PVFS_permissions perms, char *destfile) { } memset(&resp_getattr,0,sizeof(PVFS_sysresp_getattr)); attrmask = (PVFS_ATTR_SYS_ALL_SETABLE); - + ret = PVFS_sys_getattr(resp_lookup.ref,attrmask,&credentials,&resp_getattr, NULL); if (ret < 0) { @@ -167,7 +167,7 @@ int pvfs2_chmod (PVFS_permissions perms, char *destfile) { new_attr.perms = perms; new_attr.mask = PVFS_ATTR_SYS_PERM; - + ret = PVFS_sys_setattr(resp_lookup.ref,new_attr,&credentials, NULL); if (ret < 0) { diff --git a/src/apps/admin/pvfs2-chown.c b/src/apps/admin/pvfs2-chown.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-cp.c b/src/apps/admin/pvfs2-cp.c old mode 100755 new mode 100644 index a65a556..b0764c1 --- a/src/apps/admin/pvfs2-cp.c +++ b/src/apps/admin/pvfs2-cp.c @@ -177,7 +177,7 @@ int main (int argc, char ** argv) goto main_out; } - //time1 = Wtime(); + /* time1 = Wtime(); */ while((current_size = generic_read(&src, buffer, total_written, user_opts->buf_size, &credentials)) > 0) { @@ -201,7 +201,7 @@ int main (int argc, char ** argv) total_written += current_size; } - //time2 = Wtime(); + /* time2 = Wtime(); */ if (user_opts->show_timings) { @@ -257,7 +257,7 @@ static struct options* parse_args(int argc, char* argv[]) tmp_opts->show_timings = 1; break; case('s'): - ret = sscanf(optarg, SCANF_lld, &tmp_opts->strip_size); + ret = sscanf(optarg, SCANF_lld, (SCANF_lld_type *)&tmp_opts->strip_size); if(ret < 1){ free(tmp_opts); return(NULL); @@ -318,9 +318,8 @@ static double Wtime(void) static void print_timings( double time, int64_t total) { - //printf("Wrote %lld bytes in %f seconds. %f MB/seconds\n", - //lld(total), time, (total/time)/(1024*1024)); - printf("%f\n", time); + printf("Wrote %lld bytes in %f seconds. %f MB/seconds\n", + lld(total), time, (total/time)/(1024*1024)); } /* read 'count' bytes from a (unix or pvfs2) file 'src', placing the result in @@ -615,8 +614,8 @@ static int generic_open(file_object *obj, PVFS_credentials *credentials, { if (ret == 0) { - //fprintf(stderr, "Target file %s already exists\n", entry_name); - //return (-1); + /* fprintf(stderr, "Target file %s already exists\n", entry_name); + return (-1); */ obj->u.pvfs2.ref = resp_lookup.ref; } else diff --git a/src/apps/admin/pvfs2-drop-caches.c b/src/apps/admin/pvfs2-drop-caches.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-event-mon-example.c b/src/apps/admin/pvfs2-event-mon-example.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-fs-dump.c b/src/apps/admin/pvfs2-fs-dump.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-fsck.c b/src/apps/admin/pvfs2-fsck.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-fsck.h b/src/apps/admin/pvfs2-fsck.h old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-genconfig b/src/apps/admin/pvfs2-genconfig index 7ad2ed0..7e9d2b1 100755 --- a/src/apps/admin/pvfs2-genconfig +++ b/src/apps/admin/pvfs2-genconfig @@ -1,14 +1,16 @@ #!/usr/bin/perl -w # -# (C) 2001 Clemson University and The University of Chicago +# (C) 2001-13 Clemson University, The University of Chicago +# and Omnibond Systems LLC # # See COPYING in top-level directory. # -# generate a global pvfs2 configuration file based on user input +# generate a global OrangeFS configuration file based on user input # use Term::ReadLine; use Getopt::Long; use Math::BigInt; +use FindBin; # turn on strictness use strict 'vars'; @@ -28,6 +30,7 @@ my $opt_ioservers = ''; my $opt_metaservers = ''; my $opt_logfile = ''; my $opt_storage = ''; +my $opt_metadata = ''; my $opt_trovesync = '1'; my $opt_trovemethod = ''; my $opt_quiet = ''; @@ -44,8 +47,14 @@ my $opt_fsname = ''; my $opt_default_num_dfiles = ''; my $opt_default_flow_buffer_size = ''; my $opt_default_flow_buffer_count = ''; +my $opt_dist_name = ''; +my $opt_dist_params = ''; -my $opt_security = '0'; +# reserved handle ranges +my $opt_res_io_ranges = undef; +my $opt_res_meta_ranges = undef; + +my $opt_trusted = '0'; my $opt_trusted_port = ''; my $opt_trusted_network = ''; my $opt_trusted_netmask = ''; @@ -69,6 +78,24 @@ my $IO_ENDPOINT = 0x2; my $OUT = undef; my $term = undef; +# script path (just dir) +my $script_dir = $FindBin::Bin; +# OrangeFS root installation path +# E.g. if script is in /opt/orangefs/bin +# then the root is /opt/orangefs +my $fs_path = undef; +if ($script_dir) +{ + my $slash = rindex($script_dir, "/"); + if ($slash != -1) + { + $fs_path = substr($script_dir, 0, $slash); + } +} + +$fs_path = "/opt/orangefs" + if (!defined(fs_path) || fs_path eq ""); + #$num_unexp_reqs = prompt_num("How many unexpected requests should we be prepared to receive? "); my $num_unexp_reqs = 50; @@ -192,6 +219,17 @@ sub parse_hostlist return @hosts; } +# emit trusted network info +sub emit_trusted +{ + my ($target, $portlist, $network, $netmask) = @_; + + print $target "\n\n"; + print $target "\tTrustedPorts $portlist\n"; + print $target "\tTrustedNetwork $network $netmask\n"; + print $target "\n"; +} + sub emit_defaults { my ($target, $num_unexp, $bmi_module, $logfile, @@ -237,16 +275,6 @@ sub emit_defaults print $target "\n"; } -sub emit_security -{ - my ($target, $portlist, $network, $netmask) = @_; - - print $target "\n"; - print $target "\tTrustedPorts $portlist\n"; - print $target "\tTrustedNetwork $network $netmask\n"; - print $target "\n"; -} - sub emit_aliases { my $target = shift; @@ -260,23 +288,61 @@ sub emit_aliases print $target "\n"; } +sub emit_distribution +{ + my ($target, $dist_name, $dist_params) = @_; + + if ($dist_name) + { + # create distribution section with parameters + print $target "\t\n"; + print $target "\t\tName $dist_name\n"; + + # parse parameters + if ($dist_params) + { + # each param name/value pair separated by comma + my @params = split /,/, $dist_params; + + foreach (@params) + { + # name/value separated by colon + # (note: colons may appear in param value) + my $ind = index $_, ":"; + my $pname = substr $_, 0, $ind; + my $pvalue = substr $_, $ind+1; + + # output parameter + print $target "\t\tParam $pname\n"; + print $target "\t\tValue $pvalue\n"; + } + } + + print $target "\t\n"; + } +} + sub emit_filesystem { - my ($target, $name, $fs_id, $root_handle, - $last_handle, $first_handle, $count, - $default_num_dfiles, $default_flow_buffer_size, $default_flow_buffer_count) = @_; + my ($target, $name, $fs_id, + $root_handle, $last_handle, $first_handle, + $curr_ranges, $res_io_ranges, $res_meta_ranges, + $default_num_dfiles, $default_flow_buffer_size, + $default_flow_buffer_count) = @_; # divide handle range space equally among servers ((2^63)-1 for now) - my($total_num_handles_available, $start, $end, $i, $step, $num_ranges, $stuffing); - $num_ranges = $count; + my($total_num_handles_available, $start, $end, $i, $step, $stuffing); $total_num_handles_available = $last_handle->copy(); $total_num_handles_available->bsub($first_handle); $total_num_handles_available->binc(); + # current assigned ranges + reserved ranges + my $total_ranges = $curr_ranges + $res_io_ranges + $res_meta_ranges; + # since meta and data handle ranges must be split, increment # num nodes for calculation purposes below $step = $total_num_handles_available->copy(); - $step->bdiv($num_ranges); + $step->bdiv($total_ranges); print $target "\n\n"; print $target "\tName $name\n"; @@ -310,13 +376,21 @@ sub emit_filesystem $end->bdec(); my @meta_aliases = get_aliases($META_ENDPOINT); - @meta_aliases = sort @meta_aliases; - foreach my $ma (@meta_aliases) + @meta_aliases = sort @meta_aliases; + my $ranges = @meta_aliases + $res_meta_ranges; + for ($i = 0; $i < $ranges; $i++) { $start = $end->copy(); $start->binc(); $end->badd($step); - print $target "\t\tRange $ma $start-$end\n"; + if ($i < @meta_aliases) + { + print $target "\t\tRange $meta_aliases[$i] $start-$end\n"; + } + else + { + print $target "#\t\tRange (future) $start-$end (reserved for future use)\n"; + } } print $target "\t\n"; @@ -324,12 +398,20 @@ sub emit_filesystem my @io_aliases = get_aliases($IO_ENDPOINT); @io_aliases = sort @io_aliases; - foreach my $ia (@io_aliases) + $ranges = @io_aliases + $res_io_ranges; + for ($i = 0; $i < $ranges; $i++) { $start = $end->copy(); $start->binc(); $end->badd($step); - print $target "\t\tRange $ia $start-$end\n"; + if ($i < @io_aliases) + { + print $target "\t\tRange $io_aliases[$i] $start-$end\n"; + } + else + { + print $target "#\t\tRange (future) $start-$end (reserved for future use)\n"; + } } print $target "\t\n"; @@ -373,6 +455,8 @@ sub emit_filesystem print $target "\tFlowBuffersPerFlow $default_flow_buffer_count\n"; } + emit_distribution($target, $opt_dist_name, $opt_dist_params); + print $target "\n"; } @@ -503,17 +587,17 @@ sub usage print $OUT <<"THIS"; Usage: pvfs2-genconfig [OPTIONS] - The pvfs2-genconfig utility creates configuration files for the - PVFS2 file system. The argument is - manditory and specify the name of the configuration file that will - be written. This utility will create the fs.conf file. + The pvfs2-genconfig utility creates a configuration file for the + OrangeFS (aka PVFS2) file system. The argument is + mandatory and specifies the name of the configuration file that will + be written. This utility will create the fs.conf file. - EXAMPLE: 'pvfs2-genconfig /tmp/fs.conf' will - generate a file called /tmp/fs.conf + EXAMPLE: 'pvfs2-genconfig /tmp/fs.conf' will generate a file + called /tmp/fs.conf. NOTE: If pvfs2-genconfig is executed with a single argument of "-", then all output is directed to stdout and no files are written. - All other arguments are optional. If run without any optional + All other arguments are optional. If run without any optional arguments, then pvfs2-genconfig will prompt interactively for required parameters. @@ -535,6 +619,7 @@ Usage: pvfs2-genconfig [OPTIONS] The following arguments are entirely optional, whether your intention is to run pvfs2-genconfig in interactive or non-interactive mode: + --fspath root path of OrangeFS installation --tcpport TCP port to use (default: 3334) --tcpbindspecific Bind TCP only to specific interfaces --gmport GM port to use (default: 6) @@ -547,22 +632,32 @@ Usage: pvfs2-genconfig [OPTIONS] --tracing Enable event tracing in the server --logstamp timestamp type for log messages ('none','usec', or 'datetime' are valid) - --storage path to pvfs storage directory. - --logfile file to place server logging. + --storage path to OrangeFS storage (data) directory. + --metadata path to OrangeFS metadata directory. + --logfile file to place server logging. --notrovesync sync metadata only upon request --server-job-timeout server job timeout value (seconds) --client-job-timeout server job timeout value (seconds) --trove-method specify a trove method --first-handle first handle value to reserve - --last-handle last handle value to reserve - --root-handle handle value to reserve for root object - --fsid fs identifier value - --fsname fs name + --last-handle last handle value to reserve + --root-handle handle value to reserve for root object + --fsid fs identifier value + --fsname fs name + --res-io-ranges number of I/O server handle ranges to reserve + for future use + --res-meta-ranges number of metadata server handle ranges to reserve + for future use --default-num-dfiles number of datafiles to use per file (defaults to number of I/O servers) --flow-buffer-size set flowbuffersize in bytes --flow-buffer-count set flow buffers per flow - --trusted <0|1> indicate whether trusted connection options need to be emitted + --dist-name datafile distribution type: 'simple_stripe' (default), 'basic_dist', + 'varstrip_dist' or 'twod_stripe' + --dist-params datafile distribution parameters in form: + :[,:...] + see documentation for distribution information + --trusted <0|1> indicate whether trusted connection options need to be emitted --genkey optionally generates a secret key for the filesystem(s). @@ -577,14 +672,14 @@ sub print_welcome { if (!$opt_quiet) { print $OUT <<"WELCOMEMSG" -********************************************************************** - Welcome to the PVFS2 Configuration Generator: +**************************************************************************** + Welcome to the OrangeFS Configuration Generator: -This interactive script will generate configuration files suitable -for use with a new PVFS2 file system. Please see the PVFS2 quickstart -guide for details. +This interactive script will generate a configuration file suitable for use +with a new OrangeFS (aka PVFS2) file system. Please see the OrangeFS +documentation at http://www.orangefs.org/documentation for details. -********************************************************************** +**************************************************************************** WELCOMEMSG ;; } @@ -633,7 +728,7 @@ sub get_protocol # get network type print $OUT <<"PROTOCOL" You must first select the network protocol that your file system will use. -The only currently supported options are \"tcp\", \"gm\", \"mx\", \"ib\", and \"portals\". +The currently supported options are \"tcp\", \"gm\", \"mx\", \"ib\", and \"portals\". (For multi-homed configurations, use e.g. \"ib,tcp\".) PROTOCOL ;; @@ -644,7 +739,7 @@ PROTOCOL foreach (split(',', $type)) { if ($_ eq "tcp") { $port{'tcp'} = tcp_get_port(); - if ($opt_security == 1) + if ($opt_trusted == 1) { $opt_trusted_port = get_portlist(); my $str = get_network(); @@ -827,36 +922,39 @@ sub get_client_job_timeout sub get_logfile { - my $logfile = "/tmp/pvfs2-server.log"; + my $logfile = "/var/log/orangefs-server.log"; if ($opt_logfile) { $logfile = $opt_logfile; } elsif (!$opt_quiet) { print $OUT "Choose a file for each server to write log messages to.\n"; - $logfile = prompt_word("Enter log file location [Default is /tmp/pvfs2-server.log]: ","/tmp/pvfs2-server.log"); + $logfile = prompt_word("Enter log file location [Default is $logfile]: ","$logfile"); } return $logfile; } sub get_storage { - my $storage = "/pvfs2-storage-space"; + my $storage = "${fs_path}/storage/data"; if ($opt_storage) { $storage = $opt_storage; } elsif (!$opt_quiet) { print $OUT "Choose a directory for each server to store data in.\n"; - $storage = prompt_word("Enter directory name: [Default is /pvfs2-storage-space]: ","/pvfs2-storage-space"); + $storage = prompt_word("Enter directory name: [Default is ${fs_path}/storage/data]: ","${fs_path}/storage/data"); } return $storage; } sub get_meta_storage { - my $metastorage = "/pvfs2-storage-space"; - if ($opt_storage) { + my $metastorage = "${fs_path}/storage/meta"; + if ($opt_metadata) { + $metastorage = $opt_metadata; + } elsif ($opt_storage) { + # use same dir as data if specified $metastorage = $opt_storage; } elsif (!$opt_quiet) { print $OUT "Choose a directory for each server to store metadata in.\n"; - $metastorage = prompt_word("Enter directory name: [Default is /pvfs2-storage-space]: ","/pvfs2-storage-space"); + $metastorage = prompt_word("Enter directory name: [Default is ${fs_path}/storage/meta]: ","${fs_path}/storage/meta"); } return $metastorage; } @@ -905,7 +1003,7 @@ sub mx_get_endpoint $board = $opt_mxboard; } elsif (!$opt_iospec) { if (!$opt_quiet) { - print $OUT "Choose a MX board (in the range of 0 to 4) for the servers to listen on. \n"; + print $OUT "Choose an MX board (in the range of 0 to 4) for the servers to listen on. \n"; print $OUT "This script assumes that all servers will use the same board number.\n"; $board = prompt_num("Enter board number [Default is 0]: ","0"); } @@ -918,7 +1016,7 @@ sub mx_get_endpoint $port = $opt_mxendpoint; } elsif (!$opt_iospec) { if (!$opt_quiet) { - print $OUT "Choose a MX endpoint (in the range of 0 to 7) for the servers to listen on. \n"; + print $OUT "Choose an MX endpoint (in the range of 0 to 7) for the servers to listen on. \n"; print $OUT "This script assumes that all servers will use the same port number.\n"; $port = prompt_num("Enter port number [Default is 3]: ","3"); } @@ -938,7 +1036,7 @@ sub ib_get_port $port = $opt_ibport; } elsif(!$opt_iospec) { if (!$opt_quiet) { - print $OUT "Choose a TCP/IP port for the servers to listen on for IB communications. Note that this\n"; + print $OUT "Choose a TCP/IP port for the servers to listen on for IB communications. Note that this\n"; print $OUT "script assumes that all servers will use the same port number.\n"; $port = prompt_num("Enter port number [Default is 3335]: ","3335"); } @@ -972,8 +1070,7 @@ sub get_ionames $ioline = $opt_ioservers; } else { print $OUT "Next you must list the hostnames of " . - "the machines that will act as\n"; - print $OUT "I/O servers. Acceptable syntax is " . + "the I/O servers.\nAcceptable syntax is " . "\"node1, node2, ...\" or \"node{#-#,#,#}\".\n"; $ioline = prompt_word( "Enter hostnames [Default is localhost]: ", @@ -1029,8 +1126,8 @@ sub get_metanames } else { - print $OUT "Now list the hostnames of the machines that will act as " . - "Metadata\nservers. This list may or may not overlap " . + print $OUT "Now list the hostnames of the metadata servers.\n" . + "This list may or may not overlap " . "with the I/O server list.\n"; $metaline = prompt_word( "Enter hostnames [Default is localhost]: ", @@ -1405,9 +1502,9 @@ my $show_help = ''; my $show_specusage = ''; $opt_quiet = 0; -GetOptions('protocol=s' => \$opt_protocol, +GetOptions('protocol=s' => \$opt_protocol, 'tcpport=i' => \$opt_tcpport, - 'tcpbindspecific' => \$opt_tcpbindspecific, + 'tcpbindspecific' => \$opt_tcpbindspecific, 'gmport=i' => \$opt_gmport, 'mxboard=i' => \$opt_mxboard, 'mxendpoint=i' => \$opt_mxendpoint, @@ -1423,23 +1520,29 @@ GetOptions('protocol=s' => \$opt_protocol, 'last-handle=i' => \$opt_last_handle, 'default-num-dfiles=i' => \$opt_default_num_dfiles, 'flow-buffer-size=i' => \$opt_default_flow_buffer_size, - 'flow-buffer-count=i'=> \$opt_default_flow_buffer_count, + 'flow-buffer-count=i' => \$opt_default_flow_buffer_count, 'root-handle=i' => \$opt_root_handle, 'fsid=i' => \$opt_fsid, 'fsname=s' => \$opt_fsname, - 'trusted=i' => \$opt_security, + 'res-io-ranges=i' => \$opt_res_io_ranges, + 'res-meta-ranges=i' => \$opt_res_meta_ranges, + 'trusted=i' => \$opt_trusted, 'server-job-timeout=i' => \$opt_server_job_timeout, 'client-job-timeout=i' => \$opt_client_job_timeout, + 'fspath=s' => \$fs_path, # directly set fs_path 'storage=s' => \$opt_storage, + 'metadata=s' => \$opt_metadata, 'help' => \$show_help, 'quiet!' => \$opt_quiet, 'trovesync!' => \$opt_trovesync, 'trove-method=s' => \$opt_trovemethod, - 'iospec=s' => \$opt_iospec, - 'metaspec=s' => \$opt_metaspec, - 'spec-usage!' => \$show_specusage, + 'iospec=s' => \$opt_iospec, + 'metaspec=s' => \$opt_metaspec, + 'dist-name=s' => \$opt_dist_name, + 'dist-params=s' => \$opt_dist_params, + 'spec-usage!' => \$show_specusage, 'genkey!' => \$opt_gen_key, - '-' => \$using_stdout) + '-' => \$using_stdout) or die "Could not parse arguments. See -h for help.\n"; if($opt_quiet) @@ -1490,7 +1593,7 @@ if ($using_stdout) { } elsif (@ARGV != 1) { - die "Bad arguments. See -h for help.\n"; + die "Bad arguments. Use -h for help.\n"; } else { @@ -1501,12 +1604,13 @@ else $output_target = \*FILEOUT; } -die "-port not allowed with -iospec or -metaspec." -if($opt_port ne '' && defined($opt_iospec) && defined($opt_metaspec)); -die "-iospec requires -metaspec." -if(defined($opt_iospec) && !defined($opt_metaspec)); -die "-metaspec requires -iospec." -if(defined($opt_metaspec) && !defined($opt_iospec)); +# options check +die "--port not allowed with --iospec or --metaspec." + if ($opt_port ne '' && defined($opt_iospec) && defined($opt_metaspec)); +die "--iospec requires --metaspec." + if (defined($opt_iospec) && !defined($opt_metaspec)); +die "--metaspec requires --iospec." + if (defined($opt_metaspec) && !defined($opt_iospec)); # only open the terminal for reading input if options specified # on the command line are not enough to gather necessary information @@ -1579,7 +1683,7 @@ $meta_count of them are Metadata servers. FINI ;; - if ($opt_security == 1) + if ($opt_trusted == 1) { print $OUT "Configured trusted connection settings\n"; print $OUT "Trusted port list : ", $opt_trusted_port, "\n"; @@ -1622,6 +1726,8 @@ my $default_num_dfiles = get_default_num_dfiles(); my $default_flow_buffer_size = get_default_flow_buffer_size(); my $default_flow_buffer_count = get_default_flow_buffer_count(); my $root_handle = get_root_handle(); +my $res_io_ranges = defined($opt_res_io_ranges) ? $opt_res_io_ranges : 0; +my $res_meta_ranges = defined($opt_res_meta_ranges) ? $opt_res_meta_ranges : 0; my $fsid = get_fsid(); my $fsname = get_fsname(); my $server_job_timeout = get_server_job_timeout(); @@ -1639,16 +1745,21 @@ if (!$opt_quiet) { } emit_defaults($output_target, $num_unexp_reqs, - $bmi_module, $default_logfile, $logging, $tracing, - $logstamp, $server_job_timeout, $client_job_timeout); -if ($opt_security == 1) + $bmi_module, $default_logfile, $logging, $tracing, + $logstamp, $server_job_timeout, $client_job_timeout); + +if ($opt_trusted == 1) { - emit_security($output_target, $opt_trusted_port, + emit_trusted($output_target, $opt_trusted_port, $opt_trusted_network, $opt_trusted_netmask); } emit_aliases($output_target); -emit_filesystem($output_target, $fsname , $fsid, $root_handle, - $last_handle, $first_handle, $meta_count + $io_count, $default_num_dfiles, $default_flow_buffer_size, $default_flow_buffer_count); + +emit_filesystem($output_target, $fsname, $fsid, + $root_handle, $last_handle, $first_handle, + $io_count + $meta_count, $res_io_ranges, $res_meta_ranges, + $default_num_dfiles, + $default_flow_buffer_size, $default_flow_buffer_count); if ($opt_metaspec) { emit_serveropts($output_target); @@ -1666,7 +1777,7 @@ if ($using_stdout == 0) my $size = (-s $ARGV[0]); print STDERR "Warning: Generated config file: " . $ARGV[0] . "\n" . -"has size: $size, which is larger than the current PVFS request: $req_limit\n" . +"has size: $size, which is larger than the current OrangeFS request: $req_limit\n" . "Increase the value of PVFS_REQ_LIMIT_CONFIG_FILE_BYTES in src/proto/pvfs2-req-proto.h\n"; } } diff --git a/src/apps/admin/pvfs2-get-uid.c b/src/apps/admin/pvfs2-get-uid.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-ln.c b/src/apps/admin/pvfs2-ln.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-ls.c b/src/apps/admin/pvfs2-ls.c old mode 100755 new mode 100644 index 75abcc3..5a4d17b --- a/src/apps/admin/pvfs2-ls.c +++ b/src/apps/admin/pvfs2-ls.c @@ -537,7 +537,14 @@ int do_list( if (opts->list_recursive || opts->num_starts > 1) { - printf("%s%s:\n",full_path,start); + if(*start == '/' && *(start + 1) == '\0') + { + printf("%s%s:\n",full_path, start + 1); + } + else + { + printf("%s%s:\n",full_path,start); + } } ret = PVFS_sys_lookup(fs_id, name, &credentials, @@ -1135,7 +1142,7 @@ int main(int argc, char **argv) for(i = 0; i < tab->mntent_count; i++) { ret = PVFS_sys_fs_add(&tab->mntent_array[i]); - if (ret == 0) + if (ret == 0 || ret == -PVFS_EEXIST) { found_one = 1; } @@ -1205,6 +1212,8 @@ int main(int argc, char **argv) user_opts->start[i][++j] = '\0'; + PINT_string_rm_extra_slashes_rts(user_opts->start[i], 1); + do_list(user_opts->start[i], pvfs_path[i], fs_id_array[i], user_opts, entry_buffer); if (user_opts->num_starts > 1) diff --git a/src/apps/admin/pvfs2-lsplus.c b/src/apps/admin/pvfs2-lsplus.c deleted file mode 100755 index 035aaa6..0000000 --- a/src/apps/admin/pvfs2-lsplus.c +++ /dev/null @@ -1,862 +0,0 @@ -/* - * (C) 2001 Clemson University and The University of Chicago - * - * See COPYING in top-level directory. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "pvfs2.h" -#include "str-utils.h" -#include "pvfs2-internal.h" - -#ifndef PVFS2_VERSION -#define PVFS2_VERSION "Unknown" -#endif - - -/* TODO: this can be larger after system interface readdir logic - * is in place to break up large readdirs into multiple operations - */ -#define MAX_NUM_DIRENTS 32 - -/* - arbitrarily restrict the number of paths - that this ls version can take as arguments -*/ -#define MAX_NUM_PATHS 8 - -/* optional parameters, filled in by parse_args() */ -struct options -{ - int list_human_readable; - int list_long; - int list_verbose; - int list_numeric_uid_gid; - int list_directory; - int list_no_group; - int list_almost_all; - int list_all; - int list_no_owner; - int list_inode; - int list_use_si_units; - char *start[MAX_NUM_PATHS]; - int num_starts; -}; - -static char *process_name = NULL; -static int do_timing = 0; - -static struct options* parse_args(int argc, char* argv[]); - -static void usage(int argc, char** argv); - -static void print_entry( - char *entry_name, - PVFS_handle handle, - PVFS_fs_id fs_id, - PVFS_sys_attr *attr, - int attr_error, - struct options *opts); - -static int do_list( - char *start, - int fs_id, - struct options *opts); - -static void print_entry_attr( - PVFS_handle handle, - char *entry_name, - PVFS_sys_attr *attr, - struct options *opts); - -#define print_dot_and_dot_dot_info_if_required(refn) \ -do { \ - if (opts->list_all && !opts->list_almost_all) { \ - /* \ - we have to fake access to the .. handle \ - since our sysint lookup doesn't return that \ - kind of intermediate information. we can get \ - this value, by manually resolving it with lookups \ - on base dirs, but I'm not sure it's worth it \ - */ \ - if (opts->list_inode && !opts->list_long) { \ - printf("%llu .\n",llu(refn.handle)); \ - printf("%llu .. (faked)\n",llu(refn.handle)); \ - } \ - else if (opts->list_long) { \ - print_entry(".", refn.handle, \ - refn.fs_id, NULL, 0, opts); \ - print_entry(".. (faked)", refn.handle, \ - refn.fs_id, NULL, 0, opts); \ - } \ - else { \ - printf(".\n"); \ - printf("..\n"); \ - } \ - } \ -} while(0) - -/* - build a string of a specified length that's either - left or right justified based on the src string; - caller must free ptr passed out as *out_str_p -*/ -static inline void format_size_string( - char *src_str, int num_spaces_total, char **out_str_p, - int right_justified, int hard_limit) -{ - int len = 0; - int spaces_size_allowed = 0; - char *buf = NULL, *start = NULL, *src_start = NULL; - - assert(src_str); - len = strlen(src_str); - - if (hard_limit) - { - spaces_size_allowed = (num_spaces_total ? num_spaces_total : len); - } - else - { - spaces_size_allowed = len; - if (len < num_spaces_total) - { - spaces_size_allowed = num_spaces_total; - } - } - - buf = (char *)malloc(spaces_size_allowed+1); - assert(buf); - - memset(buf,0,spaces_size_allowed+1); - - if ((len > 0) && (len <= spaces_size_allowed)) - { - memset(buf,' ',(spaces_size_allowed)); - - src_start = src_str; - - if (right_justified) - { - start = &buf[(spaces_size_allowed-(len))]; - } - else - { - start = buf; - } - - while(src_start && (*src_start)) - { - *start++ = *src_start++; - } - *out_str_p = strdup(buf); - } - else if (len > 0) - { - /* if the string is too long, don't format it */ - *out_str_p = strdup(src_str); - } - else if (len == 0) - { - *out_str_p = strdup(""); - } - free(buf); -} - -void print_entry_attr( - PVFS_handle handle, - char *entry_name, - PVFS_sys_attr *attr, - struct options *opts) -{ - char buf[128] = {0}, *formatted_size = NULL; - char *formatted_owner = NULL, *formatted_group = NULL; - struct group *grp = NULL; - struct passwd *pwd = NULL; - char *empty_str = ""; - char *owner = empty_str, *group = empty_str; - char *inode = empty_str; - time_t mtime; - struct tm *time = localtime(&mtime); - PVFS_size size = 0; - char scratch_owner[16] = {0}, scratch_group[16] = {0}; - char scratch_size[16] = {0}, scratch_inode[16] = {0}; - char f_type = '-'; - char group_x_char = '-'; - - if (!opts->list_all && (entry_name[0] == '.')) - { - return; - } - if (attr == NULL) - { - return; - } - mtime = (time_t)attr->mtime; - - snprintf(scratch_owner,16,"%d",(int)attr->owner); - snprintf(scratch_group,16,"%d",(int)attr->group); - - if (opts->list_inode) - { - snprintf(scratch_inode,16,"%llu ",llu(handle)); - inode = scratch_inode; - } - - if ((attr->objtype == PVFS_TYPE_METAFILE) && - (attr->mask & PVFS_ATTR_SYS_SIZE)) - { - size = attr->size; - } - else if ((attr->objtype == PVFS_TYPE_SYMLINK) && - (attr->link_target)) - { - size = (PVFS_size)strlen(attr->link_target); - } - else if (attr->objtype == PVFS_TYPE_DIRECTORY) - { - size = (PVFS_size)4096; - } - - if (opts->list_human_readable) - { - PVFS_util_make_size_human_readable( - size,scratch_size,16,opts->list_use_si_units); - } - else - { - snprintf(scratch_size,16, "%lld", lld(size)); - } - format_size_string(scratch_size,11,&formatted_size,1,1); - - if (!opts->list_no_owner) - { - owner = scratch_owner; - } - if (!opts->list_no_group) - { - group = scratch_group; - } - - if (!opts->list_numeric_uid_gid) - { - if (!opts->list_no_owner) - { - pwd = getpwuid((uid_t)attr->owner); - owner = (pwd ? pwd->pw_name : scratch_owner); - } - - if (!opts->list_no_group) - { - grp = getgrgid((gid_t)attr->group); - group = (grp ? grp->gr_name : scratch_group); - } - } - - /* for owner and group allow the fields to grow larger than 8 if - * necessary (set hard_limit to 0), but pad anything smaller to - * take up 8 spaces. - */ - format_size_string(owner,8,&formatted_owner,0,0); - format_size_string(group,8,&formatted_group,0,0); - - if (attr->objtype == PVFS_TYPE_DIRECTORY) - { - f_type = 'd'; - } - else if (attr->objtype == PVFS_TYPE_SYMLINK) - { - f_type = 'l'; - } - - /* special case to set setgid display for groups if needed */ - if(attr->perms & PVFS_G_SGID) - { - group_x_char = ((attr->perms & PVFS_G_EXECUTE) ? 's' : 'S'); - } - else - { - group_x_char = ((attr->perms & PVFS_G_EXECUTE) ? 'x' : '-'); - } - - snprintf(buf,128,"%s%c%c%c%c%c%c%c%c%c%c 1 %s %s %s " - "%.4d-%.2d-%.2d %.2d:%.2d %s", - inode, - f_type, - ((attr->perms & PVFS_U_READ) ? 'r' : '-'), - ((attr->perms & PVFS_U_WRITE) ? 'w' : '-'), - ((attr->perms & PVFS_U_EXECUTE) ? 'x' : '-'), - ((attr->perms & PVFS_G_READ) ? 'r' : '-'), - ((attr->perms & PVFS_G_WRITE) ? 'w' : '-'), - group_x_char, - ((attr->perms & PVFS_O_READ) ? 'r' : '-'), - ((attr->perms & PVFS_O_WRITE) ? 'w' : '-'), - ((attr->perms & PVFS_O_EXECUTE) ? 'x' : '-'), - formatted_owner, - formatted_group, - formatted_size, - (time->tm_year + 1900), - (time->tm_mon + 1), - time->tm_mday, - (time->tm_hour), - (time->tm_min), - entry_name); - - if (formatted_size) - { - free(formatted_size); - } - if (formatted_owner) - { - free(formatted_owner); - } - if (formatted_group) - { - free(formatted_group); - } - - if (attr->objtype == PVFS_TYPE_SYMLINK) - { - assert(attr->link_target); - - if (opts->list_long) - { - printf("%s -> %s\n", buf, attr->link_target); - } - else - { - printf("%s\n",buf); - } - } - else - { - printf("%s\n",buf); - } -} - -void print_entry( - char *entry_name, - PVFS_handle handle, - PVFS_fs_id fs_id, - PVFS_sys_attr *attr, - int attr_error, - struct options *opts) -{ - if (!opts->list_long) - { - if (opts->list_inode) - { - printf("%llu %s\n", llu(handle), entry_name); - } - else - { - printf("%s\n", entry_name); - } - return; - } - - if (attr_error == 0) - print_entry_attr(handle, entry_name, attr, opts); -} - -static double Wtime(void) -{ - struct timeval t; - gettimeofday(&t, NULL); - return((double)t.tv_sec * 1e03 + (double)(t.tv_usec) * 1e-03); -} - -int do_list( - char *start, - int fs_id, - struct options *opts) -{ - int i = 0, printed_dot_info = 0; - int ret = -1; - int pvfs_dirent_incount; - char *name = NULL, *cur_file = NULL; - PVFS_handle cur_handle; - PVFS_sysresp_lookup lk_response; - PVFS_sysresp_readdirplus rdplus_response; - PVFS_sysresp_getattr getattr_response; - PVFS_credentials credentials; - PVFS_object_ref ref; - PVFS_ds_position token; - uint64_t dir_version = 0; - double begin = 0., end; - - name = start; - - memset(&lk_response,0,sizeof(PVFS_sysresp_lookup)); - PVFS_util_gen_credentials(&credentials); - - ret = PVFS_sys_lookup(fs_id, name, &credentials, - &lk_response, PVFS2_LOOKUP_LINK_NO_FOLLOW); - if(ret < 0) - { - PVFS_perror("PVFS_sys_lookup", ret); - return -1; - } - - ref.handle = lk_response.ref.handle; - ref.fs_id = fs_id; - pvfs_dirent_incount = MAX_NUM_DIRENTS; - - memset(&getattr_response,0,sizeof(PVFS_sysresp_getattr)); - if (PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL, - &credentials, &getattr_response) == 0) - { - if ((getattr_response.attr.objtype == PVFS_TYPE_METAFILE) || - (getattr_response.attr.objtype == PVFS_TYPE_SYMLINK) || - ((getattr_response.attr.objtype == PVFS_TYPE_DIRECTORY) && - (opts->list_directory))) - { - char segment[128] = {0}; - PVFS_sysresp_getparent getparent_resp; - PINT_remove_base_dir(name, segment, 128); - if (strcmp(segment,"") == 0) - { - snprintf(segment,128,"/"); - } - - if (getattr_response.attr.objtype == PVFS_TYPE_DIRECTORY) - { - if (PVFS_sys_getparent(ref.fs_id, name, &credentials, - &getparent_resp) == 0) - { - print_dot_and_dot_dot_info_if_required( - getparent_resp.parent_ref); - } - } - - if (opts->list_long) - { - print_entry_attr(ref.handle, segment, - &getattr_response.attr, opts); - } - else - { - print_entry(segment, ref.handle, ref.fs_id, - NULL, - 0, - opts); - } - return 0; - } - } - - if (do_timing) - begin = Wtime(); - token = 0; - do - { - memset(&rdplus_response, 0, sizeof(PVFS_sysresp_readdirplus)); - ret = PVFS_sys_readdirplus( - ref, (!token ? PVFS_READDIR_START : token), - pvfs_dirent_incount, &credentials, - (opts->list_long) ? PVFS_ATTR_SYS_ALL : PVFS_ATTR_SYS_ALL_NOSIZE, - &rdplus_response); - if(ret < 0) - { - PVFS_perror("PVFS_sys_readdir", ret); - return -1; - } - - if (dir_version == 0) - { - dir_version = rdplus_response.directory_version; - } - else if (opts->list_verbose) - { - if (dir_version != rdplus_response.directory_version) - { - fprintf(stderr, "*** directory changed! listing may " - "not be correct\n"); - dir_version = rdplus_response.directory_version; - } - } - - if (!printed_dot_info) - { - /* - the list_all option prints files starting with .; - the almost_all option skips the '.', '..' printing - */ - print_dot_and_dot_dot_info_if_required(ref); - printed_dot_info = 1; - } - - for(i = 0; i < rdplus_response.pvfs_dirent_outcount; i++) - { - cur_file = rdplus_response.dirent_array[i].d_name; - cur_handle = rdplus_response.dirent_array[i].handle; - - print_entry(cur_file, cur_handle, fs_id, - &rdplus_response.attr_array[i], - rdplus_response.stat_err_array[i], - opts); - } - token += rdplus_response.pvfs_dirent_outcount; - - if (rdplus_response.pvfs_dirent_outcount) - { - free(rdplus_response.dirent_array); - rdplus_response.dirent_array = NULL; - free(rdplus_response.stat_err_array); - rdplus_response.stat_err_array = NULL; - for (i = 0; i < rdplus_response.pvfs_dirent_outcount; i++) { - if (rdplus_response.attr_array) - { - PVFS_util_release_sys_attr(&rdplus_response.attr_array[i]); - } - } - free(rdplus_response.attr_array); - rdplus_response.attr_array = NULL; - } - - } while(rdplus_response.pvfs_dirent_outcount == pvfs_dirent_incount); - if (do_timing) { - end = Wtime(); - printf("PVFS_sys_readdirplus took %g msecs\n", - (end - begin)); - } - - if (rdplus_response.pvfs_dirent_outcount) - { - free(rdplus_response.dirent_array); - rdplus_response.dirent_array = NULL; - free(rdplus_response.stat_err_array); - rdplus_response.stat_err_array = NULL; - for (i = 0; i < rdplus_response.pvfs_dirent_outcount; i++) { - if (rdplus_response.attr_array) - { - PVFS_util_release_sys_attr(&rdplus_response.attr_array[i]); - } - } - free(rdplus_response.attr_array); - rdplus_response.attr_array = NULL; - } - return 0; -} - -/* parse_args() - * - * parses command line arguments - * - * returns pointer to options structure on success, NULL on failure - */ -static struct options* parse_args(int argc, char* argv[]) -{ - int i = 0, ret = 0, option_index = 0; - const char *cur_option = NULL; - struct options* tmp_opts = NULL; - static struct option long_opts[] = - { - {"help",0,0,0}, - {"human-readable",0,0,0}, - {"si",0,0,0}, - {"version",0,0,0}, - {"verbose",0,0,0}, - {"numeric-uid-gid",0,0,0}, - {"directory",0,0,0}, - {"no-group",0,0,0}, - {"almost-all",0,0,0}, - {"all",0,0,0}, - {"inode",0,0,0}, - {"size",0,0,0}, - {0,0,0,0} - }; - - tmp_opts = (struct options*)malloc(sizeof(struct options)); - if (!tmp_opts) - { - return(NULL); - } - memset(tmp_opts, 0, sizeof(struct options)); - - while((ret = getopt_long(argc, argv, "hVndGoAaiglt", - long_opts, &option_index)) != -1) - { - switch(ret) - { - case 0: - cur_option = long_opts[option_index].name; - - if (strcmp("help", cur_option) == 0) - { - usage(argc, argv); - exit(0); - } - else if (strcmp("human-readable", cur_option) == 0) - { - goto list_human_readable; - } - else if (strcmp("si", cur_option) == 0) - { - tmp_opts->list_use_si_units = 1; - break; - } - else if (strcmp("version", cur_option) == 0) - { - printf("%s\n", PVFS2_VERSION); - exit(0); - } - else if (strcmp("verbose", cur_option) == 0) - { - goto list_verbose; - } - else if (strcmp("numeric-uid-gid", cur_option) == 0) - { - goto list_numeric_uid_gid; - } - else if (strcmp("directory", cur_option) == 0) - { - goto list_directory; - } - else if (strcmp("no-group", cur_option) == 0) - { - goto list_no_group; - } - else if (strcmp("almost-all", cur_option) == 0) - { - goto list_almost_all; - } - else if (strcmp("all", cur_option) == 0) - { - goto list_all; - } - else if (strcmp("inode", cur_option) == 0) - { - goto list_inode; - } - else - { - usage(argc, argv); - exit(EXIT_FAILURE); - } - break; - case 'h': - list_human_readable: - tmp_opts->list_human_readable = 1; - break; - case 'V': - list_verbose: - tmp_opts->list_verbose = 1; - break; - case 'l': - tmp_opts->list_long = 1; - break; - case 'n': - list_numeric_uid_gid: - tmp_opts->list_long = 1; - tmp_opts->list_numeric_uid_gid = 1; - break; - case 'd': - list_directory: - tmp_opts->list_directory = 1; - break; - case 'o': - list_no_group: - tmp_opts->list_long = 1; - tmp_opts->list_no_group = 1; - break; - case 'A': - list_almost_all: - tmp_opts->list_almost_all = 1; - break; - case 'a': - list_all: - tmp_opts->list_all = 1; - break; - case 'g': - tmp_opts->list_long = 1; - tmp_opts->list_no_owner = 1; - break; - case 'i': - list_inode: - tmp_opts->list_inode = 1; - break; - case 't': - do_timing = 1; - break; - case '?': - usage(argc, argv); - exit(EXIT_FAILURE); - } - } - - for(i = optind; i < argc; i++) - { - if (tmp_opts->num_starts < MAX_NUM_PATHS) - { - tmp_opts->start[i-optind] = argv[i]; - tmp_opts->num_starts++; - } - else - { - fprintf(stderr,"Ignoring path %s\n",argv[i]); - } - } - return tmp_opts; -} - -static void usage(int argc, char** argv) -{ - fprintf(stderr, "Usage: %s [OPTION]... [FILE]...\n", argv[0]); - fprintf(stderr, "List information about the FILEs (the current " - "directory by default)\n\n"); - fprintf(stderr," -a, --all " - "do not hide entries starting with .\n"); - fprintf(stderr," -A, --almost-all do not list " - "implied . and ..\n"); - fprintf(stderr," -d, --directory list directory " - "entries instead of contents\n"); - fprintf(stderr," -g like -l, but do " - "not list owner\n"); - fprintf(stderr," -G, --no-group inhibit display " - "of group information\n"); - fprintf(stderr," -h, --human-readable print sizes in human " - "readable format\n\t\t\t\t(e.g. 1K 234M 2G)\n"); - fprintf(stderr," --si likewise, but use powers " - "of 1000, not 1024\n"); - fprintf(stderr," -i, --inode print index number " - "of each file\n"); - fprintf(stderr," -l use a long listing " - "format\n"); - fprintf(stderr," -n, --numeric-uid-gid like -l, but list " - "numeric UIDs and GIDs\n"); - fprintf(stderr," -o like -l, but do not " - "list group information\n"); - fprintf(stderr," --help display this help " - "and exit\n"); - fprintf(stderr," -V, --verbose reports if the dir is " - "changing during listing\n"); - fprintf(stderr," --version output version " - "information and exit\n"); - return; -} - -int main(int argc, char **argv) -{ - int ret = -1, i = 0; - char pvfs_path[MAX_NUM_PATHS][PVFS_NAME_MAX]; - PVFS_fs_id fs_id_array[MAX_NUM_PATHS] = {0}; - const PVFS_util_tab* tab; - struct options* user_opts = NULL; - char current_dir[PVFS_NAME_MAX] = {0}; - int found_one = 0; - - process_name = argv[0]; - - user_opts = parse_args(argc, argv); - if (!user_opts) - { - fprintf(stderr, "Error: failed to parse command line " - "arguments.\n"); - usage(argc, argv); - return(-1); - } - - tab = PVFS_util_parse_pvfstab(NULL); - if (!tab) - { - fprintf(stderr, "Error: failed to parse pvfstab.\n"); - return(-1); - } - - for(i = 0; i < MAX_NUM_PATHS; i++) - { - memset(pvfs_path[i],0,PVFS_NAME_MAX); - } - - ret = PVFS_sys_initialize(GOSSIP_NO_DEBUG); - if (ret < 0) - { - PVFS_perror("PVFS_sys_initialize", ret); - return(-1); - } - - /* initialize each file system that we found in the tab file */ - for(i = 0; i < tab->mntent_count; i++) - { - ret = PVFS_sys_fs_add(&tab->mntent_array[i]); - if (ret == 0) - { - found_one = 1; - } - } - - if (!found_one) - { - fprintf(stderr, "Error: could not initialize any file systems " - "from %s\n", tab->tabfile_name); - PVFS_sys_finalize(); - return(-1); - } - - if (user_opts->num_starts == 0) - { - snprintf(current_dir,PVFS_NAME_MAX,"%s/", - tab->mntent_array[0].mnt_dir); - user_opts->start[0] = current_dir; - user_opts->num_starts = 1; - } - - for(i = 0; i < user_opts->num_starts; i++) - { - ret = PVFS_util_resolve(user_opts->start[i], - &fs_id_array[i], pvfs_path[i], PVFS_NAME_MAX); - if ((ret == 0) && (pvfs_path[i][0] == '\0')) - { - strcpy(pvfs_path[i], "/"); - } - - if (ret < 0) - { - fprintf(stderr, "Error: could not find file system " - "for %s in pvfstab\n", user_opts->start[i]); - return(-1); - } - } - - for(i = 0; i < user_opts->num_starts; i++) - { - if (user_opts->num_starts > 1) - { - printf("%s:\n", pvfs_path[i]); - } - - do_list(pvfs_path[i], fs_id_array[i], user_opts); - - if (user_opts->num_starts > 1) - { - printf("\n"); - } - } - - PVFS_sys_finalize(); - free(user_opts); - - return(ret); -} - -/* - * Local variables: - * c-indent-level: 4 - * c-basic-offset: 4 - * End: - * - * vim: ts=8 sts=4 sw=4 expandtab - */ diff --git a/src/apps/admin/pvfs2-migrate-collection.c b/src/apps/admin/pvfs2-migrate-collection.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-mkdir.c b/src/apps/admin/pvfs2-mkdir.c old mode 100755 new mode 100644 index 9872bab..1bd8f49 --- a/src/apps/admin/pvfs2-mkdir.c +++ b/src/apps/admin/pvfs2-mkdir.c @@ -106,7 +106,7 @@ int main(int argc, char **argv) fprintf(stderr, "Unable to allocate memory\n"); return(-1); } - + ret = PVFS_util_init_defaults(); if (ret < 0) { @@ -305,7 +305,6 @@ static int make_directory(PVFS_credentials * credentials, return(-1); } - /* Clear out any info from previous calls */ memset(&resp_mkdir, 0, sizeof(PVFS_sysresp_mkdir)); if(verbose) diff --git a/src/apps/admin/pvfs2-mkspace.c b/src/apps/admin/pvfs2-mkspace.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-perf-mon-example.c b/src/apps/admin/pvfs2-perf-mon-example.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-perf-mon-snmp.c b/src/apps/admin/pvfs2-perf-mon-snmp.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-perror.c b/src/apps/admin/pvfs2-perror.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-ping.c b/src/apps/admin/pvfs2-ping.c old mode 100755 new mode 100644 index ee7a1f0..6b375a5 --- a/src/apps/admin/pvfs2-ping.c +++ b/src/apps/admin/pvfs2-ping.c @@ -96,6 +96,12 @@ int main(int argc, char **argv) printf(" %s: ", tab->mntent_array[i].mnt_dir); if(ret < 0) { + if (ret == -PVFS_EEXIST) + { + /* this mount point already mounted - skip on */ + printf("Ok\n"); + continue; + } printf("FAILURE!\n"); err = 1; } diff --git a/src/apps/admin/pvfs2-remove-object.c b/src/apps/admin/pvfs2-remove-object.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-rm.c b/src/apps/admin/pvfs2-rm.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-set-debugmask.c b/src/apps/admin/pvfs2-set-debugmask.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-set-eventmask.c b/src/apps/admin/pvfs2-set-eventmask.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-set-mode.c b/src/apps/admin/pvfs2-set-mode.c old mode 100755 new mode 100644 index 02d7800..626c44a --- a/src/apps/admin/pvfs2-set-mode.c +++ b/src/apps/admin/pvfs2-set-mode.c @@ -18,6 +18,7 @@ #include "pvfs2.h" #include "pvfs2-mgmt.h" +#include "pint-cached-config.h" #ifndef PVFS2_VERSION #define PVFS2_VERSION "Unknown" @@ -29,6 +30,7 @@ struct options int mnt_point_set; enum PVFS_server_mode mode; int mode_set; + char *server; }; static struct options* parse_args(int argc, char* argv[]); @@ -42,6 +44,7 @@ int main(int argc, char **argv) char pvfs_path[PVFS_NAME_MAX] = {0}; PVFS_credentials creds; struct PVFS_mgmt_setparam_value param_value; + int server_type = 0; /* look at command line arguments */ user_opts = parse_args(argc, argv); @@ -74,13 +77,56 @@ int main(int argc, char **argv) param_value.type = PVFS_MGMT_PARAM_TYPE_UINT64; param_value.u.value = user_opts->mode; - ret = PVFS_mgmt_setparam_all(cur_fs, - &creds, - PVFS_SERV_PARAM_MODE, - ¶m_value, - NULL, - NULL /* detailed errors */); + if (user_opts->server) + { + /* verify server string */ + ret = PINT_cached_config_check_type(cur_fs, + user_opts->server, + &server_type); + if (ret) + { + fprintf(stderr,"Server string (%s) is undefined. Check config file.\n",user_opts->server); + goto out; + } + ret = PVFS_mgmt_setparam_single(cur_fs, + &creds, + PVFS_SERV_PARAM_MODE, + ¶m_value, + user_opts->server, /*server string*/ + NULL, /*details*/ + NULL /*hints*/); + if (ret) + { + fprintf(stderr,"Error(%d) setting mode on server(%s)\n",ret,user_opts->server); + goto out; + } + else + { + fprintf(stderr,"Successfully set mode(%s) on server (%s)\n",user_opts->mode==PVFS_SERVER_ADMIN_MODE?"admin":"normal" + ,user_opts->server); + } + } + else + { + ret = PVFS_mgmt_setparam_all(cur_fs, + &creds, + PVFS_SERV_PARAM_MODE, + ¶m_value, + NULL,/*details*/ + NULL /*hints */); + if (ret) + { + fprintf(stderr,"Error(%d) setting mode for mount point(%s)\n",ret,user_opts->mnt_point); + goto out; + } + else + { + fprintf(stderr,"Successfully set mode (%s) for mount point(%s)\n",user_opts->mode==PVFS_SERVER_ADMIN_MODE?"admin":"normal" + ,user_opts->mnt_point); + } + } +out: PVFS_sys_finalize(); return(ret); @@ -95,7 +141,7 @@ int main(int argc, char **argv) */ static struct options* parse_args(int argc, char* argv[]) { - char flags[] = "vm:"; + char flags[] = "vm:s:"; int one_opt = 0; int len = 0; @@ -137,6 +183,9 @@ static struct options* parse_args(int argc, char* argv[]) strcat(tmp_opts->mnt_point, "/"); tmp_opts->mnt_point_set = 1; break; + case('s'): + tmp_opts->server = strdup(optarg); + break; case('?'): usage(argc, argv); exit(EXIT_FAILURE); @@ -162,6 +211,10 @@ static struct options* parse_args(int argc, char* argv[]) if(!tmp_opts->mnt_point_set || !tmp_opts->mode_set) { + if(!tmp_opts->mnt_point_set) + fprintf(stderr,"Error: Mount point is required.\n"); + if(!tmp_opts->mode_set) + fprintf(stderr,"Error: Mode is required.\n"); if(tmp_opts->mnt_point) free(tmp_opts->mnt_point); free(tmp_opts); @@ -175,10 +228,13 @@ static struct options* parse_args(int argc, char* argv[]) static void usage(int argc, char** argv) { fprintf(stderr, "\n"); - fprintf(stderr, "Usage : %s [-m fs_mount_point] \n", + fprintf(stderr, "Usage : %s [-s server] -m \n\n", argv[0]); - fprintf(stderr, "Example: %s -m /mnt/pvfs2 \"normal\"\n", + fprintf(stderr, "Mount point and mode are required. If server is given, then mode will be set only on that server; otherwise, mode is set on " + "all servers for the given mount point.\n\n"); + fprintf(stderr, "Example:All-Severs: %s -m /mnt/pvfs2 normal\n\n", argv[0]); + fprintf(stderr, "Example:One-Server: %s -s tcp://localhost:3334/pvfs2-fs -m /mnt/pvfs2 admin\n\n",argv[0]); fprintf(stderr, "Available modes include: admin,normal\n"); return; diff --git a/src/apps/admin/pvfs2-set-sync.c b/src/apps/admin/pvfs2-set-sync.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-showcoll.c b/src/apps/admin/pvfs2-showcoll.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-start-all b/src/apps/admin/pvfs2-start-all new file mode 100755 index 0000000..2dc3f3a --- /dev/null +++ b/src/apps/admin/pvfs2-start-all @@ -0,0 +1,146 @@ +#!/bin/bash +# (C) 2013 Clemson University and The University of Chicago. +# See COPYING in top-level directory. + +# Purpose: Start all PVFS2 Servers based on contents of config file. + +cd `dirname $0`/.. + +help() +{ + SP=44 + printf "%s\n" "Usage: pvfs2-start-all -c -p [OPTION]" + printf "%-${SP}s%s\n" " -c, --conf " "PVFS configuration file path" + + printf "%-${SP}s%s\n" " -e, --exclusions " "String of space separated expressions: " + printf "%-${SP}s%s\n" "" " Addresses on the 'Alias' lines of the config file will be " + printf "%-${SP}s%s\n" "" " excluded from the server list if any part of the " + printf "%-${SP}s%s\n" "" " address matches any of the expressions." + + printf "%-${SP}s%s\n" " -h, --help" "Show help information" + printf "%-${SP}s%s\n" " -m, --mnt " "PVFS mount path" + printf "%-${SP}s%s\n" " -o, --options " "String of options passed to ssh" + printf "%-${SP}s%s\n" "" " ex: -o \"-t headnode ssh\"" + printf "%-${SP}s%s\n" " -p, --prefix " "prefix path set during configure step" + printf "%-${SP}s%s\n" "" " (or /usr/local if you didn't specify)" + printf "%-${SP}s%s\n" " -s, --server_options " "String of options to pass to pvfs2-server" + printf "%-${SP}s%s\n" " -v, --server_env " "String of space separated environment" + printf "%-${SP}s%s\n" "" " variables defined for the pvfs2-server." +} + +# optionally set by options +PVFS_CONF_FILE= #Ex: '/opt/orangefs/orangefs.conf' +EXCLUSIONS= #Ex: 'ib0 myri0' +MNT= #Ex: '/mnt/orangefs' +SSH_OPTIONS= #Ex: '-t another_host ssh' +PREFIX_PATH= #Ex: '/opt/orangefs' +PVFS2_SERVER_OPTIONS= #Ex: '-f' or '-r' +PVFS2_SERVER_ENV= #Ex: 'LD_LIBRARY_PATH=/opt/orangefs:/opt/db4 PVFS2TAB_FILE=/opt/orangefs/pvfs2tab' + +# Execute getopt +ARGS=`getopt -o "c:e:hm:o:p:s:v:" -l "conf:,exclusions:,help,mnt:,options:,prefix:,server_options:server_env:" -n "$0" -- "$@"` + +# Check if getopt returned an error b/c of bad arguments +if [ $? -ne 0 ]; then + exit 1 +fi + +# Handle whitespace +eval set -- "$ARGS" + +MNT_SET=0 + +# Check for Required Options +CONF_SET=0 +PREFIX_SET=0 + +# Iterate over options +while [ $# -ne 0 ]; do + case "$1" in + -c|--conf) + if [ -n "$2" ]; then + PVFS_CONF_FILE=$2 + CONF_SET=1 + fi + shift 2;; + + -e|--exclusions) + EXCLUSIONS=$2 + shift 2;; + + -h|--help) + help + exit 0 + shift 2;; + + -m|--mnt) + if [ -n "$2" ]; then + MNT=$2 + MNT_SET=1 + fi + shift 2;; + + -o|--options) + if [ -n "$2" ]; then + SSH_OPTIONS=$2 + fi + shift 2;; + + -p|--prefix) + if [ -n "$2" ]; then + PREFIX_PATH=$2 + PREFIX_SET=1 + fi + shift 2;; + + -s|--server_options) + if [ -n "$2" ]; then + PVFS2_SERVER_OPTIONS=$2 + fi + shift 2;; + + -v|--server_env) + if [ -n "$2" ]; then + PVFS2_SERVER_ENV=$2 + fi + shift 2;; + + --) + shift + esac +done + +if [[ $CONF_SET -eq 0 || $PREFIX_SET -eq 0 ]]; then + help + exit 1 +fi + +# Store Server List in SERVERS variable +SERVERS=`cat $PVFS_CONF_FILE | grep "Alias " | tr ' ,' '\n' | grep ":" | cut -d ':' -f2 | sed 's/\///g'` + +# Exclude hostnames from config file that match a certain expression +# Ex: Can be used to ignore Infiniband connections designated ib0... +if [ ${#EXCLUSIONS} -gt 0 ]; then + for EXCLUSION in $EXCLUSIONS; do + SERVERS=`echo $SERVERS | tr ' ' '\n' | grep -v "$EXCLUSION"` + done +fi + +SPACING=$[`echo "$SERVERS" | wc -L`+4] + +PVFS2_SERVER=$PREFIX_PATH/sbin/pvfs2-server +# Start Servers +for SERVER in $SERVERS; do + echo "starting pvfs2-server with: ssh $SSH_OPTIONS $SERVER $PVFS2_SERVER_ENV $PVFS2_SERVER $PVFS2_SERVER_OPTIONS $PVFS_CONF_FILE" + OUTPUT=`ssh $SSH_OPTIONS $SERVER $PVFS2_SERVER_ENV $PVFS2_SERVER $PVFS2_SERVER_OPTIONS $PVFS_CONF_FILE 2>&1` + printf "%-${SPACING}s%s\n" "$SERVER:" "$OUTPUT" +done + +# Give servers time to start +sleep 3 + +# Ping the servers +if [ $MNT_SET -eq 1 ]; then + printf "\n%s\n" "Pinging the PVFS2 File System..." + `pwd`/bin/pvfs2-ping -m $MNT +fi diff --git a/src/apps/admin/pvfs2-stat.c b/src/apps/admin/pvfs2-stat.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-statfs.c b/src/apps/admin/pvfs2-statfs.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-stop-all b/src/apps/admin/pvfs2-stop-all new file mode 100755 index 0000000..f70bf47 --- /dev/null +++ b/src/apps/admin/pvfs2-stop-all @@ -0,0 +1,100 @@ +#!/bin/bash +# (C) 2013 Clemson University and The University of Chicago. +# See COPYING in top-level directory. + +# Purpose: Stop all PVFS2 Servers based on contents of config file. + +cd `dirname $0` + +help() +{ + SP=40 + printf "%s\n" "Usage: pvfs2-stop-all -c [OPTION]" + printf "%-${SP}s%s\n" " -c, --conf " "PVFS configuration file path" + + printf "%-${SP}s%s\n" " -e, --exclusions " "String of space separated expressions: " + printf "%-${SP}s%s\n" "" " Addresses on the 'Alias' lines of the config file will be " + printf "%-${SP}s%s\n" "" " excluded from the server list if any part of the " + printf "%-${SP}s%s\n" "" " address matches any of the expressions." + + printf "%-${SP}s%s\n" " -h, --help" "Show help information" + printf "%-${SP}s%s\n" " -o, --options " "String of options passed to ssh" + printf "%-${SP}s%s\n" "" " ex: -o \"-t headnode ssh\"" +} + +# optionally set by options +PVFS_CONF_FILE= #Ex: '/opt/orangefs/orangefs.conf' +EXCLUSIONS= #Ex: 'ib0 myri0' +SSH_OPTIONS= #Ex: '-t another_host ssh' + +# Execute getopt +ARGS=`getopt -o "c:e:ho:" -l "conf:,exclusions:,help,options:" -n "$0" -- "$@"` + +# Check if getopt returned an error b/c of bad arguments +if [ $? -ne 0 ]; then + exit 1 +fi + +# Handle whitespace +eval set -- "$ARGS" + +# Check for Required Options +CONF_SET=0 + +# Iterate over options +while [ $# -ne 0 ]; do + case "$1" in + -c|--conf) + if [ -n "$2" ]; then + PVFS_CONF_FILE=$2 + CONF_SET=1 + fi + shift 2;; + + -e|--exclusions) + EXCLUSIONS=$2 + shift 2;; + + -h|--help) + help + exit 0 + shift 2;; + + -o|--options) + if [ -n "$2" ]; then + SSH_OPTIONS=$2 + fi + shift 2;; + + --) + shift + esac +done + +if [ $CONF_SET -eq 0 ]; then + help + exit 1 +fi + +# Store Server List in SERVERS variable +SERVERS=`cat $PVFS_CONF_FILE | grep "Alias " | tr ' ,' '\n' | grep ":" | cut -d ':' -f2 | sed 's/\///g'` + +# Exclude hostnames from config file that match a certain expression +if [ ${#EXCLUSIONS} -gt 0 ]; then + for EXCLUSION in $EXCLUSIONS; do + SERVERS=`echo $SERVERS | tr ' ' '\n' | grep -v "$EXCLUSION"` + done +fi + +SPACING=$[`echo "$SERVERS" | wc -L`+4] + +# Stop Servers +for SERVER in $SERVERS; do + OUTPUT=`ssh $SSH_OPTIONS $SERVER killall pvfs2-server 2>&1` + if [ `echo $OUTPUT | wc -m` -eq 1 ]; then + printf "%-${SPACING}s%s\n" "$SERVER:" "pvfs2-server killed" + else + printf "%-${SPACING}s%s\n" "$SERVER:" "$OUTPUT" + fi +done + diff --git a/src/apps/admin/pvfs2-touch.c b/src/apps/admin/pvfs2-touch.c old mode 100755 new mode 100644 index 6b11b77..4e24cce --- a/src/apps/admin/pvfs2-touch.c +++ b/src/apps/admin/pvfs2-touch.c @@ -71,8 +71,8 @@ int main(int argc, char **argv) int rc; int num_segs; char *working_file = user_opts->filenames[i]; - char directory[PVFS_NAME_MAX]; - char filename[PVFS_SEGMENT_MAX]; + char directory[PVFS_NAME_MAX] = {0}; + char filename[PVFS_SEGMENT_MAX] = {0}; layout.algorithm = PVFS_SYS_LAYOUT_ROUND_ROBIN; layout.server_list.count = 0; @@ -90,32 +90,35 @@ int main(int argc, char **argv) PVFS_object_ref parent_ref; PVFS_sys_attr attr; - /* Translate path into pvfs2 relative path */ - rc = PINT_get_base_dir(working_file, directory, PVFS_NAME_MAX); - num_segs = PINT_string_count_segments(working_file); - rc = PINT_get_path_element(working_file, num_segs - 1, - filename, PVFS_SEGMENT_MAX); + /* Translate the working file into a pvfs2 relative path*/ + rc = PVFS_util_resolve(working_file, &cur_fs, pvfs_path, PVFS_NAME_MAX); if (rc) { - fprintf(stderr, "Unknown path format: %s\n", working_file); + PVFS_perror("PVFS_util_resolve", rc); ret = -1; break; } - rc = PVFS_util_resolve(directory, &cur_fs, - pvfs_path, PVFS_NAME_MAX); + /* Get the parent directory of the working file */ + rc = PINT_get_base_dir(pvfs_path, directory, PVFS_NAME_MAX); + + /* Determine the filename from the working */ + num_segs = PINT_string_count_segments(working_file); + rc = PINT_get_path_element(working_file, num_segs - 1, + filename, PVFS_SEGMENT_MAX); if (rc) { - PVFS_perror("PVFS_util_resolve", rc); + fprintf(stderr, "Unknown path format: %s\n", working_file); ret = -1; break; } + PVFS_util_gen_credentials(&credentials); memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); - rc = PVFS_sys_lookup(cur_fs, pvfs_path, &credentials, + rc = PVFS_sys_lookup(cur_fs, directory, &credentials, &resp_lookup, PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); if (rc) { @@ -128,7 +131,9 @@ int main(int argc, char **argv) memset(&attr, 0, sizeof(PVFS_sys_attr)); attr.owner = credentials.uid; attr.group = credentials.gid; - attr.perms = 0777; + attr.perms = PVFS_util_translate_mode( + (S_IROTH|S_IWOTH|S_IRGRP|S_IWGRP|S_IRUSR|S_IWUSR) + & ~PVFS_util_get_umask(), 0); attr.atime = time(NULL); attr.mtime = attr.atime; attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; @@ -171,7 +176,9 @@ int main(int argc, char **argv) assert(tmp_server_index < layout.server_list.count); /* TODO: is there a way to do this without internal BMI - * functions? + * functions? The address lookups should be done within the create + * state machine. This program should only have to send in + * a list of server aliases from the config file. */ rc = BMI_addr_lookup( &layout.server_list.servers[tmp_server_index], diff --git a/src/apps/admin/pvfs2-validate.c b/src/apps/admin/pvfs2-validate.c index 575b766..88dd414 100755 --- a/src/apps/admin/pvfs2-validate.c +++ b/src/apps/admin/pvfs2-validate.c @@ -126,6 +126,15 @@ int main(int argc, char **argv) return -1; } + if ( pvfs_path[0] == '\0' ) + { + /* When pvfs_path is returned NULL from PVFS_util_resolve, the assumption is that the + * original start path WAS the mount point. + */ + strcpy(pvfs_path,"/"); + } + + if (fsck_options->check_stranded_objects && (strcmp(pvfs_path, "/") != 0)) { fprintf(stderr, "Error: -d must specify the pvfs2 root directory when utilizing the -c option.\n"); diff --git a/src/apps/admin/pvfs2-viewdist.c b/src/apps/admin/pvfs2-viewdist.c old mode 100755 new mode 100644 diff --git a/src/apps/admin/pvfs2-write.c b/src/apps/admin/pvfs2-write.c new file mode 100644 index 0000000..5d594fd --- /dev/null +++ b/src/apps/admin/pvfs2-write.c @@ -0,0 +1,653 @@ +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/* pvfs2-write: + * write a file from an in-memory buffer to a unix or PVFS2 file + * system. This can be helpful for testing network performance, + * sort of like running "dd if=/dev/zero ..." + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "pvfs2.h" +#include "str-utils.h" +#include "pint-sysint-utils.h" +#include "pvfs2-internal.h" +#include "pvfs2-hint.h" + +/* optional parameters, filled in by parse_args() */ +struct options +{ + PVFS_size strip_size; + int num_datafiles; + uint64_t buf_size; + uint64_t file_size; + char* destfile; + int show_timings; +}; + +enum object_type { + UNIX_FILE = 1, + PVFS2_FILE +}; + +enum open_type { + OPEN_SRC, + OPEN_DEST +}; + +typedef struct pvfs2_file_object_s { + PVFS_fs_id fs_id; + PVFS_object_ref ref; + char pvfs2_path[PVFS_NAME_MAX+1]; + char user_path[PVFS_NAME_MAX+1]; + PVFS_sys_attr attr; + PVFS_permissions perms; +} pvfs2_file_object; + +typedef struct unix_file_object_s { + int fd; + int mode; + char path[NAME_MAX+1]; +} unix_file_object; + +typedef struct file_object_s { + int fs_type; + union { + unix_file_object ufs; + pvfs2_file_object pvfs2; + } u; +} file_object; + +static PVFS_hint hints = NULL; + +static struct options* parse_args(int argc, char* argv[]); +static void usage(int argc, char** argv); +static double Wtime(void); +static void print_timings( double time, int64_t total); +static int resolve_filename(file_object *obj, char *filename); +static int generic_open(file_object *obj, PVFS_credentials *credentials, + int nr_datafiles, PVFS_size strip_size, char *srcname, int open_type); +static size_t generic_write(file_object *dest, char *buffer, + int64_t offset, size_t count, PVFS_credentials *credentials); +static void make_attribs(PVFS_sys_attr *attr, + PVFS_credentials *credentials, + int nr_datafiles, int mode); + +int main (int argc, char ** argv) +{ + struct options* user_opts = NULL; + double time1=0, time2=0; + int64_t total_written=0, buffer_size=0; + file_object src, dest; + void* buffer = NULL; + int64_t ret; + PVFS_credentials credentials; + + user_opts = parse_args(argc, argv); + if (!user_opts) + { + fprintf(stderr, "Error, failed to parse command line arguments\n"); + return(-1); + } + + PVFS_hint_import_env(& hints); + + ret = PVFS_util_init_defaults(); + if (ret < 0) + { + PVFS_perror("PVFS_util_init_defaults", ret); + return(-1); + } + memset(&src, 0, sizeof(src)); + memset(&dest, 0, sizeof(src)); + + resolve_filename(&dest, user_opts->destfile ); + + PVFS_util_gen_credentials(&credentials); + + ret = generic_open(&dest, &credentials, user_opts->num_datafiles, user_opts->strip_size, + NULL, OPEN_DEST); + + if (ret < 0) + { + fprintf(stderr, "Could not open %s\n", user_opts->destfile); + goto main_out; + } + + /* start moving data */ + buffer = malloc(user_opts->buf_size); + if(!buffer) + { + perror("malloc"); + ret = -1; + goto main_out; + } + memset(buffer, 0, user_opts->buf_size); + + time1 = Wtime(); + while(total_written < user_opts->file_size) + { + if (user_opts->file_size - total_written > user_opts->buf_size) + { + buffer_size = user_opts->buf_size; + } + else + { + buffer_size = user_opts->file_size - total_written; + } + + ret = generic_write(&dest, buffer, total_written, + buffer_size, &credentials); + if (ret != buffer_size) + { + if (ret == -1) { + perror("generic_write"); + } else { + fprintf(stderr, "Error in write\n"); + } + ret = -1; + goto main_out; + } + total_written += buffer_size; + } + + time2 = Wtime(); + + if (user_opts->show_timings) + { + print_timings(time2-time1, total_written); + } + + ret = 0; + +main_out: + PVFS_sys_finalize(); + free(user_opts); + free(buffer); + + PVFS_hint_free(hints); + return(ret); +} + +static uint64_t parse_bytes(char *argument) +{ + uint64_t value = 0, multiplier = 0; + char *mod_ptr = NULL; + int ret = -1; + + ret = sscanf(argument, "%lu", &value); + if(ret < 1){ + return(0); + } + + for (mod_ptr = argument; *mod_ptr && isdigit(*mod_ptr); mod_ptr++) { /* empty */; } + if (*mod_ptr == 'K' || *mod_ptr == 'k') { + multiplier = 1024; + } + else if (*mod_ptr == 'M' || *mod_ptr == 'm') { + multiplier = 1024*1024; + } + else if (*mod_ptr == 'G' || *mod_ptr == 'g') { + multiplier = 1024*1024*1024; + } + else { + multiplier = 1; + } + + value *= multiplier; + return(value); +} + +/* parse_args() + * + * parses command line arguments + * + * returns pointer to options structure on success, NULL on failure + */ +static struct options* parse_args(int argc, char* argv[]) +{ + char flags[] = "tvs:n:b:"; + int one_opt = 0; + + struct options* tmp_opts = NULL; + int ret = -1; + + /* create storage for the command line options */ + tmp_opts = (struct options*)malloc(sizeof(struct options)); + if(!tmp_opts){ + return(NULL); + } + memset(tmp_opts, 0, sizeof(struct options)); + + /* fill in defaults (except for hostid) */ + tmp_opts->strip_size = -1; + tmp_opts->num_datafiles = -1; + tmp_opts->buf_size = 10*1024*1024; + + /* look at command line arguments */ + while((one_opt = getopt(argc, argv, flags)) != EOF) + { + switch(one_opt){ + case('v'): + printf("%s\n", PVFS2_VERSION); + exit(0); + case('t'): + tmp_opts->show_timings = 1; + break; + case('s'): + printf("Stripe size: %s ", optarg); + ret = sscanf(optarg, SCANF_lld, &tmp_opts->strip_size); + if(ret < 1){ + free(tmp_opts); + return(NULL); + } + break; + case('n'): + ret = sscanf(optarg, "%d", &tmp_opts->num_datafiles); + if(ret < 1){ + free(tmp_opts); + return(NULL); + } + break; + case('b'): + printf("Buffer size: %s ", optarg); + tmp_opts->buf_size = parse_bytes(optarg); + if(tmp_opts->buf_size < 1){ + free(tmp_opts); + return(NULL); + } + break; + case('f'): + tmp_opts->file_size = parse_bytes(optarg); + if(tmp_opts->file_size < 1){ + free(tmp_opts); + return(NULL); + } + break; + case('?'): + usage(argc, argv); + exit(EXIT_FAILURE); + } + } + + if(optind != (argc - 2)) + { + usage(argc, argv); + exit(EXIT_FAILURE); + } + + /* TODO: should probably malloc and copy instead */ + tmp_opts->destfile = argv[argc-2]; + + printf("File size: %s ", argv[argc-1]); + if ((tmp_opts->file_size = parse_bytes(argv[argc-1])) < 1) + { + usage(argc, argv); + exit(EXIT_FAILURE); + } + + return(tmp_opts); +} + +static void usage(int argc, char** argv) +{ + fprintf(stderr, + "Usage: %s ARGS dest_file file_size\n", argv[0]); + fprintf(stderr, "Where ARGS is one or more of" + "\n-s \t\t\tsize of access to PVFS2 volume" + "\n-n \t\tnumber of PVFS2 datafiles to use" + "\n-b \thow much data to write at once" + "\n-t\t\t\t\tprint some timing information" + "\n-v\t\t\t\tprint version number and exit\n"); + return; +} + +static double Wtime(void) +{ + struct timeval t; + gettimeofday(&t, NULL); + return((double)t.tv_sec + (double)(t.tv_usec) / 1000000); +} + +static void print_timings( double time, int64_t total) +{ + printf("Wrote %lld bytes in %f seconds. %f MB/seconds\n", + lld(total), time, (total/time)/(1024*1024)); +} + +/* write 'count' bytes from 'buffer' into (unix or pvfs2) file 'dest' */ +static size_t generic_write(file_object *dest, char *buffer, + int64_t offset, size_t count, PVFS_credentials *credentials) +{ + PVFS_Request mem_req, file_req; + PVFS_sysresp_io resp_io; + int ret; + + if (dest->fs_type == UNIX_FILE) + return(write(dest->u.ufs.fd, buffer, count)); + else + { + file_req = PVFS_BYTE; + ret = PVFS_Request_contiguous(count, PVFS_BYTE, &mem_req); + if (ret < 0) + { + PVFS_perror("PVFS_Request_contiguous", ret); + return(ret); + } + ret = PVFS_sys_write(dest->u.pvfs2.ref, file_req, offset, + buffer, mem_req, credentials, &resp_io, hints); + if (ret == 0) + { + PVFS_Request_free(&mem_req); + return(resp_io.total_completed); + } + else + PVFS_perror("PVFS_sys_write", ret); + } + return ret; +} + +/* resolve_filename: + * given 'filename', find the PVFS2 fs_id and relative pvfs_path. In case of + * error, assume 'filename' is a unix file. + */ +static int resolve_filename(file_object *obj, char *filename) +{ + int ret; + + ret = PVFS_util_resolve(filename, &(obj->u.pvfs2.fs_id), + obj->u.pvfs2.pvfs2_path, PVFS_NAME_MAX); + if (ret < 0) + { + obj->fs_type = UNIX_FILE; + strncpy(obj->u.ufs.path, filename, NAME_MAX); + } else { + obj->fs_type = PVFS2_FILE; + strncpy(obj->u.pvfs2.user_path, filename, PVFS_NAME_MAX); + } + + return 0; +} + +/* generic_open: + * given a file_object, perform the apropriate open calls. + * . the 'open_type' flag tells us if we can create the file if it does not + * exist: if it is the source, then no. If it is the destination, then we + * will. + * . If we are creating the file, nr_datafiles gives us the number of + * datafiles to use for the new file. + * . If 'srcname' is given, and the file is a directory, we will create a + * new file with the basename of srcname in the specified directory + */ + +static int generic_open(file_object *obj, PVFS_credentials *credentials, + int nr_datafiles, PVFS_size strip_size, + char *srcname, int open_type) +{ + struct stat stat_buf; + PVFS_sysresp_lookup resp_lookup; + PVFS_sysresp_getattr resp_getattr; + PVFS_sysresp_create resp_create; + PVFS_object_ref parent_ref; + PVFS_sys_dist *new_dist; + int ret = -1; + char *entry_name; /* name of the pvfs2 file */ + char str_buf[PVFS_NAME_MAX]; /* basename of pvfs2 file */ + + if (obj->fs_type == UNIX_FILE) + { + memset(&stat_buf, 0, sizeof(struct stat)); + + stat(obj->u.ufs.path, &stat_buf); + if (open_type == OPEN_SRC) + { + if (S_ISDIR(stat_buf.st_mode)) + { + fprintf(stderr, "Source cannot be a directory\n"); + return(-1); + } + obj->u.ufs.fd = open(obj->u.ufs.path, O_RDONLY); + obj->u.ufs.mode = (int)stat_buf.st_mode; + } + else + { + if (S_ISDIR(stat_buf.st_mode)) + { + if (srcname) + { + strncat(obj->u.ufs.path, basename(srcname), NAME_MAX); + } + else + { + fprintf(stderr, "cannot find name for " + "destination. giving up\n"); + return(-1); + } + } + obj->u.ufs.fd = open(obj->u.ufs.path, + O_WRONLY|O_CREAT|O_LARGEFILE|O_TRUNC,0666); + } + if (obj->u.ufs.fd < 0) + { + perror("open"); + fprintf(stderr, "could not open %s\n", obj->u.ufs.path); + return (-1); + } + } + else + { + entry_name = str_buf; + /* it's a PVFS2 file */ + if (strcmp(obj->u.pvfs2.pvfs2_path, "/") == 0) + { + /* special case: PVFS2 root file system, so stuff the end of + * srcfile onto pvfs2_path */ + char *segp = NULL, *prev_segp = NULL; + void *segstate = NULL; + + /* can only perform this special case if we know srcname */ + if (srcname == NULL) + { + fprintf(stderr, "unable to guess filename in " + "toplevel PVFS2\n"); + return -1; + } + + memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); + ret = PVFS_sys_lookup(obj->u.pvfs2.fs_id, obj->u.pvfs2.pvfs2_path, + credentials, &resp_lookup, + PVFS2_LOOKUP_LINK_FOLLOW, hints); + if (ret < 0) + { + PVFS_perror("PVFS_sys_lookup", ret); + return (-1); + } + parent_ref.handle = resp_lookup.ref.handle; + parent_ref.fs_id = resp_lookup.ref.fs_id; + + while (!PINT_string_next_segment(srcname, &segp, &segstate)) + { + prev_segp = segp; + } + entry_name = prev_segp; /* see... points to basename of srcname */ + } + else /* given either a pvfs2 directory or a pvfs2 file */ + { + /* get the absolute path on the pvfs2 file system */ + + /*parent_ref.fs_id = obj->pvfs2.fs_id; */ + + if (PINT_remove_base_dir(obj->u.pvfs2.pvfs2_path,str_buf, + PVFS_NAME_MAX)) + { + if(obj->u.pvfs2.pvfs2_path[0] != '/') + { + fprintf(stderr, "Error: poorly formatted path.\n"); + } + fprintf(stderr, "Error: cannot retrieve entry name for " + "creation on %s\n", obj->u.pvfs2.user_path); + return(-1); + } + ret = PINT_lookup_parent(obj->u.pvfs2.pvfs2_path, + obj->u.pvfs2.fs_id, credentials, + &parent_ref.handle); + if (ret < 0) + { + PVFS_perror("PVFS_util_lookup_parent", ret); + return (-1); + } + else /* parent lookup succeeded. if the pvfs2 path is just a + directory, use basename of src for the new file */ + { + int len = strlen(obj->u.pvfs2.pvfs2_path); + if (obj->u.pvfs2.pvfs2_path[len - 1] == '/') + { + char *segp = NULL, *prev_segp = NULL; + void *segstate = NULL; + + if (srcname == NULL) + { + fprintf(stderr, "unable to guess filename\n"); + return(-1); + } + while (!PINT_string_next_segment(srcname, + &segp, &segstate)) + { + prev_segp = segp; + } + strncat(obj->u.pvfs2.pvfs2_path, prev_segp, PVFS_NAME_MAX); + entry_name = prev_segp; + } + parent_ref.fs_id = obj->u.pvfs2.fs_id; + } + } + + memset(&resp_lookup, 0, sizeof(PVFS_sysresp_lookup)); + ret = PVFS_sys_ref_lookup(parent_ref.fs_id, entry_name, + parent_ref, credentials, &resp_lookup, + PVFS2_LOOKUP_LINK_FOLLOW, hints); + + if ((ret == 0) && (open_type == OPEN_SRC)) + { + memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); + ret = PVFS_sys_getattr(resp_lookup.ref, PVFS_ATTR_SYS_ALL_NOHINT, + credentials, &resp_getattr, hints); + if (ret) + { + fprintf(stderr, "Failed to do pvfs2 getattr on %s\n", + entry_name); + return -1; + } + + if (resp_getattr.attr.objtype == PVFS_TYPE_SYMLINK) + { + free(resp_getattr.attr.link_target); + resp_getattr.attr.link_target = NULL; + } + obj->u.pvfs2.perms = resp_getattr.attr.perms; + memcpy(&obj->u.pvfs2.attr, &resp_getattr.attr, + sizeof(PVFS_sys_attr)); + obj->u.pvfs2.attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + } + + /* at this point, we have looked up the file in the parent directory. + * . If we found something, and we are the SRC, then we're done. + * . We will maintain the semantic of pvfs2-import and refuse to + * overwrite existing PVFS2 files, so if we found something, and we + * are the DEST, then that's an error. + * . Otherwise, we found nothing and we will create the destination. + */ + if (open_type == OPEN_SRC) + { + if (ret == 0) + { + obj->u.pvfs2.ref = resp_lookup.ref; + return 0; + } + else + { + PVFS_perror("PVFS_sys_ref_lookup", ret); + return (ret); + } + } + if (open_type == OPEN_DEST) + { + if (ret == 0) + { + fprintf(stderr, "Target file %s already exists\n", entry_name); + return (-1); + } + else + { + memset(&stat_buf, 0, sizeof(struct stat)); + + /* preserve permissions doing a unix => pvfs2 copy */ + stat(srcname, &stat_buf); + make_attribs(&(obj->u.pvfs2.attr), credentials, nr_datafiles, + (int)stat_buf.st_mode); + if (strip_size > 0) { + new_dist = PVFS_sys_dist_lookup("simple_stripe"); + ret = PVFS_sys_dist_setparam(new_dist, "strip_size", &strip_size); + if (ret < 0) + { + PVFS_perror("PVFS_sys_dist_setparam", ret); + return -1; + } + } + else { + new_dist=NULL; + } + + ret = PVFS_sys_create(entry_name, parent_ref, + obj->u.pvfs2.attr, credentials, + new_dist, &resp_create, NULL, hints); + if (ret < 0) + { + PVFS_perror("PVFS_sys_create", ret); + return -1; + } + obj->u.pvfs2.ref = resp_create.ref; + } + } + } + return 0; +} + +void make_attribs(PVFS_sys_attr *attr, PVFS_credentials *credentials, + int nr_datafiles, int mode) +{ + attr->owner = credentials->uid; + attr->group = credentials->gid; + attr->perms = PVFS_util_translate_mode(mode, 0); + attr->mask = (PVFS_ATTR_SYS_ALL_SETABLE); + attr->dfile_count = nr_datafiles; + + if (attr->dfile_count > 0) + { + attr->mask |= PVFS_ATTR_SYS_DFILE_COUNT; + } +} + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/apps/admin/pvfs2-xattr.c b/src/apps/admin/pvfs2-xattr.c old mode 100755 new mode 100644 diff --git a/src/apps/devel/module.mk.in b/src/apps/devel/module.mk.in index fcbe92e..3fde738 100644 --- a/src/apps/devel/module.mk.in +++ b/src/apps/devel/module.mk.in @@ -1,4 +1,5 @@ DIR := src/apps/devel DEVELSRC := \ - $(DIR)/pvfs2-db-display.c + $(DIR)/pvfs2-db-display.c \ + $(DIR)/pvfs2-remove-prealloc.c diff --git a/src/apps/devel/pvfs2-db-display.c b/src/apps/devel/pvfs2-db-display.c index 3ea111c..7381df4 100644 --- a/src/apps/devel/pvfs2-db-display.c +++ b/src/apps/devel/pvfs2-db-display.c @@ -204,9 +204,11 @@ void close_db( DB *db_p ) void iterate_database(DB *db_p, void (*print)(DBT key, DBT val) ) { int ret = 0; - DBC *dbc_p = NULL; + DBC dbc; + DBC *dbc_p = &dbc; DBT key, val; + memset(&dbc, 0, sizeof(dbc)); ret = db_p->cursor(db_p, NULL, &dbc_p, 0); if( ret != 0 ) { @@ -267,9 +269,57 @@ void print_dspace( DBT key, DBT val ) uint64_t k; struct PVFS_ds_attributes_s *v; + time_t r_ctime, r_mtime, r_atime; + char ctimeStr[1024], mtimeStr[1024], atimeStr[1024]; + k = *(uint64_t *)key.data; v = val.data; + printf("(%llu)(%d) -> ", llu(k), key.size); + + print_ds_type( v->type ); + + if (v->ctime != 0) + { + r_ctime = (time_t) v->ctime; + + ctime_r(&r_ctime, ctimeStr); + + ctimeStr[strlen(ctimeStr)-1] = '\0'; + } + else + { + strcpy(ctimeStr, ""); + } + + if (v->mtime != 0) + { + + r_mtime = (time_t) v->mtime; + + ctime_r(&r_mtime, mtimeStr); + + mtimeStr[strlen(mtimeStr)-1] = '\0'; + } + else + { + strcpy(mtimeStr, ""); + } + + if (v->atime != 0) + { + r_atime = (time_t) v->atime; + + ctime_r(&r_atime, atimeStr); + + atimeStr[strlen(atimeStr)-1] = '\0'; + } + else + { + strcpy(atimeStr, ""); + } + + if (hex) printf("(%llx)(%d) -> ", llu(k), key.size); else @@ -279,18 +329,38 @@ void print_dspace( DBT key, DBT val ) if (hex) { printf("(fsid: %d)(handle: %llx)(uid: %u)(gid: %u)" - "(perm: %u)(ctime: %llu)(mtime: %llu)(atime: %llu)(%d)\n", + "(perm: %u)(ctime: %s)(mtime: %s)(atime: %s)(%d)\n", v->fs_id, llu(v->handle), v->uid, v->gid, v->mode, - llu(v->ctime), llu(v->mtime), llu(v->atime), val.size); + ctimeStr, mtimeStr, atimeStr, val.size); } else { - printf("(fsid: %d)(handle: %llu)(uid: %u)(gid: %u)" - "(perm: %u)(ctime: %llu)(mtime: %llu)(atime: %llu)(%d)\n", + printf("(fsid: %d)(handle: %llu)(uid: %u)(gid: %u)" + "(perm: %u)(ctime: %s)(mtime: %s)(atime: %s)", v->fs_id, llu(v->handle), v->uid, v->gid, v->mode, - llu(v->ctime), llu(v->mtime), llu(v->atime), val.size); + ctimeStr, mtimeStr, atimeStr); + } + + /* union elements */ + switch (v->type) + { + case PVFS_TYPE_METAFILE: + printf("(dfile_count: %u)(dist_size: %u)(%d)\n", + v->u.metafile.dfile_count, v->u.metafile.dist_size, val.size); + break; + + case PVFS_TYPE_DATAFILE: + printf("(bsize: %llu)(%d)\n", llu(v->u.datafile.b_size), val.size); + break; + + case PVFS_TYPE_DIRDATA: + printf("(count: %llu)(%d)\n", llu(v->u.dirdata.count), val.size); + break; + + default: + printf("(%d)\n", val.size); + break; } - /* union elements are not printed */ return; } @@ -312,7 +382,9 @@ void print_keyval( DBT key, DBT val ) } else if( key.size == 16 ) { - kh = *(uint64_t *)k->key; + char *tmp; + tmp = k->key; + kh = *(uint64_t *)tmp; if (hex) printf("(%llx)(%d) -> ", llu(kh), key.size); else diff --git a/src/apps/devel/pvfs2-remove-prealloc.c b/src/apps/devel/pvfs2-remove-prealloc.c new file mode 100644 index 0000000..3f960bd --- /dev/null +++ b/src/apps/devel/pvfs2-remove-prealloc.c @@ -0,0 +1,521 @@ +/* + * (C) 2010 Clemson University + * + * See COPYING in top-level directory. + */ + +/** \file + * Utility for displaying PVFS Berkeley DBs in textual form for debugging + * */ + + +#include +#include +#include +#include +#include + +#include "pvfs2-types.h" +#include "trove-types.h" +#include "pvfs2-storage.h" +#include "pvfs2-internal.h" + +#define COLLECTION_FILE "collections.db" +#define STORAGE_FILE "storage_attributes.db" +#define DATASPACE_FILE "dataspace_attributes.db" +#define KEYVAL_FILE "keyval.db" +#define COLLECTION_ATTR_FILE "collection_attributes.db" + +/* from src/io/trove/trove-dbpf/dbpf-keyval.c and include/pvfs2-types.h */ +#define DBPF_MAX_KEY_LENGTH 256 + +/* from src/io/trove/trove-dbpf/dbpf-keyval.c */ +struct dbpf_keyval_db_entry +{ + TROVE_handle handle; + char key[DBPF_MAX_KEY_LENGTH]; +}; + +typedef struct +{ + int remove; + char dbpath[PATH_MAX]; + char hexdir[PATH_MAX]; + char host[PATH_MAX]; +} options_t; + +/* globals */ +static options_t opts; + +int open_db( DB **db_p, char *path, int type, int set_keyval_compare, int flags); +void close_db( DB *db_p ); +int find_pool_keys(DB *db_p_coll_attr, DB *db_p_keyval); +void remove_preallocated_handles(DB *db_p_keyval, PVFS_handle pool_handle); +void print_help(char *progname); +int process_args(int argc, char ** argv); +int PINT_trove_dbpf_keyval_compare(DB * dbp, const DBT * a, const DBT * b); + +#define TROVE_db_cache_size_bytes 1610612736 + +int main( int argc, char **argv ) +{ + DB *db_p_coll_attr = NULL, *db_p_keyval = NULL; + DB_ENV dbe; + DB_ENV *dbe_p = &dbe; + char *path = NULL; + u_int32_t db_flags = DB_THREAD, + env_flags = DB_INIT_MPOOL, + type = DB_UNKNOWN; + int ret, path_len; + + if( (ret = process_args( argc, argv)) != 0 ) + { + return ret; + } + + /* allocate space for the longest path */ + path_len = strlen(opts.dbpath) + strlen(opts.hexdir) + + strlen(COLLECTION_ATTR_FILE) + 3; /* padding for / and \0 */ + path = calloc( path_len, sizeof(char) ); + if( path == NULL ) + { + printf("Error allocating path, exiting\n"); + return ENOMEM; + } + + ret = db_env_create(&dbe_p, 0); + if (ret != 0) + { + printf("Error creating env handle: %s\n", db_strerror(ret)); + return ret; + } + + /* Open the environment. */ + ret = dbe_p->open(dbe_p, + opts.dbpath, + env_flags, + 0); + if (ret != 0) + { + printf("Environment open failed: %s", db_strerror(ret)); + return ret; + } + + /* Open collection attribute database */ + memset(path, path_len, sizeof(char)); + sprintf(path, "%s/%s/%s", opts.dbpath, opts.hexdir, COLLECTION_ATTR_FILE ); + ret = open_db( &db_p_coll_attr, path, type, 0, db_flags); + if (ret != 0) + { + printf("Unable to open collection attributes database: %s\n", + db_strerror(ret)); + return ret; + } + + /* Open keyval database */ + memset(path, path_len, sizeof(char)); + sprintf(path, "%s/%s/%s", opts.dbpath, opts.hexdir, KEYVAL_FILE ); + ret = open_db( &db_p_keyval, path, type, 1, db_flags); + if (ret != 0) + { + printf("Unable to open keyval database: %s\n", db_strerror(ret)); + return ret; + } + + find_pool_keys(db_p_coll_attr, db_p_keyval); + + /* Close the databases. */ + close_db(db_p_keyval); + close_db(db_p_coll_attr); + + dbe_p->close(dbe_p, 0); + + free(path); + return 0; +} + +int open_db( DB **db_p, char *path, int type, int set_keyval_compare, int flags) +{ + int ret = 0; + + ret = db_create(db_p, NULL, 0); + if (ret != 0) + { + close_db( *db_p ); + printf("Couldn't create db_p for %s: %s\n", path, db_strerror(ret)); + return ret; + } + + if (set_keyval_compare) + { + (*db_p)->set_bt_compare((*db_p), PINT_trove_dbpf_keyval_compare); + } + + ret = (*db_p)->open(*db_p, NULL, path, NULL, type, flags, 0 ); + if (ret != 0) + { + close_db( *db_p ); + printf("Couldn't open %s: %s\n", path, db_strerror(ret)); + return ret; + } + return ret; +} + +void close_db( DB *db_p ) +{ + int ret = 0; + if( db_p ) + { + ret = db_p->close(db_p, 0); + } + + if (ret != 0) + { + printf("Couldn't close db_p: %s\n", db_strerror(ret)); + } + return; +} + +int find_pool_keys(DB *db_p_coll_attr, DB *db_p_keyval) +{ + int ret = 0; + DBC *dbc_p = NULL; + int i; + char type_string[11] = { 0 }; /* 32 bit type only needs 10 digits */ + PVFS_ds_type type; + DBT key, val; + int key_size; + char *key_string = NULL; + PVFS_handle pool_handle = PVFS_HANDLE_NULL; + + ret = db_p_coll_attr->cursor(db_p_coll_attr, NULL, &dbc_p, 0); + if( ret != 0 ) + { + printf("Unable to open cursor: %s\n", db_strerror(ret)); + return ret; + } + + for (i = 0, type = 1 << i; type < PVFS_TYPE_INTERNAL; i++, type = 1 << i) + { + snprintf(type_string, 11, "%u", type); + key_size = strlen(opts.host) + strlen(type_string) + + strlen("precreate-pool-") + 2; + key_string = malloc(key_size); + if(! key_string) + { + printf("Unable to allocate memory for pool name.\n"); + return ret; + } + snprintf(key_string, key_size, "precreate-pool-%s-%s", + opts.host, type_string); + + memset(&key, 0, sizeof(key)); + key.data = key_string; + key.size = key.ulen = key_size; + key.flags = DB_DBT_USERMEM; + + memset(&val, 0, sizeof(val)); + val.data = &pool_handle; + val.ulen = sizeof(pool_handle); + val.flags = DB_DBT_USERMEM; + + ret = dbc_p->c_get(dbc_p, &key, &val, DB_SET); + if (ret != 0) + { + printf("Unable to retrieve pool handle: %s\n", db_strerror(ret)); + return ret; + } + + /* Delete the handles in the range. */ + remove_preallocated_handles(db_p_keyval, pool_handle); + } + return(0); +} + +void print_keyval( DBT key, DBT val ) +{ + struct dbpf_keyval_db_entry *k; + uint64_t vh, kh; + uint32_t vi; + + + k = key.data; + printf("(%llu)", llu(k->handle)); + if( key.size == 8 ) + { + printf("()(%d) -> ", key.size); + } + else if( key.size == 16 ) + { + char *tmp; + tmp = k->key; + kh = *(uint64_t *)tmp; + printf("(%llu)(%d) -> ", llu(kh), key.size); + } + else + { + printf("(%s)(%d) -> ", k->key, key.size); + } + + if( strncmp(k->key, "dh", 3) == 0 || strncmp(k->key, "de", 3) == 0 ) + { + int s = 0; + while(s < val.size ) + { + vh = *(uint64_t *)(val.data + s); + printf("(%llu)", llu(vh)); + s += sizeof(TROVE_handle); + } + printf("(%d)\n", val.size); + + } + + else if( strncmp(k->key, "md", 3) == 0 ) + { + /* just print the name of the distribution, the rest is extra. + * the PINT_dist struct is packed/encoded before writing to db. that + * means the first uint32_t bytes are the length of the string, skip + * it. */ + char *dname = val.data + sizeof(uint32_t); + printf("(%s)(%d)\n", dname, val.size ); + } + + else if( strlen(k->key) > 2 && val.size == 8 ) + { + /* should be cases of filename to handle */ + vh = *(uint64_t *)val.data; + printf("(%llu)(%d)\n", llu(vh), val.size ); + } + + else if( (key.size == 8 || key.size == 16 ) && val.size == 4 ) + { + vi = *(uint32_t *)val.data; + printf("(%u)(%d)\n", vi, val.size ); + } + else + { + /* just print out the size of the data, try not to segfault */ + printf("(%d)\n", val.size); + } + + return; +} + +void remove_preallocated_handles(DB *db_p_keyval, PVFS_handle pool_handle) +{ + int ret = 0; + DBC *dbc_p = NULL; + DBT key, val; + struct dbpf_keyval_db_entry key_entry; + struct dbpf_keyval_db_entry *key_ptr; + + ret = db_p_keyval->cursor(db_p_keyval, NULL, &dbc_p, 0); + if( ret != 0 ) + { + printf("Unable to open cursor: %s\n", db_strerror(ret)); + return; + } + + memset(&key, 0, sizeof(key)); + memset(&key_entry, 0, sizeof(key_entry)); + key_entry.handle = pool_handle; + key.data = &key_entry; + key.size = key.ulen = sizeof(TROVE_handle); + key.flags = DB_DBT_USERMEM; + + memset(&val, 0, sizeof(val)); + + ret = dbc_p->c_get(dbc_p, &key, &val, DB_SET); + if (ret != 0) + { + printf("Unable to remove count of handles in pool %llu: %s\n", + llu(pool_handle), db_strerror(ret)); + return; + } + if (key.size != 8 || val.size != 4 || key_entry.handle != pool_handle) + { + printf("Problem removing count of handles in pool %llu\n", + llu(pool_handle)); + return; + } + printf("Removing: "); + print_keyval( key, val ); + if (opts.remove) + { + ret = dbc_p->c_del(dbc_p, 0); + if (ret != 0) + { + key_ptr = (struct dbpf_keyval_db_entry *) key.data; + + printf("Unable to remove count record for pool %llu: %s\n", + llu(key_ptr->handle), db_strerror(ret)); + return; + } + } + + memset(&key, 0, sizeof(key)); + memset(&val, 0, sizeof(val)); + ret = dbc_p->c_get(dbc_p, &key, &val, DB_NEXT); + key_ptr = (struct dbpf_keyval_db_entry *) key.data; + while (ret == 0 && key.size == 16 && val.size == 0 && + key_ptr->handle == pool_handle) + { + printf("Removing: "); + print_keyval( key, val ); + if (opts.remove) + { + ret = dbc_p->c_del(dbc_p, 0); + if (ret != 0) + { + printf("*** REMOVE FAILED ***\n"); + } + } + memset(&key, 0, sizeof(key)); + memset(&val, 0, sizeof(val)); + ret = dbc_p->c_get(dbc_p, &key, &val, DB_NEXT); + key_ptr = (struct dbpf_keyval_db_entry *) key.data; + } +/* +printf("ret=%d, key.size=%u, val.size=%u, key_ptr->handle=%llu, handle=%llu\n", +ret, key.size, val.size, llu(key_ptr->handle), llu(*((PVFS_handle *) key_ptr->key))); +*/ + + dbc_p->c_close( dbc_p ); + return; +} + +int process_args(int argc, char ** argv) +{ + int ret = 0, option_index = 0; + static struct option long_opts[] = + { + {"help",0,0,0}, + {"remove",0,0,0}, + {"dbpath",1,0,0}, + {"hexdir",1,0,0}, + {"host",1,0,0}, + {0,0,0,0} + }; + + memset(&opts, 0, sizeof(options_t)); + + while ((ret = getopt_long(argc, argv, "", long_opts, &option_index)) != -1) + { + switch (option_index) + { + case 0: /* help */ + print_help(argv[0]); + exit(0); + + case 1: /* remove */ + opts.remove = 1; + break; + + case 2: /*dbpath */ + strncpy(opts.dbpath, optarg, PATH_MAX); + break; + + case 3: /* hexdir */ + strncpy(opts.hexdir, optarg, PATH_MAX); + break; + + case 4: /* host */ + strncpy(opts.host, optarg, PATH_MAX); + break; + + default: + print_help(argv[0]); + return -1; + } + option_index = 0; + } + + if( strncmp( opts.dbpath,"",PATH_MAX ) == 0 ) + { + fprintf(stderr, "\nError: --dbpath option must be given.\n"); + print_help(argv[0]); + return -1; + } + + if( strncmp( opts.hexdir,"",PATH_MAX ) == 0 ) + { + fprintf(stderr, "\nError: --hexdir option must be given.\n"); + print_help(argv[0]); + return -1; + } + + if (! opts.host) + { + fprintf(stderr, "\nError: --host option must be given.\n"); + print_help(argv[0]); + return -1; + } + + return 0; +} + +void print_help(char *progname) +{ + fprintf(stderr, + "\nThis utility is used to remove handles from a preallocation pool.\n"); + fprintf(stderr, "\nUsage:\t\t%s --dbpath --hexdir \\\n" + "\t\t\t--host \n", + progname); + fprintf(stderr, "\nExample:\t%s --dbpath /tmp/pvfs2-space --hexdir 4e3f77a5 \\\n" + "\t\t\t--host tcp://devorange6:3397\n", + progname); + fprintf(stderr, "\nOptions:\n" + "\t--remove\t\tRemove preallocated handles\n" + "\t--help\t\t\tThis message.\n" + "\t--dbpath \t\tThe path of the server's " + "StorageSpace. The path\n\t\t\t\tshould contain " + "collections.db and \n\t\t\t\tstorage_attributes.db\n" + "\t--hexdir \t\tThe directory in dbpath that " + "contains\n\t\t\t\tcollection_attributes.db, " + "dataspace_attrbutes.db\n\t\t\t\tand keyval.db\n" + "\t--host\t\thost whose preallocated " + "handles should be removed\n"); + return; +} + +#define DBPF_KEYVAL_DB_ENTRY_KEY_SIZE(_size) \ + (_size - sizeof(TROVE_handle)) + +int PINT_trove_dbpf_keyval_compare( + DB * dbp, const DBT * a, const DBT * b) +{ + struct dbpf_keyval_db_entry db_entry_a; + struct dbpf_keyval_db_entry db_entry_b; + + memcpy(&db_entry_a, a->data, sizeof(struct dbpf_keyval_db_entry)); + memcpy(&db_entry_b, b->data, sizeof(struct dbpf_keyval_db_entry)); + + if(db_entry_a.handle != db_entry_b.handle) + { + return (db_entry_a.handle < db_entry_b.handle) ? -1 : 1; + } + + if(a->size > b->size) + { + return 1; + } + + if(a->size < b->size) + { + return -1; + } + + /* must be equal */ + return (memcmp(db_entry_a.key, db_entry_b.key, + DBPF_KEYVAL_DB_ENTRY_KEY_SIZE(a->size))); +} + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ + diff --git a/src/apps/fuse/pvfs2fuse.c b/src/apps/fuse/pvfs2fuse.c index dcab18c..7be48e4 100644 --- a/src/apps/fuse/pvfs2fuse.c +++ b/src/apps/fuse/pvfs2fuse.c @@ -20,8 +20,8 @@ char *pvfs2fuse_version = "0.01"; #define FUSE_USE_VERSION 27 -#include -#include +#include +#include #include #include #include @@ -748,7 +748,7 @@ static int pvfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler if (filler(buf, cur_file, NULL, 0)) break; } - token += rd_response.pvfs_dirent_outcount; + token = rd_response.token; if (rd_response.pvfs_dirent_outcount) { @@ -756,7 +756,7 @@ static int pvfs_fuse_readdir(const char *path, void *buf, fuse_fill_dir_t filler rd_response.dirent_array = NULL; } - } while(rd_response.pvfs_dirent_outcount == pvfs_dirent_incount); + } while(token != PVFS_READDIR_END); return 0; } diff --git a/src/apps/kernel/linux/pvfs2-client-core.c b/src/apps/kernel/linux/pvfs2-client-core.c index 2af5cfe..bb096b8 100644 --- a/src/apps/kernel/linux/pvfs2-client-core.c +++ b/src/apps/kernel/linux/pvfs2-client-core.c @@ -37,7 +37,6 @@ #include "pint-perf-counter.h" #include "pvfs2-encode-stubs.h" #include "pint-event.h" -#include "src/client/sysint/osd.h" #ifdef USE_MMAP_RA_CACHE #include "mmap-ra-cache.h" @@ -2523,23 +2522,6 @@ static inline void package_downcall_members( "FS mount got root handle %llu on fs id %d\n", llu(root_handle), vfs_request->mntent->fs_id); - /* - * If any of the servers are OSDs, pass this info to the - * kernel, along with their SCSI addresses. Optionally, - * we could also bring up, say, iscsi connections here too. - */ - { - pvfs2_fs_mount_response_t *mr = - &vfs_request->out_downcall.resp.fs_mount; - - osd_find_scsi_addresses(vfs_request->mntent->fs_id, - &mr->num_osd, mr->osd_addrs, - sizeof(mr->osd_addrs) / - sizeof(mr->osd_addrs[0])); - gossip_debug(GOSSIP_CLIENTCORE_DEBUG, - "Found %d OSDs\n", mr->num_osd); - } - vfs_request->out_downcall.type = PVFS2_VFS_OP_FS_MOUNT; vfs_request->out_downcall.status = 0; vfs_request->out_downcall.resp.fs_mount.fs_id = diff --git a/src/apps/storage/data/40ec61b1/bstreams/00000062/7ffffffffffffffe.bstream b/src/apps/storage/data/40ec61b1/bstreams/00000062/7ffffffffffffffe.bstream new file mode 100644 index 0000000..8b43c15 --- /dev/null +++ b/src/apps/storage/data/40ec61b1/bstreams/00000062/7ffffffffffffffe.bstream @@ -0,0 +1 @@ +dev -p normal-mic diff --git a/src/apps/storage/meta/40ec61b1/collection_attributes.db b/src/apps/storage/meta/40ec61b1/collection_attributes.db new file mode 100644 index 0000000000000000000000000000000000000000..9747160951051946e11474d66872fe82575c0a35 GIT binary patch literal 8192 zcmeI%K?;IE6b9gb6r&(`Q5Wa}N-jE2C>jQ$q2i)TbcinC0a~_f(Gl7NEjmOql9l_Q z&HrGSH*c6>_;!y00HueC(04F0$wZGf`Rti;7rWURY6u)2)@`5IT^ZIZo9nr|^S#N0 z0u-PC1t>rP3Q&Lo6rcbFC_sU~3YcE~yI&um5#?OuBu8oFE?4P4kNtn&gDVP9fC3bt z00k&O0SZun0u-RYuLXvtQ#b$fI&7#S(Q{jCE5H~k4a#bj1X+~EfCIJgd~Z30s*1dh Q-6-6y-8wGHO`hp9Pw!YBSpWb4 literal 0 HcmV?d00001 diff --git a/src/apps/storage/meta/40ec61b1/dataspace_attributes.db b/src/apps/storage/meta/40ec61b1/dataspace_attributes.db new file mode 100644 index 0000000000000000000000000000000000000000..d14809851b37ea33f008e602e0a13e2dad21f8ce GIT binary patch literal 8192 zcmZQzU|?VbVh~6&WM$w4F$91Z%s|M2gkhjs_zVLh2Lr?Rr8>R(?^$5N3`|g#0+5E8 z36~sYjE2By2#kinXb6mkz-S1JhQMeDjE2By2#kinXb6mkz-R~zXb6D%>d5_d9)<(F zjI1Jj2Y5^P6!=W|AMkzQU%-EbuYqq0zXLx5!)X71K%;Ba^3f0&4S~@R7!85Z5Eu=C z(GVC7fzc2c4S^9F0s#z+uxVFHLqG^-00#r(zyDxR&j2(ZxoZeg@`4$Hx1dWv^}oF` zEf~biFlA!^v0;3Watn|I(0nHF95av&G#@nEOjQ6h|NnnrKNSRk<|8JkAwn?s|Ht8e vS*ZIL_H#0T*f2gsH;@FH&q!nU1A`a>$Z$U_ymiY^!yjfO$o-HxexL{dpg=zk literal 0 HcmV?d00001 diff --git a/src/apps/storage/meta/40ec61b1/keyval.db b/src/apps/storage/meta/40ec61b1/keyval.db new file mode 100644 index 0000000000000000000000000000000000000000..5aae72af565bd8360546f00a127c05d0d544d62b GIT binary patch literal 8192 zcmeI1F;2r!42J(#XcbgZQx%Do5vfx*Zi7@Mg-9u_$m@m#N9foC^Z-2u0}=~I=+=c3 z5bQKB$;{H_xAYXt_WNypnXCr@PLJ7i(#3^2S9(gP$yqqq>*y0M0wy<)hp$yHgwd(I zTm1&jI!T8FNPq-LfCNZ@1W14cNPq-LfCNb3qy%hNZ|~~^MB=&|SqX zL*B(pEO)~F|D->R%}Ia+NPq-LfCNZ@1W14cNPqJXUglUHQ*oM^mwU*|N@B2WR`vWu3EOh_? literal 0 HcmV?d00001 diff --git a/src/apps/storage/meta/collections.db b/src/apps/storage/meta/collections.db new file mode 100644 index 0000000000000000000000000000000000000000..d6bfa8ec51ca5650ea2a07fe02f61afec1806cb3 GIT binary patch literal 8192 zcmeI%F$%&k6vpxIl@@eL!3%f+2R(r&5p?J*6!aD@p2T~21Q+*!OApZZic*~%yZi%> zgqMVbU#3SS$vmPR)|KWls6B?kI2Y+?rN?=3m(8Tz<9c~LKf9%3SRpOFAG7Zy9Rdg- zfB*srAbfjYTi3f0Vau;vul?0n=DRgt{@)trw0&V#^MUq?yTifi_ zS<;7yN$y!Wt$n!UTIm?ids$OeYQA&|dpa|B$q+yQ0R#|0009ILKmY**5I~@&fX(W~ lyxu$izNo0jBJ+RE-{Nir5I_I{1Q0*~0R#|0009L43q0RF2@(JR literal 0 HcmV?d00001 diff --git a/src/apps/ucache/shmem_util.c b/src/apps/ucache/shmem_util.c deleted file mode 100644 index a6792c9..0000000 --- a/src/apps/ucache/shmem_util.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "shmem_util.h" - -/** Aquire a SysV shared memory segment. - * key_file and proj_id are identifiers used by ftok to uniquly identify the - * segment. size is the desired size in bytes. memory is an optional parameter - * that refers to a void pointer which can be set to the address of the segment. - */ -int shmem_init(char *key_file, int proj_id, size_t size, void **memory) -{ - int key = 0; - int id = 0; - - /* Generate key based on key_file and proj_id */ - key = ftok(key_file, proj_id); - if(key < 0) - { - return -1; - } - - /* Allocate Shared Memory Segment */ - id = shmget(key, size, FLAGS | IPC_CREAT | IPC_EXCL); - if(id < 0) - { - return -1; - } - - /* Reference to pointer not required. */ - if(memory) - { - *memory = shmat(id, NULL, AT_FLAGS); - if(*memory == (void *) -1) - { - return -1; - } - } - else - { - if(shmat(id, NULL, AT_FLAGS) == (void *) 0) - { - return -1; - } - } - - return 0; -} - -/** Destroy SysV shared memory segment */ -int shmem_destroy(char *key_file, int proj_id) -{ - int key = 0; - int id = 0; - int rc = 0; - - /* Generate key based on key_file and proj_id */ - key = ftok(key_file, proj_id); - if(key < 0) - { - return -1; - } - - /* Allocate Shared Memory Segment */ - id = shmget(key, 0, FLAGS); - if(id < 0) - { - return -1; - } - - rc = shmctl(id, IPC_RMID, NULL); - if(rc < 0) - { - return -1; - } - return 0; -} - diff --git a/src/apps/ucache/shmem_util.h b/src/apps/ucache/shmem_util.h deleted file mode 100644 index a096871..0000000 --- a/src/apps/ucache/shmem_util.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SHMEM_UTIL_H -#define SHMEM_UTIL_H - -#define _XOPEN_SOURCE 500 - -#include -#include -#include -#include -#include -#include - -#define SVSHM_MODE (SHM_R | SHM_W | SHM_R>>3 | SHM_R>>6) -#define FLAGS (SVSHM_MODE) -#define AT_FLAGS 0 - -int shmem_init(char *key_file, int proj_id, size_t size, void **memory); -int shmem_destroy(char *key_file, int proj_id); - -#endif diff --git a/src/apps/ucache/ucached.c b/src/apps/ucache/ucached.c index 4dd8562..b534642 100644 --- a/src/apps/ucache/ucached.c +++ b/src/apps/ucache/ucached.c @@ -37,6 +37,7 @@ static int create_ucache_shmem(void); static int destroy_ucache_shmem(char dest_locks, char dest_ucache); static void clean_up(void); static int ucached_lockchk(void); +void check_rc(int rc); void check_rc(int rc) { @@ -69,8 +70,17 @@ static void clean_up(void) } gossip_debug(GOSSIP_UCACHED_DEBUG, "INFO: ucached exiting...PID=%d\n", pid); + errno = 0; rc = unlink(FIFO1); + if(rc < 0) + { + perror("unklink of FIFO1 ucached failed"); + } rc = unlink(FIFO2); + if(rc < 0) + { + perror("unklink of FIFO2 ucached failed"); + } } } @@ -204,16 +214,12 @@ static int execute_cmd(char cmd) break; } /* Close Daemon */ - case 'x': - writefd = open(FIFO2, O_WRONLY); - rc = write(writefd, "SUCCESS\tExiting ucached", BUFF_SIZE); - while(rc <= 0) - { - rc = write(writefd, "SUCCESS\tExiting ucached", BUFF_SIZE); - } - remove(UCACHED_STARTED); + case 'x': + writefd = open(FIFO2, O_WRONLY); close(writefd); close(readfd); + remove(UCACHED_STARTED); + printf("SUCCESS\tExiting ucached\n"); exit(EXIT_SUCCESS); break; default: diff --git a/src/apps/ucache/ucached_cmd.c b/src/apps/ucache/ucached_cmd.c index 7197d9b..aeacb39 100644 --- a/src/apps/ucache/ucached_cmd.c +++ b/src/apps/ucache/ucached_cmd.c @@ -1,4 +1,4 @@ - +#include #include #include "ucached.h" @@ -17,11 +17,12 @@ int main(int argc, char **argv) } int rc = 0; - void *rp; + //void *rp; char this_cmd = argv[1][0]; if(this_cmd == 's') { + /* char ps_buff[256]; FILE *pipe = popen("ps -e | grep -w ucached", "r"); rp = fgets(ps_buff, 256, pipe); @@ -29,14 +30,28 @@ int main(int argc, char **argv) { rc = remove(FIFO1); rc = remove(FIFO2); - /* Crank up the daemon since it's not running */ + // Crank up the daemon since it's not running + rc = system("ucached"); + puts("SUCCESS: Daemon started"); + } + */ + /* Look in /tmp for ucached.started indicating the ucached has been started */ + FILE *ucached_started = fopen(UCACHED_STARTED, "r"); + if(!ucached_started) + { + rc = remove(FIFO1); + rc = remove(FIFO2); + // Crank up the daemon since it's not running rc = system("ucached"); + ucached_started = fopen(UCACHED_STARTED, "w"); + if(ucached_started) + fclose(ucached_started); puts("SUCCESS: Daemon started"); } else { puts("FAILURE: Daemon already started"); - puts(ps_buff); + //puts(ps_buff); } return 1; } diff --git a/src/apps/ucache/ucached_common.c b/src/apps/ucache/ucached_common.c deleted file mode 100644 index 03ccde7..0000000 --- a/src/apps/ucache/ucached_common.c +++ /dev/null @@ -1,16 +0,0 @@ -/* ucached_common.c */ - -#include "ucached.h" - -int myread(int readfd, char *buffer) -{ - int count = read(readfd, buffer, BUFF_SIZE); - return count; -} - -void mywrite(int writefd, const char *src, char *buffer) -{ - strcpy(buffer, src); - write(writefd, buffer, BUFF_SIZE); - memset(buffer, 0, BUFF_SIZE); -} diff --git a/src/apps/ucache/watch_daemons b/src/apps/ucache/watch_daemons deleted file mode 100644 index 749f710..0000000 --- a/src/apps/ucache/watch_daemons +++ /dev/null @@ -1 +0,0 @@ -watch --interval=1 pgrep -l ucached diff --git a/src/apps/ucache/watch_ipcs b/src/apps/ucache/watch_ipcs deleted file mode 100644 index 7714e86..0000000 --- a/src/apps/ucache/watch_ipcs +++ /dev/null @@ -1 +0,0 @@ -watch --interval=1 ipcs -m diff --git a/src/apps/ucache/watch_log b/src/apps/ucache/watch_log deleted file mode 100644 index 1911bdc..0000000 --- a/src/apps/ucache/watch_log +++ /dev/null @@ -1 +0,0 @@ -watch --interval=1 'cat /tmp/ucached.log | cat -n | sort -r -g' diff --git a/src/apps/user/checkset_shmall_shmmax.linux b/src/apps/user/checkset_shmall_shmmax.linux new file mode 100755 index 0000000..77e52bd --- /dev/null +++ b/src/apps/user/checkset_shmall_shmmax.linux @@ -0,0 +1,231 @@ +#!/bin/bash + +# (C) 2011 Clemson University +# +# See COPYING in top-level directory. + +echo + +#check for root permission +if [ $(whoami) != 'root' ] +then echo "Please run this script as root user..." + exit 1 +fi + +changes=0 #counting the number of selected changes + +echo "Memory Info:" +echo =========================================================================== +#total ram +MemTotal=`cat /proc/meminfo | grep MemTotal: | awk '{ print $2 }'` +MemTotalBytes=`echo "$MemTotal * 1024" | bc` +MemTotalMB=`echo "scale=4; $MemTotal / 1024" | bc` +echo "Total Memory = $MemTotalBytes (B) = $MemTotalMB (MB)" +#other info +PageSize=`getconf PAGE_SIZE` +MemTotalPages=`echo "$MemTotalBytes / $PageSize" | bc` +echo -e "PAGE_SIZE = $PageSize (B)\n" + +#Read from config file using the source command +source ucache.conf + +#UcacheSizeMB=256 +UcacheSizeKB=`echo "$UcacheSizeMB * 1024" | bc` +UcacheSizeB=`echo "$UcacheSizeMB * (1024 * 1024)" | bc` + +#BlocksInCache=1024 +BlockSize=`echo "($UcacheSizeMB * (1024 * 1024))/$BlocksInCache" | bc` +BlockSizeMB=`echo "scale=4; $BlockSize / (1024 * 1024)" | bc` + +#LockSize=24 #sizeof(POSIX MUTEX) +NumLocks=$[ $BlocksInCache + 1 ] #plus one for the global ucache lock +LockMemoryRequirement=`echo "$NumLocks * $LockSize" | bc` + +#UCACHE_STATS_64=3 +#UCACHE_STATS_16=2 +UCACHE_AUX_SIZE=`echo "$LockMemoryRequirement + ($UCACHE_STATS_64 * 8) + ($UCACHE_STATS_16 * 2)" | bc` + +ShmemTotalB=`echo "$UcacheSizeB + $UCACHE_AUX_SIZE" | bc` +ShmemTotalMB=`echo "scale=4; $ShmemTotalB / (1024 * 1024)" | bc` +ShmemTotalPages=`echo "($ShmemTotalB / 4096)" | bc` + + +echo "User Cache Considerations:" +echo =========================================================================== +echo "Values read from ucache.conf:" +echo "-->ucache size = $UcacheSizeB (B) = $UcacheSizeMB (MB)" +echo "-->BlocksInCache = $BlocksInCache" +echo "-->LockSize = $LockSize (B)" +echo "-->UCACHE_STATS_64 = $UCACHE_STATS_64" +echo -e "-->UCACHE_STATS_16 = $UCACHE_STATS_16\n" + +echo "Calculated Values Based on Input:" +echo "BlockSize = $BlockSize (B) = $BlockSizeMB (MB)" +echo "NumLocks = $NumLocks" +echo "Shared memory required for ucache auxiliary structure (including locks and stats) = $UCACHE_AUX_SIZE (B)" +echo "Shared memory required for all ucache blocks = $UcacheSizeB (B)" +echo -e "Total shared memory requirement = $ShmemTotalB (B) = $ShmemTotalMB\ + (MB) = $ShmemTotalPages (Pages)\n" + + +echo Current SYS V IPC Limits: +echo =========================================================================== +echo "given by: 'ipcs -lm'" +ipcs -lm + +echo "Current shmall and shmmax values:" +echo =========================================================================== +#shmall +CurrentShmall=`cat /proc/sys/kernel/shmall` +echo "shmall located at: /proc/sys/kernel/shmall = $CurrentShmall (Pages)" +#shmmax +CurrentShmmax=`cat /proc/sys/kernel/shmmax` +echo -e "shmmax located at: /proc/sys/kernel/shmmax = $CurrentShmmax (Bytes)\n" + + +echo "/* For the ucache to work: shmall and shmmax both must be >= the memory + * required for the ucache, its locks, and any other applications using shared + * memory. Note that 'shmall' represents the overall #of memory pages that can + * be used by SYSV shared memory. Also, 'shmmax' represents the maximum size + * (in bytes) of any single shared memory segment. + */" +echo "Recommendations:" +echo =========================================================================== + +#adjust shmem +reqChanges=0 + +ucacheSlice=`echo "scale=8; $ShmemTotalPages / $MemTotalPages" | bc` +echo "Note: $ucacheSlice = Fraction of total memory required for ucache" +compare_result1=`echo "$ucacheSlice >= 1" | bc` +compare_result2=`echo "$ucacheSlice >= 0.4" | bc` + +if [ $compare_result1 == 1 ] + then + echo "*** Insufficient memory for current ucache configuration." + echo "--> Adjust ucache.config and/or total memory and try again." + exit 0 +elif [ $compare_result2 == 1 ] + then + echo "*** Enough memory can be allocated." + echo "--> You may still want to adjust the ucache.config though." + NewShmall=$MemTotalPages + NewShmmax=$MemTotalBytes +else + echo "*** Enough memory can be allocated." + NewShmall=`echo "$MemTotalPages / 2" | bc` #half total memory should do + NewShmmax=`echo "$NewShmall * ($PageSize)" | bc` +fi + + +if [[ $CurrentShmall -lt $ShmemTotalPages ]] + then + reqChanges=$(($reqChanges+1)) + echo "--> increase shmall for proper ucache functionality" +fi + +if [[ $CurrentShmmax -lt $UcacheSizeB ]] + then + reqChanges=$(($reqChanges+1)) + echo "--> increase shmmax for proper ucache functionality" +fi + +echo + +if [[ $reqChanges == 0 ]] + then + echo "No changes were required for the ucache to function. Exiting..." + exit 0 +fi + +function askYN { + echo -n "(Y/N)? " + read answer + + while [[ $answer != "Y" && $answer != "y" \ + && $answer != "n" && $answer != "N" ]] + do + echo "Error: you entered: '$answer'" + echo -n "Please enter Y or N: " + read answer + done + + if [[ $answer != 'Y' && $answer != 'y' ]] + then + return 0 + else + return 1 + fi +} + +if [[ $CurrentShmall -lt $ShmemTotalPages ]] + then + echo "Mark 'shmall' to be changed to $NewShmall?" + askYN + changeShmall=$? + echo +fi + +if [[ $CurrentShmmax -lt $UcacheSizeB ]] + then + echo "Mark 'shmmax' to be changed to $NewShmmax?" + askYN + changeShmmax=$? + echo +fi + +echo "You selected the following changes:" +echo =========================================================================== +if [[ $changeShmall == 1 ]] + then + changes=$(($changes+1)) + echo "shmall = $NewShmall" +fi + +if [[ $changeShmmax == 1 ]] + then + changes=$(($changes+1)) + echo "smmax = $NewShmmax" +fi +echo + +if [[ $changes == 0 ]] + then + echo "No changes to be made. Exiting..." + exit 0 +fi + +echo "Are you sure you want to perform these changes?" + +askYN +performChanges=$? +echo + +#Finally Perform Changes +if [[ $performChanges == 1 ]] + then + echo -e "performing selected changes...\n" + if [[ $changeShmall == 1 ]] + then + SHMALL_CHANGE="sysctl -w kernel.shmall=$NewShmall" + echo "Running: $SHMALL_CHANGE" + $SHMALL_CHANGE + fi + if [[ $changeShmmax == 1 ]] + then + SHMMAX_CHANGE="sysctl -w kernel.shmmax=$NewShmmax" + echo "Running: $SHMMAX_CHANGE" + $SHMMAX_CHANGE + fi + echo + echo -e "To make these changes persistent add (or adjust) the\nfollowing 2 lines in /etc/sysctl.conf:\n\n" + echo "kernel.shmall=$NewShmall" + echo "kernel.shmmax=$NewShmmax" + echo -e "\n\nThen run: sysctl -p\nAfter that, restart the system and the changes should persist.\n" + else + exit 0 +fi + +echo -e "\nDONE" +exit 0 + diff --git a/src/apps/user/ucache.conf b/src/apps/user/ucache.conf new file mode 100644 index 0000000..00e6f38 --- /dev/null +++ b/src/apps/user/ucache.conf @@ -0,0 +1,6 @@ +UcacheSizeMB="256" +BlocksInCache="1024" +LockSize="40" +UCACHE_STATS_64="3" +UCACHE_STATS_16="2" + diff --git a/src/client/cp-library/orangefs-client.c b/src/client/cp-library/orangefs-client.c new file mode 100644 index 0000000..962a634 --- /dev/null +++ b/src/client/cp-library/orangefs-client.c @@ -0,0 +1,1022 @@ +#ifdef WIN32 +#include +#endif + +#include +#include +#include + +#ifndef _WIN64 +#error _WIN64 NOT DEFINED! +#endif + +#define CREATING_DLL /* will export the functions into the DLL to create */ + +#include "orangefs-client.h" +#include "pint-util.h" +#include "str-utils.h" +#include "pvfs2.h" +#include "gossip.h" + +/* GLOBALS */ +OrangeFS_mntent **mntents = { 0 }; +const PVFS_util_tab *tab; +BOOL MVS_DEBUGGING = FALSE; /* will be set to true in orangefs_enable_debug */ + + +void orangefs_enable_debug(int debugType, const char *filePath, int64_t gossip_mask) +{ + switch (debugType) + { + case OrangeFS_DEBUG_SYSLOG : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); /* current un-implemented on windows */ + break; + case OrangeFS_DEBUG_STDERR : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_stderr(); + break; + case OrangeFS_DEBUG_FILE: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_file(filePath, "a"); + break; + case OrangeFS_DEBUG_MVS: + gossip_set_debug_mask(1, gossip_mask); + MVS_DEBUGGING = TRUE; + /* dont need to enable anything to do this */ + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_STDERR: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_stderr(); + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_FILE: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_file(filePath, "a"); + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_MVS: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_STDERR | OrangeFS_DEBUG_FILE: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_stderr(); + gossip_enable_file(filePath, "a"); + break; + case OrangeFS_DEBUG_STDERR | OrangeFS_DEBUG_MVS: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_stderr(); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_FILE | OrangeFS_DEBUG_MVS: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_file(filePath, "a"); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_STDERR | OrangeFS_DEBUG_FILE : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_stderr(); + gossip_enable_file(filePath, "a"); + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_STDERR | OrangeFS_DEBUG_MVS : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_stderr(); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_SYSLOG | OrangeFS_DEBUG_FILE | OrangeFS_DEBUG_MVS : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_file(filePath, "a"); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_STDERR | OrangeFS_DEBUG_FILE | OrangeFS_DEBUG_MVS : + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_stderr(); + gossip_enable_file(filePath, "a"); + MVS_DEBUGGING = TRUE; + break; + case OrangeFS_DEBUG_ALL: + gossip_set_debug_mask(1, gossip_mask); + gossip_enable_syslog(0); + gossip_enable_stderr(); + gossip_enable_file(filePath, "a"); + MVS_DEBUGGING = TRUE; + break; + default : + break; + } +} + +void orangefs_debug_print(const char *format, ...) +{ +#ifdef ORANGEFS_DEBUG + char buff[GOSSIP_BUF_SIZE]; + va_list argp; + +#ifdef WIN32 + if (MVS_DEBUGGING) + OutputDebugString("---- DEBUG ----\n"); +#endif + + va_start(argp, format); + vsprintf(buff, format, argp); + va_end(argp); + + gossip_debug(OrangeFS_WIN_CLIENT_DEBUG, buff, argp); + +#ifdef WIN32 + if (MVS_DEBUGGING) + OutputDebugString(buff); +#endif +#endif +} + +/* caller needs to allocate the space and zero out the **mntents parameter */ +int orangefs_load_tabfile(const char *path, + OrangeFS_mntent **mntents, + char *error_msg, + size_t error_msg_len) +{ + /* currently unimplemented */ +} + +int orangefs_initialize(OrangeFS_fsid *fsid, /* not currently implemented */ + OrangeFS_credential *cred, /* not currently implemented */ + OrangeFS_mntent *mntent, + char *error_msg, + size_t error_msg_len, + const char *tabF, + int debugType, + const char *debugFile) +{ + char exe_path[MAX_PATH]; + char *tabfile, *p; + int ret, malloc_flag, i, found_one = 0; + + ret = GetModuleFileName(NULL, exe_path, MAX_PATH); + if (ret) + { + tabfile = (char *)malloc(MAX_PATH); + malloc_flag = TRUE; + + /* cut off the exe file, just get up to last directory */ + p = strrchr(exe_path, '\\'); + if (p) + *p = '\0'; + + strcpy(tabfile, exe_path); + strcat(tabfile, tabF); /* now we have absolute path to orangefstab file */ + } + + if (tabfile) + { + orangefs_debug_print("Using tabfile: %s\n", tabfile); + do { + ret = PVFS_sys_initialize(GOSSIP_NO_DEBUG); + if (ret != 0) + { + orangefs_debug_print("Failed to initialize the file system with call to: PVFS_sys_initialize()\n"); + free(tabfile); + return -1; + } + + /* read tab file */ + tab = PVFS_util_parse_pvfstab(tabfile); + if (!tab) + { + orangefs_debug_print("Failed to parse tabfile: %s", tabfile); + free(tabfile); + return -1; + } + + /* initialize file system */ + ret = PVFS_sys_fs_add(&tab->mntent_array[0]); /* currently only supports adding 1 mount entry at a time with a call to orangefs_initialize() */ + if (ret == 0) + found_one = 1; + + /* now copy the mntent data into the mntnet passed in */ + memcpy(mntent, &tab->mntent_array[0], sizeof(OrangeFS_mntent)); + + if (!found_one) + { + orangefs_debug_print("orangefs_initialize: could not initialize any file systems from %s\n", tab->tabfile_name); + PINT_release_pvfstab(); + PVFS_sys_finalize(); + ret = -1; + } + + if (ret < 0) + { + orangefs_debug_print("ERROR initializing OrangeFS file system...\nTrying again in 30 seconds...\n"); + Sleep(30000); /* 30 seconds */ + } + }while (ret < 0); + } + + if (malloc_flag) + free(tabfile); + + /* is there a gossip cleanup or turn off function? */ + + return 0; +} + +OrangeFS_mntent *get_mntent(OrangeFS_fsid *fs_id) +{ + int count = 0; + while ((*mntents)) + { + if ((*mntents)[count].fs_id == *fs_id) + return (&(*mntents)[count]); + else + ++count; + } + return (OrangeFS_mntent *) NULL; +} + +int orangefs_lookup(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, OrangeFS_handle *handle) +{ + int ret = 0; + OrangeFS_mntent *mntent = get_mntent(fs_id); + PVFS_sysresp_lookup resp; + + /* lookup the given path on the FS - do not follow links */ + ret = PVFS_sys_lookup(*fs_id, path, (PVFS_credentials *) cred, &resp, + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); + + if (ret == 0) + *handle = (OrangeFS_handle) resp.ref.handle; + + return ret; +} + +/* split path into base dir and entry name components */ +int split_path(char *fs_path, char *base_dir, size_t base_dir_len, char *entry_name, size_t entry_name_len) +{ + int ret; + + /* get base dir */ + ret = PINT_get_base_dir(fs_path, base_dir, base_dir_len); + + if (ret != 0) + return ret; + + /* get entry name */ + ret = PINT_remove_base_dir(fs_path, entry_name, entry_name_len); + + return ret; +} + +#define FS_MAX_LINKS 256 + +/* Workaround to follow PVFS2 file links */ +int orangefs_lookup_follow_links(OrangeFS_fsid fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_sysresp_lookup *resp, OrangeFS_attr *attr) +{ + char *real_path, *link_path; + PVFS_sysresp_getattr resp_getattr; + int ret, link_flag, count; + + if (fs_path == NULL || strlen(fs_path) == 0 || cred == NULL || + resp == NULL) + return -1; + + orangefs_debug_print("orangefs-client sizeof(resp_getattr): %u\n", sizeof(resp_getattr)); + + /* copy to be used for link paths */ + real_path = strdup(fs_path); + count = 0; + do + { + link_flag = FALSE; + + /* lookup the given path on the FS */ + ret = PVFS_sys_lookup(fs_id, real_path, (PVFS_credentials *) cred, (PVFS_sysresp_lookup *) resp, + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); + if (ret != 0) + break; + + /* check if it's a link */ + memset(&resp_getattr, 0, sizeof(resp_getattr)); + ret = PVFS_sys_getattr(((PVFS_sysresp_lookup *)resp)->ref, PVFS_ATTR_SYS_ALL_NOHINT, (PVFS_credentials *) cred, + &resp_getattr, NULL); + if (ret != 0) + break; + + if (resp_getattr.attr.link_target != NULL) + { + /* we have a link -- compute the target */ + link_flag = TRUE; + link_path = (char *) malloc(ORANGEFS_PATH_MAX + 4); + if (link_path == NULL) + { + PVFS_util_release_sys_attr(&resp_getattr.attr); + ret = -1; + break; + } + /* if link target is not absolute, prepend path */ + memset(link_path, 0, ORANGEFS_PATH_MAX + 4); + if (resp_getattr.attr.link_target[0] != '/') + { + char *lastslash = strrchr(real_path, '/'); + if (lastslash) + { + /* copy path including slash */ + strncpy(link_path, real_path, lastslash - real_path + 1); + strncat(link_path, resp_getattr.attr.link_target, + ORANGEFS_PATH_MAX - strlen(link_path)); + } + else + { + free(link_path); + PVFS_util_release_sys_attr(&resp_getattr.attr); + ret = -1; + break; + } + } + else + { + /* use absolute link target */ + strncpy(link_path, resp_getattr.attr.link_target, ORANGEFS_PATH_MAX); + } + link_path[ORANGEFS_PATH_MAX-1] = '\0'; + /* get file name */ + free(real_path); + real_path = (char *) malloc(ORANGEFS_PATH_MAX + 4); + ret = PVFS_util_resolve(link_path, (PVFS_fs_id *)&fs_id, real_path, ORANGEFS_PATH_MAX); + if (ret == -PVFS_ENOENT) + { + /* link may not include the mount point, e.g. /mnt/pvfs2. + in this case just use link_path */ + strncpy(real_path, link_path, ORANGEFS_PATH_MAX); + ret = 0; + } + free(link_path); + /* free attr buffer */ + PVFS_util_release_sys_attr(&resp_getattr.attr); + } + else + { + /* copy the attr to the buffer */ + if (attr != NULL) + { + memcpy(attr, &resp_getattr.attr, sizeof(OrangeFS_attr)); + } + else + { + PVFS_util_release_sys_attr(&resp_getattr.attr); + } + } + } while (ret == 0 && link_flag && (++count) < MAX_LINKS); + + free(real_path); + + if (ret == 0 && count >= FS_MAX_LINKS) + { + ret = -1; + } + + return ret; +} + +/* get the attributes of the target of a symlink */ +int orangefs_get_symlink_attr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, char *target, OrangeFS_object_ref *ref, OrangeFS_attr *attr) +{ + int ret; + char link_path[ORANGEFS_PATH_MAX + 4]; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || target == NULL || ref == NULL || + cred == NULL || attr == NULL) + { + return -1; + } + + if (strlen(fs_path) == 0 || strlen(target) == 0) + { + return -1; + } + + /* if target is relative, append to fs_path */ + memset(link_path, 0, ORANGEFS_PATH_MAX+4); + if (target[0] != '/') + { + strncpy(link_path, fs_path, ORANGEFS_PATH_MAX); + if (link_path[strlen(link_path)-1] != '/') + { + strcat(link_path, "/"); + } + strncat(link_path, target, ORANGEFS_PATH_MAX - strlen(link_path)); + } + else + { + OrangeFS_fsid fs_id; + /* use PVFS_util_resolve to remove preceding mount point */ + ret = PVFS_util_resolve(target, (PVFS_fs_id *) &fs_id, link_path, ORANGEFS_PATH_MAX); + if (ret == -PVFS_ENOENT) + { + /* just use target as path */ + strncpy(link_path, target, ORANGEFS_PATH_MAX); + } + else if (ret != 0) + { + return ret; + } + } + + /* lookup the target and retrieve the attributes */ + ret = orangefs_lookup_follow_links(*fs_id, cred, link_path, (OrangeFS_sysresp_lookup *) &resp_lookup, attr); + + return ret; +} + +int orangefs_create(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, unsigned perms, OrangeFS_handle *handle) /* maybe pass in a string parameter for setting output errors */ +{ + size_t len; + char *base_dir, *entry_name; + int ret = 0; + PVFS_object_ref parent_ref; + PVFS_sysresp_lookup resp_lookup; + PVFS_sys_attr attr; + PVFS_sysresp_create resp_create; + + if (fs_id == 0 || cred == NULL || path == NULL) + return -1; + + /* cannot be only a dir */ + if (path[strlen(path)-1] == '/') + return -1; + + /* split path into path and file components */ + len = strlen(path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + return -1; + + ret = split_path(path, base_dir, len, entry_name, len); + if (ret != 0) + goto create_exit; + + /* lookup parent path - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, base_dir, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + if (ret != 0) + goto create_exit; + + parent_ref.fs_id = resp_lookup.ref.fs_id; /* NOT SURE IF WE WANT THIS OR THE FS_ID PASSED IN */ + parent_ref.handle = resp_lookup.ref.handle; + + /* create file */ + memset(&attr, 0, sizeof(PVFS_sys_attr)); + attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + attr.owner = cred->userid; + attr.group = cred->group_array[0]; + /* configurable in options */ + attr.perms = perms; + attr.atime = attr.mtime = attr.ctime = time(NULL); + + ret = PVFS_sys_create(entry_name, parent_ref, attr, + (PVFS_credentials *) cred, NULL, &resp_create, NULL, NULL); + if (ret) + goto create_exit; + + *handle = (OrangeFS_handle) resp_create.ref.handle; + +create_exit: + free(base_dir); + free(entry_name); + + return ret; +} + +int orangefs_create_h(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_handle parent_handle, char *name, unsigned perms, OrangeFS_handle *handle) +{ + int ret = 0; + PVFS_object_ref parent_ref; + PVFS_sys_attr attr; + PVFS_sysresp_create resp_create; + + if (fs_id == 0 || cred == NULL || name == NULL) + return -1; + + /* cannot be only a dir */ + if (name[strlen(name)-1] == '/') + return -1; + + parent_ref.fs_id = (PVFS_fs_id) fs_id; + parent_ref.handle = (PVFS_handle) parent_handle; + + /* create file */ + memset(&attr, 0, sizeof(OrangeFS_attr)); + attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + attr.owner = cred->userid; + attr.group = cred->group_array[0]; + /* configurable in options */ + attr.perms = perms; + attr.atime = attr.mtime = attr.ctime = time(NULL); + + ret = PVFS_sys_create(name, parent_ref, attr, (PVFS_credentials *) cred, NULL, &resp_create, NULL, NULL); + + if (ret) + return -1; + + *handle = (OrangeFS_handle) resp_create.ref.handle; + + return ret; +} + +int orangefs_remove(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path) +{ + size_t len; + char *base_dir, *entry_name; + int ret = 0; + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref parent_ref; + + if (fs_id == 0 || cred == NULL || strlen(path) == 0 || path == NULL) + return -1; + + /* split path into path and file components */ + len = strlen(path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(path, base_dir, len, entry_name, len); + if (ret != 0) + goto remove_exit; + + /* lookup parent entry - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, base_dir, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + if (ret != 0) + goto remove_exit; + + parent_ref.fs_id = (PVFS_fs_id) fs_id; + parent_ref.handle = resp_lookup.ref.handle; + + ret = PVFS_sys_remove(entry_name, parent_ref, (PVFS_credentials *) cred, NULL); + +remove_exit: + free(base_dir); + free(entry_name); + + return ret; +} + +int orangefs_remove_h(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_handle handle, char *name) +{ + int ret = 0; + PVFS_object_ref parent_ref; + + if (fs_id == 0 || cred == NULL) + return -1; + + parent_ref.handle = (PVFS_handle) handle; + parent_ref.fs_id = (PVFS_fs_id) fs_id; + + ret = PVFS_sys_remove(name, parent_ref, (PVFS_credentials *) cred, NULL); + + return ret; +} + +int orangefs_rename(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *old_path, char *new_path) +{ + size_t len; + char *old_base_dir, *old_entry_name, + *new_base_dir, *new_entry_name; + PVFS_sysresp_lookup old_resp_lookup, new_resp_lookup; + PVFS_object_ref old_parent_ref, new_parent_ref; + int ret = 0; + + if (fs_id == 0 || cred == NULL || old_path == NULL || new_path == NULL || strlen(old_path) == 0 || strlen(new_path) == 0) + return -1; + + /* split paths into path and file components */ + len = strlen(old_path) + 1; + old_base_dir = (char *) malloc(len); + old_entry_name = (char *) malloc(len); + if (old_base_dir == NULL || old_entry_name == NULL) + { + return -1; + } + ret = split_path(old_path, old_base_dir, len, old_entry_name, len); + if (ret != 0) + goto rename_exit; + + old_parent_ref.fs_id = old_resp_lookup.ref.fs_id; + old_parent_ref.handle = old_resp_lookup.ref.handle; + + len = strlen(new_path) + 1; + new_base_dir = (char *) malloc(len); + new_entry_name = (char *) malloc(len); + if (new_base_dir == NULL || new_entry_name == NULL) + { + return -1; + } + ret = split_path(new_path, new_base_dir, len, new_entry_name, len); + if (ret != 0) + goto rename_exit; + + new_parent_ref.fs_id = new_resp_lookup.ref.fs_id; + new_parent_ref.handle = new_resp_lookup.ref.handle; + + /* rename/move the file */ + ret = PVFS_sys_rename(old_entry_name, old_parent_ref, new_entry_name, + new_parent_ref, (PVFS_credentials *) cred, NULL); + +rename_exit: + free(old_entry_name); + free(old_base_dir); + free(new_entry_name); + free(new_base_dir); + + return ret; +} + +int orangefs_getattr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, OrangeFS_attr *attr) +{ + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (path == NULL || strlen(path) == 0 || + attr == NULL || cred == NULL) + return -1; + + /* lookup file - follow links + attributes will be read and placed in attr */ + ret = orangefs_lookup_follow_links(*fs_id, cred, path, (OrangeFS_sysresp_lookup *) &resp_lookup, attr); + if (ret != 0) + goto fs_getattr_exit; + + /* free attr bufs */ + PVFS_util_release_sys_attr((PVFS_sys_attr *) attr); + +fs_getattr_exit: + + return ret; +} + +int orangefs_setattr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_attr *attr) +{ + int ret; + PVFS_sysresp_lookup resp_lookup; + PVFS_sys_attr pvfsAttr; + + /* to workout the compiler warnings when you can't cast non-pointer values even though they're the same type according to their binary */ + memcpy(&pvfsAttr, attr, sizeof(OrangeFS_attr)); + + if (fs_path == NULL || strlen(fs_path) == 0 || cred == NULL) + return -1; + + /* lookup file - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, fs_path, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + if (ret != 0) + goto setattr_exit; + + /* set attributes */ + ret = PVFS_sys_setattr(resp_lookup.ref, pvfsAttr, (PVFS_credentials *) cred, NULL); + +setattr_exit: + + return ret; +} + +int orangefs_mkdir(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_handle *handle, unsigned perms) +{ + char *base_dir, *entry_name; + size_t len; + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref parent_ref; + PVFS_sys_attr attr; + PVFS_sysresp_mkdir resp_mkdir; + int ret; + + if (fs_path == NULL || strlen(fs_path) == 0 || cred == NULL) + return -1; + + /* split path into path and file components */ + len = strlen(fs_path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + { + return -1; + } + ret = split_path(fs_path, base_dir, len, entry_name, len); + if (ret != 0) + goto mkdir_exit; + + /* lookup parent path - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, base_dir, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + + if (ret != 0) + goto mkdir_exit; + + parent_ref.fs_id = resp_lookup.ref.fs_id; /* do we want this or the fs_id passed in to the function? */ + parent_ref.handle = resp_lookup.ref.handle; + + /* create file */ + memset(&attr, 0, sizeof(OrangeFS_attr)); + attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + attr.owner = cred->userid; + attr.group = cred->group_array[0]; + /* configurable in options */ + attr.perms = perms; + attr.atime = attr.mtime = attr.ctime = time(NULL); + + ret = PVFS_sys_mkdir(entry_name, parent_ref, attr, (PVFS_credentials *) cred, + &resp_mkdir, NULL); + + if (ret == 0) + *handle = (OrangeFS_handle) resp_mkdir.ref.handle; + +mkdir_exit: + free(entry_name); + free(base_dir); + + return ret; +} + +int orangefs_io(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, enum ORANGEFS_io_type io_type, char *fs_path, void *buffer, size_t buffer_len, uint64_t offset, OrangeFS_size *op_len) +{ + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref object_ref; + PVFS_Request file_req, mem_req; + PVFS_sysresp_io resp_io; + int ret; + + if (fs_path == NULL || strlen(fs_path) == 0 || + buffer == NULL || cred == NULL) + return -1; + + /* lookup file - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, fs_path, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + if (ret != 0) + goto io_exit; + + /* copy object ref */ + object_ref.fs_id = resp_lookup.ref.fs_id; + object_ref.handle = resp_lookup.ref.handle; + + /* get memory buffer */ + file_req = PVFS_BYTE; + + ret = PVFS_Request_contiguous(buffer_len, PVFS_BYTE, &(mem_req)); + if (ret != 0) + goto io_exit; + + /* perform io operation */ + ret = PVFS_sys_io(object_ref, file_req, offset, buffer, mem_req, (PVFS_credentials *) cred, &resp_io, (enum PVFS_io_type) io_type, NULL); + if (ret == 0 && op_len != NULL) + { + *op_len = resp_io.total_completed; + } + + PVFS_Request_free(&mem_req); + +io_exit: + + return ret; +} + +int orangefs_flush(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path) +{ + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || strlen(fs_path) == 0 || cred == NULL) + return -1; + + /* lookup file - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, fs_path, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + if (ret != 0) + goto flush_exit; + + /* flush file */ + ret = PVFS_sys_flush(resp_lookup.ref, (PVFS_credentials *) cred, NULL); + +flush_exit: + + return ret; +} + +int orangefs_find_files(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_ds_position *token, int32_t incount, int32_t *outcount, char **filename_array, OrangeFS_attr *attr_array) +{ + int ret, i; + PVFS_sysresp_lookup resp_lookup; + PVFS_sysresp_readdirplus resp_readdirplus; + PVFS_object_ref ref; + PVFS_sysresp_getattr resp_getattr; + + if (fs_path == NULL || strlen(fs_path) == 0 || token == NULL || + outcount == NULL || filename_array == NULL || attr_array == NULL || cred == NULL) + return -1; + + /* lookup path - follow links */ + ret = orangefs_lookup_follow_links(*fs_id, cred, fs_path, (OrangeFS_sysresp_lookup *) &resp_lookup, NULL); + + if (ret != 0) + goto readdir_exit; + + /* read up to incount entries, starting with token */ + memset(&resp_readdirplus, 0, sizeof(resp_readdirplus)); + ret = PVFS_sys_readdirplus(resp_lookup.ref, *token, incount, (PVFS_credentials *) cred, + PVFS_ATTR_SYS_ALL_NOHINT, &resp_readdirplus, NULL); + if (ret != 0) + goto readdir_exit; + + /* copy output results */ + *outcount = resp_readdirplus.pvfs_dirent_outcount; + if (*outcount != 0) + { + *token = resp_readdirplus.token; + + for (i = 0; i < *outcount; i++) + { + strncpy(filename_array[i], resp_readdirplus.dirent_array[i].d_name, ORANGEFS_NAME_MAX); + if (resp_readdirplus.stat_err_array[i] == 0) + { + memcpy(&attr_array[i], &resp_readdirplus.attr_array[i], sizeof(PVFS_sys_attr)); + /* TODO: DEBUG */ + if (resp_readdirplus.attr_array[i].link_target) + { + // orangefs_debug_print(" %s link: %s\n", filename_array[i], resp_readdirplus.attr_array[i].link_target); + } + } + else + { + /* attempt to get attrs with PVFS_sys_getattr */ + ref.fs_id = *fs_id; + ref.handle = resp_readdirplus.dirent_array[i].handle; + memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); + ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, (PVFS_credentials *) cred, + &resp_getattr, NULL); + if (ret == 0) + { + memcpy(&attr_array[i], &resp_getattr.attr, sizeof(OrangeFS_attr)); + } + else { + break; + } + } + /* get attributes of symbolic link if applicable */ + if (attr_array[i].link_target != NULL) + { + ref.fs_id = *fs_id; + ref.handle = resp_readdirplus.dirent_array[i].handle; + /* note: ignore return code... just use attrs of the symlink */ + orangefs_get_symlink_attr(fs_id, cred, fs_path, attr_array[i].link_target, (OrangeFS_object_ref *) &ref, &attr_array[i]); + } + + /* clear allocated fields */ + PVFS_util_release_sys_attr((PVFS_sys_attr *) &attr_array[i]); + } + + /* free memory */ + free(resp_readdirplus.dirent_array); + free(resp_readdirplus.stat_err_array); + free(resp_readdirplus.attr_array); + } + +readdir_exit: + + return ret; +} + +int orangefs_get_diskfreespace(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_size *free_bytes, OrangeFS_size *total_bytes) +{ + PVFS_sysresp_statfs resp_statfs; + int ret; + + if (free_bytes == NULL || total_bytes == NULL || cred == NULL) + { + return -1; + } + + ret = PVFS_sys_statfs(*fs_id, (PVFS_credentials *) cred, &resp_statfs, NULL); + + if (ret == 0) + { + *free_bytes = resp_statfs.statfs_buf.bytes_available; + *total_bytes = resp_statfs.statfs_buf.bytes_total; + } + + return ret; +} + +int orangefs_finalize() +{ + /* TODO */ + PVFS_sys_finalize(); + + return 0; +} + +int orangefs_credential_init(OrangeFS_credential *cred) +{ + if (cred == NULL) + return -1; + + memset(cred, 0, sizeof(OrangeFS_credential)); + + /* blank issuer */ + cred->issuer = strdup(""); + if (!cred->issuer) + { + return -1; + } + + return 0; +} + +int orangefs_credential_set_user(OrangeFS_credential *cred, OrangeFS_uid uid) +{ + if (cred == NULL) + return -1; + + cred->userid = uid; + + return 0; +} + +void orangefs_credential_add_group(OrangeFS_credential *cred, OrangeFS_gid gid) +{ + OrangeFS_gid *group_array; + unsigned int i; + + if (cred->num_groups > 0) + { + /* copy existing group array and append group */ + cred->num_groups++; + group_array = (OrangeFS_gid *) malloc(sizeof(OrangeFS_gid) * cred->num_groups); + for (i = 0; i < cred->num_groups - 1; i++) + { + group_array[i] = cred->group_array[i]; + } + group_array[cred->num_groups-1] = gid; + + free(cred->group_array); + cred->group_array = group_array; + } + else + { + /* add one group */ + cred->group_array = (OrangeFS_gid *) malloc(sizeof(OrangeFS_gid)); + cred->group_array[0] = gid; + cred->num_groups = 1; + } +} + +void orangefs_cleanup_credentials(OrangeFS_credential *cred) +{ + if (cred) + { + if (cred->group_array) + { + free(cred->group_array); + cred->group_array = NULL; + } + if (cred->signature) + { + free(cred->signature); + cred->signature = NULL; + } + if (cred->issuer) + { + free(cred->issuer); + cred->issuer = NULL; + } + + cred->num_groups = 0; + cred->sig_size = 0; + } +} + +/* check if credential is a member of group */ +int orangefs_credential_in_group(OrangeFS_credential *cred, OrangeFS_gid group) +{ + unsigned int i; + + for (i = 0; i < cred->num_groups; i++) + { + if (cred->group_array[i] == group) + { + return 1; + } + } + + return 0; +} + +/* set the credential timeout to current time + timeout + use ORANGEFS_DEFAULT_CREDENTIAL_TIMEOUT */ +void orangefs_credential_set_timeout(OrangeFS_credential *cred, OrangeFS_time timeout) +{ + cred->timeout = PINT_util_get_current_time() + timeout; +} + diff --git a/src/client/cp-library/orangefs-client.h b/src/client/cp-library/orangefs-client.h new file mode 100644 index 0000000..72729ef --- /dev/null +++ b/src/client/cp-library/orangefs-client.h @@ -0,0 +1,352 @@ + +#ifndef __CLIENTLIBRARY_H +#define __CLIENTLIBRARY_H + +#include +#include + +#undef DLL_CODE +#ifdef CREATING_DLL + #define DLL_CODE __declspec(dllexport) +#else + #define DLL_CODE __declspec(dllimport) +#endif + + +typedef uint32_t OrangeFS_fsid; +typedef uint32_t OrangeFS_uid; +typedef uint32_t OrangeFS_gid; +typedef uint32_t OrangeFS_permissions; +typedef uint64_t OrangeFS_time; +typedef uint64_t OrangeFS_size; +typedef uint64_t OrangeFS_flags; +typedef uint64_t OrangeFS_ds_position; +typedef void* OrangeFS_handle; +typedef unsigned char *OrangeFS_signature; + +#define ORANGEFS_DEFAULT_CREDENTIAL_TIMEOUT (3600) /* 1 hour */ +#define ORANGEFS_NAME_MAX 256 +#define ORANGEFS_PATH_MAX 4096 +#define MAX_LINKS 256 + +/* masks to set lower level server and client debugging with gossip */ +#define OrangeFS_NO_DEBUG (uint64_t)0 +#define OrangeFS_BMI_DEBUG_TCP ((uint64_t)1 << 0) +#define OrangeFS_BMI_DEBUG_CONTROL ((uint64_t)1 << 1) +#define OrangeFS_BMI_DEBUG_OFFSETS ((uint64_t)1 << 2) +#define OrangeFS_BMI_DEBUG_GM ((uint64_t)1 << 3) +#define OrangeFS_JOB_DEBUG ((uint64_t)1 << 4) +#define OrangeFS_SERVER_DEBUG ((uint64_t)1 << 5) +#define OrangeFS_STO_DEBUG_CTRL ((uint64_t)1 << 6) +#define OrangeFS_STO_DEBUG_DEFAULT ((uint64_t)1 << 7) +#define OrangeFS_FLOW_DEBUG ((uint64_t)1 << 8) +#define OrangeFS_BMI_DEBUG_GM_MEM ((uint64_t)1 << 9) +#define OrangeFS_REQUEST_DEBUG ((uint64_t)1 << 10) +#define OrangeFS_FLOW_PROTO_DEBUG ((uint64_t)1 << 11) +#define OrangeFS_NCACHE_DEBUG ((uint64_t)1 << 12) +#define OrangeFS_CLIENT_DEBUG ((uint64_t)1 << 13) +#define OrangeFS_REQ_SCHED_DEBUG ((uint64_t)1 << 14) +#define OrangeFS_ACACHE_DEBUG ((uint64_t)1 << 15) +#define OrangeFS_TROVE_DEBUG ((uint64_t)1 << 16) +#define OrangeFS_TROVE_OP_DEBUG ((uint64_t)1 << 17) +#define OrangeFS_DIST_DEBUG ((uint64_t)1 << 18) +#define OrangeFS_BMI_DEBUG_IB ((uint64_t)1 << 19) +#define OrangeFS_DBPF_ATTRCACHE_DEBUG ((uint64_t)1 << 20) +#define OrangeFS_MMAP_RCACHE_DEBUG ((uint64_t)1 << 21) +#define OrangeFS_LOOKUP_DEBUG ((uint64_t)1 << 22) +#define OrangeFS_REMOVE_DEBUG ((uint64_t)1 << 23) +#define OrangeFS_GETATTR_DEBUG ((uint64_t)1 << 24) +#define OrangeFS_READDIR_DEBUG ((uint64_t)1 << 25) +#define OrangeFS_IO_DEBUG ((uint64_t)1 << 26) +#define OrangeFS_DBPF_OPEN_CACHE_DEBUG ((uint64_t)1 << 27) +#define OrangeFS_PERMISSIONS_DEBUG ((uint64_t)1 << 28) +#define OrangeFS_CANCEL_DEBUG ((uint64_t)1 << 29) +#define OrangeFS_MSGPAIR_DEBUG ((uint64_t)1 << 30) +#define OrangeFS_CLIENTCORE_DEBUG ((uint64_t)1 << 31) +#define OrangeFS_CLIENTCORE_TIMING_DEBUG ((uint64_t)1 << 32) +#define OrangeFS_SETATTR_DEBUG ((uint64_t)1 << 33) +#define OrangeFS_MKDIR_DEBUG ((uint64_t)1 << 34) +#define OrangeFS_VARSTRIP_DEBUG ((uint64_t)1 << 35) +#define OrangeFS_GETEATTR_DEBUG ((uint64_t)1 << 36) +#define OrangeFS_SETEATTR_DEBUG ((uint64_t)1 << 37) +#define OrangeFS_ENDECODE_DEBUG ((uint64_t)1 << 38) +#define OrangeFS_DELEATTR_DEBUG ((uint64_t)1 << 39) +#define OrangeFS_ACCESS_DEBUG ((uint64_t)1 << 40) +#define OrangeFS_ACCESS_DETAIL_DEBUG ((uint64_t)1 << 41) +#define OrangeFS_LISTEATTR_DEBUG ((uint64_t)1 << 42) +#define OrangeFS_PERFCOUNTER_DEBUG ((uint64_t)1 << 43) +#define OrangeFS_STATE_MACHINE_DEBUG ((uint64_t)1 << 44) +#define OrangeFS_DBPF_KEYVAL_DEBUG ((uint64_t)1 << 45) +#define OrangeFS_LISTATTR_DEBUG ((uint64_t)1 << 46) +#define OrangeFS_DBPF_COALESCE_DEBUG ((uint64_t)1 << 47) +#define OrangeFS_ACCESS_HOSTNAMES ((uint64_t)1 << 48) +#define OrangeFS_FSCK_DEBUG ((uint64_t)1 << 49) +#define OrangeFS_BMI_DEBUG_MX ((uint64_t)1 << 50) +#define OrangeFS_BSTREAM_DEBUG ((uint64_t)1 << 51) +#define OrangeFS_BMI_DEBUG_PORTALS ((uint64_t)1 << 52) +#define OrangeFS_USER_DEV_DEBUG ((uint64_t)1 << 53) +#define OrangeFS_DIRECTIO_DEBUG ((uint64_t)1 << 54) +#define OrangeFS_MGMT_DEBUG ((uint64_t)1 << 55) +#define OrangeFS_MIRROR_DEBUG ((uint64_t)1 << 56) +#define OrangeFS_WIN_CLIENT_DEBUG ((uint64_t)1 << 57) +#define OrangeFS_SECURITY_DEBUG ((uint64_t)1 << 58) +#define OrangeFS_USRINT_DEBUG ((uint64_t)1 << 59) + +/* gossip debugging-type masks */ +#define OrangeFS_DEBUG_SYSLOG (1 << 0) +#define OrangeFS_DEBUG_STDERR (1 << 1) +#define OrangeFS_DEBUG_FILE (1 << 2) +#define OrangeFS_DEBUG_MVS (1 << 3) /* microsoft visual studio debugging output window */ +#define OrangeFS_DEBUG_ALL (OrangeFS_DEBUG_SYSLOG | \ + OrangeFS_DEBUG_STDERR | \ + OrangeFS_DEBUG_FILE | \ + OrangeFS_DEBUG_MVS) + +/* permission bits */ +#define OrangeFS_O_EXECUTE (1 << 0) +#define OrangeFS_O_WRITE (1 << 1) +#define OrangeFS_O_READ (1 << 2) +#define OrangeFS_G_EXECUTE (1 << 3) +#define OrangeFS_G_WRITE (1 << 4) +#define OrangeFS_G_READ (1 << 5) +#define OrangeFS_U_EXECUTE (1 << 6) +#define OrangeFS_U_WRITE (1 << 7) +#define OrangeFS_U_READ (1 << 8) +/* no OrangeFS_U_VTX (sticky bit) */ +#define OrangeFS_G_SGID (1 << 10) +#define OrangeFS_U_SUID (1 << 11) + +/* valid permission mask */ +#define OrangeFS_PERM_VALID \ +(OrangeFS_O_EXECUTE | OrangeFS_O_WRITE | OrangeFS_O_READ | OrangeFS_G_EXECUTE | \ + OrangeFS_G_WRITE | OrangeFS_G_READ | OrangeFS_U_EXECUTE | OrangeFS_U_WRITE | \ + OrangeFS_U_READ | OrangeFS_G_SGID | OrangeFS_U_SUID) + +#define OrangeFS_USER_ALL (OrangeFS_U_EXECUTE|OrangeFS_U_WRITE|OrangeFS_U_READ) +#define OrangeFS_GROUP_ALL (OrangeFS_G_EXECUTE|OrangeFS_G_WRITE|OrangeFS_G_READ) +#define OrangeFS_OTHER_ALL (OrangeFS_O_EXECUTE|OrangeFS_O_WRITE|OrangeFS_O_READ) + +#define OrangeFS_ALL_EXECUTE (OrangeFS_U_EXECUTE|OrangeFS_G_EXECUTE|OrangeFS_O_EXECUTE) +#define OrangeFS_ALL_WRITE (OrangeFS_U_WRITE|OrangeFS_G_WRITE|OrangeFS_O_WRITE) +#define OrangeFS_ALL_READ (OrangeFS_U_READ|OrangeFS_G_READ|OrangeFS_O_READ) + +/** PVFS I/O operation types, used in both system and server interfaces. + */ +enum ORANGEFS_io_type +{ + ORANGEFS_IO_READ = 1, + ORANGEFS_IO_WRITE = 2 +}; + +#define orangefs_read(fs_id, \ + cred, \ + fs_path, \ + buffer, \ + buffer_len, \ + offset, \ + write_len) orangefs_io(fs_id, cred, ORANGEFS_IO_READ, fs_path, buffer, buffer_len, offset, write_len) + + +#define orangefs_write(fs_id, \ + cred, \ + fs_path, \ + buffer, \ + buffer_len, \ + offset, \ + write_len) orangefs_io(fs_id, cred, ORANGEFS_IO_WRITE, fs_path, buffer, buffer_len, offset, write_len) + +/** Object and attribute types. */ +/* If this enum is modified the server parameters related to the precreate pool + * batch and low threshold sizes may need to be modified to reflect this + * change. Also, the OrangeFS_DS_TYPE_COUNT #define below must be updated */ +typedef enum +{ + OrangeFS_TYPE_NONE = 0, + OrangeFS_TYPE_METAFILE = (1 << 0), + OrangeFS_TYPE_DATAFILE = (1 << 1), + OrangeFS_TYPE_DIRECTORY = (1 << 2), + OrangeFS_TYPE_SYMLINK = (1 << 3), + OrangeFS_TYPE_DIRDATA = (1 << 4), + OrangeFS_TYPE_INTERNAL = (1 << 5) /* for the server's private use */ +} OrangeFS_ds_type; + +#define decode_OrangeFS_ds_type decode_enum +#define encode_OrangeFS_ds_type encode_enum +#define OrangeFS_DS_TYPE_COUNT 7 /* total number of DS types defined in + * the OrangeFS_ds_type enum */ + +typedef struct +{ + OrangeFS_uid userid; /* user id */ + uint32_t num_groups; /* length of group_array */ + OrangeFS_gid* group_array; /* groups for which the user is a member */ + char* issuer; /* alias of the issuing server */ + OrangeFS_time timeout; /* seconds after epoch to time out */ + uint32_t sig_size; /* length of the signature in bytes */ + OrangeFS_signature signature; /* digital signature */ +}OrangeFS_credential; + +/** object reference (uniquely refers to a single file, directory, or + symlink). +*/ +typedef struct +{ + OrangeFS_handle handle; + OrangeFS_fsid fs_id; + int32_t __pad1; +} OrangeFS_object_ref; + +enum OrangeFS_flowproto_type +{ + DUMP_OFFSETS = 1, + BMI_CACHE = 2, + MULTIQUEUE = 3 +}; +#define FLOWPROTO_DEFAULT MULTIQUEUE + +/* supported wire encoding types */ +enum ORANGEFS_encoding_type +{ + DIRECT = 1, + LE_BFIELD = 2, + XDR = 3 +}; + +/** Holds results of a lookup operation (reference to object). */ +/* if error_path is passed in NULL then nothing returned on error */ +/* otherwise up to error_path_size chars of unresolved path */ +/* segments are passed out in null terminated string */ +typedef struct +{ + OrangeFS_object_ref ref; + char *error_path; /* on error, the unresolved path segments */ + int error_path_size; /* size of the buffer provided by the user */ +}OrangeFS_sysresp_lookup; + +/* these values must correspond to the defined encoding types above */ +#define ENCODING_INVALID_MIN 0 +#define ENCODING_INVALID_MAX 4 +#define ENCODING_SUPPORTED_MIN ENCODING_LE_BFIELD +#define ENCODING_SUPPORTED_MAX ENCODING_LE_BFIELD +#define ENCODING_IS_VALID(enc_type) \ +((enc_type > ENCODING_INVALID_MIN) && \ + (enc_type < ENCODING_INVALID_MAX)) +#define ENCODING_IS_SUPPORTED(enc_type) \ +((enc_type >= ENCODING_SUPPORTED_MIN) && \ + (enc_type <= ENCODING_SUPPORTED_MAX)) +#define ORANGEFS_ENCODING_DEFAULT ENCODING_LE_BFIELD + +/* figure out the size of a pointer */ +/* +#if defined(__WORDSIZE) + #define ORANGEFS_SIZEOF_VOIDP __WORDSIZE +#elif defined(BITS_PER_LONG) + #define ORANGEFS_SIZEOF_VOIDP BITS_PER_LONG +#elif defined(INTPTR_MIN) + #if INTPTR_MIN == INT32_MIN + #define ORANGEFS_SIZEOF_VOIDP 32 + #elif INTPTR_MIN == INT64_MIN + #define ORANGEFS_SIZEOF_VOIDP 64 + #endif +#elif defined(_WIN64) + #define ORANGEFS_SIZEOF_VOIDP 64 +#elif defined(WIN32) + #define ORANGEFS_SIZEOF_VOIDP 32 +#else + #error "Unhandled size of void pointer" +#endif + */ + +#ifdef _WIN64 +#define ORANGEFS_SIZEOF_VOIDP 64 +#else +#define ORANGEFS_SIZEOF_VOIDP 32 +#endif + +/* we need to align some variables in 32bit case to match alignment + * in 64bit case + */ +#if ORANGEFS_SIZEOF_VOIDP == 32 +#define ORANGEFS_ALIGN_VAR(_type, _name) \ + _type _name; \ + int32_t __pad##_name +#else +#define ORANGEFS_ALIGN_VAR(_type, _name) _type _name +#endif + +typedef struct +{ + char **orangefs_config_servers; /**< addresses of servers with config info */ + int32_t num_orangefs_config_servers; /**< changed to int32_t so that size of structure does not change */ + char *first_orangefs_config_server; /**< first of the entries above that works */ + char *orangefs_fs_name; /**< name of PVFS2 file system */ + enum OrangeFS_flowproto_type flowproto; /**< flow protocol */ + enum OrangeFS_encoding_type encoding; /**< wire data encoding */ + OrangeFS_fsid fs_id; /**< fs id, filled in by system interface when it looks up the fs */ + /* int32_t for portable, fixed size structure */ + int32_t default_num_dfiles; /**< Default number of dfiles mount option value */ + int32_t integrity_check; /**< Check to determine whether the mount process must perform the integrity checks on the config files */ + /* the following fields are included for convenience; + * useful if the file system is "mounted" */ + char *mnt_dir; /**< local mount path */ + char *mnt_opts; /**< full option list */ +}OrangeFS_mntent; + +/** Describes attributes for a file, directory, or symlink. */ +typedef struct +{ + OrangeFS_uid owner; + OrangeFS_gid group; + ORANGEFS_ALIGN_VAR(OrangeFS_permissions, perms); + OrangeFS_time atime; + OrangeFS_time mtime; + OrangeFS_time ctime; + OrangeFS_size size; + ORANGEFS_ALIGN_VAR(char *, link_target);/**< NOTE: caller must free if valid */ + ORANGEFS_ALIGN_VAR(int32_t, dfile_count); /* Changed to int32_t so that size of structure does not change */ + ORANGEFS_ALIGN_VAR(uint32_t, mirror_copies_count); + ORANGEFS_ALIGN_VAR(char*, dist_name); /**< NOTE: caller must free if valid */ + ORANGEFS_ALIGN_VAR(char*, dist_params); /**< NOTE: caller must free if valid */ + OrangeFS_size dirent_count; + OrangeFS_ds_type objtype; + OrangeFS_flags flags; + uint32_t mask; + OrangeFS_size blksize; +}OrangeFS_attr; + +#ifdef __cplusplus +extern "C" +{ +#endif +int DLL_CODE orangefs_initialize(OrangeFS_fsid *fsid, OrangeFS_credential *cred, OrangeFS_mntent *mntent, char *error_msg, size_t error_msg_len, const char *tabfile, int debugType, const char *debugFile); +int DLL_CODE orangefs_load_tabfile(const char *path, OrangeFS_mntent **mntents, char *error_msg, size_t error_msg_len); +int DLL_CODE orangefs_lookup(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, OrangeFS_handle *handle); +int DLL_CODE orangefs_lookup_follow_links(OrangeFS_fsid fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_sysresp_lookup *resp, OrangeFS_attr *attr); +int DLL_CODE orangefs_get_symlink_attr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, char *target, OrangeFS_object_ref *ref, OrangeFS_attr *attr); +int DLL_CODE orangefs_create(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, unsigned perms, OrangeFS_handle *handle); +int DLL_CODE orangefs_create_h(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_handle parent_handle, char *name, unsigned perms, OrangeFS_handle *handle); +int DLL_CODE orangefs_remove(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path); +int DLL_CODE orangefs_remove_h(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_handle handle, char *name); +int DLL_CODE orangefs_rename(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *old_path, char *new_path); +int DLL_CODE orangefs_getattr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *path, OrangeFS_attr *attr); +int DLL_CODE orangefs_setattr(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_attr *attr); +int DLL_CODE orangefs_mkdir(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_handle *handle, unsigned perms); +int DLL_CODE orangefs_io(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, enum ORANGEFS_io_type io_type, char *fs_path, void *buffer, size_t buffer_len, uint64_t offset, OrangeFS_size *op_len); +int DLL_CODE orangefs_flush(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path); +int DLL_CODE orangefs_find_files(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, char *fs_path, OrangeFS_ds_position *token, int32_t incount, int32_t *outcount, char **filename_array, OrangeFS_attr *attr_array); +int DLL_CODE orangefs_get_diskfreespace(OrangeFS_fsid *fs_id, OrangeFS_credential *cred, OrangeFS_size *free_bytes, OrangeFS_size *total_bytes); +int DLL_CODE orangefs_finalize(); +int DLL_CODE orangefs_credential_init(OrangeFS_credential *cred); +int DLL_CODE orangefs_credential_set_user(OrangeFS_credential *cred, OrangeFS_uid uid); +void DLL_CODE orangefs_credential_add_group(OrangeFS_credential *cred, OrangeFS_gid gid); +void DLL_CODE orangefs_cleanup_credentials(OrangeFS_credential *cred); +int DLL_CODE orangefs_credential_in_group(OrangeFS_credential *cred, OrangeFS_gid group); +void DLL_CODE orangefs_credential_set_timeout(OrangeFS_credential *cred, OrangeFS_time timeout); +void DLL_CODE orangefs_enable_debug(int debugType, const char *filePath, int64_t gossip_mask); +void DLL_CODE orangefs_debug_print(const char *format, ...); +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/src/client/jni/README b/src/client/jni/README new file mode 100644 index 0000000..d413889 --- /dev/null +++ b/src/client/jni/README @@ -0,0 +1,63 @@ +# (C) 2012 Clemson University +# See COPYING in top-level directory. +=============================================================================== +Brief Documentation - OrangeFS JNI and Hadoop Client + + Exposing OrangeFS Direct Client User Interface Calls to Java Developers + through JNI. + +=============================================================================== +Step 1: + + JNI Only Instructions: + + ./configure --prefix=/opt/orangefs --enable-shared \ + --enable-jni --with-jdk= + make + sudo make install + + JNI and Hadoop Instructions: + + ./configure --prefix=/opt/orangefs --enable-shared \ + --enable-jni --with-jdk= \ + --enable-hadoop --with-hadoop= + make + sudo make install + + For comprehensive documentation on using Hadoop with OrangeFS, please see: + http://www.omnibond.com/orangefs/docs/v_2_8_8/index.htm#Hadoop_Client.htm + +=============================================================================== +Step 2: + + *Note: The environment variable LD_LIBRARY_PATH and JNI_LIBRARY_PATH should + contain the path of your JNI libraries and other required library paths. + + ex: + export LD_LIBRARY_PATH=/opt/orangefs/lib + export JNI_LIBRARY_PATH=/opt/orangefs/lib + +=============================================================================== +Step 3: + + Use the .jar files in your Java applications. Be sure to include the full + path names of the .jar files needed by passing the -cp option to javac + and java. + + example file Main.java: + + import org.orangefs.usrint.*; + + public class Main + { + public static final void main(String args[]) + { + Orange fs = Orange.getInstance(); + fs.posix.mkdir("/mnt/orangefs/test", fs.posix.f.S_IRWXU); + } + } + + example of building and running Main.java: + + javac -cp ".:/opt/orangefs/lib/ofs_jni.jar" Main.java + java -cp ".:/opt/orangefs/lib/ofs_jni.jar" Main diff --git a/src/client/jni/lib/NOTICE.txt b/src/client/jni/lib/NOTICE.txt new file mode 100644 index 0000000..5554dfc --- /dev/null +++ b/src/client/jni/lib/NOTICE.txt @@ -0,0 +1,6 @@ +Apache Commons Logging +Copyright 2003-2007 The Apache Software Foundation + +This product includes software developed by +The Apache Software Foundation (http://www.apache.org/). + diff --git a/src/client/jni/lib/commons-logging-1.1.1.LICENSE.txt b/src/client/jni/lib/commons-logging-1.1.1.LICENSE.txt new file mode 100644 index 0000000..75b5248 --- /dev/null +++ b/src/client/jni/lib/commons-logging-1.1.1.LICENSE.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/client/jni/lib/commons-logging-1.1.1.jar b/src/client/jni/lib/commons-logging-1.1.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..8758a96b70cfba9466bacca19c0d99b87cf53734 GIT binary patch literal 60841 zcmbTd1CS`evMoBcZDWsZ&+M^n+qP}nwr$(Ctv$BizW1JY-aY^SxN-jLsOavB%8csH zTCplKt4dB17z7I7Kdvxf7qNq|ONMubl8A7T&yp?}5v97s9t|2E$N z0sx@=cQI)J8F3L|MI~Bkk!ZO|i$QvXF6c-2cffG=AUrS01+)a_;ynZpDnSjZf`y4O zhm3D;Yw*%*;^IHncwCL0$!3ye$h$&S)_qyV27=?<6@fg0pFz1eSs59yAf%HJjQ%H) zFIm%6<#2s1_Yh*^1@*K~Z7wDW*?`ll@6DUM$cw3eLK2c|aoqYy6tVkUSvkhm8Qt*f zOyK)5B2PlC;LC)%NYL`7Y#D(%;bAXy9EJx}IZX+%2t7~fDki_K(BcZ=bG83QG(v$P4|M<*XMw6@mV=+=`y-dlku@_6)#!Q@jEE zZyNys1pYrv3G&xQwhpHMwBr9;0{R~k`gZz;X2$=6Ao9No8roW0+uAt(4+_}--wIZ? zrl#gL|I;TC{LhN!)^=9^?DoH4(bRMhVhs-fphFD+fbduQpXiYi7ZR3H6yDa*ble<4 z^?9jXb0|?X2P?^DHpe~T_<4bFS)zPrE7Hems+ruCFruN21BXamcqN`h7o8~5!t+Lt8)sdXHsutSb z)!Wn6@oAsNM|)0Db@J(J`#u!@6&CWslQ6r?PEt91TA)gKT(Ae| zZ6#_m`&A|li`UF;Cdsg}V_%KVP!@$s+PBW56FX?#bplEb676E2;E4TC)bdZsS67xJ zRY*1th*d{35}J#q$Ji#JBEPjUagF$6IFex~ILTFV9H}^@h9BmhI^9Sgu#P}Ajx8)0 zZk0I{VKo#!mO@A0;$EwvYJbB*Q}uZl$xq(erT(ac+hDt!DfRh$YzrF#!+6E~e!nOa zow10h{ehtFy+WgE3&4x|EfQru*S9Mn7_kJT%;;$s%6B-mo-h?xyYd+{nMojDiqiT)tCz~LTP z9p^j1mQgY^lE9IOvtE!wAQkxn6Hnr#FYBR{R-eXaYPR-?PUz1Z8GHwpdo~VYca&=Yk@uQ_Q+E0*XQ^|rIv$#4c zPE}_E<~T}RPyth*nNy{`>un*^Q{CvTLlYr;G0`o>WT77#H3n1&R?~O0G>YC!y3y**b%FX1#x+!~)AKCqB{* z)xUK;(Pwnuh;`LssWdB$ekyf0p-`BibBa_}S-{1CZ<8}_ffaxr7A019z{sou{BB7h zMGYsajGr$fm&kWcDotm-K4{sBiAY`mWM}Sy@MRKJ5CpiGg@P9 zg7Wc|cq5XG0F>YDTaos&X0rj{;&ubs5ttXwNc7-EH6tFlL)Jj-k~+R#w}?kZ{cXH~ zcj#T%m&THIV19pZysR^IkZz)bw)z1vStrI4=eGiYfqoVoZS^bW8Ew`1H}A-drmh~^ zk%;QJoLOmqu@T`%=fS!HN;4dRb%KX%t|M#}=%`!HO1r}dbb&wwHRI1zU?$#DS9We%SSd|Lu! z`v>?&tB-LRK22}V0mh%mKOhFXKyv;;o#_Tp8(g33EiddCG`K95)j66QKElrez~{{u zP(BKGjR6syTmHE!PLC`LM!Js|s&k^pwr-mlmp!{GYVBB=3cI|2=hMoCy^aWSyc*lS zG4PMGjE3~Ox+Z__-25+G3*DSo^lPLIy+sOLM8I#q_}?nBlQHN)!1ke+l{96uB(@b< zy9Ti}5Y0BUDJ<`N&w_AqP==hG#&en~0yd=IQUs^iFOf=hM6E3&?Wsoe+#=>8N3x%o z+;qakFE&fSc+K*fv_N|Gd0qz~qGhi*ee%+J!`ZgYiCK&srwB2qpYuqHpbS#OCGi-) z6wO4uOM*m*kJISf{gv&V`%r{$g4N<_5n7;nVEWOkp%?08t1zH?(j&Q&WkXJyoT=a; z*JI=%?Bu|0nEDG%)$rOu%!#d7fyU%<2n+px*y@R7H%(~wWeL>dH3%8SpsH0Uo*k^Q z&cfSz!2ft4U;GK~I!cT|FxOl{Uq18!-m2ISgV5l3iryyt&c;zv@Mgaz=_zHzdfqbf zyx${}H~&*u=X;tTGmH@MEZ~YkzQxmFa9{w{cw4*@t((e(&P)6X_XSbF%%-i8Nj+a!JG=+U0mo{Cfupx96fQp98$*I z2d=Arm~N@b%%}8`zvemnQ6L@>OYN9k$;Imy(GaJU$wR%>SjB*^<{#Jlu&E-D+IiB0BF}g0bH>R(J(k679Q7b+NjNFp^tC$R6b<1~(0r6ot#=iq3Qmc(-5!8@c~Sl^#N z_%3F+X9!!E01gtRb*St=$FJ5-`9&UF!7isp@0Y+Vx=3E(rXVUzN6W!wRiNmC=wlht z-eEIz?g3J$F|_>FJUjn&3(qT5MywcHF-4H$$A&djQQhQK>$K(h+Uds!hyn(5fPlt? zr;RB%<4@u0LL3zGf^H$DJHQfRWp9Iq2`kf`;8hH(-qGzS(fR8+*eT(K*1 zWgA5`v~X$w_m5R}_g+LmR(k<$)#J~&qHlXPhMq?p^<3632R zkFBrSCFsvg5@*Xe%*A(3a!LK0@TED^Wc^DjhZh{#u<%Xu)>#PcY^s_&=v=N10goD( z*YaE)vQv-@7j|<{CN)GJAwH&)#ip5_ZgB_ofwe0G=JCk*tm)xbKseCMBX&2Tpy-6P zJs#o>%|HrpkN@78%cqwQy@$*MIGl07B$hPxM>s&cN{a(m_Wt3;tpvXZN8c0F%}V2@ zsn{=q7O!MKkPy=jH^S3ku%MB2?6c@Yi%HiLwPC~R5zWIxk<=;}_{bleP?5 z7}}g}WO$AJdh9{KPL`65OR`*CpMV0Zcb$VI1djf&h*br)!ea}POpiZE?fFD*C(;OA zpnZGOSN+&j;QoR3VIW^_2&cwF`W;nx%-RVn-%qe(0JcH54uR;in77+n)Dl&YX2E`4 zZ4X4K7t|EI*Kr-Pi%+i&x9gWJeS(wO4BVi_;-^Oq*(No8n-;=uKysp36E#X+VL79D zcwcZRt`%3e%L&W~hK;NOuKKLexq^tc?!k3|Q>nEYd)#SsJ-rKn0)~Nih3kgoL)Avi z80$>PSu>)xO-|A-*hn0$y=eJ_H9uJX%>BR4C8fx>3rK#;CKgb`d`e+>l4V)%2 zBwAmXWlAj1)!ahqjV!0nw>Qxc$`h>4M^I#oS}t0r=i&g938}_RQ^LzfF1FvD?2U_X z&H>WISz(QT@A>j)A2D7C={eAK$Ro4{p z)r@h!a+?qYIltoOy+OuDF9Id)t^e!H@$t(qqDNu~5UrliSME8t?Kjq>JO&Y^ zB6cF@FB73fMh?vNVEz;#h?m)Jhj+ZT4-4-vB&8Bk-GRB>1HA8SCX~eJC7E5j0m;Bm z|5A+CAF*EGJF>>=_M2gOb`)U+ByIpf z6=Y6^UT{5q99pHDJBAbT=mP6d&Pn1VI0v7AamK7Z2UN9aAx}PPsD=xder&Omwo?ws z4}y;N#tI`&_SFiYaSpn;)l2U~k2p5m24aqpQDJFml7_SZIJt?HAk5BVAz^NG4)Q>hLZ<14p82_~_vIvk9Bw#moSA*&*PfU8M&q#jWBYPa1&M;rc-b!FwCNT)?S z+WB^HL#j=Exs10#M3YqHJ=VsCT=ppBiOt)-R&Bz_4W0|*U$1t6ULFWc7vI;QXx{a9*&e}-Y<618km%a>KU*-|3zyUy}Pn* zRp*{Ojmny7)w0$#Vv;!xm$|yGW$YL|jcv6PwdVn1D}39+PhEL(6k$^w?WMy4I-1PMJ1>7uoy~iL&gVKI5t3Q~?qsyl{c$Ny3E+vtE@^(*Jd2B)MV^*`zRo za5gtFxwR(|e%T1LKVNU@;uid{O%JNlJ_kG0bWbW+CcVaJEL<(U7C)VE$)@?qgm@#b zl;^B7pS@2gVL{(vt|TR_z3evFY02i004mNN{D355AUAM`fx`aAf1)A0$_7(yRDLoc zExg^#9EgFIjVY_-N+BON2{|cdwDj9uRk(ouE}grBP^# z9jBiQ$;gN#ijZQTBP*IeJ}#J2ABcl>5GiL=9a8a+Ons(lYoCq(wz`YyTDHDx&NiqE zIz2VLeO7u2;=?s<^^g!knUr4DK4yt`(VZ@(na49ho!Siy?v0Y$rFma@NkPpiNXX^1 zWw&E`)uQMg-~|uHs*n)QbUOpgJUT0!KVT5TaX8Q|U@SV%2Zaw5WP{LAwW3H^PWHGb zg7_V*;J7`buHvttMI+C%Mp)|jY*Fl#d4E)Hf%qN^%$y-bzps(o0Wf@*KG+U8cFQ5q z-soGpurI%oN}lPLxqHO~pu>-_AiFT;7_Y0h>b4Br(_NgIc;?;*N(3WfK_pi zv>f1Z+xd=IR)5*~>6^n{LeBcwXZo%>;RNjledJ{Y)g1sbYmU!n=A3-15|5Sqjsq+G zu8@jLKMQEk;^IZRW5a~| zaYTiZz#^x=%^$^EM0vAVDU7%z#goLvqjblP3HQT@3MK(Xj~>O`2dNI3e%H*@#$;j= zwW1S{y-E1u6JNwdbJmA@vRt7w7jU(!Y5{a5?+^@p1GdhHIuL?q_r#w% z==!V>`Kz(FqS`_2hE;>P&WI<02=AW|zRSYwFTOpRKLj#n(J{;IKi}I(kFkMfde*7p3<4suDtxF0fpzy|{hVW*J$s@wWJ+H1u^wLHS-NPmhCW`Py2^KM967g!s5vMPEcyg3}hhQQkA-@4!|jW$_`LLchnq= zhQuh;FxP8k&uB0wqng8JrJ|aC|LM_0bwl#ll9M}(3P1mIS+9UI&_jA|M25<;Vd%lR zZ46)O!rcjD$;@%omLgp2>1i-#??T2DP6#^T2lOLHhR27(Ko*r2;D-%)Zh&)x#-y*I ziMj+zS6r`8C*DFHieVu>B!!`!{+btmu?%j=dS#>(d$p`s(si1JXSpOr)kc~i72R}p z=;5?v7EX3}XGD|@Z#^<JyR*<{Xn-B*TPrJ7MKIr=hwHx(UuwP|}Rq4BQfa$<3vA zg%VQAGS|K-qnL(6a*bhj-RgCH=QsV%(=EmciF5hEbV~aKLy-Y)Y9Z$Xa>?;)S z;Wkq(?TrORG-pIIWg(P<`lwfS;Q?p0&gdkH$X{A^qee>@ty4yV4opTcCL$;2g`Rf3 zh|PaUD(#80S42^bp}?IjDu#c0rgsa#c*W^} z9%~lVZYUB^V9R4mAv zzeUbkrVnIO>MGyInQ1&jQ6@`1OEtGOf2EkQe8t>Ru@@MewbvQu!rB?8Yg6rLmdWT{ zy2aaBy`?IBx{P!?b*?yI!}5u&#_|c>oqTt(cn$1|*#m~fm$-~I_$E0q+#9ia?}b9C zy!B$CQuD+t3sY)rce<}SXLzVnBvC<0q&GG!DL#+V)b7HF$jPiNQkkHr6vtMX{oFKG z-%)q#e?4m+7ErE*K;vn>)S@_ou7WAYV>PU|D;PDP^~_#u@OnnkRWM2geMqKP1pze( z*QSO>Q~}YZD$$luqqUiZf!|EM752}PV)u?xzS$X6v?4W?w5f&$DAl=fFzzVbN~I^G z`2aw0eFlqnMmyM$X@5U$SA$_EeLfhf=b$z&2}}McV+enhYbVu~y4YXeVbU zBtgEX2WFS;M^261s*Kh&U1O$PKxRFn4o>ntR39;F$}AE^^>ZW5i;@4aW3v(jZ>o@f z@`gxfwyo%z?trPH8J2`tx?p(Pf?TvIlyS>bh(u{#2-XnxL_wC2%tl@7Vohjl%Ou>j zVH+h_t?^zmj0dXAA*UBk^qByc=rWgo9WbunHqyW+ef&U5;R9Lx#OoGCJXXUkPjEHU z?F$>TOku$^GAHblc|v*!T3l)aHRV+ZTVzFv>mIaQMuQqrB5)3M#c5c`YdkDW9#Ae( zysRNC?;y8N%(wScp$ui<)GR_d%%%}rf(VaIA1*{966CS@%~1AKp+W2Q0g%KW6_CzX zJ~^V7ghrHO*qKVb-C#`WtK1V)kkrO1Td-!Y@=cb&cb^(_cU54>TC*vlxZw%bSs0Zk zaBh~$()yBW>b~RZt48Zgw!Pzunh67KG}Y9uK4Y$Hl z+&S_#aJ&(&0e0`LW*Lzm5^o1ajrmy~Rm|$}4_^Kz!?uvl-gE<=7yuS}e(fy7DhO2) z%dWUh)8LJ@RAgiDJL6O;p;81Z_CVMPWPX1moakHComs$O({1TR7>lFH%cE_7?Q8$txzV3iMAym5|241qr4i@uXp|w#r z?g72c0K5BChabF0z*hBMZ^0SB@S8VPMbzA+HwBbKrstT<5_d(X&0cAg*w4UFw?a#| zRMLXxGfQ1lQmf3&sFH)a5VxzK3wj+T`Q>U@-vVR4w4AUX3@O07Ns>arNtzRB%kRnD zO{>@Ms{IL6_mVNFfo698udP(SKcNVc7*)f5GlY?$he@c088L*Jpoej)hTRz;(9j}S zY7xS(p2MWIOyLP_HO{o@Nc>( z%>UgnsaDanLpDbFW^I)oXenlsAV?yLu--tbq0D!nGN%Yq+En=UV%;E~YSX}yiY7M? zuKTEM>a~bz>eY`aZ-$w@FJNjk0`C1VFN*K|7=QP{Mo3e)*%Y&QzV18A@#EU#`0e;T zT`TM32Ez7!r;m_n&*}$95{v<>(1kj*iIK>F7X)t_oOXMtg^d=a`(PbhAL26U>V9}(t5M8Ek z(&)j9-7FPK`WhriCAMa8YP5cKJYLBmEhsrWDrb&Ohk8bY0QT6W!%39i{UPi)OTq@9 zVQyn1apq2=J|k@z4C%a4w>On!AyomY-KCnGvk;||G?z;cyA-nW+r+ zy4u!6G6B=cQwi`TFjnG9CQMhg+oDES*odRuusMuy*`R5Vs{<}YwGt`~xH?m~C5str z%hyAj>Rc{SgL2TrY0t`?&V+WyED7M~D$FDJjYvv3!FYm7O+bBE5}?^uorlc>wIi$+ zBPiYV~+#-C3S9jThSJ(rN$s755aCuE^@eth08n=&_q2YH5bgmROME1k;|B^Y(?N%2V#7>ifVLBR@L2~xR(50*qIL6H zN7s2lG(o5k1i@;A9OLuzuKq~OAq{!C|0W-r&}#pbf!YJRPt;)S^)Za&&=Hx$qvv;f zqOJLR=PQh83W0DDxEbw>|U<9(Od!@ z0~md_f}!nj;p3>zpJ$x!6^~$fNj;dwAg0}XL4rdv>4fuoRi}Rs3 z+Ab`j-Te9&!i*wPD=ircGfZd%wq1ueYzsi_Th1MVBtLGYU>wpSPg0{?*dyGqOL=}5 z2mG2*v#8s1pD;9rmL)Gu=tZ;s9aAb^e(01cISFG+mZYKhW-6gd zMNA)}zFFr9yQLPGY8m6#=(yh6c9>DSE-0TmjS$!aD1Gb)pmxo`XY~?3m7=cvlzT|> zFca)BK5Ig-Rp7f+njvxWFcs{uUTeYw83b!qgr7A*7!HA^O@8kBV2qZlJl0US1R%L0 zy=*wFf7CW0+s&tOohDLjJCS#318&L&Uy^8cUC4X9gZ}6e>++3$IiY%W8Uq@+e7vkV z%~Jl{-~GwwHVl^dg#K4vmobrh#{~xfkVE?Sc>OP>GfVt;UQbq0SHl@a{0_BDS%#Pk z2&&nOZ)(wxccIaYFchzk_G_+JiG)#OY%nxc3o$-g$7JN9@;4y8^WJ^A8VdE|Q5zF^ z_oA?!NF61a9q;_g;y#g7o~?tS?~F^mNWZA){jRvKx$gab$;6k7)P5z3z!@<p(;D$1JLo;{Y9M3wQ6kigz$1Btjd&>9Hci z+=C{Nlp}?#IrRgEn%Ly~q;7rbHRh}ZoXDn*!?h-ZC*+Ju`E%@t4zAt^P0r4WKSgAP zYolRbXy6#=lJ;6Evj&G$4XNfIQ>jef zq0#?X2(P*-xk_N!;mcku)f#LGI%Yv40(U6s&9- zj!H%8f}!;9P|$ah{+>gRN+$Oi`o3 z5YEVx%7W{2rtJDbj-&gyQWB zg^Iafowe@{ve{4+x0NORGE9Ap)lP`jW|UJ0Eo86J!~d{`dW9?)fAh)P17lsQo8o^& z2F2euxDul=9dKzlz%zqA zM{Sxfhs4Rbk+9Cz)^DA@2YR%q$!W!<^ppC=^Qj&miV4ozq;#G6nZLdGc!%GyhjwoC zxAKS!G2{_);#qlthlPckPrJrEAD`P$IWuqq4{}MGke1EAK4~syw#|r%ThWyX?9`8x z|C8UCjLvI5N^8fH>P)RK&T_d}zQ_?|eRkqT>HtkCnoD2KNue)uv_T~`&xp_#R5@Ui zcT8zjxH>MgG}lQ1iJAE}2kaKdg%HiM6=W9WfS<=OP>O}*0~pqejrMf~{b^l9XJJg@ zEAIOhL^8jY)#eux^vGg_7Vk(j6is4SM$94OfR8m^49RIj6n)UXZ}K=d76nxpE;9pu2a^d4ZC-z(LDRzAyoh(V}!Vi6E8oG~^?4dP^8RQS-?%8>DM21f9Dpc z%NF_-r0r~l=?Zmt75#4BsOBPs?+sM7|EwfEi3n~tS*$#!J>G$ThHT}$LfsoPlbS_o z4T0HM6umXzl!WV(qBbE$sTK5Se4@D&v#_n?3iy;7B%8g~2Kc+9`?S>*cz-9jGnh3* zH=M2Slg3x}P2~q$ST8cvv_2h6&uUWG3YRB#+H{^jgX8lLx9t{OPRBsz1%e`OqnvvC zv|@!|`HcQYrdQ%MM)WY<-h^bnNPXpr9Sd&l3}4|Tcg8G{N0=U zZ7J0^gf@l{vuD=H4Pj)bU5JAR#7hd5TL@zhdM{dJUN~p$7yQ4@wde~ns``J|0agF5 z1G4@bG1T8_Rz%;>$=1PL{O^8W5{Ca;*GiV3lo;ek;Ylnh88KUaR~ZV9q+I*m8bJ^& zNLZHFmMatLL^3``g8GU21*uIz`w74&(G{+}cFjrec*FC8b8Xn;%iAm0kLaScX4a*- z2oSg`t!Tc%Fv}=DCSE3e^Z-r^wt&tl?v(LXA48NZ(j$Rqz_%nH8mX08N*nw!TDs(q zSpq{f9eA6==fHO|)P1on8Lzm|JugITB#P>ceR!eL|3VKu+Fue%W5oor$l6!OuAZXb z8pKEuB62MI-7Fuw#82{pPNbUAVJ)p1a(l6hreq0!qc zlDWXFtolw6KqQtg7p4*R=-rTRQ*wPBv@Wjat0bH+eAkb^7mIXbg!t2w-#?T!knK?XwD1>(#+M=Qq5eQ4I}Qd- z<149)>MhzBZh>5Pr!QX9rP+$J=$oj_0 zLy1B)#ly;VCL@fd077-S#)3Cw+_Rvl;FZPzbEQYpdIs; zf13%dz8vh<81M$Mc1LpJHiLuHaFM_9{#k7R{ty5!ieR@DjRJ%!1lil|bx_ThpktMaY z%Tc}KY*XLRRLfs3?G9G3zGM4WTp--G=k))@h3NksE|~s_3)%m~g=WW9huSZK18^0Z zA|-oBUJEH0NJtZ9B#4{Eb0aPzE+Lav>GxV@L~*Y^SKp+&nFS1j_c>{o>zDS^opjw^ zU#)>rR#qXUySx|ggxGq#J#jx3zfzcGhS?1wLp5ocx3p2rRr9XYJ8oH+8_AE5 zd>`idVSY3TIS&Roch69Lat7AuH%xS3OlT$?tnATraYf-L3%8WvaPgP+Us2gOapLUD ztrC?7xPzfHRl`5~EzSdS>rCF`b7Dy;xgvu(O`~0@@ule){f)>r$&IBm5r?w?A!q!S z=90|fIop^N&AN-fdvMJ|j%QX_d~!WY6;M!MVyDKS+H19Ti!+yNwS0oyxg+hs<%6&; z0CPmm3WMIT^;`4R}klt?Nz}`r^5c+r&M`Tjd%RdIGL^+r!m<+~a(& zGTQsgfJ5FOMHaQzC_vg32U$q@XP;ns6zvXPpm?MfMJ{*j?)i!yPtr`~lAb7gTSuJl z`?%NWryGgYw>Kbv|MT1l#DAVU0ckQX9VGg@V?i1KfcgJ7!~Yi~s<|QEl$MuIw_bEk zjNPmTu>djAAdNr;`tqtE#I}wb za_xg4e%DSQ-|Zf(j#>A+tG=a8*r<;T_^f|^$5-98=7 zz|hscyEfj|>st!A-?aG}yt?%(L`mJzHchTX`*{fv@@9?I3I(hd%vnuAa zC1+2~A-0yc;%KXrm*%Lelh_Q_D(AQMXsy#{Xw1*jo$l6)EpD$# z!FS;y8>f$?HjtBl2SSIOQ@%rJNhCKd&+nQ!=lI!TRrKyQW~cc~@Q>TlTH5#Xf?is$ zs0T7_n7tkU4vZlXMNfKJ%!0^#Ei{C}Vfzk@lF0oIjQq$$X9fjyAML-4YNj1EKdc7E zA%K49BtKR*a%m7i8`0LPhEA%ZMk?{9SQ6==EwwaEqMap{fR^a|sf4cRWS>A=a$$h= zB5evoepxU;Y;tyhVv{|Qo8FN&eAwvBAd2qj%pi-N+);MW^VXr(*F?J{%rdxgd&;c6 zbWtFK{?zqMq)ojtjI`i3pBE`Y_XkC~Lv5llg(2d&LoGkjM7wHfm{PlHWf)64t0uC! zgIx$6P`heTSPq>~JFTl0EmrLYu^IxjITDS!tVXx4rNhSlO2a~`eE%k(0t`g=D&0TY z|6Yusqo<1j6JB(6mj8^04o#W_c>bt?zi4nuL{8Ctqlf}7;E*Yvt~yh5S&qqc#~iND z9upw?v)TddX}DA!7y_?mMP->-k0n3=!4jQ~T0?7jZYgSRc3Z2ntOZGbC~IRwcye{7 zHoLK_!r`h*_(@usDnm6Q&sj4FXtquXYvJ&frc}nvv1V_KGLW}yriDat8{lN^sEny5c82GZV{x>6z77m-{Kqg|BKS_VhrC0`JkN{dl zj1jv+4}F}OG}wx;)Ib7$iWfX%6k>RF?&#zy_=XsmciXr@xGP8^LxEvYB#Z{J0a)TO zEx-UPiKB#}n>TaZpD<*`Tu*ohM4ha@%PAvE>LJ0)m@O<~{#@WQ5zMgP2AL?xjJ6 z`$tkB#-BmP5Eor)VQq`8tT-%}TpKItcVsCn*gDi0Vbst=gIg_J%SM)IzxnD@R47{i z7S;bKrUw&D;lwT&m(xdCNg;$$*t^=|FR z&E%m+P8E)fOR8Njz#O5YVeO-pg}FAwX2$KPCq|Iika6Ql`X39NE3LCd)3|#w^T;2E zpbmia7sco`TN8qnt>H4Rx5 z5XTdi4dCc)9}ginN2f47A0r(S928nRC)hUE^M_?C_rF4}Q#Xg0&Ggw7EZ8fCSNy8f z6T6^suj7rHi!T3_Y6TbCLAU7#&G7`X2#_Kq^v*TV?as7@2v6S1u0X=w9bkhLg5%P? zLz4RF&=lGNl5U{8A!HqbjGNXECtBE@Y~r~E1D4SB^ZiWST8o>^K-b#JLz`6wX`RO0 zuA=dl?!OnpfepMLX1w-Q)lZSG-87YirK(z6)=ps!>we|$mPZqhYL637g$S160YXEH zr8#iPMZM_Qh!!Y=k>Hl8aab?yf5#(V{U?alB;$pxS-TZWX>p>+I zu|yV2+Ls- zM$f5P-Pw<@a%gx*UyU1v0|!0A{#eYgJW66zylx;ca=5UG+QFZ-zWhj@1p`jBUv0t- z%Hik2MUG-dF1lynPzx|lmu4j;5%0E0|L1YLrqy=EDaBY+3yX_%lXt~Cq7O4*#%`8!*BxKtl#s3XbfwQfM-t0Pe{+%uWjxu!S^u}Le5yUZ+<3kK(c zjh0ES3Hww$2}a%_WOYSQ`euez0%2*C7c^ata5xnm9q-21B+J_p;kJ(?LE88Z?iF^}tKT7Oe#o%Dac1!K`~C(m zO*S!s`GCG5KP-Dp-=C=8A{m*@ZGb-^wc(~)+9TV>Xv8p|ygD|0r?2gshl{$m-V-G}B0d?ZTXtc;2LeOZO3ktWZsfVJzd! z*`r_2_0D$@qOBv|F;}9OV_b&@l+zHF1+90qc z>_=oOux6h7P<(N>Fny{y$nwkga$+?TXQ$tWWy01=TamA3Edt_y5Ro&Ex8i(sjdS0G zLKs(KRi4mTm)Th89O_caMi~iwuXPv^;5@ZX;%w3JIFcMcoHl3l!&+q+iF^wxj0@gl z18Rv1CGW@aVM)Go;2#pkI>l&Rs#?w;$c`ZcyGBz#h9ZCSQzE}4!cLAGC2o;DQ0piw z_gY2wQuG9yBB_(qQdgQ_4MffH<33OrHKDr6B=v8q?hX zo>~)(ppaLYaHbH}n;~O-TtMy+rYl`#-~ID*rZ z<^#9o3u{iF>s& zF7_!uB*`>#4YecT{#N+$O>7$T4Q~n)&LF(j8^lgAcU$qM%EnZucY3F0rjIG404i!F zv`!oWL(%ZG8%7uG5ZV&oX_s=rI-s?0CA>y-RisZ(Wt1$A`>L{)Zn00`c%gc#8gaUJa$6Zz<@J~6Ozys$W?>~o-j$nRI^@hvs0SO z;T-k`(+S%ZPNQUK4n|&x5;Ez;giW8W6*A?3yW_ar)?9Tt0SB?>mD;5?Bdn9| zP>E84(Rx?Wa7Xi4GaJ#~;IY435{B~p;x`5R7`jYBu)5tNSC#49((tE9+M-7fK=Cd#+7D%z)TqM9uyxnDvtWprFCBiQRSrhO-WpSW}Xncsw_7-u%PW@x~EjKs+h`;FO{L7z_ZjZ|$N z{dG=O68Z7YqEyKfSh2StDCkf8Ruq9tcytOEXGma%bLZmV`l>q!9x7y`Al=xP%^3mi zTB}V_rSnQKU$BCOQMYQ54!I+bJV$LT$BrM^F?Jqz0=E;6caoK8mhT(L^-M;_xyi{sB_In7zEgfGW=Q?zg4NeS7+IF4_WOYa22GA8lN zp~e#QSZwP2LVAfG;ckCpZ`-Gquxo2LNVp#D_>u{9g2pdx@f&1k1fJ&)PT69r(){U( zg>-I4H}enSK7PTn7}-^4;5`Rpwdq6bC?Nu?ClRtHHk>UnSZ_}5fFfUkok#Y#g8{I8kpxn9OL>>HvdN<-FIVdo_|YPbgiNvTg-#sZy}o5WU;s3 ziM2#OB?P*hzLKe?r}*b*cAR|JldiZIE z(~)WOPva`+Ahvy(f9SDe0$ca2`Q1V_08!;Xv{gG}HhS%wEz7=gD!mb!eJ?F~MXq=I zKa}YF;IzI}=OyquHdg0eMQdCVHhNu~+2lVARXw5hzkqp@pZNOljNiyG!Q|e?MN@Le z74EjXt$t9xNhfFbq11gKd{d8A8)#l(Wm0~cCVj^hPSFT8UikhrJV}dOYPv=`N|ibT z;`7POtLCpr#)%UB(Tsc!C>7fV@|ZV_+wDT@^2}51ut46&J<~4Yh4s!z4$Z$MIJ>-T zg?ne?1N7!1i1omH@r(5bW#mCw*n<}1_jAMf8*PHV0!t6aqeQq1wAsm( z+(uG1MfVQzNO=>W-hBsTP(-1(b-Z&j*->?bIQCg-&_}tb$~28xm+LtU@GMxi)=@9wwba z{lliL7zCyr~hNwOkk0@Uw?_3CgBK0QNYQNh6qfcR{qMNt5ZN!8#N8OGMZd%!oPi zc-Z>*mPJCX7}68;soT=Lx|$<+3J{i&)$yGK+O)bZ;_eMS6RMR!|46gVNPT)*0#??E zUIXy{K1*lt^8jP=ne+2_ms7)E;ZrR1<`r9k6v+iEuFk zMO{;W8AjF`NfVThiHVawr*MA!#Irj3Zb#6t_EzjTz@TyxLF%Hz4GL zX?ld#eyPv=$m~Y!1C#Y3duw9z%s+2C=1`7p*aXivf#aRTk_!{{i^FbjX;!w=ET$7P zRUAjcuLR2>)TSkJ78AW8s+XG39(Kqwlk6N}P0tVV1gIozOyM5XQESWUbTO{MCwE2! z1O=ZasmNb}WFKDu;6@-@JZY?dxrym^WqsZc@&?v_IqkbK%W0fJUf{DtOI)86uRW=J zUcL%mbTP3=A$K8|nk9TG(lWE~cIKFyIs=$q(lWd7j&#UVUjxc8r>Kokb~y{z&mQJ2 zEK5UIU4;;$SfRC1iNLya_fztK;L@sqV+Rkct|#PR%?kp>8oORerxzJI2CSH|jSGZjY^AMP^#a(AleaIJ2A*F6*lLzA6_{#)d4|zXqaTnf9FO>xl zObBjF2)q~s;rN$o3dvNkIIQ2x9+etiybK9v4xe?vq8>x49z|oQJprMT0uYvnjsZuu zq`5SHUA%#iT!NTYoA0Nu8gDBJYXzZ&UhwQS@n?l1krtLle5Z zfDiCcWE`1J!2E%68u^YN#esAgylp?@KiDexUjM~m&pPE#*ck-8zV-v5*P2&w8#Fww zx8=WO!;4~$$n0n%2{qGk3v2szHlav7u6i`fWAYD%ozp|!S7YW^SnaWgS>8=0U#t(Y z75g0tfpVn%BkX#nh~UB>Fg?E>7_vW|4fHL>{K$(F^Y06Ra#_I)DUcrN=#q`|&8E<< z3V@j)b}FF!D|+09aY{=3&^LZx#PK*uE4QvnPfqB9i0=`^k8tP&-!O(lt4D0#K*a}G zWkjH?1ILLXT6LlVb4ur5n)Wf#e6h1=cWRmvKUD1*Abj5AJSXNk8#jJ{4ao2SH zkTo#7>K4U%=BBjMGU7HEsKP*@Neh9GKrl7e8=@_ zI|My|WC|m_#P4TtJoSi_+0>V(m9`C(TW@9x^f4b5N(S|gjnIpg+5#jggHb;<8Mvyh z>INq=%NN(ytKvNOu_2i}_qA5?p&Fy^x{_eCb655j3<^lb-c*4C-+CI+X!p(r>?Wa< zc7wGLYX%4}4#{7&)ypN7EfkU?%M6Bz2D;E_eHx5ZBN`;vHr~*m=(QxkC}xtu(B!@2 zJPMjSxTU=Lw;2oGdQ7EV(~wHLV3RBmBshQqB*0gwNSml=iu^A31&dK=RcC@SlUdhlv;bVmRR_8!n&*nOz+@HQ zvK)XuCE5{mR9hrZW{CmV1W0H_QP01eYQ%BYcASz9q^(jU_5+355`a)JMgX*iCH5gX z1AGk)D#1wJ5k)b;oH^0TIwh5glVrA1&ymr3dSOD4KWI&B&?GUCKWg>}t0_kpz2wM+ zRB-*gjM0$EJNso9M=4_Y%Ns_EJB(qIjUC{~Ep^VX+FUxSJ1i-po3?Z^y<66^5x0}8 zhN6 zIkuMYoH9M&og7rzmQWi@Go;mpVcg3a_XXS5{wbLb*bmiw6>)=!x%JSIu2?gE5LYRwaIN0Cv~2_%`gtP^lg?OL-Pi|ht7rNWCt^oB&E z!W$r&5VZ@w_f*K6-2*tLyNkPTAADaFQzjkL^A1-eD%m(dhi=`&P;nXT?QFbK|J7qW zkxHBzVO&R-kGU&yc1e=@; z_#A87K?Q!#0hZsPo`L1t`s?gn2WV2=bLqFiOyR(;@wQbH_TvA*C$UHFL>x; z+6fmxYy;dH^?Ai4o=@uw`_xYm?+#nq*4~wvY+D;P59`iP_PfeL?snH~zjLY{v z(|+*NFH}Gh0hP}aEqrwBp9lG(-eo7%LfzDkQH>dkapSs{EL0)D|C zISb-#^y#>j3EqCrYJ+SDtT6;Em6o}|QIk`S9cm5(#@eDW7}}v-oqP-~O~ARXZpx&| zyw1ZsiO~u_eFgD(E(lP9Y$pR;p9ge52YJI<`L{s57xd|fiOS!Pnd-%HZ)kKO?G`Am z^SpLZ>kh59ANeoy45*cd+D~G^pjDbO5P0!-tym_2 zZF&5zniD42gYj7*vp!bC|7$6oT_8J{YT1KZNZVh)86o2Wkz3Zfk4w2gOgp%9Y5BFR z1NNm-z)J*X|DhtBuEO3+yBlOz0qHfS1Eg1}HNyS^#2~;UpIn6wDf!|>IMkzhtxAWi zrGhQYaT#m)?ZV|B&y$LMu}5Z`NVnux!4B1p$}Q4MTNk( zB;2wna_+mLamjmdBoV-UCI}zxM6tF3->)ZGn@{2SSlJ3vJh*)1lmSA-fYaCx)C#5 zce?}wJ+Apve+&uS9APqg9-@`e?8EccX9k1C!8`KZ(x0UcSzo1{Qoatjl7Bo+JvdDU z5-GTqRFwJLPo`O=_b68)_ax#ttQs)X|CAaE;tG!TBT7w7)+vU~KHQ%pe>5j( zC%qy7MQ|8DC8umn!bo`MRNQ_((~+o{{_BQLy%>7zFY?{xrFvOST0_fUcr*ASi zD@^v2r3xm{z(6)TrkBWsHf*AhE6WBZ*-#>1Ea_LO9%#-zmuX_ZicG`hV+lSK?F{zzuk>@hWL4PK;#qliQ#cF246=;oqV}U zQ>8{5pDq&k2Ya!BapDSPCcK>CL7#od#U%(=G$~VkGNz%!cZou^}BXvvIcm>^kic>iaW6 zJ^OT~_e|_2iA8kZW68f-Y&B_U*|x--aX?vJZb zDN+Pn-(Q7YO98Xhe!FWA^y;ra63tk9O4lL^$C-Mx&1e>_ah$uLFdI1V^Dcec8!~50 zH-R6`ANv^B1a3JB5vtAGcQw!SUPU~BzAHWf-Az2~{FeiO)^sr|xWf+Drfvz(>@!O_ zeQz6yYPCGU2-bY0%|Nd>*Z4XWI0KeVrvFT?Il6>CKzQ@M5b;)WM!h#`?RuXPd-A%Y zYRzi*IyWj`45VB!@>52P48DI$aQfTo4NAvkkZP3>4ca&8_ zjGRZu@dDEgmaBbIozJw>$t&TW?pb~ zfpq+i?vB|%1cf+97st{}ezjqr?=>5v{MMu|rPsk-WX1pPd4dmmWP@X~KbE*90BZ8` zX1jU26n3gga=L2^=qrqRCG}UfX{qhxlQZ0#FDc}cy$!u}p#p|bF7+07t13BQCj0#X?X zNvs83M9d4);2_|M(yB6uW3|D$P9f(v?aJ*8V{1 zleERnmKr@(r4;EioLFQa9hDlwXy{WnW}O-vOBKbBBHOGLBpZ>m=*opXvuoJjr1!)=D+$ zRyP6iFVxS;POb#>oE*!~w{``!2)2Zv!n=80@ zL;Hx%3lLi*cpyBhU6r^)geY-G z^-&Vj6zqhDJM+4+?S16dg{HjzQ><*aR0W?EMV9#Fra1#XfB?Rowv*b0KM=Tu*+a6DPFJ3+byO$*YterRM1HEd!$E>%kDU9hsF?+o%T8 z!cnBU&+|w!r&|cR?{S_O)#ionHRvCUc>OX%NM`srO<5>S89QxKO`vORRhn4r0MBa6_^5vcK(OPMf#Ns+>`fT4HTrph{}2_rh8thmLV^7MSm4}0Q}}Ck+VJCi z$v~s}Btk>4tgs)`ujYGVlQ(hp6@CIFYF5M<@ZjA4=FKB4IG%-d2%WSMg8xP5=(*#@ z^?-#F>2V~T5yjbW2CrJ?QhkJS_KNV_Rx^;4#KT_T$7`&U%!8M_XyAD6@*Un%Yjo)= z2=j1sTj0-2513Z+5TdAA{yL*ZJme_vJY&%Nst>K#AGsv3(epa}M;HC8 zRhqYs$@4n%2R5b`>ojjIGhhtDYQq>xl6#N=UvyKwvVnN^M6_|;^ClOV3d%E3 z0fZx@%ZLBV01V@ZctUap%~ey(biS|k?qYLg;No`h-pnlI#>rHwlw4GU9()v5v-XTX z$g6DSF)UEae&!6vSi(3-qp)}&B5E^k7qK<36w=2rJ(u+WeO>=b9B4a~bqt-2F}=4g zVIHE1G!Z3}WjCUP;;m56EU=o+TUxdbZOT}pEJkT8Omkmkks?u|Pv+bxH#b(MLU}ok z-CDuvDk3$wA2|~?gA%BDH14u|sI}K(m@es+vM)CEB_n#t=hg14XMgCK2TP` zS<-w2I#RcMP_%w>xJ8jsWMM0Gg*tnw<(#mCk#2Js2@S?(LT1TXXfm88O;^!%WmY1P zzyl+w&ZH_InUf%rE+TB$F#{FBTUD{uf)xy^@ycYPL{TrOCs+@;Wu9c)sw{Dz?;8&% z52;MDbhU#X7Yc+3o`fPvA)nHLDd1#m64M1g>VZSQ?;$<{j+#+m=_)J_h&zG~JBmqr ziXBPGjcyB2-!go7;3)OSbP*&(Zl+3&5^ote;<@FosGwG&`~bYrqp-5U+O8Ur>KWjy zr(lY)1|l>D=>%iUUd(Hk;Gc~=^r$~X2!4yBj!QFUy65)WoGJ3VupMHEGd zu%{GfW=2?J%TN`mb}Ztok<85^g3(n`;`>UjPEyLUNH80=2=i@ZlTAo#735%pN0Jxz zEc`Rqf&CitoCYnQObM)U+L;dxX3GS;5=`?3p_5De|XR7~>zvmmdxy!*Mr2Sede5qd8b$gtw zd|dsaTKfs}+72X$iaRyvj?%v2jPAbSj7`0$$5<2HeK>l8A7+WVmYWO4NT8Gxj6_Zs zk)NGEXEe_g&9Kob_%ilD8nFjk)!!$bUu0gho!2@oTc|cp(8@zI3ukvVSE5_|@y-~7 z+xkqdAEwbxfIKFH(#IaOrC@ep2M<3=`R2g~GCBqF6@KDJ@sBL#Sz5;cXe;~QquD!FL0iePLk35T>4S}Mr zKwC86O{KSMl2hP)VFuGfcK35&aUY*(E!`nodk))X&U@}K=$4oe!Ks2l+lE{G|Brn9 zkNCm}Ev{;aU!W2B>kj#!#APV{M@I+aU#RhaU0#ZtHjDi5JeO&l3?->e#X*u3@c7{n zu(Np*%EUzysQ3!X2ll_RlxnZ=E9s(7<@h!w?mLm;<6QVg8KvT4xL5dtaVszh1BGUDRu!JB%!URWV&^ z;1oJ}hgn`I->9$dQIJ&On$e2&JA@SuW6FjTzW_y-^kA9&Ci2Sfr7(aK#?5Jrsr<`* zPDv=8$*+H17BSwLDCabQ(3)>rFgDhW9$6=D#6IIl=T{EA{LhFxqARCmKz8t*X+dpb z1Y%I6us!d>`9};mBEgtt3K-AHJES_;OMXiBjo%2k!SkFQYDlu&nI^ZMZ`lnD7MHWE zujOv6-;kM_8K-HF(+x1S{|l}ex)P0r(F!eJ3;0l~qWpz45eX47qF*P^NTNC!)1zbB zw?+u&A3nUh&aD$CbhBe3$L`z7FRA||SJp~MH`0*0hy#V27&J-igPKs@nj1A@0ZMX$ z$?#axj`&X)_iB#Ke7-x?T=~h!ychBdy$M^3$TwZ4^XM{c`yG14fp5S~S5IY(76EjG zt!m-z9XgoB3Yq#jD{-T6E9!DPtI{PP;WlT$UK3BxE5N<#1xbs8x3FfQ=#WC{kZWQD zt_q_UbzNMh$0y^M zKO@X&aX;@&yTXyT=*a0URC?;{AyA6u>>+-NIAm?B?ubp1V`0NYy{fXKVz9dO_7$& zF&A63eKee|XI;vtmd4G}hckb!^IKVN7Th{VxR`HNUO7pLJn=J`LR(CxzK6&a={+2+ zbg8qVia`gm+ocFu>Qc;CMw}=!Ba0ol48{=@PjO2YtPIT9%|#Z0G=Fgx^`aM)J#ng7 z2#Ar10|XP)5eQAS_4H<;b~nwmc6GOQ{PW6AON{mPw6+wkF}&}hyh0ynqTu+I)-RO7DonDE4yY~0rf_GIon1@AQ zbG5r6)tWG5SlC00h6bC}F0me-o3uZX<_0IQMjY6+%}$GO-ZwX5^=6B+6_TAkZd-MG zB?sjmAvh0+O$;UeF#y-b25=bxbwc68Y8m4>!i7N#*hT zvO)JnO@9=|rD4W(!Nq$a{Dp^iq{P!0GvB9=ROc=vd+dwE=Ah zAx@m;BMOSHS+@cnrZ`a@a_jhQC1x}re81RZ9PQ7KYEin?Kb1>`TEzR*GxscxYA6p z><>@!&aBc+gnl?K`2OULYXN0^%k2^jQX0lO&d3e7sVfz$<4g&ks~)<`e8`j)E34kg zDXJ#x7Tu{_8YyAX2G2q)utSIpTh!wV6>9KDFoxoBx<~8m7*C{2B}V{Tyt0I)G(;e; zWM*A%j#EKJ-Ru?*BmHzjOPwIq5ddFh0F-08nwAz*{DrLH8s6kyH5D^cI&%@lRqU~W zIEiv3y>n53uq&lqCAL%FpC*V9ptR&M5&kvrJW2EpIH$nk#vHI(0m{^?GDZProJ*u` zrKJ^VS;Q4oC9iNxvIMCNpn4-mZrH>QA-nKPc-#cyCd8PcXM((AepPCqk(&o$Arl*V znDCuL|FxQDy9$Nqs{7k+_$rDr{y zG7^=HFa)|fYMFhm<#ke6&hgy8L3*RCPjI31ZH)Cqt2|pbHQE+tdt?3jqNx0tF}Fs4 zLwDg5!Q9~0A@hKDt?qC|hC)pLmd#$Jj{YS%2~bl|aPH{c&68cw546b-oOAZ+U^)AG z1c(lWmSI=`QSFCwDYrNVWl>%Zmul8lh*x7O7p$^Yc2`qWw%(F6o+IESXFSwCqJLGT z0l4z3dseOng1%u{rD~2e$RFpx4ad>!THS*-g_#L|&Mhc~!QJ=9yk&Ds!eu_Ye5?|H zTVx3QPP!ScBvis2#*J2yHkj*;paXHuMqmcT+Y7|RV|+#R$sM_6dj;~M!d_*nc<7qv zV%Zn|^d%+@gnIx>SIIhz7g59ae6}Q?dM%#%OyQ@@dux?yo z*gt6h-DSfuHg#nkn%`+7P{G?;+L;&_-oTyCZl-+9!qmYO@o8=!>9w3YqxLm{9a{h) zix5!k-Jp}Dd8uB~NxM+)p{fMHpINauSxN+8bb}L4(ircr#A#>~Wjx)ubfGXc8WK8< zY>^m((abDEQ*pYGxYgvnK<4@=YZ*y8DOM|)%+J>@Rxyi>!YsQkcZ_B#>SAh5`d~?f zAgkcmt)aJ7xtpW3Dns|cGd@-MM9NpXLP2z;pnH+npzlt|=~(}oLtA;KP47IjjaJsd zo+A|r@!Kyecb<>kcpMv!-l-CuWdCz`LbZzXo)RuN`>ks!yK;ki)=_MkbG9M#X56_) zNJH)|_|Qrz{}EUxfT!&O6Hau^*=E;HgVo<{&G|65>Ee1fA!s^itj+f7x|J)>yoSfJI(ToOl|jA!x#Hfwrxdpj83@n(}j3B zFJQZHr6Wm-{e|L99=!5HtCA8@3?}NSw0;8$`z^UFp)fzONO*K?SI0NQBwEqlEC5h# z1#eIu&zyge!3Q+-RFR+uZ}5V)FIMmLPzg|;w{i?kPv(*1-SH}r-diX9DDX~KP6GA$ zW%H_bnEYz8udAqgpV|CLZ{1Fc0KC$V(18x!XM!O1kX1h2TOQ#zPKw}mFl=;_w0E#) zTPxJ-7##&HIs_u)Y1y2c7X~xe{$JYVT^bZF7)mT-CYa=^{=dCa`;FLnJWhdP0v}}8 z{!(rwy2b*C4DW~l9x^i-yBpwXDDUVAdZ{@tgtBj9ZFntu0hG)3eE|)h{96EvD!Mj1 zz^^K-@*OC{tL;>fa&|R}yFJ171$jyc6u(1s9B>_Wh&!r2y}JT&{(L|uFf?hv2;@8( zH5Q0DWIf}%1988aKg<1+)P4w*t#$$Z!>C2DW+xbwzaixm-GYv1 zolSn<>9nP{^PKN!7KOKpTotXn9ymU)LPH0=1T#KCX>SbJmt=LXvipC3#0?*r9s&4D z6Ca^GGIsJ#&!y!)NXoiEqIC67S07owLU!_7+x>iMt*Ks#^^~I=J*{QU?qe0F@?Q3u z2hgU@#c97m(YgvyeF6sf21?ik3pYDtso)m7TU1VUEAQLZrEE*~h_Cv+c+!v?X&LW& zG)I-1NzYpGW#^TY3@A3Wlos3p|9-0mVMn_l?`1w&*{uWzb_IWx))V+tQy8WmPyHSw zi$+LiBCY=osyu_PpmA3ksvQi?fn<3MU7@m;q^bjs^#KXLSwC-`abPcZ%9l*H;PJy-GLS);q$Tp~yFjnp5!FBgr{hj=*Qal}XFd<$*Us^$d13laFKdF(6^GXxXJMV zjynb3a90f-NR89O3%vLKWraTaWQOi4zRw1ZqV*j{p2mN3z@3+pdy4E$ur@e-QhRTZ&2DMZOqGy&w~{Q)=&M+(oNaxEZC7wf>`*d;bD| z#{~T67@(wG;Nw;k>aR%Lg-cerZN+y!zfrEee>d($zVkxw6ce}$AJ7Zljb&4+tcK^h z4n?~Ll6XqV!y@Gz6FlCds^Y^v!OWYk@si(pgCu8TKM6!X&MlvBP2Dzfa2qgr+h-m9 z=}pG0?t#69sn)cT%If67fkvU`Z9@k`%A?xI^Geavpb!_eiKiz@dQzI)?STdrw z4*8a_?^L)`-F1dJQ@T%m&z^dv-1R^GK$;JIyhr{xaX%7umba9fO zmQC43(mbQ(&QTG6AatS;c^Cy&|H^aQww%nDmU};-)7an@3SZv^RnNxxBt?uAsr9yy zwMp}nl|4{!3(Ldnu*+-)-@!)Sxd^*`06W{l;sE_%DnV544KUUe!-{Q4bID7ov#tLL zCBw@g+0|A$;u2)(@iY&%%~E;0DO^TheUDk-+!b0n`G6Gmf>Ug@4RCpnS)|=HT)Onk z67iO$q^atg?8zvqf3K;~pWLbE_N ztKd=|d)F>20xD)v;>TViq@L96(Ej51PzkH+oOqbk@oW;g>3wtiH8L_jkd$&daS5(! z?~jBUi#96u-|6ZSmWo#$RH-P%Tk#HzN16E?TxuCP#2|S{QIu5fGNl9p4T#F8d0e$4 zc$jsI_IO&ka29?x{HLoB%J;k+pEW1+=F?QYMKHfNd_XK~^p2$EyHA!gYK=Kfr#$hs z@b?>1B~MSe&1gaj96@W>$ckfJA*%17#GV!M*jI=pCnz^B*e~Qj7eJon*`#^jnx5W0 zmnUlVOmGS>!LHB8)8^+_|%H9f+jKKX2jO$PGZ{Uj)rW=ZzQm|GB<3uomcrV z^-V~*=Gd(M|qQ{?$Ij zK=;1xk~k#YAn1oc9-qEz@hgvKjf2B_tT8U=;_6gJ+{iU&^hdWVk!ciAPxv6B%v(oO zYAdq4FMg30v?!4p?Dd-7+jXu0KHt7V`>D_zeDtpxs_j?YK@Td^8@{yWR*Z1U`aA z_Em5sNWrW*mocf>4Z&0RdCTB#>^b)!?*0G5L}yL6+Bf1m2q!j_m2Luey}5(|(@N{1X#rbU{- zZjo|!dUh+h7k~WzGQ!dwhcw#g-Cf>isgo6u)I>j{oQRCv4;7 z;Qqh)yKE(O#YH*fZ<__yCeTP>Ir~bkBEi2~^=P^~A-XH#$< zU|UUSH3cY;?L0{!=VkB6P$midT0omRZxnfPk1Zp0R0TH~YBi5B|2%*XoeB&?i0Av2 zAd-YrDspw!#1ZW6t1T6MMJF&{SSZ$`Hr6-hiw1Dl{Bws9g4S#Mkk!^TO!PQTOKKN7 zI71oL57}V}q$d_V-L4xF>g{AK+vykj6%Hw&E8NrDDXSWoTkW z_k#t}=4>$xjgcX^9_H2P-wob%36yBRdLziiq;TAYw4TMupt@^-M{htZHZ>Mh=NjwK zNvj@y1Sd>onM42hHta{&xG?S0tEu;Oh&6+quDqz-T$`UOb>pbLVc9=~_x_@360j#9 z3yT4IY?{y{!jcZ$X-Ra6Wlp|ns)rsPqY-3*r6qh0k%D9$uS35+5E@!zPq;!@X@syM z^<;${M707cB3_`U2>%N?&OBg|;aY?QOSu@>YxkXt4~ev59j>mWe&ZE zsMk+LKjM*uxjRU}gV8}8A~j}=1mk=`IFbgx?q5n-SB9bKgdGNbzm43Ui z^Zq|CTLohiV+Ug!Lt~@=y>^>bZe=x<(S3HFTUu$*LZDkv*7RUo9iX%(vSifcM?-`l z+w|$LHjf=vTsj|Zx~uJf`g$x1beD_>{sG}-aUz1*OGb?hk@!5|G4`B3F4S+tCk?^z z@a;J6oVxGem0s)qaDSobM;UPVyJ#f{slYBmI2~x?+>*feJ7v+_N=_QLXUyBP_yhBb z?O~ocd6DDLP9D1Ba0qr$+k`iea|GBix^8|iwPTet=1E#KgdqevRmchr+k;B8vcYIZo}7t@Dj+IYLTHk7AKI;wzb?s@n%lBA9oq=HfIOaVcQxGQoW^I9zO_^(%Nh}Cm&f> zH4rj{>hOy{Q7UvQ#ee?HOS110M}!0|{i{(GRxU#ybRF^*Jj!8)m%+K}TU8v)YFE=y zQn6C?a4HSS3=fa+RNj2jjo-|K-dBb!;HDdgNoUsq3A^?r>(Aj1p@QnYa5!>O90ddj zS~uBmN!f{-;6H1$=P&|KPx)&9Nx4l`vn@WeJGUN1=;2GkFdZ6R+K=33F21B$eTh3y z+Y?La{`K8A3NK&NX=5cOfqKxJ?ZIRvR~kB~5kKPGeL{DI&;p4v5Qo~}NCrVwpC@uH z(|gntA&P3=6LEj`T6Wg9!!DzY>Jo$i zo!kOOJ)}C2`N4M>WxFqvR8BcYS#J@1>cu|TpkUtm7qvr8dxeZyc%aRb%}qbT8py)$ zs^F6$`;E+gI+{I#aGpzM<<-U+ebi(A@vujft5ihSa}#GmpW6zU>1E>g_^Bl<3b#Z4A@mjS?R zh62zN1UosGC2`3BamJ6-N5wi(al;}tl{Nf_QRI#i?{L|! z-6tkD?EdXbUt+N}$Rr6~sexM-yUW!SxI92YH#C!|$P zvMk>ut6(IH&#m0#xAQ9~L9sS8eo9)(rs(tX7;RZQYokkXjdZQ$qWUHVN_C8@nlXDG zxV}QP;+CaeFFju!)!AV(ikR4)4{G-h;D0UEIj6>oO8kP(Fwp;*%ICj=&i}ZQH2%+R zzgtP$a#0W2M<#>SI@MaEmkq~9$-2||ocC}2V5UDgsxTSSP$sjdbz||kl*0OVRByk( z!f(-SFWQyzRd?utG{1&Ykn`@u>p1K5_ek}6|F=)XSZ3HBMqMK*PeB-J;a{B*0s`YK zIFCjbOs6GjWv*uQGd@Rl_M)x&dKrTOOo+c_1B->Gp-!Fu{i*l8A`|<%Rue5h2}kv z-D~Zfm{;Se89=|?p#86I*AnWdT#6`3BgdFCv&2@C528YU^;aGi$z z8q`wUkMDPP!q*d#lq@;Vr0|?lq?Te3T$h9y)Y`lM7AaU_AQM{`7BoO#x#W8lOl+bA?8BCZu z5l``~bN3@>T)ldN20FHMahs1@SF4wCjO+{IEfCXV5YV%aK5Ajl8*>N@uTEwkF<<12 zY1*cs(V!Y)-J`WIu1C|@(CjL=3#)l#6xSm<=aCi1f65T3K7&bv%m3E>`XKi2t?U&r zPRfJb`pWhTw5UB{?G=pM&uqdqRNz= zDApZ$ZK8p;J|{Bt9pb-E(Iu$Rk+k2wV>d{D{xJQ&ZgBsJNL4NEl#VfcdW>9W8#oBi z#E1b1*3c8CLxLeOk@`l`_$6rJYXE4lSwoHV9a(RJH8q8;t2b0Uv8r2!p~zb{P$?1V zDWhiQ(p@}mqZW0qn|!TIH`1SVZ@qUKLmNBwg~S;fci(1Q-Fr^Gb6>n?Q}Mn|t6k-z zP_1#?hY+>|2t?3IA>o4oI6}d@`{a{ zcw!HeOD6!*ga6S(-c82Bjlz%8Lk!hRt=UUBt;*s>?4HEW3w*!9`FzEBO$>OegV>z)V)mL2{(Kawp-3n!R#Y5n@Ya#wB&QC-P7h zuw$rhQov+FoM@szKyP-#hE#&W5Q@^JtwPz)0`<=6a&x{lH{aW1IhoVh*#QRH`E0ep z+SVf}@I;>EGE!|cQKzsOt+qi8+SmQS>I`jjeg3~Fd&l6+qG(&RyJOq7ZQFLzv28mY z8y(xW%`diXJNe>t^m5)k_g0-#uim})$FACc_gZ7^nsbgd#yFj#-CW?RtM;#y1%veV zUzg2xAa`s>4^J<)IrAZPM=Q4L2UQn0rZzZ=9Q@KEm#K~--@!&oH zfKpw={5JFVvdK+fwYrRQENbAuXENG|5mnvJ7E-WcmA)V71`bNDVsa1{nsFi%;E>#Z zbEeG5WMQYP9<;QvYX+neDh)Hoh^@-vi_+`c6;_jbymdDLSW?X#SH#6Z%-Wt;qDrkJA<|wfmJwMRF&-=IOlI?9l{w9}3F)|WC=#?7?I&g>+bF42wL`iC#8R5j zDOwVV-6fVHQ+tw>mC4K6ajxPSO!pI+MvArTd;GtUN|cd*H{Y}5_^9>>6d-$j+>|25 z8?39+Qd^*_Xz-CLaiAkqC9$_c>ef6diG_ShuH-{9OI+*YXlxtta=2^Wmz#+XTGght%M!Chqh zI3pk2$dc!hV;!wP_>1K#Bk7UOwxU_)!YNOqqi8n_>0_*aYtw7Zp z&Q_*J&4rUXxrxPvFo7v^*PEF^^AL%tH@1O3PmY)1J@V&$FTt^moF4VPtAy9b(1FwCkspn&NwS ztGBBa=s1;(>(aH$HEQ6}coOOMTjzwOt}eCV(Z2i82-ED`OnTZM#JR3sH=^Ea^>eA) zw-6j`h;R34`6;4h1whLeSXlfTvL8S(IpDLlzcA1q3kr}};}2lQ9r1a(2~DE&X5n^3 z$d!g}2H_oTc0!=b4Yn`Sk`ugu2_@h4-x^ASVYwyERanz>O@D+>d0007HnODN4vKSb z{(E<`yVGBq#TPbsgu%%I_F{?bK^}I9n@TD`fQ6_A&M@+)3`BXJ2Pzw%^2)j=yj^xY zC5lqT1D)?OiAG0UEVFdj87X=Gx!KdY3xlzCibCYx^J3A;M?;Y(q9Pw#KSsQ;a^pQ8 z`%7$7H5jk-%bPxl>{V(0mwf!;ebMbNQ%@urAhIy06q15cUaI8>4XHPFCy-kFHp6zZ zTcjPv5je^;m;L&fZGN@X#~mnrFrd7wu>0p z2GQpr;5|}TzaLBm?*lydo&3UU`^)i?~WT{*tbR|5pDT?H^?$ghP~j{g(YQc5h)`-5Kr)Jwh!!d=6@ z^mv7OeNXDnopTi^wdu{f_m9}Pr5V4qZur-C+#U-nEDO)H1z2lmJcVZ%f^0W(=~S;8 z;+KeC3gA&_`tCq6}70@H-wAMmYrAq z>n0w7tiH&5Yj$#Apo?Ln?p7p4NQ>NN!wL$y)=N;8~~uFs7NMsAE;f2{((03g#|w=;*(fr zmmrIE?yG=*g47Y6lHWtKNbT}-f(o4E7I6Hm0NB}i_nRng+$_q+pJ;Q$InprYTiz^#22W(a2!Ri8Y*^PExxZ4q40pq?m?tUkuj%EEj9tkRQgD& z!y-(TlP#S(WC{W%y>buy$W#+GAE1mvaJY2w~Rx8A5q=Ap7B&jA%V9P6w6Dm|d$uG=svH zn;ZJSJ#Ti59gMRlUmzG-h-ohU?B&ueX^IExCb{Ez2KpvBT`?+zg=1DzsIsFJ zSRiz~Vjl8GJg0-hX7vSiJ;})N0fr+O6fzWPjpRG!V3qBBlN`N{oB6W+_M~^`=f}yL zf~)~tCUc2W&LG()>Kq+bYdx__2lZZTH1D|4986jG7G)mw6B-m7lr=2ZMr21;{winv zwwBq%9j@~Y=k1R66nZVoVXMvz909ZJX);LYWsAS$X?o}dP(!J6EQs%?i6TyqZ8LmT zADX9E8eH5KJs>EQfU{(&{?gcP-LLb?TetCuCst+(yQlHWTcQR9O#SrV_5uR?O?W^C z#$$fD8zA7;l__NLc&p}U(3ar`Ci+8yk!Uefpd)SD?yUn)y}4d(G?V1^V`1O%j1G~9 zXH|x)QuQvhDi})}Z2=h61+?rY+8DCP*}I8CK_Lk~Wm^~=xY)vh7JT!ugk08^xdB?} z)E6+t5ZJVKF$%NAPVkSDN0@pI>ED3MFMHFRdwpAB;mEUO$QJ&Gy)xYY{}Ge0U-+vB88DV0k| zEs_`s8t12qWM|5$Mc$H>u8fUHm%!O}O82MIDw6tCsF8Gsh!ddZt*OpnDo`kw%02@J z`GqQ;;)}uCRqVLLc?&8=M7qucG-5(1x@4&AMZ1g&Du5ub93N>ddGhnh7eeZ#l&3f*{xtTKzJZs}VTXP)B)=Y-ps!Oo0ynxKkF8COt?y5DsXVb0H32Uv97B z*V_NAaTp~%{Wst)@jg%gNBV};H+cUy+OO|_z<&mB{7>>HMoCTvgbC5tQbS{9Y5BK+ zl^8E&OCWs?O&}_&p^^}=B;F3dZkj2{j`pG9rOf*R@~*Uh`CHVRIev07(~~7JJ#MDe z9ko7+4FMjVSGE4sXl$q<3N3UDq`ZjFgz}s2hn3fM2NR)6lFovIz%#7zpdczjJ`bl@ z*&Ln3{}X#Pmh=<$vs`(g2_>f_Fy5?84)>M^|4|h2tY5H_Rni4l1`Q%VHqO(e*>iK# zUdfO}6?RFS0u} zFT#*7Oc@C-rYWvJB;i?=1%0b>{!pToiboaOcq{C1Fp|ZJdN` z4b+_Bw$|RZ>2U2npHFp0nRya@q_y;a|7~_+invuj{JmGA-_zIs^S%22$l7o;zv_9LzPG?>b%s!Sj-Ek7sgmMV@V zr_^xE7 z1A$bEj5?KoqOgZGtSeV)B^#ZWXJ4GFYn65_zhJr_v3thZ5}I9#=Snn_^;o|Rb6oRu zPV(e{bHP&j&aq%2=yfcUp-gQ@)+sbb{Y_Xq_aB9_CUhttACoYCS=FhP*6Zexc-g*G zu$n6IrXZ>Tk1z@ktU_(M{Ii2rqG9DKwhR-~`1JmaxSSMUa*+D~wOsW-I*#&eYfDDe zkc7?g|Cl&qIJpvA%vw_~^nrMkbrvQP4EVZo1d-jH*6x$ ze_}AqRu2Hw!N@i_j)l-RJS-+-!zA$Wy*&mLv+vr_X!wz_0ODWK3Z97ftk6%!IVZl} zz>NHFR|hZJCRnU-Gt#371B)tHSQqkza4#8q6Y59p(5-2K+s~Zy9A?y~rEtaz-}J}> zDQ46)3I1rhC}>ZgaTd!vvHHA`?<|%e|Fja~#+N|qt)B6MfZXpEJy4M>Li(OiT}hNz zNM8(scab`?Sua7ABeMv$m1hf0i~_)dWYtjxzeox*^e4Ky;^Z-)+b*#d(HKg6B*^fAmVyW#^opK5ri6S4 z%I&@_Gz;g}r8n3U3a0qN13#g?ffsv9Jz7gE@D2~yT8}_8V0ZET$pH*EMCS4~fZJ0< zyMcJz|G%;SkMisztlzll`j%Y&pZ`o)|3{G$qpEF>B7yojJl!zeVB1Hem=OS*X2kOc z4)v5Q2{{l1K2vdtQu&QtD{e((g~g0Ps`~TqXOt>6kySDO(;ou0$4PEYOGzY}t1Rc^ z%^v49-}@N?|NQWaRR=|JU*ys`#*wZdFddE&IGmgyvCSsO2_dLQWPXkZHz;@9%^?i& zmw8Pe(*tW98TRY7Z-4ByVv^uh_r$O>s$NJ19%F0}4X1YwoS(az{`omOYBXiux7no4=5IG0QG z<+aTn3Dr%LG+3v-0B!A@ac}g~2E#*KK1K)H7zlNj`$Q>NC2?aG#zR9StXR|dwp)Oz z4YtNkHujp!2TEJAn6RRnqK^6G3KgiP^Kr%~PrG?Gbb57Q+If+$$9_Qw8-~Kvo^iI} z6CW6}&RZWoOBVOKR%q0#8gU?P%GvB2eaZ$X1#0$DUqE5~;w1khZYMA6jbhPG6sbMq zly{HYBzH_rgQ~cmim5LXbtbq9`NCKewX`U6{n;|drrfv8=9So@f5l0uH5rW@TOC&jyo`T7wOG86q zR-2AL*p>1H#M66HEm6bgpOE~~kEt@*aAm-}W)4*Tnn!3;v`e~F0I{o>zMw;f2WU|J zC*V#_d4)pjNa+#vvC{X6>5uYD;O8-?izpHOu{7X?dx_Ra?{RtyZ#hf}h3y>?P&z}e z0qc*?hF_8Exs)Hb*omg*2ow_J6chA#_uenzqxk&WBd8mXYxLxIfo4!EtZ0U13EG^= z6QQvV{-II>A1F3715L$@)^LpG-Giny!^YM)bk-2o%M1q{$ERP~Luvy(;z$*T_UCs9 zR&=|+{gy}39louYZv@Z&8;g2M)l~W);aNKWSI3X-e;z+A1ymu#Pi(g|Q%tTDZ6tMc zS9dOOgf2l8j~IE@?D>e2kpbmJJhLTS*dXN0C2RWA^1m62UQ<6f?5I9wbFBU{CK>MIymrH#lY` zzIjs7OFAlLFqC7eF_r8y2X&aW`-<(DmT_oQu}$21Sn#%)$1*QY*Lv?UBj9D`n@s|< z9J2DMx>x8L`w%lxxu$0gxbb^cbaW3teXZxnq=8Swu ztw8^h&xoda?=nQA^-jlW(bPrLGiW2ub?@pjjC_wa4I9wE!6C9)@|!cZkTRFH(23GH zM%QS=`>RCtQXu$qLweZgv~5^d*-^m7LlB-#=+xOdIluXE57Ky<1{LrsDF+{YQ$Hmq z(Bett5-h=PtB2~FIm2nEdT*~IGOsJaGwj-wr#6I!r{Nf*s4kpu{40^V#6>p9!nP(} zW+*!LqD?5|o$4J(Geiz48&)JK(F|ERi4bl+qa=joQ(`vE9g`+KXztYqE-R6l&ui|S`|fP@K$}|lG=mT;askSNsM)ccLwt3i~rHFUgjm( zj&GidGwhqPija@5QnvjLq(k)k_8MYaSyJJ{q290^4>hN|g1K33v zPb^PV(P69mp>ppzkF<~xs+F`FMrJY5)3YTjMU%Nxb}-Lx)JiTPLQ}Vf3dD-sClxnV zjK^ki%Vhm>OjtW(|wdg#&CS#l&!Im#Yk6;bL;TvT$K9Ww_NsBmU$s@iK%TTaj z__EJw<5aRqi%<|;occnRN=`48Z+g;AVXe2en`3*T<%{ZEu;3pjAwBcv8!9WuTj@E3 zgUyjr=ECa&#RE=|+-CDV?aQa@yi^hmJA<95%*5A-`I)Wc&m(aCQPnN2mTo%abSrVu z+mls7lSS7_3TKMyAM&@i?9QSP*B>AjEz5uMHf?$whB+uqOnIVtK8Ux80Cn&9l`a?7 zF26u8dOHGE{C$6ZNu;lmUQjCS^ijWFO{i`HeoHM?nPi=i^4<~b8j5vm50fqnP%JyY z^eVpj1-UmK#?aqW>mgheZ}s_di*#sHFQt5e{8toM7tTGke5*lMRDS%R`QOfC{WKfZ8jC@9P{AoCCdrU}O%T0|s;9ZC*3BTyJ@DEhHL#r#^tOvWUgz&q&* z1!X2ESy4OkI8lEy_b~;t8@T?H!loU!?9_h7JlM(_Qq_v~4HBJ{u6 zJ2Z?>b-<40i#MG9(k;T~M+VH->41Rci#f;SP;c8FtIt-5{cRk_>xlNdhc=+s>LoVx z#_A;}^v3!{fc{+&&};dUA4*{P;tuzfzbC-_b=#CM*gGB7lD8jGz;Cg~DjfAa7`My(h`kq~^`Q6rV%{uq6N%oOO+Yak#@1_DPxM z$;6rR<}xq=L7vzxZKC|OI2Y&#gC41AyXX{A5%hb`5mFgxm!WNG`^YL=b#k%`gD$C* z20uc&I>I^V+#--UbV#Mylu9C;;D9sp0Ralu4H&ob|WKbH}m?Th2Esbi(kPMkd{S7QTQ@AHBgk~20a+B zk-P0Usavd!GRa#K!K3gdi|<(-dt`KWL(K<6=pB)$n%h>%=;sDgS%Ic zyH0*O`4P2N`_dfgeTf-u(kL3%`_>sR9pp80gB+|tIXRt)k_Q+$oe`TJJroX$eeJ6E z!8n}u3vxLhZ4@3h$42rV5$7SgjJD(-kvGgGJH~fCGjRmB2Vog)Q)G4$x2$X{?CdKo zEw;ba7D9Kcc}9Ad^pWnucxZm_&l$8i;}6uGOLC$=haFhI=j-7KSy$K8upFPzS60~B z+SqL@E^e->E^JEca;dM(XPBy0Ui^l#ST9=7KnHb~k-N`WKhKbBmO;8pT~?>Fx3ICS zuC~i}rK@K5AXyLkoOU2ZM*uep{(F5Rj%k{Q6|KsO6zf=+$v7o9Z5w%x*M9|>sIJ;v zWl{ZGS%PPYV`*t|g|$h&d6}JkwPjRWTcz1b#mUH3S4~DnM9mjY3FQWQxI*Mpvx4}ZpL?$XAA+CZmGo_Z-rSr#SA zL-Wq}DVVB<6z<}VGD9PrFfIRANKChAA#0TISCbnuLUoNbc zMXr=3-9@MdN(8-cT&kwo7U^btby3TEHMMidcQ3#|RB9wtS32Hvc@fHM#?{qY-@41h zqN7*O6lJfmwyK|-2efcDJ0PM&#sahg_iEPgXTA4@u!Yi+ktPlX9K;^uuj82F3cTD+ zD(y&oRLSE9RTXGM1i-LL;LH#h9>66J9k)=`VfZXw(*_ENn&=sZS*$v}g}qwwW8c!1 z$8bUO6BA_XZYm+X3j1GTL1ipHr21uLm~v*F+y6c=HcV|Q#hlk~D`v3~VPEq1oTBWz z3>Fks*dbd9qeMZ+jeHh4ws{+KcTxmOT(ZGBg@rHxExK%Hj<+3nSF1Om(3BbqyMo=d z<~Qc@B_5y5wpf8@5&27dn)V6`q}VGP)&qYec?^vplB{{j>-s&*-o$#%M-5UR|wgrnnLsG!lA8z6h$&B!{pG zr;x&04QC=4!jY2%@EjKO1OvX?On8{Bc@YWj4Qk5qs-JRg?QSxjVq%eM``6@(-< zTqG!lgl03S4tVWX*O;E+i3=PRPb12xd=yEV=G;dKSd-biF-&~R4HiY69jOBvt)>Bm z^MaZmp6r}SMK(b9bM$SB1SQssdP#fMJPoqHqeNFmqmpc+)|Eug&T+O7#8zV%;Mx6& zm7=8GWTYr8AS@?c+Chh&4^I^VT<(}xxh@A|4misPXqA~4%5GAQ&#~K-?Ol82jZ)O1 zakAJ04TPnxA~>H+XVPm-ofO#7jCjnV2oxN%CO4xkuJKk%j(KDFSk0&dDcIFPbxeU3 z%ZX`~W3w$8XM6AUrV_L@?wQ&Px0}W|b4<>E>9~J7G+p2o^=F|m$fb}5t9IfSrX8P# z4bLz2usCbB-xH7GCqZ=Y$rmV@a{Z)(_g!voV0>VGE$m!gc-1Qm0G*>p^a?7 zw=WMgcB;Y}hpXghCcO>s9Nfb1g0H2(US474;9$3ZAVaEos8@a=#_I`idFr8u$*Kh? zRN1*lI9vOP@}WPEm;2z8LE>9v^UbZU*5vkdSqzv%&67KDx%l zRH}2VDFKU@xqHg|>=>}xwy!V3MSWFe-nawjG&e_zgD#;>1p7$bqWJLN`9J$eo+5Qk zbR)8P+feMuB@CI{CyksG2Bf@hg}cI&Vx`mNfP#dFNN)}$GMg7j&k=rct8pvdj5vId z8@8tsEr^H_afX)sDBJKm|4@|EV|qLWCGca%y`_p`i0Zee{<7x?aVDpxCJJREDyB4t z7_ptOMi&ZP!el&h!)&%B)XV%NqXpylpTxMB1L^-x?eM#g6;k!QwRs>}B-`Z>{j?s3 zYuJdWssU}I&PB8L?JyS^7D^48tVSQ`|$Qu>g^OZAB zi&AcCUR$%}y@)jYh=6E4x1`2Q#3kTy*^6{=L%zBFg6e@(;eh`eA&`9#eC&$lI47jr1>NB}$=LNRSB9{soR z^iuW2`0?KjbddM9Tuu*Sa|qt&pK+Xm@bbK)_ym{YF8k`DR1bunQp<^+$ryFQpdCIN z7T`mxn3mW=iCLGxkxt|e0}u9b&dceTmo>ZA4%IO`n0YU%jli$JXJAE4s9)nMzar#T zYO#w9gT3axu`TN6k<lm-7)VmWbv3F>ni z%^URn9nSoTnXhDzA<4}U9?>5kUHq5TiDgSxm%NF)Y}2SArvbRSL!S)}3|!s6fg6fL zqKz9eP8TChbuv@l-N1g3nPpnW^ahP_e?8!T-M&5m9QI@DVJ=39@KWW2u@^Uk&=5zC z_hOpi^TKd=4$chD@a+?V={SbpXKy};4g@XK_XRaNv_Mc4#1SM?`LIo>Fr2;1CYcr( zC?Gmu!ap0pAA31K$3BIJ4Fbef`97ikNbn9M!Z6?LBZOS?3{gT^8ByaGe|sIvr3drN4Ed-N zb@`5w!}#{YU%=EPuxOwWVg+l*UY+o1Ir!Z@ZrSDQyDuP2f%w2S&U576hj5C)+R=zA z0v*P-!9;vuk_R`L*o;p`7~@4R7X$HdHT=cKm>rk%By5K62MZ*b{%+MQNe=<@E{Ar%YoEOiz%H&PX}F+We%QGEi6g= z6WLU`LGa{$ZYlK;<j<@Y6pnVXZ3jP30)dPzozumr?$+Ele@?brd*Ed?-LNXg}ds{KcB5 zG&laEx{Ui%)7%9gmbr7rj%@7J+e=tTq}ha1`WP9xZD$-U3?8DsM$*14o1@f2%GQ1} zmC&s!ThnP>+jTlD?GNiIB_##(hBlo4wvfeOdl}3N94Ak-s+bwQ_~(M0BbB5#0yGNg z7GbG$(R9)}sFpa@c0!9*{UE{WJeKJbqcoHraG=JctF&Q&8Js4dE?v_NX$3_0NEdjG z7-Us(b$b>5fZW+~UZT!~5Cois$9ZFRjQ!5*kc}8ubcn)VH)KqYo`kmYgI-q>K|E|G zF(g@uL{zXGDYKX1Y=~K`QZeUESqhbFejIsF*29NsIDZ(XZIq=En0UYX%;97?#PwgC zoYPvMwk;2fUPy9mc`LkfTP)VqVzf+ygp{F$&O96;AgHIU8`9G)s(@0^Z5Kv(EOPP( zLfz&BizAbK14QffQCkYhe7*PWA)OJVuZ}q zMMYT~=x9aYb4N%cH%uZst7TH@=Tzk*6d4D(V2!gL$jhM(J+q|s$LA703V#h0Vj_Tb-?QB!A&l2sIZhUACzyNKX;pfxYZcn+4g8BNqIBQM#5mww`U?QpU#Cy2faK zN?q(-0TrRc&2UL;)d~m&kbwx{Y%h}}dLx$jK=9lj$u+f>nvHWB03;&vpx~}NLi>zY zXj4Pcxxnyf^m>`wRc}P<=q0rl6Z!RG-cu%ZoKnb5qMwIFuEexV2Acl>P~p761+X@i zj&7(Y+<6N>6r9**z)*1Nud`CXgRQ2fgvRyg+|#Ju-9||VjjO8IQT_p+JXkn0Qqw?H zR%3vBQ2wfz<4Z)8S&l@UzA)%@$K7MamsJP*7NrbGYvQZp>dfT2wTF|Pb;Z@i%_TkI zHg9y`Iaf3^+Naj#<#sieN4~EZ`Tf)bE52SLL~$P4?`S_UzFjQ#bz4H8d0*J*ckBl< zc{RhuiY$10i<{dk#x%A@pRu*AQ%bTFFq3PjWVKsnQvVPiYl!!lswtpRiP3)2rU6;7 z{o~~HYGtyM+6?l}PoDmX)Hg-hEw8k@mP1hdbxqn&97bg3vk}Q>^uNB|vm(D=8SXD5 z<43jvhCe1S@w}q>KtzzVn@Eugx1-qZ|9vjQ=3(AxZoDy~-#HPYTI zAoj(6auBD>yM38dJ2nRv8GVO926-k?Zx6YNv(xzy*ui^{z^WLDD)N1I#FOM5yU5-7 z(X0j@b3r=U<7%5wGiQ(vL@v@=KWvA&sfzlA)fJ;>7gDTtugX>5X|}moEUaQga{ui& zkzsUnhNYRd7fwx*KQ!`*nA;UVbrX)P0geY1BPGG>XuKd4ndT-l@NLAHFkvKN@h@%D zpo$tD#%+8){N^_P42d{&V~hqD`9zi@dpWyLjpE|X_Y9*gZ-4`BzILoiD&bREOZP4r z&7ZYIyO&w-nCyh7#^H=f)=l4J3B&wH!IhLjw)5bW0K03t{E?X zTQk*htkm?j8MdW_+<&pH%yMhmL?b0)uRX~)^uVOz{bQ$%IEM**kr~1&>@a{CioLJ& zM?B2yEx`*cB7dp=FZ^I1(2X0a2OQhpsMFTEkDAgQ_>CJWMtro5n>E(!rVqbgn^_-o zotX>tR`*O3>^1$GE*pO43tcu3vz@&CskZRP%9TJNHo_cGLjRbi4{FemTKm}>riTmF zKylGOjUEDRPmG$A#-NbAeNlORwM@A`aS|P9gESCF_B__)`w~rgkbFTMkf)R^%ygb) zI1|_oZt-!MJADU^Lo^Ej+PvLG@SnvtRCt3OOof+cp(igxS0AB zbb<)0y#%3h-n~Zl5%0`$h#+_^Kl&7l`QtL^vU~S2_B1RpGEVU6C+2bsfp`t|wp<;U z2@;tdrd&ZLJV5TZMquibo=oqu5V{>Pc}u9Sie?-_LDsSkJrJL`fbM##vE`8#RUY4 z1=$ML2=-6{k;t7#G^S0uRONp{Y|~MJ!_s1(Ic7qX97LQDd4WQck^!ed zSZ9gmC35^rEjvQ<%@~v2W=!T?!56q77ZdP(mbMTEcG^Are7*vz*I}N?)BKn!<>U}g zfM09bHGYYBRkP902=pv8D9=TF5mXv7Q71OmYj zKoSqh!-2vVd(LPA0Llwgmqf1s;xB$w?00RGJE~mjH4l zP~Qm7k9rxJXd0EiUg)csF`#_RCxN$pn{o&OknD`_D-S6?z}dJ#x)I%`;VA^VT&Lq~NAyz=o6P@XeEHk}Y$G-V>WX;@1+ z?jjMY__Q2VNtL?khZ_cD(vbD3d7EKv@HY0XtLqS!jdOhRT0Sp^CcIE&uO|Sv@>L5z zXF51k)MJ=|2;Z6p{Mrh4q4mM~Ux|N$)|8$_m%I4ume@^7Rv-_pQZ3-q&XnSRJR&(i zSY=UX23Uc(s1Yam!d*WahoTtuyFe#~ChDZSe#Pv!)~RD!QJK%LK$ z67W%^4*4Z7Ur$<6c!r0Y*msr&TVV|Cfvb|gsg%|y8e)_#c-w&$`Wu;?Zq2n0ZuBi>}4uTeZ6DoUu z$W0!hs~{vN0|6%+ouV z(Jw{=w~9t_#S+!EHU7E~hO&PrqvaCXdVq&=;gPO<9dW!^xfd)tyu z-&XlRw;Ox3BA=1)cHvm=hgd%s**=m}#GGItKXGWmW$R( zvw@%T|G;QQOT7$>l8V6|#}9mwr=;Tnb!6d7H%K2MQ};5OX+2C5wjNKlD4TTf*=ATM zT)YN_Iu0c*Em8RkH|~O2lGHC*j5|z?wyR<$Sj-HAPU-v|T?f~Z|;A4!e)Wf6?_8QYjMTSrmj6~kKb$H902&madmZp$i@adhmILM``kD1sU4&qir zMvgx)2hBop!n=@xKY$=Bg3~XbDZ4j8O}!3QA+4lu)^x>cEG3{fSJ&w}T+Z@yWq$p_w%uo;u7m5up@c@;{ApU=b8``TgLBhOj#t_c z8OM?o1@$xIf@|Zwn!4y*ub!&fp(a&;s&V6Ba+esn;Ui-IWi4IEZNXI19W7 zRQy^}e3L@I7HCrP(f*#Rn0zOGu@|0PWpxmQ?h~OMnLV8!O8cvd`?+xR&QIWVj{Q=V zK7C4ja(aWOB539Wu_IKw!dRe;*k&jhUsgQnR+K)+{gHo~N3Gpg7@Vhg7V1O>Yn>Ej z5ah(PS*`>9OsOC8F|Nj#rvnF(TnjKBXS)q`!s{yLMYy5d33N}!*&{jHxUFwMkx9BS zOuyruR`d%mrEJ~PIg-~YyBxk6@Ak-dBG@kE4UeM|7|}=)dC9m#?5W|6B%qAjlNiT& zslO{3RoO;ENqQb+J@RGJeHBci_D3nDB#2;1@{fcYFP(qjrfh&$j8F{B7QN`KOY3sM z(7G2cV3#cJ4BXiJwK*U~UVIOqfl<)(fa(!^9MVTr0wDI%o9Q8-=lMtwKwKR4>M#7OsoI6 zVRq4|IEk|r=cQT*?zBOvxTwZ*#}U73f|FN({dBoCQ15=m_rh{-RSjp%lCe2>!hVUc zxiR9PK>L=){BnQ?*~5jeV8Lj}CLtU-3t^g0VC?6DF5wyxj9@{a&U&3a#6>VX`Ng?% z7F6cUts{4{!Wp%TGmTXjwSD811MSXp(vN>aOjU(;__I`qPCUFAel+yQlOzRha(}Xd zTo2LCba88^l!3EU*`?OA6p;hsCP~P+5Mw0Mf|zr4U!xO3pB+~E(dY7_5>x!9JpMdaFSyq9%?2dapOXWy ztU#5sejGwmSd4u!aLs<9OqS#ugOA%}&9lRbcfap;$A?OvP1*4Qm^nE_Q08*f3BD^> zoKlM?PGRZl+fzB8Ub~d)MR53=&-!Kjy$TSYoXhq@Ksz0K+J72pXDFSKfYbwFzOak{ zUW>a;K)=x->)MRa4(iawJ*V@uRNeHaw*_MzFNe@Q|0KvXksDLOlymK6&=CdX zZG!R7%eTu`-+1lvjL#RP^S`w;5o}Q2zLS#gBi;xbvh@8aB+I7^RWVK!&wzvBE@l35 zmxLTz;-7H?uMKRVpCXi`e|8j7UVc!bI_ga4_B)&iagKRHigOYCiI|ocLq-6|o*;2f zy~3oO_~4>*#SI{zFc=o!LzOvyLQgyJLs@6f^ogG|I;7vPm}K|D*?*^*cK3^p%KGY~J`r$izt`71c}LC6{_1C& zo?)zk-YmCLMw%f((}r>e8qGh@-ch>mk=yp!jJu%Vvf!PmCK;;D8RpQ)22TGWteFf#G=dZu_DOoo6 zCXp{@9YZY6QTgpsvzSi|ReJV{VvnM~u~mNOLPZmwLf@eH)QnM7jOXw>EMHMQeO3@S zxj9XL9P)cqAW%nkD`@lSt%*K{XAN(fAFq|r|~hoS+W(g``EaFHgqv4r{_6> z%T`xzzg=+4`1={3&B%nhT?M5+OPVx{rMDTjRE6sYh&yR#LmjQjCexOI?JC0%Y193R z`~8#43hJ=ph*6jiY`B8OFw%=UsiM)Kg&PCCyc8hq`g5@|c{Xo4OxzW%smyh@WEnu7 zY*0xzTb}b%*NVkPNqf)9)s^_OWAxcaw;>@CywOWnRJa?wSI8c&;U@E;<-$sc(B|UiqBf$ZQ|C8%@8Zw!kYoveQ~X#4AtwJsy8;aLs_GD=Tuv z?nv7-%x{_$ZIZe}uIj}io|}TcIboLQ{iG<@Sl^9h-RpQA2r2iLJB}EqcjDzpT-Wjf z@+?Q}AoNv2l^Vyq|B=vZj8gt5~@$0_{PNm46*-Hty89=uK319agynk*B~H|8m?APMnr+<%4cXslpPS;A?~1 zISEMoy&AleLXBFaI+J#C>>te5{-)blGs!NEdMCYy&qv% ztk0)v`m?=wY2oB%Fl7cva$UfS583OEHOf1G*tmfr0f}E?dRbf|38ystZYraMFEsVi ziQ%7rtiVq!3$@&!rE?gQO9o+`4>+B&9#DOC{ZN{v9RS-o!QSsjwKlyEkj<(d@YV|d z(2b?uKKe)3HVI#lrwV(($2pHO{nX)#vmv)%*vl1RG_FU~;qySSP7TF&>S*I3=i+Yl zpl`|&$P3>BjDP|8cBK%om+C*?HcH z?GZ(BQ6T~)ca63N(O+^6Gk0@4v^6uKsDE;}ODFM)T%xK8*uL$jmDyYV@jo4y~se=-~7(- zOfk&jEzjV`C)?m@FT}3#H~q|+n}&(C-ISIDRc58?z<#9%g0F#(+IE+}%7&iOHrx-r z;$h(+7l6JZTCgWCH5Lbkvn^Xt0_el0XWrN{>zuK9n|dmn`(*g9*S`=2Tdz*O9Yz@8 zfBc~S-(LSxv3GScHvP{VfEsV^Dr)GT@`+E|C8-iBkdVdI#PKC$NSB<`eR<(|Ax)g< z{eiL0nR@dZC@;)mYQM#$<%0u-x&KKj}Qdb??b&N%h5AO2sK*w z*@+vZNmak9vV3Rwch=rE-Yy$&t~9>hc8x*n@W0c8FyDlIdb9y`u^&!;g3~va!@oBx z_uQ4YF$UCLy1`in$HKFUNX=B`>EIwlB#mW*@PsiBoIHi$vEbIw4|gp_t=se~o}{d6 zaG|+*@x<`LTx3HXFv;*Fin<|Oc*_nDuw$V?S>!ti>sYz$@R?D>W~NE)IADx(xc=6& zL(v{P?RfYbUJxxzOJ)bGDm=cN4u35Do7MzgFyvn+=MS>LVeEvJaZl0u$PIi^Wra2j_d7aa+t)QY zRV&AB$8C5#wV0MH$+bqyM>G^3a$FAB=bqyGiqWF#C17DL#k~42Fp2HN+5q~+-`cZVwN6A zkGSr~X?jG~8yISgjX!@|7kYq=Z-_Z3(if;je-3dMGDPfqo@+HR>qeO@r?I0mEW*(?(jCrYHlpYC7la0p}JsO_s!FL zdYCGY*4HQ)HA$f{2&0QKGb|?FccRd+Z@#NZX6CbA6vTxBiQ5OYc97Tk#dwQ}&v6Ty z!#W%Fc&K^e0#_xn*hk=~oM-$gi;3B13;r2g3dWd#64Hr47i1dk33=uF4$w ze>%GgsHnE@Js=1Yf^;h(2-4jlCEY0)XlwdGctyb^ATGBwPe8*Pn9ia`8Wn=(mexuQ!+% zPmF)DCVh2!lO6ubYyjc9h^zr&TzjwVVjfTX2B-DM0j3zfB|Ed39CfYD+{xw9VgstP zFY=QL;9=7JR9cRDllh%5U8llP!TR%lcFbkkkw?@D%R|uo!Yop#+8O?7KME%SiG8)W@KsAyw{mH+(YIW#j$3d6v~3$$qkUycq>EJb@TuG^R4E5(kN3DLgFzdkL=irZRG%|g#@+PLR395I-Y_Ff zZwjmSgX44I#`|AF9OpI6g)^G$sH1go)K{Jq#K*9ls1C#zR8}|+^Y#}MEoEQJXQwi@ zPWqG&y`@&hgRhCPsW!<}GM}!d{5i3(=wUQMx?=-S$nf>!G}YY#tD3g=3%stqpQP=T z^>Q#haEn%vI*dRfuf8Hp(oZtH-1>O?0d-dB)k#xwTT-)em9p}5md|AET7v8bSGq87 z@ACIIJPWZbhrjV&a+2PL{l-W$+bKVaVo_+4q$sNkoTuk|VQ!b}A)*2eYeVc;tWn&Q z6_eE@)D5B*Z_Vno(abv%35v#?FH629)_Ix`z%}eyRsA*8?j~h~1bqh+gwncOp-O*Y zykc17jM_@wNn?p?;-2e^^yz?vQrs#7;zw!@RVNOIkp*ZB6mit<9@(YItfQ9jtrch< zVtn`|pqrzIG=Wl?^$%Dgu34zb`s@)cCTkV<@98eCxr`l7a)hi-@c0Od%P1ctO59Ze zQ)NX$@wYy><}3=_>uokOZ&?fegz9!4S^72KPXzyw#&D%=;Z42`DYuyw_nGySJb7o- zL1U%2b}vSr>e|2JjiiePAF&=BHZ9(?EDoosjin(Xj`!=_w~AWM8DhVsirndsj8X0| z6=}k>PT6WRH#r)@LfPEJbArKs8l%&+aC|7{(W~lEhqo|J#;2Zg3HYr3G*)Mm52Dsu}p`CN67R=$JzG zRl%QTF(7Yu-8EUfSDVq)_r@86)O|EcOY}wW++V?|c!qV%NGo0~TKM|8tr_B&-qqJ9 zsZOPLXB^2ib^;$iU)|*Zl6Wm9Td4F)AB&S)qfNeOf5Ie*ZS}J#;P;K*CCYj(o1r_v z`&RZ4f|^G>z^Z>^)kJ`Ds=HuTiU*CDu;)Z+`6e;1Gf=G>-1W0Zz>ZwmYK8Q-^dJ%Ag;`+!3g4dj{ zmq^M@!WUvGgX$L{u?n|wx=kak0=eb;ukk;7;S!!AB?&?4+NFD)bHwqPS7Trvvd1r# ztzhIQC-Kfdm=QYXGPJ*?65V8n&s}s-29_=eFME`o&ZjbrZu~SW{qw7jjGbLi&yl`w zmw*r#P?rhVA^&U`z<+Y$sv-F+fxSR-S2<|ogOAEh$>7$${yJSaf+AT z;2{|Z+Q*7&5%Mx{UJLG`e?dAIv%Bh_v< z3I%Ir9VH4YJ_tKV7S}_Ej^IAJ;Jq9~WBX`YLM&DzS<0sBdO-nRa_r>RO&^(Z6i$6x zjw{HFZ|>o6nZO5_N7~LrXZx5jGmndHL2<04gM7?XCOGx+Ja|>a=vmdf2?q^}ADS2) zbl#vq*Dk-kTaA-tn$}W?+bVd3kt(9D?}N0A3Yq}QeAv6|f0Zdt8om9-ha$^_1KbKV zioSabCm?=}Hb)EXA%h0)lT@f#(7j+>MDx73TSg-Yl&ag%Ehr|d3f)s&@t_Wh%=jTi zoY8I;yd+P0CJ7oi%%EK%Fzt&-oUNEh{9B_RBZo-LpKlP{k=^i0RaIipo-8>@2VFB8 zJ)0%n7@Jj24>Jf&W!0jSW`^>FX&?&jw1;_-or z7-Mnw@Jh$WjZYgZi2M!Y{`f*W&{JDCNWB69^0i7sXIIbVDZloiO2#PBY=2}Tlse;5PWTea_UbOSj%;7>{o)zQ zqhPNA1M_TgdA1BbZ;N6$>_}(Y(GpXM&#P608Ajk8vRdDCF7G89V+_Q1K?L2`~lj=L_HA;oUf-WM%OZm;J3oLy4MrY!_aVe z>=oTq2l)b1{CD;JJ$>F(&+}|%2EmhF5qCzuPM%f+|9F%g7j-GC{8~!1@4No$`R96| zO&oLl6A4Syt8@)-n!_}x@5CsV)}SFN*&EAAX=RGK-=gngIA5Q*$GmhOX&yt`NuF&N zXWtJ!R>03jq4+vd#N!f`5P^fmcX&5lL^2@cc#+~}F>{Zd-99EwU+0*e>&J{R3U&OY{v9 z$_$1ADLgWFyR9S^vNbbz0GcpjG2Bt{vDkIFF%q%D7L*E1O#eJdK4uS8B%Jk9D>MoL z&BEvLL5fS(P8z%V^ycw>?Iw#6%~AJRE2(zwBHuj6_3}gDTz(%z?s~h7g$p8b5}aUP zisIgMVI(K3h5Br8xCb5o?O08k8vh(;wAsVbbtej4?XZeGu5aC1L$ z>y>jUrUV#}8|3N74XV5Fd$;-q_tlR}984+rzF?7abrlsTsAuRXR*f9L-rNmg*0nq`2o3_$-2}*m< zcdUX-i6Vu~N)Jl*YM;T!2NT^w*Q<4BPtKA_HPKmtgg*f*z9SD|K9+tDF1FG}YT~r7 z^;)?np(?K!U-7Z0RtFJ@^gv7 zMQ!_BioIMSyuA-BA<6<+JZ9I{5h_NZEC~8L-dBwR(YsRM@6_8j6Y7i_^{DQC{(|(X z;ba}px0!+%#R@NyQgJZWGkR?i&%KZ>TBJp;hlIaI-PWwlrj@MKAPP;sWPiHU9etkC z@yn!*gl}maN>p;~O)%y&EWfTaf`PK zphoB|_igS(Ppy_-VZ)slI<{*y4B;KB{$v~jnH%A7%FltDM!eduC(|wGz@=q>ogzh( zC_^sAG|avYU5)Z>&%ib0Zg&Yhc9khSR6lhdxbxNeVD_$i&ePU0pK;&ph6vXxSiOi` ztq)PI;*e#M_M1ACbAgkWWAK6M-@{GH%$5n&>q%`R)o(d(Cjd`KxFRQ8%~dFnb4W4A zNouy;T;7xgr`#3x2x=VUwhxau^6h3F6i=HXFr2hL>omMMOB(=plGto%G1sH{e7>>P z)Ne=6B%xyU<4oidy956`AMtjpQ~A(<&`PW)wb0^A0b4qpD6TWnfND7hJ*+HUFs$vf5mTM?O$g!poG*E5w3`yh?+fxLwe>ys99opCfd4_(8rNZH9SBxWkv7 zx{mInj{X;3NUTHwq{K9AUr!g)m<^3j^!d~^$xlg{`@l~Jo|Q7}93>AY?BpiWdc3U_ zM>_YjgiC5&noB-9Ux}N}NGZ~f)+sHqJig@mx zvRXsi3GSMDOrk6g##(6O&06T5mUj&=4<8Rn5(0kAI8BD)Z0_5423&iCZna{oUF>`F z!6+1F>9W{c+pzMS7yjpqzL-U82It z*oDVxn(vLrrSwHxWlS*5Wd)ez^0g_8-Bt5T9Htf3)$g+7&EBSnCf@At20cze-nTl& zDO@P+i+SqDR^R9>N;Y24ql(h%Ux^SC77LXbC>5fZO=6oif*hf8n(j8z=vEHHtw++k z#HR~T(JOR}a4-mHR&Z#gqPtT}yh|Qd_Ot&e!as&KEOn3Bn06WLxe;tNg~cd5ltDzw6n>~@}{@I%pL0)=DXJ&YnV5jSGN5usxCiM6g*LPn<90Z|%tqCz_=*quYIt(ax3?+R>LE4N^HJFCCDW5P92fzWi2 z{6%ju5qxa-bvmPbFstFTfaxnff1{_)i;nW(b7j_kf7cJsXJiS-hE+>5L(ogcirK~1 zwqHHL7Zx$jqGBM+M1N^7!8R%JYLvF!=uSe6@&;92UpE^sT-QOLPJgA6p~AHIB2-6z zP?I4i$(9qQN9t z_gNVhvx(O@gIK9*t#y6eQ;a{YWAS0Uha_0ZgP}_vi{X(hopUl}ykdBcO`XPQIL(dv z*sx6TJpbgA)*T+a1E@S z6@swNaK88bqsKwy!wk~ujK2P_WfHKHx>2vXQJ2x`ed5K(w9D3d&XDqXzEXLNA?sdv zkx-@PQLPQNK;-PRh@o3~Hr|_N+@ZWjuaPUrb*CQ)9P=8Ub|+Zsk2|e|kGC(xAl5&w zt3GzYtzLhOo=t9J59V5kP^IwWv6C%_(kBc!eRNG zj*~$sUQt(mhIBhc1Mp13gYDWAALD`_RwOwC2IJ)mhP-*jfgCd|3{lO+YsT@}GLbJ` zT;nFr+>?)<3ra9~7~LOvs4>Q|&7&WFI8O0)OcB0{c3+)JLMtEBYD8H#3e5prE8rS- zRm0rTy_VU`?26o2^7&nTaH=8MohgSp|1Pfin*N8$c=a^{v~jIfc35piT__R0s-zl7 zjSw`Ulm1;Scwqq#4E{pRp*Ab{o+uvpoJlb>H6^dWlclgXC?~_bo5^$F`&+z$o4Loq zh!ZASt!32%3Li@S`0S{6;dY>h4CxlAc?#J^L% zMtItb@gcY3)`wRfWR1uvO}pW=cKaHl1=9IlG}!L@;j*NCZgv>;_huPit2(E6ZT5zK zayU#IhwQR?K<$wqtb*#eoYUA3LE|rMJZ06ILhXtv%U97Pq0uz-76}JSla^?^#~=-7 zj6B)Y4;VyenR5)&{-z&8RC^C7wNt=7XC0A-AtS1CNgI-CeBkDNsUZ{*{>?M%#Jxob z($OV{2;XU}0(x=yLbVFi6u&$tm5>Q{9!Lm+4 zj@oW7lL|AdGBa}tYgq{^yOOOFx)L)hGxORCoeTrrK;K|F$Jmv7dPN86rz7x#IMd6g zGc%|4Mze{h2M2xi4thoH>5+XE?aNqJc7T=-96Zhy6u{ZPCuM-T4Br|iXj|ms-#@b~ zmuAQyf1u~j>~8by0T*0|Na1`lx_HU-qyhf^X(lHkFC`(aqRJ>Iaftu|U6l0xixCLW zKK#}$h-Cmw8@r1H(50)e7O3A1Ko=I)-z*Gm4UNrB|J4wX=Kc#+^pA$$vPS<3K>XeQ zf6QI~3~-sl`gs>_{Qv|4R3|Pv{jCe%J^2oFQP2D@Zv7F2ii$-)YaorKM-Kv=xonx9 zf&ki|L6DUa6_-~LzZ}j#tOG^3eUSk7Nr7uGa(CZbrsw31zgWvFr~>wXHNJ>N_G@Tf z5)d|TbP$O3yCv|N>4^@E@UJ=|;$&!L^GFs*^qJcIae4-eUs~$VCk;rc-vTBV-w*i5 z_`k-NHhIXxChKTzWNK$=X#DWsh{pQL$DadII;6l5TvV3--ZDLtZv7q+`@g}Worym!^g!*qW$XGc1TeKm?{v>=r zq`QC#1%&s{mg#By;Me%_HVU=?`aioKow6Vh2rL5y!1W*3+lKD1p;b)noUBY80Cidi zQx^wOD^tTqKU>&=I(&uKfIb8Pk^XVL^%?&L(Z%PWDbS0bP1XiiXSNOCvoINuZ~
    {@^= z#dJv%@%X>ez!qkL<$^8Ta>+I5`CqwyDB}W41Y3UNlE}{IKN9_OaG)@<*OvqjLjIND zr^^mj{rM6xJM>qGz-s%c7BuY8z>4)=^5{qWiU&rz7Zw^;TlNwf^~LW(|72IlhfyiL zgeHmlUFe@|2CyQQm(ZFqzYG0M(h_z+UG%U%y{<>G0nlTrO{4FP;WW`u}qK`u!mK@;)5) z-1_1u`j2*D9PxMKzn>-l9PDz>xd0pZHQ3L=|M{r;yRVs^!~=ipCM+22`)>!=mqUsC mzf*kJ$Jk2_38PdyL$fdyI(8wPwu7 zTro4Yf;2D)6u{p;;lOU}|MTD!p&?blmePcsx~7W z=*w}wQ8wZ;Kjq`Xsqz}mJFho8-L=DtexV7;!L(G(wKqHi@00ag2; zqud-1CmXKXP+gkL#QZ4SYJ8RR6Q=qi!=*`u*BW8WQrO~*R@A6&6qJ=*^k<4xWP<&e zB3Z`{M;_GsE`IWBgg+ijw4Y0c>B;g5c?{LzD*8#SYuyW2v@ZT_P+ZE$z(zAI|ju zwe$b|WC4E}Hprio**pFF<^E~`{SOO62SZ~E(|;S+Uk#D})9@c-_&0~Yk`VjV$NOJ|mXQ<|l~Weo)Y5idA42`{ zT)pB{q-+URl*wX=eH>PM5L_v2Dbi|379T=dL(mLXGeSoY{`tt8-1)1(#QjZ8wun{o zVzvJGF7rBL5c;;YTaty!wMh|yqa=wacXh(Nn zZ+GX%UD_YIGs^1YkDr@&A@DD-kS|trRVtO-ynar0Uwzih_vC4i&GE9tTBO{JJ(A$2 z+Tl6{jy#;ARtx=< zo4xIQZ>T0&Z8d$u%7-k_v6u94exq+dc3B$<1Uz-vO)P zdIQ)nNrXlcJP>m=2viE7CZA*GjUWHXwlAa8qxF%Tse7as@;yTa--e}_gzD+z0eFVk zun30=*r|Pq1IjaqNeTBpuzrPS@76rH_fiJ;iAjr?o0L+7<4_g}wZ^=ZB z6GlUOL`YDZeh&yP2hVi9f2sx{2e&T+eJ?(uOTFfvm_*t5DR~r1ee4XpW-kEA0)d@7 z3SeWu1NP&zlcY&d!G{=^t2$q$!U6vGk5IfJs*UiCpw^o0Q>Wx#fE?C-SOBS(iveWn zMkoQ6K3Nc;Xl!ggK!{tDo@}0m8ixr15`^c{D-$dUC^a(nuHfw%ZyzYpz;cW65A*}I zuN{vJX`R;+9o1NBjY`8GDxD1|lose*V&xT9a53PU9JQmZ3EbpmHESvo|3V|7>25Rxj3 z{epDkSK~9IjZ;lnVTPp4)iExDIGQlJk=ED=~L9H z9-sXU7uTHlge;UTdqJTbmSBn$S%zfmREheS1nQQ zu-<(8@=G)9ab$3D_-xgTOu8N?5miMp7E^*C&~IvBFBBbsGf)|*|9lZ3333;FW?98M zQYW8zQ~ItW0C|5nxyS1Q4V&CKX41h!QyVm!1)&{WnJ6Y(#d-UCH#m3QA2r69cjy*! zj+Eni7`6hGS}5l!GEg9T+iyz83fFf(OmwUHkcHofG4?PXcRInj56x``pBa2p3S{#e z_*$ojX%RlfV8#jN7tt^ODC|7x*?UdqYd~FaL+;m{&_mFml4v&9NFMlbKP!MAuRj45 zf8(w&B7*ZMK2^jRkY&Kg_V7Wqk9FDCY_i~TWLErMIaH;_F74g=uyNz4A%YyO#CEI? zxNw!zl3mr*7Ra8NrNFh)&w4?>LRvGJr_@IT{PK$xQIj8!LJtIX3^^~SEtw{3F#h_5O z5c4ex6eB)Nq4)fy>gd{oB6=O95le^A1l0x8i(UymS0i760o9cn!JQ}{eAM7d4G*~* zr3m4m0B*d0kVyinQjPM-$rkG* ztfdS5!VCHABB9sk-~?kB1lNy>%u}7Drhu>9a(t~Y z$Zu+AuqvKWg*MIAWI^`K?oc~}LfsyZs1C(uh%Ip$wwh!3U|nXmG8r+h>c*B%TPPPa zl$L7p@XUrE%(tdUk-#@k6?sbjieE32M2)JzHXju!WQ-y+PF*R*aRovS@sXa4>W19W zW33fnN5|(X$&1P;!ZXZQGJcmvs)vr_*yg~gAF)YEjI7PV(IqX4=Ej3}N;$K=JH7uo zpXQk+YGnr4Pn6Q8w)+&jTs`3zv3Ci(m>juV1T*g@eTkcds5BX=0GCmQq7Pz-WkPq0 z&Dg#JNU6ctB%*zCN^t|vCtO0T99=d+kmbjYHBeUB;8X3g;r-I?#}9}C2DFEO#*C+n zDKzzq(%p?XF!&kWN=CnrHQ2_{4h<7lt~0^6C$;Mvg6kFIC`5P$EK<0jfNimCTkO(4 zx+aJF1~SRTi4x_<{N5vr6|frEmSP`ZC$-W1ulTk2SDTTd9d>=#sRV$gh3w-!DQ>IG zo4F=5{9ix)b>SEx^UBhJ*=rU&jUy5b{5m8irPKUTM-BO&b(J20TnBS|9V62CBlpL{ zoar5_Kx6o|D+Zl-k@;zs#$6e%h7UiZ+3~LihX*$|ja<7s^di#RKeWD%GBqlGp#9XZ zs`9(C=mPvPa9ScwJ{w4_%0?!ODdMbz>2L-hOP3msMdS@tYcTPC`1yVgRMF+ts?*u7 zUG?SlIsbUpg}|@7-T8^wpz~4V)7|l%Ds-}W_rtaGXc-($Z|HIl4(Dn2b5CyLM@xIB zroMCI;d&pKJ(|Eb9^0bJxd1!!2C7^?D37_UJ?oq^mjmoA>VsA&;#K90wvE zdrzZV;Kft|SJNoW*;iI#QSGbfxh3;>?Q=4x4;Fp&TaQ23VFDtR1jAKDCu4fZ;H)M;<7DBZ545|s3NUqk};Yp$I>Yf7>G!D4UUo|Els5D{0 zSY<}em=d>daFKPxM&fMlM$09v`o{Xj(o1nFEknMUMwc-cl%M5v*=V2%9gkR4kV3Rja(n2?z>=ggf91%$^ceDPQpAnhwx zbq~((IQo_-A41-4 z#TYN&65YVJWc8JaX(b5$85XbuFgTU#Q3wtKkU2Ci!}d?FmXdqtR}VV(=-+_<)J6VY znuiN=1cCq2nQ(ys0RBTnk&{>XQ=C^u%S-nQAPio=Q*Kp4P3l7n*&(3>=7E<#vvNx| z%bNFH6&3#QVs8SsjOGf#G<)eBPNxyRJ66&RPF`Mg{tR7u3KYvA=7+!@$Mq+ufXqrW z2&!d>K`Zz0#Bf0#o?{!xI*K0$=j0bOO`A64gsK$J=gmb8(Q@N9j4pK1b;$zxM$pq; zTVle=yj%h_%|e&7dG5aNlEj8vL(DQU$uBNW(2^AdCpWVZg4ue=C(Mq_;`vDJzHMe` zDAogGdf_oD!X&oWgoAO+G<$#CXHypNcQ@;dFaYXY?sS-IYr!9|EidmEYqyF;JKYSb zOSY>mmGd}}~Boa`M;om?zUot53>C#7knXe4D7CCXH8WND-)_YaleMk!Qp#_5$An3Nb8 zYMAP3m{=4Y++Y3w252>VSsir2T>sc3oh4iW(@;>H(rcu@pJ~lQ!I*c|mJ{}$> zI$ZRs2J+%28U_xKY@Gg0VD$bo0g~Ojj)yi$qP2*e zI8zb#NQu4t{s!*HzlUk!X$YkdSd9-DiWxtck&qj6K#A=|Qb|=DV`J&z#O=FCZbqPp zn3~#&p_tGCkRxPJeRQZWBw+c3ib0K?lPEEfn2cnIyIVT=c)19Xv--{grR$;C^c`4% zA?QYhP}og?LM`GPHj;`0%^4V$MJ}#TY@{Lr&6QW!^wE5{ltpNm)J8C;4Xdq9j2?y% ziD0$rNpD(E3Qco+D^dISUg2{D)${|w51;{7HdpJNz4gDOt25_GM+1opO<2wPu8fkX z2~a}Qjwy>ZVXSG@QGeuInMVlyMg_GfOC>Ox10hzqyt=qTU{a>~i7FZ~NK}wEqku9$ z!ibjni-ul|91tPmhTn`bJ`Uv~IS!p*{x)s~$0F<$gF@!iKSxE8R%^B9Jr4lVeExG2 z_jF-XMT(Y89HV9(1VB)6W@KwOG$ZP1*nn2X7BC6M1-z- zWcG0I_Vn@e5R|8rFa(|d`s%~M%dtZq0|K(i(B1Rb0dOP^=}27gX3OU+U4xp*lo8)9 zV@;y0G?%Ffm7Qj6uI52SigTD%f`A@SFvGDFcJ#*P=`G6D6-cjxyLk-y9&iL|YkG0& zhuien4>^0yrG&5c@%s}~4+Ojm%n^0>IQ5y5(m{2stHIvh`;+4PdPJIxc|UWdT*V%$ zQGH2X4>BX!C9w2ZRRk}B7T?$HfN#7&ccxYByj_@wS+X1C80cJuP?gvMldA;l*WS^( zp}c8IEkmjz$$pc>+VmSN_>q98Mg>J8%8-~Lku z7Db|R%=z2_meqjBaqg7!HKt-uN6nb0#K3)yXw7K}mQp68zvvkqUruNbOPgE@HW9Ga zMtdMg!P}TwSpotq3CBKIF#S<71$Hl{dZoZ()9Z5@6nun?L5a~w7+Sy-jmLntvCx@5 zybxOTAFmXR-+OgPXd0)?N?3V9wT!XGVt3gZ*DU9c^Q(X^V%SGcGGL=&P&l0xyi}&S z!?Qzf^h16Hj<)P@o)ts@;R1`gL%WlTjoq)waTbD>@s?N@^AedlS$M(|(_<2r=wSfbYOdxydo#pxg(;rtk*a z%U8pJ$NJVNNAf=GEurCi2Umz!9nJg=#=R2q_ciX7GUqM>(mrfg$46s0>SsP}sM1 zQ@_!tu}GU3FxiXkNt9q}BDto9!2d?|4+dd7*h(h!B&}m)cNBbe!5hXii*g9h7#2sk zqTo>CXNT)8?)hDSVNn>8tVokUM9h9|JV5s&P17zrnFw(ecDh51%`AwhdOS}6+|6dU zqsT1Ahl+%ga7cP{%G+ z)@eb`bu)l0rT32 zn!7eXptRpu1h9H--Yi*#(m5tNhmJ8n%oLUgBN^VLw#=$+w7|RBoZI{lg~U|kbmTAv zMIj_~`7kND5*5k&;cW6YRtm?TW3vHTO`&|=AC*^auQZO^#Wvoa9Y^QOP~!4vjND*A z%_>A{amI+E_c4t`_gnCiH^yBWW2h<($%S$WB z@y^%)?a1d~8#_`arktOp$Ut$Zv~8NT11PC4tG>b{YUg2t883Kg)U97g6$c3}K7-tvc8rQaR zRN_VAG>1F^X_&ua1kt|^05b}Q9nJ=#=y2}A)R{LLQ@MG10Wax%KS2xXA;N~TL5m|+ zm`?eXbi9Y=UCEpz*eg4R!_%tfVBT-vhu3G22qRZ>zh3JNyF={yvT83DRGSKwnAL_a zqIWWtG~33j*sg18*?h5h+2c}OL%K4g6zR?$f)Qj6G*OCLeNk~`1lucNPm#2CR13_E zy2JnG)MpsUHPiBFob0$g$LdyI47d&oHmN5)BJ0Ag=?q7dt$~# zn!`CJ_BCjPX<9UQ4a0EN_H)P(f0Hs4@I9l)%5r;5BW$Ou%{2I0&m_I!=yoG+pT&h| zha3B{&#iuDivKX>7a9Lv0LD8bEn175to5+cV$|{sOaF$+H>oG#aFIt^v6K0#Snt@C!(s7ehiG z0zzOtyGs{GM;=&ugrG^XlS^=GyCOrm}abiIPZa7uLl@- z1jGJ_)p=2P9pl(7@vf83V?xpO3cgXb#1!82e$~P$I`g4r_1V;vE}!>_>E--bT>sus z8|{@XGWO~2H8iFjWT|6YL+si;vNB1gk4cRRnKh|Ke3kS{J%rlOF_lU#T( zp!mxYK)`YRO{yafmcnVwR_Oca^nnD&66>zm&^U*M1+tJU-&8fWjF%<#h5MvU5G-VP z>1E5ch^xI-%4=NK71Y$ISe%>tgp(Rifg@siNU56-dD@@h1&YUaRt z6Rj*|%_;>u-wN_9z|2YtF&I-GnEg8aZL@~NxuPd6BF*7|U3FU~Z!hTfv|>bFN3`y4 zvT<-0z`H?VyTL#W=i16}>V9|`Y?WG{8$8?XY4`vQ%ePxm5{|$z@t8BsSYdeojQFcL ztikrm`O9VKymZ)OsIob)d7g$grK`Iw*V+RS55&00;wExgxMH^}870L80GNIhL%P6I zSA0eaWfVFJQA-27bzApri^}m*)Rv=y?!jMc)hC0FyS4>6pi+JoCB?Qw5dwnz8i3en z2>NQUfyF(_)`mgamYVm%R;d?0z+G*L!i0UL0i^pO>qT!b!|cuJYdybyy0G)3g8mDg zr|Xwa{9yg>ZzZP55YO|l4H?XZS(Vy?NZ6W%Y8H{>%aR}H0)obcB(!)1unEp$%&TH0 z^OOTd6zR!IrzB+)Bg|ZY!w(ZWlTC_-^6R2|S33IB8rYezm2aEXt?iSAo*^8FNAmzQ zG|2wM?_2}zot1lQCs1rd>qK&c)byeIiymU^kz4Zo1$7`|J&t^zzBSLZ{Fa@^?3G#_ zXp`aA26qsmwpTn4`fteF)<3fmf0}&FBz~NID}KOJ}&w0qtv8r|@0={-{a8iS|Y1RDCpuMD zAh%6-pi$((#HDN3#_jr43cB0%hA1k}{+Q79;}9cyD297$a{euXaF$j|jV>spQ92zt za|9a9i>!`P?~w}~!Kp|yj5hmer%7pnwooXhioZ$YwauQ4H*V7}c7~wLKH$upBZ}*_ z5u$-mcU_zJjmz+3B;87X+3hf9d0;mgw8OW(<;?@N<-`}Zh|ntivfzgYqiBS-8A~$r z?r9&!v01guI`&0q_U{WMCso7e7hYfa=lX3OH-jj&s^Ri{sR5$SKQ##_vgcS@vIlxZ zkU0uw*bzODxSayalbgDGCRV2o{Ki~)cY(~3L$rF(GDch!H>~zUnwjbl+hx6{_gaMw zPVtn%a{aC$S6Ov9>joojVo&w4aaxgdT!M#Z>dL2g)@vA_7`=~?#GJMI0_!EGe$4YS z(c*#vP&4Jd8i|-@IfBicl5Qf5i&-15XEd0)g{yZPgSk1d>_XNzwZ2)7As)q=OMA#L z`%dembrxDj>l9^bU$YZZf7LKlY>*1BI(U~O4FCJ&4HA$5uMa#=rN&IZ4bWI3Cs6UK z2#l(tfB5@;^eEK(EZ14qwwc5QSNK`!+i%bn6V1N5mMQu3+F))cvKzqbt7qCgOK7x# z{7bvAG|Jz?CzTwN~e2u;R>np zVRB^e`xqJA2`?x34xvrDMiuvL|FiL^N0;Z^Wyc#PpDSkw?IVD8cK2MCXMp8+`(HAu z-BC`}#Pvro;#W!JG?wWP`>R$kH*Wyy?(k(YIp^?Lp9R~r>mjDMkt*X4#9G;AW1oX@ zhLLkBvYDsis@!Hh_mVSEf;?xRwi$POj`Vi=58n?#$vd`6ue})4#HTzOn%(Z9mr16w z^(?>4Y`G#9ji}uli&_kfog<1<`+kV@b-mepicCKEAgF>=N)G7uuG(G0_&oPAB*73} z|8`G2l}L@o>tI%8sb*h}UNOf0g8yGa$lv-;u8a+OA^(U++kZBaKRUwST3P7<;J?cmgn`hv4e5u#0xlm z6A|^r4|~~EOX|WtUXDS6&-H>~KSA&hOz@X@0sw*F0X#;cr!eyYzzk%1tDyr%Pob3?1B7DzbGvg1pojdgZgmRvNB+2lP1~>huC5Y?4gi_ev&dk!>)ydGs(%w$g z!`Rf}ZwG$|I8#~HeqI28Qy17(&L zv$>W?xs7T!>Nn4r(JXXH=q5!D)e|ZtE2K3H=X!WsM(zqn?Utt5_#KY(HOI}i_9R+0 z^Fg!DG%P-o%t<0}@I}*4iIdde^ILVr_R#=dKobS*F55=9iXK!?uN2tmO}hSoV0@0E z#o7yFyR{$fm)^Sdhul%plUQB#m)_!4$e?N`Z(H;5Y}cWFY3Pr+rEdLxH?E993rCw( zhXc0s02pWwu||JhQTaR4wCvnCaMzmaRsUv`*m}(GIhxiX^zf`mb5*R|fl>iwZlTEo zg*=Cn*+3md5cy#?f0za+S80uwJfTo3BC$wdz^|X1ERdNlr4oKm zP`orYB3T4u-7emnOess~QKmxF9VCi{oU^7pg)T#;SSGD#}U&Ga~p}s;e(AE@|;wiSkf1`O{@l`=g*3 zDhl2f#n|<;nWjsyp?<1+De=4je<V^xW96S2Sc+fmsw|zPR_s zBgqh&;`T+4g+ zihWjLM%&CEk&=bA`=sU;?xcn_Oh(%juL6{_9i z^QFchJx8pMxSIL~^q)5wQ-sahp+B(_0simAis|pMN>tLdMixZjtxq>gcQsy9sLWCNZ_u=Wc3uU@et?_@K;(@qD&<4Zh zoW@EluEwD1)U*qkqv};~X6+*-PlGQoTP6_BcD96KljOb>NoP6IZ^0PTIGL3= z-shONl)7`wn-6#$O{XtW-Ij3*j#PUW($0P(SJHqA=H+D+!YipbvC@3qI20?{lMGZ< zA=(f?G2j+L=7y24E|q(B(2O@MU%`@QWE`8?n--Im`~I5ACKSX>&hNLdUsO2N4AUQi4XDKu*9|9!{vQ^!}WfA z(~TBpZGuZGMOzWSol=anTj^ic6yul`e>2h@ISKkW4g{=t{99vs=coAT1Co9FPUMj% zv>v=Wls7tdLokXq<$~Jxzr6_f+XKA3O+f4R4Q%#nmjP<2w?S^v=CsIL3R z&u>6<`kBhUel<|i4fZ2J)O8PwiKq~9JUnlYK84J?7F23JB+P!X@89yC2=^>dPsUlt zzTUTKxlAdAUNj9bm}6!nhhYX56)-R^Wb>h3()K1)kJ`bTQ~WnyS!Y>HC{K%_4ClV7 z;ro(ID68UpziA_&JblKPE$>8YbB3AB0Rn!e6cN?G_)~3mjpg}e-#gIwE0Bgs-4m!O zitq^Pi-PkkP^CBO#j3EU7r-=gZ=#Bl_cJ3}wN=0^kU$Uq`dwLecpyE0o*$eP4OPbH zv+;1VFwETG>oQ|z@m&lO+*m#Uv)+^t;SeXu3%zCPB!xu8xCY&*Qm}lP;##TSt{rSf z@&F#Ied*14seTjKG}mf&dLO6KYv{!{d#~p8LPiK<)`~W&igPg&eK0#U?l8kpUHk$z zvCLqtVFs6pb(T=A=pxc8-L>@&wdDN+vbfnB@;TnNL$paGk^&DABDAk5FN_%NjinV>n+Hs_hriivXW{+vJ~S72`qEZE zm#46H9nsj&zi{VKj%}Fb4{tg^|2sDmmVa`)T~2xuNGP4hmwvNX4@Z!yN&jI_$%+*jWLh8x4-*f{>3$eC!WyknT7egXm%} za~eLT`_|afY*(u4XFReylhIPCumhuHm1{9d+ zgYW*iJ|nrALrOs=-g{XpOr6s;3h&t-*ItY4m}F`$Ax3hqN@0-|-K2ZRKGb9NCw}7T zJV|1FEg2HtOojjf>q=4so<4%?uKL5d!{9t8kn}U3U20+Irwj!=S=Ifjcm-T|YWBzr zMj4dB%#Ck^BGXNJp#-F)`83SLK?{24n)k;7FiNGUr*t?@D>IigCzTNm#oUt|OGWx} z+UAY~YNiS5EK^?nEv+2U?{rfJLxY??M*G_6@HH2Egh`l1(W4f|gM-8@m{WMRoBb8* zto7}zY*iNz6t<+1Aq7%_T8C+|c!4a>jME*2Mr!((#N$ViwD4B;ne)+Wv6MPdm?K~{k3I*E{B=!uG z-d%1JT#;3EDq?!droN0+>0rua$4?BBqTdRk<@hSFwBa&%l6X{^Ga)f7iK_#0aL?je z-h3Dki=1^&-=Ggu8%bMJ+{--IgI?whTX4HN=#qWHjxK`3_*#^U#90%b0*NGxgM*@0 z8;$^Min;t^sa?sID4}yth(FPeDAQSSq(Qx=_m$(!!?ej;C0xpGu__q9p@N3`s8N27 z!ycdT2nN@X&>`q!rtT5Z9p)Cn&0$OxP$2xoREHDlCR`=C$L`L*VK*fZvUh|>ZV$fd zUweEu{0?8srue+UiZ?ZfCl@CpAE(2;_kIZ-!Qk|sM^;hhFErBe|86N zMZ2T*V`&7vI;X$nTZ_wX(Io zcTY+>2}i{=`ce#4#-cr@fHt#MU(s#T5_a_p*6|w;3!WD9D5iy}YVTbpc--_{vx(ab zhm2gx&Sl#A9)xrh&Z!v#F1&7K9o>U3U+Y;?**=t}LpqHv;%QS;8XY$vFou)*tl>|| zWhfxIwBM8;9fqhh-l^D48oH=@1}#L{?j0S5;UB+EL;Ccuu?cM!f6N+NNSaGo=tSro zp{cjv#wk+1dPtP2A!Vsb?n z*5yf#Gr4c%yrxyd1)E0GH*y)D2w#ZgQVe_oIfu};Eh)WAE_rxfqA}B$O9jq3^sCA| zU*czI8LdkC=k`of#7e&{MKkzYvx2ZR?ut)zLTkVptjnbkv9Yeuc3MNX{k z*v5$%{hleypN>Bkc|`RrLG`SBQO{p;hon(d)ie1WqSbd;l!vfPV_;+n?uchJonEvq z)##MrNX2dM4jDwnCE>^%n1?A;%PK)GB+Ln_OXAlWDwZGQ|Cv~m5$@paf7V1V|E+?C z?VoER+dqqBgdb0IldQ}03mUf8jbhl0Vf4?H5U7GsK|%{c1>5ZDk9C)aO&7L6&($be zDExn~Y91*HU*`hSGd|nKIe0oufnBC>)|yK>EsBybRlvGV-N~gFO&9}aNJ5#z&=A3_KJy)j0w$~ zc}5ehoJmrE4DaI96SP=#a-nqHm1+uOy}8vG)%9DhpvDCg?r{RbGiR=@ynL*gj$J6w z95HD&w8me|?-F%lY;Li&;dwjWs+q9_`lfM7;=Q0R@zpad|^Jkx$NC5zrl>q>#|G$>C zf9F7_x4Vz_;^Paay1e{!9TGQD{}jR4LzA$CkVDZvM;J1_4S6pni0F?dQIk;#C$M(f zd;#fk3Ko>M91avMrXI#XHbYXvw<+Xc3dA4eaHs3h!duO>g z_I%gn*y(%UocRrZGXn^VKhc-HJH2^>gXhxEurY2N;&DL;i+}Wlh|YHw>;v|U(Hzox z57GT8)Ia<>tO)ya^b#5CYYZ0nr2sp-ulV&=2F;bfeAgL^uX-06t83)`N9C?Pi%*!o z{?ZL9`j=Y&w&jaAtp4H+{KjV*^!G_0zvYWL`@~>(%Px!0W{~|&H2dqY_J@adf49|3 zRPeRcOIGl;^$S1Uhd_U~K~Mlb)H6pIt&l4udUG0CU5o2Iak>T-Pa1~U1VTS+Z2!Eou2CR1S7_`W z3F9287-P#z8hJz*-L7+(WLnBaa7)S_lJaJatjzp? zOEQH4Ku||pC_AlN7!tbk)=@=8JdMrE*YAoQLVHJ;|gh7$2to zpEt{FPMDZ1i{&27P@N_+ZJNa)th%*PB-xVHo=mdE`~a71g?kvR-3l#R+khrr?I`T~ z%cD*5O?$4sjawMN^~MzvS2He_-W6JAo;0$cY)1dZMqXG9SsN?jl86X0ZyJX>vZCyO z2g4OoryU1Xla*0ASyMb%1nxxPJ&R+Pw9Zbj`9KhzBO+yE%L*yo>_9Tht*NY!D01>$ z!??$e(+{28uxhJ4DfZN!__P)&WOeI3>$I0PvZ~nuc9vUNS)K8s2WVNHVVf>JWOj=^ z?TU|qXzbQ=GFcyOWNuc+da^EI=Rw-EmPCN?Yo?-YIjTM#o4JlntwdJ`qQ`PcwEl7*Cg0(a>5O-7jsiwnyv4Qh=`Y-}q{Bih=^jaJG|My|T5($d1JzOahO*HA-c!e1H{ zbbI#8`4Gl7GQx zeYbR(82$=IGzGpzSno2d{d%&e{O{#^VRa6{-s98eKU1Qd(0ZgIYHx(pS63L*QY z{7M<5av72x_{v-HfRFVHl@!|o-Au0zDmkx)R(840d1&x*_1MaC$9qmM0y&N7nriDC zcj+iJw94s%%vF|VwKH?SCXPl21my6jeog<~s#Uxh?>#{*!IVVA@%=sr(Z`spXvXL~ zFL#r2J7OOdvX}uCd72=8P|PA&GkE$3Fo^@lO%yd~UW?b1zC6MPI{G1It9EZ8uV%cc z_f(}(9FW}jSecsZa&WKw-j^s4X^T(EUKwe|tQqIlxCe&1$qmKGv)V0%3|2y{3%;%s zJ%5_Lo#k%~C zKzGf#_1RqU$0xH*mfO>?+{IlDdwF>htmSpDZK(eUZeX&t6J4M|i(d2X~)8eVrs233;)+UFblvs8>H_+P?HG9j9&SmZ409 z7_ki}F|r|n*))m+ZtLY0hG%H}JbT&Guo4O{d4h&H*I_K?MCMK;Bkxk3ML~O8a-Vv$ zsbBt_fX1gM8%IKc&8_CTdHT7Mo227&)D}f+$8Kr8 zBvo*<3|3zqL9wea_7~%+)GA{;Io59mTqY5Ca`qXM>yakc7%N4`oKZZ?MwGrJtjd5I zM*p&<_>}U|nWnVU-H%#RahfXkbnW?@4P)$CM&~$ME}iAp%}6Zeias=E*g7#V<0f9Kz6{mIag_`kV+>6Jrvx9qPrE1k zdiO)+WLZAe-O64I5*v_h88mS?PU;vLRh|YP(HIp*tP`R!>2AMoLJ4A<1C07oda}V- zquQv+PTW#A>j}0xx+Xuo`p|izxx~e$V$wJ@u?$HI3_<|0!2pI!j?-dQy0FXQ8)L9R z^6uYf%H|U}_-h{mBNf3Lv~we{-XoH2y-r|9z1R+E(jOzlR{~U3zQfM#2aM5|F1&g2 z7k4`p8AH*tD%%P$l9s}~ThltM%^m2w(6+>!LCzB+TVdWhX3c=0~?zIuqC z!gWn_!!mhVknPFD4VhXejGW~AB)x8gIzkhoq*7&X1qcoh-yMpiH_j2C!+u1sL@#?Y zVDmz(+n$IwAs~cB8(Q)qZ^3Q9AuFXuc6khl<3){mOBO^D)^1J4v1JKzBqk@v3uYoH zBsB&Zu^zMh&gZ{?PJ85n-e`)gl?EiG0pH6jyvI|0)9WE}6KXX6u$Q9Fd zPTtJKM4T^bvjbDTuIurUwNllz5q6xSJ9jVR0gKdoCVk+`w)vmcsWz-IO&Wm#0|2ys!w15%idrTQ9 zOm?{%tH3bOYt9?XqGk?JbpS35fz+YPA9>>w+Hz?Fgh|#CLn9;F6hu%-;H@0fi4#;n zpTlU*peJr99S|c|(H>obi#{~0H|BR?9E%h4ri?CG16Rq0QC(Ku?aDS?CfKe2%HB2X zU^F64^q_I7C`q!DnbOWW)`Rp6;}V89NTmDgKHuxs)qej$FP0w0LYOcQWiBXNVIwd# zQTSLlh8Z3YG`r`(^uRRl9s#J1W9WV6#)C*-z$o!g>4!{$ zX`X>Rf&&KJvjNv>D!fA78yLCN zqDnaJH33&8C@n}9U(k#`o?wR3p5-m-|H0Wi#)twmd!J+5wr$(CZQGtRwr$(CZQIrv zn`h^_dpFs;*}R*5lm5~lJ5{N!uB!j9&&Uo5F?kT_rRUP?q9rtk6rklGUMrIIy{(1} zd8v|gc~6nTcn`zhKvl&tsiELw1?nc=o$zSb`P@D3*yI{|uE0(2@$TC>E|L14!pVp0 z#v`inbr{-*lko17J-A3k=X^557_Ry_>4`>b;I6hN>^PmLVKQ~UnITB^_p9fLb5Z9M zNg9Umtmp=ZkFwFd97w!0DKmKwJ?{r0ryR)8iIazBk4=K6lAlC~O`NeRGC)>jn1UBn zib|6LBActW@L$|7EhV3#Ji5fcup*KTT|=oEl9!16h9q0mKdO>hA%>QY40=z*m}Fi) zHi^AtIuRc*z1nkdo8-;%PKlth7Qc(Z`VX$sRA`@7*WR_VtgYCP@+l>=pc*(h+8Pxg z;w3MU8rK{=DmdCJYr+MF0R7VwHmb8el~1w_B{4H}8RUN2!xUoQ$L~jpj`@j)?Wg=o z{;}jME=&T{lym)Pn7iP?Fm=t@kxsmOdkF~&x0rB9ogyK%?@gkH!GSl_O4yg@u$OsA z+S+fY5x7<7XgF?fiX~X*O3R(!f{Vd5kQc8Hk zLm`vw5R^$3&n9nzXo^wpCbVic4CAjaVw%1%NI~k|57v5gmo*MDfl>dd&(Lr~Tm#lU z(Y?Px2(tPWfL(__A$7H0mZ~wr2i?!ZVSh3?#zH_f$wW*lI7H!X8Zu-=PeWPxL2W7u zBOJF78xpTYBFI~gmD@{mG{!7fE1UDAu7t|AJdZso>ES^)UOtV|G|5o&Pkmkg_{ z6j!Wd^ikySt$dS*-MPc9^U7Xb~H zU?w!rz5ff`tDUweKAXHS3<=m2#5yq`+F6ae+MM!jX^=SsHABLKb#p7BSSv)9qmwgb z^&6r3QL?^524k9%B46sO%4P`Oh#s{^6f^sXJ{Zv3mWrtUu8IJ6-}j`u=Z<^p@kl`m zB&6mZ>PoOL<4801K)oUk%#YmmNM_eP+KUQul|k=rccIcHSEE`!)61UxQwC8A+8(D)dF4Ce_h zgt4h|bVE7g%3lJIcVe9bMaFKp$xa0ewwjp{oYbRrPpABH8z&hyuC8W7{~WF4k+RDvwGjO7laL ze$R~MA1A9UsAy4K-Z0ZyLintYfvionEcBV54Xe{*wSMfSKh zI#5o^hh%jh{+z(b{f_Db9zon;B1t0Dfoyx2_*#y|&9v9jbZbO+Fh!pgqyG3(<;qWa z%_MLN?MF^Zp5;E?&Q8w^fw#DR^?)nwx$}D-$S}>at5ebOufc*_m}3P`1^kFh)`(A4 zlD_MEtgFM6AP$!=`*O(+EOty%x=#K~vMj>BUNRGBr^^x0qpu+Tbx~p!q{p6!7l{Wp z;fKqUd39W-!VJ>q^>)D)jvyWIJj9Iwm`-z3Wwk4-YX;A5#8~Y<ru+q?J+M555G32GdqGa2@r)tr7+@~cnZ3-tExZf0k11J|?|W(lhQ_hYLm-Lmk6sMzJ{O$F^v7*$~1Y8X-Z$( z7TkhejWoxJGSj;jnATD<|K;{_%bi&h_0))ij%4G|Ba_On@4a@STt={ECUC2;<3CK0 zZ2e^b@zC#g_-`->d}aDTc)>m(Tep-?*tUI9=WX@hwPky7Tep%7c&J;q8!R`?-+n;b z+20FYSxawqMAP_wLQThFKjCp|ANe(nY>Ih>89vgD~Nv7P0z90@rGl~{w zIxjMER~bTC58D+SvaL%Ef5gU|;0y_brxEw_d)0JKRvZ8tFFyoo#yS&;^Szp`q`(B0 z(_Vtk5MZ=dz?Cn1Hb}qYotcl}1#aZVUt%!;{s#T+*?*2b4@-)S6LWS4WdQXy|gN;M7{ zF2^*NSU3@g=@^{JJCePpVHio0ZRT)vcjS-W%t2UmFhlc;@OU>>xL3-`Z@gEj;Me?O z4L3ukIH47aa*_Uv`DdXDV%uSYWrjO6U5y98)0H%AK(kT%MUD^PeYmw@*YTSn7mQqC z37&jO=2qn6g8D@c>(9jV2y981p;3jq6u(T3%0tS~{){@9ffm0^AEu6XLH@vYQM@`@ zgGh{Jlj%PdYjh%OpI#w&dr1CBq^=Wc(`H@DihvN?43zs(Dbb%?GeHV=LJsi!K*4E= zKj%T17fI%&vV1G8dxDEC=+ixBjON|JS2(~|Q*iy3w%`VK+P#OozWgdTVV)_od>G0V zWZ*ADKpQ!?f5SpjsMw<(R)*@QyEybyCb{&5=-c8ej7(I-j3N2W9*Z*ZrIR!&E_BKh zf>Uxh(8H;6Oj<^D`m#HvGUiIx&BlKs(6Uh>J(ux>QK(6gR_jzp={!&8xKcfMEB@$+ zRI=8kPp3Vbl4&{++k5k~5XRTuZ(%}&<##M-1x~ILDbu4NZ-6pX^-$Q#1*DhhcAfNLfiyr1YmO*L9 zNZq%5xMn~()OoOk@_`_Ia^rIB4&c!voh7DU0n)q7lBbg-m$!Qg$;U&V*Gk!5aBW9G zUx*}!kbAu(};J~l$_;T*Xp86fQz(t#7zh>^Br7ySaUHtC;2=61v!Aqq|@ zL{2+`dMI`k8q>mZB`JdA>`y_-CDX~YiHZJz6oL8y2K-^I6m!^CuhtFacb{48$RemK$7HPO zFj|j!RpQe)&R2tS6fS8Tb%8a@bfNjo!24;atQ&CwDVCZZYXB_%?)vMcq~zJOl6a{k z9U4fgHb|_2KpwmSbzx*1n-N}d;a>QSBj5}|Uopw2!s#S@fk^kisl^YZ^GKgz!5cgMw7jJwJV>k{crvLMbMxWRU3fKE6;2H$6|Ei2E4K@C}El#J4x zu&S3qPH}>i#@+s}O*skQR4t(Y)^ZFt1lb+7a9ZNG3NpUDlWOL&3qnJw*3{8l^@ zN_&5ZZEnHqAVenvaQAx+e3|ks=riU!BH*`oq_=lq2S9RXxXDs;g%_-(Ya%EZpw%Hw zhun!3sma)WK_w?0pd_5M0hlpchsqr){__ z9QS^=F~5m-O_CJNWbv7kVFWZ~AP)4oWKJK_R>i__6QTFzw%lD18}?GckHXPFKJOWz}uu#t2AfB-(NLvGnP-v1F7Tx@;Tks5T zTawwkY9FW$V~;kZ3u2ybY|FzC>(^r2XEKV|HUZ~uSk72?i>g;!?USt4Y5P&NhtjGF zkvb_>uyZ~D^cK{#zhP05F<6s$fp2mYwA>($%)A)}86%`>UPg0m$H_w0lW7*^(+)nn z^h-s{Hz1Iwp(JIc%89U(E*PcB0}>@Tqg1H-%4Py3Owec)&iPuLu${@Cke0C}Aicqh zo^GN$Oxu5ajFA+38TCQmW11*Q;fsS2$+~uq?|71iY7dd5$fcHi`W7vY@~9hPrnX0e zxKxpl;*ZQhvXPx|ucYCQz)6c?^(*GeA5BowZi1Cbs_0rYTrr!<@afFebO-!KXDj*E z3C!yn%=}l_KBbO!>>u8#yiB%Nv;AC|-v43Q9x_wa!**d)K%s5}npX7QUWMLb-}aE< zmNf?XrrXjnCGKmk7TRk>^-jcDCsFsT-5+^z!*Cc4a!5?x*KkIH9*IGZ%8nJBZGkmQ zol%&QPqU>t?{e;TCE>F_9&vxQhv2t89CfW`@{P-D-t$@$l)Qeb)geASREz*S2y6E` z^MC!R1X@w}ltjDXZ&vit{;jK+^hj^B6`fsYcjAX05~7}%y<8qk`KyTexv=*wPT_V< z0I5iwza+gleZo=Vw{QU45vX3HFHuD7(w9!IDxCEwNL}Ip6rAT%Y4;Ze=PO)+v=!bkysxsv3z=EgL4H-|e-i12hc9-zL-%{)ax~E_t5T9(_H8dhi zC*K-oJn+ma_=T5Iv>oW2$mx{-9lf6H@hEV@-!0+^kE7%tQ%@Ft%X~oSt>uZtr-(Zc zpTvG^cqkoL-bF=DejR2x@nzI~7f7b^M=qnlk6=#rkA$5pTYTc8XoORUPzcNsx$3G< z?{-1gd=x5VlPKv5+&Tc-9+V_2d4$VEFKm87@d!Q*=_f25BJ$FnMvRqNVliM-vg{WE zsn}!SI{p6!g779DjL{)YduM5$(KuMB^;)Xex*vrO)A? zRRg$Xa#625i?bEup4>v_fV!gOy_31`TbwmEvi zdW*2RHDV`6HH3`@a)1Lqz=5k|MsLg^CK$U2VVq517~q5|-fka_2r9z&j(NtVTTsEEA*^3on5i4+VIUAje4= zNRgNACES}WY3q_SaF#6ptNAKP=zy?I95N}$5XrbC>Ri*`ijHtJq}ziFVx-Et0LAV?4Z9H5Z#2lJsTAvoF;KTGTI69 zlz`?E*cYRsC;+!W3JmxBxBqb(*LsFQ*i+G8``&MTZUP07F@9SPZ;`VPOmp^j3j#CX z>zuiMv9l(JjK?*ToW20-9QuKn*|Y<- zv)g^Qv)hBQS@i?iv#YzWUvyOVzkaGSe#eeSeT}m(l&qY8 z1FW-i47E_(6;?`!bHu3Hkk0o;i%&EU6z&J457%1jA^L;#$h@Q+I+YdBW`)pwLeE`b zLk&3eB|_4q&=aYvby$&B8gMq(j}VgVJ6lOd2OL+6`N)!}b4&IceuWo@~gZ(3FGjD?t-# z(*nh50diVF9#@_)2=RiBRx%q#dQl};HW{>Xp`%rl4N18IE?1?@=g)?TxuQ0gyUv%c z4w0o8RME~?^?>yW+QT;9W<9kA9NxAl zmD3)#U6x$g%Rf0Tvjz4;tXmCk0UgaKzQbpiHf39__7Cru!39ZQ6cwJ{EL*8PC*gMk zmSs?{W{PtlA4mFl-Grol9-w*^aCjrJe&201Yf0{aRd(j2w*re*oeg+A18s56fn+Et zaK`RQ*)%S0n-p)8xI?V##Ufmqf_yq*lovtGfGM1P6Psrwt1T;5dJ6jDM_bpUeNCt^8ao+<@oQ(k zrac`_XWnE%iBj@oh7R>~O6l1lJ{4gU)bp)e;ENe%++$I|RK#*0q_wzi6-q`^|=juod7>pp)%e5cM!`rPW|Xd z5Ekq6qmuDzFIHAGy&X)E37k^@=go)oea{;Ci!W@_KmniFFDauuE{T{!3T{7*LEIOL zYURu@;DhD<2h&0|FKFcw+T<_2kj^)(PI)hgzM6h0^~&B5>m~ky*0XB6-Z$`ebuU<3 zrGMzwN?$+SvunG!FYrsH{m}O%w-VjV@tU(CmtWZ1H9<6vN7V7_V6aXt`EJ^H(=o^L ze$B9N>I(21?-De>0oiVqAp4rxeIHX6TI+0c{h-m0$lJjUi8?=1(@7t;c*Vc-Fn=WH zMJLv0WQAq<2;{sCnpy;Zi4Bar?cLC}tc2o$>CtYTq-!$q>gM~7T|b2+a4$G-8Alx> z?*7O9I12j{PrYv8Trh2Xv(IsL3~m(?zF{fAQV@#tlm|pM)ZyA;!7KI|2 zFaQ7sH~;{u|IhI+WqVgAW7Geh095~US5`&)kxP2nElm?whJYxkA&M_0Mf}S#+n*nv zAJWW$HV_!=oTaz8MfOWe3q^7fQ1pQ*nmvz>WUejYmq?4I*ZKwOJcHv~e~t8+tVYkB zz}IR%<|J*ABv%7fXZz0a?QMK+eg18_y;lGCxo-?ok4GO?kMSww)2lsHAN%d(Cop?! zIjXf?b>ObFi$19O)&s^oJQ1EYMEB##r!cN`K%o%$J85>IZdv8bs#$B z0ck5+XTUiMNnlDg>pJ_|77;?E>oswV%{*BRjr2O3Rbx6<<0iLp$6--2BcrF(da9!i z#><#Zvrd-Fj?3_LW;s1Yf^&n0mt>sScFA^85}s3(opeY;slMAJBQK@JDfePSE>=<8 z+5*m#uFW>l#AQ>$bQ(yvd6l4561C={H0wpmGivGp*mX5TU9x=f7SlOLlD}YP(r$LT za-Qy<4q?-e!}Nr-FEG>?3vcnRKJ*9+&k$olx?8f7)^h5~+-^oEQtk5+)HOq7!M=W) zQlLg)?c{!K?ZD|>HwNb4IAUlnD|xk`wGy6Gh-bW~soa*8bEmgSc1u$Q4#`503FQ^* zrf^RdR63v9LUazDPKQoiwz3D&(d9wxF$9ziGZj=4nx3MpQ zlxY3^P^X(y*PF8&C<~;OHs{pS7WG9R5TX^5rViP3OY5$yNxY8IPKA!g?=O4r){KTY zjoP@Y>O-)c0wXJ%{)f@*g-N`C6xK6~lE~WY6f3o^)8)tfqicuA4lUqK!7*HwSAW@^ z8^tp42dZe4Q+;H>Ov9o$y-lRfE7u5tUWvCD*L`&hfucSq zvQ!-uwG+SU%rwSNmD$Yd)@IiQu9@oEqf*E!77}CIoad?=0@X%NbPf1R)eZXk{X$ix zm+YEa>r{|J*Pa#IvKHS0mAh)2j-lNHF3+iFDQ6|UG6Wyg+EefmBLKnjAMg#D4cg?t z_oUinC9z-|ri2c-=4;B0O@)jvc*B}}EC#@12&8vBGd+J|teSp_+2R{C_AH2t{mfrH zPztrNIpV@h9)JM>y8;{@a52KXJ!kVQz_w6cN(#BEVrm8{hXgx1L*)CeSbV~1|Bl61 zuyy>i!r2!B+S-3&o$!eh#Art79f@tn<=gZR)|wXtzsYRW+|-ZQ*M&Tj3b(?u8c^E| zuSbuQ;hq)Ih=XL@?=JH)rD zizn|)C&$9h3>|&6NjWZ?XCY957!8AfZ*tj8G@(By9<<-vSc+jJ?(gILglG9m)9E|- zcop%PQvQLvehYB@BzELimD3y|f-z!$t=^Z|stxA$#bqlBr?uHXqH zwbJndOn7am2Fx?+h}KgnLWec+IQt8W!0+4^{k#M3xN_&M!5DPf52N<5Mi-?Ptlm(s zFH9kEg3|m4>4T0^v|YHSCBnfRbXgCqxHe9+T0~m7iiix+_fv-opc&2oS`je`bG<8;e}7DFACR~ zo)?GUP)}{c_bH{2Jt-WK2yXETqlK;I2&c&;{ve$=s{7C}U7i$W+%(Z9l0$9=lIKs7 zM|_^7xFgiq9aT%&JL?OV`s}{r1CL~>yiusE*lJib-OZlI{NrEc)IKM4j@qY2GpXwM zM!V8NZsi47WB-!Em-2hM(J}vj;Qw=GetEiSE#g;*g8K^+GGb?OW36dl8GX1H<4 zVTaGOw6l{s_oUUFm9-9mblt4qpH8-tsRY&SR!_-YjMht@&trhzDCa6GHEXt*oIaWM zX&9BBo55W8Jz)>H70gbvB*tGinP*WuY8GT>P-ns6Hi*yhNd(r7muWIqR>FWv%Ub zC#~M${1~;ABX;FY9ZB{_ngH6;;6DR0A<)cM-74TKS(PeVX-iVfW|>e$PO&#S37nnH zSt=zh7fvr7nQ?M^^Gc-Dpqyo>QC2S<%vD?x;p;ZeG~xonYe?Oo<8c#DsiNvumzc%ZBGH+Jg7mQnh9$x!4%9fa zRUtmtJK9KQV0!s#f&K)hD%>fA8R`z(H0Vm3@pPMZN0Dxuw2cb&z-6d5!exQi=Sp{E zvE%Ip258e=E2SDxP6jv~*?BWr(4Ls3ft=k%`2-?}q=b`9r>HapG)JX@+U+&@*t}4? zq8h;-@&lhnuHxbF!RwLr!Mm<7z|NjOHXANg03^f5&6?gW%v`mOII!PtrdaIUxD-=m z=p&7X=x%sCj-9YJNhfM)^D8^b_E4?0MydG-4)Y38BgL##w({Dy8Qyw%A zwr=$FT^Gd@g^NHCY(~j3zP|1ojwPJZkyi$83!n*Y4$c^9ys-PljmF=e!a0wekx9II zMLLq~EkC;6V8l}iM2o>4AP-`npb#~K!!o^_yY84y(EQ{AFdF0t|BzrY{!yD1u<%JzmD+u$}h$&DC9K0*9LK7&BE(@r7tqX^op?o zbcW%JB-`FEC7ZBA>eMOIs$P$;?g+8w0JFvzZJ8|?iHG&ig}Mz!6Q4*7q-Q#(k9&SB zk3i1|#*n>mcqamReaOf35O+YY_G`7bY-QX4pPERs>btqKdIhksz2mdfRSs_x{;=ip zV)&h|8;fYKpy8D;vzXLIM~>106B>bi&*>f83K08_YnLGT506R+4r#GBsYxE}F>d&k zqJW!fw*DWKDvXS-c0QY_wvC9}F_3@7aC<|oK3O?$ep2IetJCfVzCL{fZ)vV?aMf|Q zxUF{%-+~afs9x^#6?O=!LWBs*^V{>}!dyru#z|1WP`@E{De1ld z_@%ldbk}dV7@Ti;UvX}Xd;R(P6b2C8bk;4}H3lk!Si!I0*f7jyRVp8xL!}<~V+ZW6 zdQHm1s8Z5~ipghaZ%2Y@!nE$*VzE_+iRWj*sf+=F)?}3}HyP)cB*!JoWse`h>A)7z zxg=dO-y33yQp9?t@QnDE6~m%*vdZW}KF7+I129WrsAq!ia`~P3PltOhccc@P7kd_j ziA}^&U9pcY)dpS}fX4<(!)R@oL6+G1>p3)24cmg5C_}|g%1 zdxc8(zKZwbpecOG;YJZVT9dT$8}!Io=>J$=C#()Cz0(=zR!et4MJj)S{!gQ^rrFaC z{~GN->d^lUqy4|&9dzc>|*Iw}*?m@8mF57qdfo?RM*T#6aU+Yf~0>apW z*pDR7iYPF&zK!{g3-%qN6L96F7{@`w}x)>M+^59z`D$YJ@{K zYq20h&GgLG`8F?o#h1r4>wU9L~ zA?n+u>+Oe51ukkQGFguT?VP_NVj;Ztdbn3>#23ug6UBww0uD~gP5#dJcdZflpCH^f zU@bzg)UNg*UCqp{dj0MTX7=t8bG!cJFqx(_TrUo1B2 z^CMD{#%;2O{DGhF^&{!7JgL1yuKGP!yXL00M!`y1Pl%H3J^TOk3xvCl+<{-e5dYuv zi~puR{9-`l{|f`6-Fe-qK|yc`u0~s|;t0uSB?AKqX{L$C^A-pL{>Nh(Yi%FY9*m+Htm!890v+u;bL~?4L*idfs zSa(`NSq8>H6S7@OQ`v0f(HubNxq!8$G>c^J4kl%b{*p*9u4U-S>?*5Yo_CoN3JOfz z^f**Uoz7lK)=Hg@U$7@nlmob8FxDktuDFG9kQ+BOYG}w72*#?kI^D>4r4bUo7AqN5 z#os>k5T@a++xG98FXtAQs|p&pj+D&&RXZ7vZ?O47an%x6u)BE|<9NJ5Us?7I{iz~< zJogE^_?HBmJd+}Cz*S#IxVp~=oS!u&#{fBS$XleS;?vY*{u$1OUJ!3jo0K z|2x9}ck<2y>7lZ+a<=`dcWUZkGlT_*i3Vu`D%hW24H=&fA~A@B=9unDNSu_x!EESU zwOX>Odj+%#+SWb~r3JLw`3JSRB(rj<^$>#J4O8olZt=WCDWqZt#(Tc4j#ch_$u z=`inmh5I_p%HsosN{-yo^FXe96vFS`4dTDsht<=FW%m*s$?`Zp_3;31^K|G!f2bLy z{dy<#w|m~V)!D5*!qua4cQ}&!*&fO3a_tVA^7gDw;(xvH;7@~RXawhNUxFUGH?#XH zNB_aVKb)h3zd5}Ldw+!R_Zu9(KJe7V+nze%%Y7)1u$$~zdN(s9hrM~#`n)XSO|(f#>9npoNL1KksH(ZxJ%RH0JUGe_oVYb89~1jt?em3 z`gi_jUCTGJ<(Wa=GuWbzIb+S$TYH494Wm{{y%8x(|-` zH4iQOmVl0R|BCmu9+c-{2zrh8FWmoOKacmVPfsHz&-0F6j|2B#<kg) z5-#wFIf1?=OM69u*?iX$uHO+8Am*#a3G8{KOcNLauXa^!h1h^KP!Pcyot;KYXJvjl zdVX$4r>ndb$#6J(b5nF`ZMH6_sk_qYx?A*FR+TzaM_J4)T3wBOR=c^nvf#ZQ0lKOR z>y%|$`#kg@y43U00>3?R95w{_s;EJP2}cKq zU3)MKu{(fdp!P~46Eav3Ei%@GL#dY`-a-~^Ra9m$5kJ)jo+%nJq9$)_Y7Kl-0?fC4 z!YINWB#E)mxHt+%i`WP(>4Xkokd4Gy%Gkq~CH`+XGE<&6yc42ccK_A1i8alz&{ga< z7O_Ac@VOXfxQJ2KsW?#9Gy-iV3p+U?SSOb<&UWHP4};Ap@Vx=GD}3rU-V}A*Ny?bk zHYwwAVXLDw%Z3$F7-D2iM8n%hL%@qb{R$3tbW6*^>=;tX739eJ=K9AwpcxP?^GW#p zLF-GnwG=BW;wat>5rk)1aM8iB42bDhuqni4w?=sTQX3l%>lOFrYQ{ZTDl4`g4MsQ( z^zhJjEBA_tb-DC`&Q1;`jK<#6l_YQPM62OW5|Mgb zE?=(wxw)uzs4hMtKUQ&tA+}J29z9b!HZ84jzXWrJj)8TIQ5EIhl$f1xpqU&+Vn@bJ zAQ^Znbgi<@5l`po&B`Z#8iqOqGF*~i&~8f%QMHB3yzT}e%uP%J6dx`L!!`O64=wc- znHC5!jcM1I_sivILMSEd0Se*yG8( zjtEcQ#-T*Q(-UZi6pG{4vrCfpxMx!)39-QF6N}c(?N+q zj%K<~q|Q%N2BxMg&Vv=MVPm_UD3NI!b=2U-oJ%6l(_?-zchH8DKzVF@j?JVkQ5o#z zNMI+%%<5*u9@FxCa_2=Y6S+(zaSWHZSOHsCwBI~JT1dQZ9eJEWgAWJ(t`tN|ZjEiJ zh3DqwN@9L(qh;@|Q6_CKFezXrXmK`bbR1ELxlWmXD$t#1sVq#3n3&P1C>0vRYHcPs z9=kdW63bwQ?YM?_C7a8Ss9`^QZDDE12Y=lf&N}!qg$a?d;)Ut)NYf@CEzz7c;2^yY zW14xE@6b$&X0N@87sVF36@JoMmA>MO|AHh=8f{7wD!_sQ2fBU|YXK=PERAf|&B%`G zi*sp0?zwHSU7UgAeAK|!UDGvyuzF;C&rpLKjspih%JEdfxH3j!QnFzrIC`|W zh1w~Qy|MB{o(%&|bWmf)1Iqcwjhh_Bf?Ryx$f*usfK$iQ(_lPHmh0s!OV= zxDFOK=@#Fr@2|`vbT6%`JQ`1*LEPqV7oGQ^z{Ll9Mubd1XqYp}*o}T*(wj3;3ET^r z#D%sbE3sJ{iKpBglp6-uqMeReo*Bn<0trU`5oAqeaK=`qO(J1gv=20Wu4n``Jw4y% z_Y~{fiz*k5#%96_9lnP)N67IDf3UIk5$HE?gCrG`ZE0S1ZKtGp?h-xO}> zBn%Ddp{PjnhIQ8*AlM7CVq7?8A?_H~Aq}EDUO}f_6G7utT_u z3h%otaM=NZunnp?F^qM*B}dHLg~7!hLX2(X2j*%tIgBIRwLtb1OYWsy5A~NInB3@Z z1N_=7l>a>TPjEOJ=H_9U!xUkJn{=m;S`!;4j2Mh#F2^3i-arJNV*nu?${y>mXtOkq z=tltgK8LUl4IN=jW|xJc@^v9+iYjbqyNXYo#5Lg_X<2>qPxFW9)D@-ES*-i;plU`W z=N3X*#I5)6Noc!}&O}VrIL8+)O8Hmut@Rh!7vwJ6@Cpg#8}y0;rgNLUT4khz61>(x zt7a-|(QjeB->RB0jwng{0YyB>B$747Y~t&c!c4M#nI;WMv!h;IM|hK<_Bs3t#dxGaS48pVutLl{2w%pE2??|6YKH5a^XT8&e0Oz@F3TK<1*O}zx z@vJ3t0M;hcMC?aMX+r1$8&F4FIOQOoA4~d!6aR=X&LvjoO5J+lP<|X4*gb~kDGd2X zfC~9F33h72Bx#%Mkw#Bdwa+G|kFqz!97&U;j;6{CYcP6V0QZs7w6RpGGJ5Xr1FL-$44ZANG-2fQy&j6y$!@`_f zBQEfdXS8z8)9@ev`(;K-9VV!Ho3DdtXK78$iyfs{GwXyyKT1%brWlzGB~&$awGxkt zq%UWX2A7N#d0G+>mvQ|~;OTXtNJ>SuNmoiygIO}Br{(^Yb}+-i1RuR368%#l$3z`8 z+nrZ-V$@0xaXBOL$748cS$=SPF1~mqx8}C7L&+#FOVf;Wq-m-*5WW(EX{!yyR85Ik zR@gV(Zu{`9;cFDdFPm9yBitW0u5hhXz9^?N8E2VCX|eL=9h4WE4+%o*$)u{z=W_{t?aLqM3v@21D4XmL99V z)H#@%3@#ruEDW(llt9I8gtkeeU?^JN4kPG7ox{X_m>RYl?G7sQxm+W@V0z(uqUltOEg{H@(ZXh3n6McO2J13!>@As!6WEEr zJTEzp$|KLnWjONWFkA>INJ!?z#Un1T+?X>AjgZF+khJ*M(u$*?c6}ZJ#*IjC+lQ9% zJU~W1-5h}_rl@DtmFGwFnuALVe+n}#9+-?~lkKOmV=|xw6t>{NAtDkdtDVE6>g;B# z^uCngp4npDgwXhoF{#a7 z=W&Dd8nk3e((eW|C>6C?6)YQAagJbd8u)E2yH|TCa&20k+V_c70VdMuYGkTGPv;4R z?fIGt0#0J>YmF;iCRi8!;Zl`Ela21;kHc$**{$&9=h_W4~rNbQU+Twq(n)Y8D*n2BgI zu0u0g@&I(zc2?gSKt?=W7;`hkBE z+u;n616~YjK*hv^YoTuq9^tF*U35%&GLQ5npd~PC6OM_wImjio3ggv718Uln&8;Q^ zG*+b=doxQ!DiTy4L|ss0yklI6*U3?3`rVSl%~bCj$!tu*au!UStdJ6Yc}Rd+czY|H z*<~Qq%Y@$u@@C+F%N;ObV=YUc3R&wHp4vu=rzO(T%_d!tXe^Y-wI;PCxN;!0!vYUt zrA~)AZY;))`t@3FWa{b}u5+`KDNc5mWJ;gGOMHdE!2Ts{M-#e5#H4a_g$8B1b}bEU zta*asqd_$Z(T{)IofG1%x7ig}{mwD)hbUQ@^r#o>Q8@D|a@NIh?*0Kk!O7=I}b$+K>{vZ^UGfQ9zGnHb%X4e!DHc0x6@DPc+?U-K1sjKBA<$iMDPa)I`p186n zXq2B7d|5a=V~?#)4`3h>*1H+oDma4w{7sf6$p3Z)J#aGBm_Npi5h1d96QgM3z}u66 z_vPjdD)SdQm=%Mcft28$k-SmtNkrsl-j97qrw#FT&`d414Ox{JA@>}edTk2n5=dH; zuWQy+-^iJ|w)oJOh-H2Chu)zI2dnh&7ZaxlKaER z)Y9Gd<*D$oVs3CMpQzL|6P3R3JfVgGYTus)z29aT<{#=0+0@(tw5A`Vf7*$9BkdcUT9ew?|k)6E0hDg zbKPP-IN!{au!38{^Q)^i_z!k|AYX36I4`W%KXCzI90I_Y7V)4g3P7+V`2)@K@xBZ$ z*vIJaP@VhjJKf|e7v4k|PrNy9KOo0L&J6M8*pf=v(l~V_xvI$ggY{^e`!Es$e>`wS zV$3jB;TYg~RfzV0x4O7f+DXf&=|3Q!sBQucyRt`)TO0aB7}kLr5glfzMI+atVX;>L ziJ}bA`N4)F$ce2mP0?}m)gLILMb^Q9BP+x#Pm~!dp~c+&KEbu@r;iva^)f2ql%(_8 zk-^g7l%l{ZbQw|&u;`T<9=GJBmr!DgWPyJn4Y=^%4kRe~_+A}VZV6h<~Dyv5v zlJ_WurcgLxJ(3}wH%3`*Ir$$3`h`9C)1!Xtd2VbG=Z^_eRLx0%9Pw&XCa?>hLg>*` zW;4q}^=1fHNN}lGk@FM@a19BqOGG-cWTzO@w`KYDwZ{mQpsb^76T69Y>GjwJ9HFs z)>`sx zE@i7|w?UTGrtiHM&pG*Ne}j@bsug^hFDF8BgigIG?ak2dz451S0y%p-RLE239%hQ< z(N%5&DtDSw(|q0?%Ihg93)%L!nt!-SMqVYD{h)#GeVL~Ah8(^SV#nePQ2bz4-XeLWz>yHlP>h~E%5$V}>vIAvQ%ca5@T6a;$%RuMI& z@(k%|v}bp@nbs0exFP|8LCla=7OX;XOe_NOAd)YgHvJ!+eFb0~$)mFM_dEUj{mwJ9jG8f&DLzZ|xW!@dioKG%*^}UD7ZZ!GAk$)3X?EY=b?ls=4fqH!m*Ft{ggbQxU`B9 z*dYVUst7q)vx2~}2Ttb_dDUfS^H44PJrF(kzyXP;k95@Ti037m6wYTpc?gWz;w`c# zUT2GcC8cg)lLzHp`p5)X1%1_PaS>KWFO>!yObBUA_-;A~%JC!B$a_=4yiZ+T_Gr|I z;)U;VCqA%tTU236RiSEpZ;C}Kp#Xs=qGQ07&95u?vZ!7sp-};1DpwX&yMe-;fKlyN z>j^TJ+m2?iN`0hA9HGF8SL2=PS8tQuJzF9?c8N2o?I=fzyu`!s=|D4^=TrfAz=)c3B1R|`h&r(61O!?A915fN$LrxJPFivJpid1_JW$nwfQfs*U`nB&9Q-Uq+NaNdZx&b!av~J#lX4A zfLf~Q>y7zQriUhCf*HO-dn98>)=bu!!n!Jeq=MP0fb-AkaT~@cDe=Re`MnT- z!Hu6gcU8J|!VpA$3Malnz#w>qGyFck!}bcAw}o9u1kOqhT`H&ai2~e-yiGr13Svz4 zsryvIcOe@#NX8hEI~z9eWeAZy3pUs^0mMxf6BwVOzh{1kTr?aPB};Uu(!(Ec2>2=@|!=mbzxk70l&L<#JiJb#{2lXnN1wBAzzD0P6Uyb2<>Jcfksn3oo ztr{pdoQ>t^W8Em^_vq~!VdN<_21rr{qdjXfaFw1^_6(&KO)o5##&~YxKr?x6YRzTC z)I?si#>1y)&TUK?Yo5<6GkX3w4a{zsoXhPCat(V*zCkAE{AfXjS zJA82}7sp*#bBf=Rw)!fu87R~k3yO-_2dvdAu?fu?;A?150zvYGEQ$%?%!yvuBB_)Y zFSC+(h=ShU0T+VugVwYhT@n-JNBIU}8D;;pmmIl}3Z9>rF**u)OPB0)KSeZuQFVV_ zvoU;vu>%6RrOx3=qf2vHvn9pn+7+Et@A}1bkemZ#cS`j@baGH-n?b87NRd_- zhI22h*%WMCxKuLjw*OxKlFJPt=I$di=NwaeiCA@_Zm>wFpK}EwC9e|%y-Si*)(Qd> z-;gEZjw++56G$?2Tq)q5*t%dl5YYxTcM)^d z)blhgrc64Z=N+aw z7aET0s1$9ZcZs1W3^Z+5tqit-sF3 zX@Dlx6_b35T2s8!%|qfW1=xWiF>VV|lY z;`Lrj+lq^PlT~ZOx?bJM;VxHM==HYp)hEuT$%tB_GTI;f^i##qM4&~JL{mSSHxGk+ z(Js>CD`3tl2B-!M6B~ja_Er&soyO<}DlSmmC=x0rI5&F%>gu96kf^ESu};*PT*{!*uoTcP0j^SCzHlE4B( zz)V4*8v->s<-oRPFG#d4I)kAd`pMppo|z#8*ZF0cB$ zB^NuAqY78XN$wRXevAk2R%c3{6)12MuOXjvLX`N*?*P@&?G(M})p7z!%=pWd!w0;d zC9sR-L@_BO(ktTxmvRQt%0lZRv0%_D_}U$K^l>3iCV*{r@S=bTeFL-Y zSnT;e5pW{&LQ1=wg0LeYImJ~LZ)yI2D~uE~9WObNUUVKRCi zqPhO`?ZbvU27~FI3-a}Xx0z;HU!}DIzGj5{OP<4XW2deL6_o5UBc~Td11FMzQOcb+SdWlq6 z!&(Zt!t{3}OG@O^`CUq7-F2CVGS$quY{M^h))6bR_~hMXt@s+ZR^0tEU&r$6W#s52 zfw>Reie4z_oI8ga3Wl&fhL07l4{tWD`IxN(B_%QgNM)KHbwmx(Q=Q~q(q7WOh6OCk zwmh%;EHuIGp_s{b$-s*M(v1b>+#GAw!gzLG&1?$AYw%rEGbd<{c7B=(@ZEHBcR};U^0AYk z=ZLEV;;Ut(WxEuVqrS9<0UN3-#_D9`)SB_CgVUrNnAhi6_4NI*jsvl?lxMG_oDI?j z>Ux_{H0%K3qaO*}k-LvNmBZ*|S9Ym&**aSaHa+A9ZF)ObL0?TXCw3NK&Vpa}7trnG zT&D!&ise6JZ&z3^B$ibZ^ZZEoMp&`(`DAuQEbZ_ab^^#%sNj7#LgzO zRxir$=)H1zKz!$X0@`YM*!hpUL9FSb=J0wQPEFln@7Tv?GCCiZ;?yd5f|0EGNb5i! za8Ezz6ytVV)|y_LoN}}Z{Q%?5dO^mY%joxBs<7+0LvGJ%i>xrK*l1ZQdH8aN<&)nQ zrE6{rIkEPY)Cnma4&a`+0!o2Ex{^ZwBCs==?bHZs?S4U7`kj$;XZMT1Xtm{hr&J3d z-FX5FYh1j){Hek4wEQVDw3(OZ6^#z1(1zVJWQXWpLARL~0$m^-zoWZj`WwMF+?}Ic zX(qplPtQ-~Oa1)Tr1u4CxFvwgv$Dq9cv}_LO7kQ{?c@_u-0O}hOtMO&+PmM164&w8XWHz_lZMv#!{e2B9rc)vOZ>hLL}*YiC~(io*p6dF+Syucb}? z7WOD(D{J?U0(YO|G;OEpQTn5&C9|9o1^aF2S@mu}hy=|975#ZSDG8jHg-Qsz;!-_| z3W&?o;>Ep4b=(BE{1G}s1#w#BmFs}_v#Y$l07Y?PNju)2pTRiT{Y;=jy|FVERCo)JD4!E&z(;WZm^Fzs z<#_O^S!l135b`4iNBadgo(DXFNV_BHm?-XM9c1Y&m+B3Svsbw1s+xhMBtFg*KYmT6 zWEP_2Q8mY1t8ed$T8&F*&L~8R_vkPpz>Nkn- zIJ6U+4XCx}_KrHp$;Ka=9O#6QtU&4_-(dV_AIU!I?ekTd6sK%Cr52v>r4nF>Z+P}2HxS4p>7PD&!IgNf~wdR2VLpLG;^cykG89Q1)FE~ za-E9lw5W%rdKytKBxVRr3F`gSC-p8_WP=OLHTIJQvVCNSmd1BQ+$yd`txs|_EZ#u= z&NbuyU8bui+eUYb^gmkZAFPtRbxiISnSbD5d9jZ2RxtjsO7@O|<<&IFR58i4t{KM; z9Is#8Xa6P(cGmSme4>8!S+mL3(fl+SVMSt!vNFz}Tbcyl=!0j`jt%&gBV|*f|4BhC z0#gikF!6<01>V~)ah%~=TxC!ID~tfd>-{g2DinX(qA|b@{}FeqxNHNc1juuo#L1AK zSeq9lNrCtw3<`ccOG24AR|4&Wg7TI**|YCJ8u&iD283YDaGvR;2v1x&KhdK}8 z8TH+=Jx@$iYD0ZcJtE(lvW}eJ#NLI+8ncYN!*}uyDGTyLYY+pJr;!UjURzUstjTo}B#pkZ1c zwAiAC%*Z|qaFRVNhMW8*6zyegh8e%Dr^4ke%hRL!)m0nk<<(Qe zWeaP|W$&5hxAT?MRIW`Bb)SwE$1&Hjd-nBXul0*=e0<+nXfvpF%q)~Pq%5|>M69;F z$qJAg%O`2S=NlJ4AIXmCgZp0gOI_gR3?DMnH_d`KsEM~Je31BjSEKXjD|d8HDJ)07 zfSaf>-bk$v_%!$m`}KeQDZqj)%WR}g(ZT!Vd~;-?6wMS zCt!7`ZYu*HZOmd-Og2&Q&tGYLo`XVpS{q@>9Cfrp+eyRedeEx8Z)sd7y*&nWn%%&1Hs#jR$Hja$_rOU?E`vcN#eKZ|DJugrc5{(w zP)(-8P3mbc7<=MGu@EpL69*_Jm>n>hGV9UhZ`y4%quOO{+F$PG*6O3IPe-+-NEW+p zd}0=mu^E%y$k?HB9qH2t)#-)iXsXf{6Jm_bGkL5fO+ySg($M|t29hyF!_zoYU>evp zV{)jMs*2c_n!m9uE!UN~8&WL@Lx1{oU9X|RX0=YNhwmosPo%lT`A#DS;?!oXUO4NO z8@X(`-r4HCojzV;SyKrI(?UY@ZY)U%oxsJtQ?u!Dci_FiOs0<^)(4-GkVrOAT<<32wU-=n{4Drlgw2VWXMC=zz?C9D&cvT zoNeZj$-#|*E#6%b(6|-i#A)8Apy--*F5qE`+gfj?O_(rHW}32}7mOQ2!v5RKRtCOQ_WRfY@~oEKTwLovWNlwDk*R4?&N7W^X^Q*k%hqhWl2 zC&HzKBY^FTvV^5HR3NWpYGr1IQ%-T^_zDjr{b+1`r6AP~FkeXkjAOEzmKM{OBU!@* z{Nar z1X;WMs??x;XV=0)CN}hNVQbs|3*~oqM+WnIU!C^Fye5_$6e+`6=p4G#D;OYm%alXt=SKNT(S`k1ywEL#wnMB4!&lprd7%fDYAWC#@;xCi;wLZvb zMS%>AWyn0RU3z`et)Q#r076Q6zXfhu*ydZ25RFNPv)GFI_Ay+$zb*5@@J&`<8~FN1 zQKYW@flKhyZ!h34$!XX7j70f;41unWT4v7+SuGTn6FgUs(B7zvLtLnxO9SnnRqm{7 zYiz%zdt(D4RjK@$u~z!?yIv6EAlwkup|jqtTV3FZd=D}GSU7%?*#D7aFF;K}!MV9( zJxg{i}#9r_1V8sHPZ$~)yUP}nn;d8)bygX}>Lyf9qN*7*%sQ@F9PyUd&d zIJ`}7taCQEcs%BV2!| zKAC;zY!9GbR5zwsZ=szk@=#R*=1(o29xfmPHaf!%BdPh~ zuf%C+6KOnJGjpUc(jO8!ieeELf?3BbLsPsz6}M9BJw@hvBWoE!IxJQpnZVE2Bvw3* zgUT$sD7TAlD(YftO?qufge0rr*ruVkQnH?*G%rJU%`-Ssa!blrFh@ajqM&;eSFP_( z$mv-1kU?8=piS>Qwu)ZZ%$^|?0R=4wl{v}BZaj#CK<`w7L9+SWJEU65c}0m3oc`E4 zlU}k!J?li`*MSuRurIc?=!x!b4OY4}c>NUyog-mUI zSHl}L-!R4+VOjiXgj0z_P3QlB!zcS3*rJrK(GKLL6uW2*#_(h{5v+(^jpAZMuxU!35(?FC8v_?ohaKvI zs#EVGN1Q(!#0dgj8YCPgi$;wFY63;i_+m@kuN-K$OOo0TiL${ipsN=xmtBcgESjB@ zM+|-Q2aVYtCS|^@97UU;<3UTU-)k~$!TBWT6S~E>b49M=23`+bp9i7uTO9;rK0!&3 z3^>PRl@GF;AK%0cZhI6ru)c(>Wj8eW`BYe8 zR9k_pbja~VJ|(bVw(90}D6wjZj!z1GN&(@YyjaAm!Q}x#@UBV(yP^!bTYaw3Eo*ia ztvD*L;TcZbdsUs^ZC`w9KGhzT4T4r?Nm)FRf%`3%6xT5LRVlaw1W^52dlMnVsMJer zP#pBg)Zj}%A)4>-Y+e}Q!*RDR9pd-R=6*BOe7Lz<;AxV%8v`lqvO_Pap1In0(|L@z z1;(Q0Og36RDcuB@u8)em#~tPYw22cj+K(`_t^!ogAOXIC5_ZADbq;ANczNy?B_nOh zo3@o-S0&rU=l$+IX~>PVjMqKtA`8r<$F2C%v-0!16>IAYaxUHh+Nwd=+$6|*oK04E zF2R9Q%wMW?3prBz2}_TsY6F@@Bcvsc*8dDmoZ7)ab zOpaFdsFFO>1@C=_2gXV~Ha9sw@NSF1Bi_8B1F3OxSdRC`Wm@QsPipA8;?sCwKYHhO z#Qv984ur!3a!>I$dUAZw-Ahc#x7N@bVb*9u*~83t(FL8`$=6~(KT?cu%k{;K?*JRB z7*Tsd=gytC!b>T*sqpVV-na||>=W?YKA`dI?{*tZs9z%RrjA(=Ru!N4{Q9{zF3;R^ zeJ6#UD2DK+e!xz7*A$MZvKk)hI^?b!Na8Cc^okU54DopPtBUuw2Qx3bevy35>LEE8 zc#9=^bFP1WtZlQALs){#T0Lm)O0G3#br00`2ukNOG7qD`{6~3i+xor9f+Fv0 z3>q8!Z^EY+L1p7HKJnpwxoREtWR24NWQErh+`{sRI_xsb!58om7cRnXKi)ap!sCLz zVJShCY;-f0=fR6DNps0dsk1Etg_7Z?kgRJf?QjXQw0oKd+oq{Jo_(9en170z;#?P+ z+4})4?1iA%U>o4_6g5q|Za8!7nI_^bOG#7OIozI-TlG|4tV6}{Lv+MKZu<3ou|>YN z#l2^-Hny<$i+5hxyqvaXv(7gQ?Hj3rgJwJ@DjqWP{ps4{1?D`yV}&Q9Z+XMEr|ibP z7XG*;WP`4->ERs^2|&;#IRz+D_yK4;^4weBEszdg5rtb&h2P4}WLb;efNL~x(2Bj~ zIK`=_E>UQ9ng*}=1XJ~zx+FAnWYcnv<#E>S(!yb)rX}9&HA1RL-L~zIcDI$VTMvnQ zSsf3CQEH!-S05rGz66p|j>gR(lx_e?sIh3H;d~q|%V#Nm&_R=mR6G}N#=Mc4%)q0T zkwXrWhZaRmxt+vQ+d+g|v}pQ5D;LJX&-UT=B!u!QE5m2O38QX5QEwW; z@9_f&wlzj`{OrXu%K^2QYM>8jV11sa-J#y)alC}Vk-0PgU^%gsE&{skCJj4&t`8LGxkcf%JpK@x&Q0kBy zKDQ9l-ZfXJL%+UDT(Eg% ziHvv=3(gofZYLt6sNkN6K}4zNj;7RBWEU^|BK7EzBIP)XlMOlQLvJ|$_2?PK?`{!vac-fWtZF~*Ay-QTzMLa z3PB}!(S!mSKD;8Myln-Xdy^uF;ViNbf_*^>W_6j2@p*1YrZORmDqMNz_5mKuEAM5b z22oLO)VSYg$G|f%72MJGoTgd%>?2n%IbwJ0Yg?};R3|Khi)kS`tDnSGzZTZ6bfr^HC5Cv$P8go@g1Xg^Tyy_AbC)ET zBfzH~_B0q2(mWM+0zFem6;{v!;?0tlT|kto2k-<_0LCOZ{<8fE+c-J6|J{F=uB5IwEr;@IGsRj99w97eU&56u_;IDG z@k2TJSXSd_G4gp<#MqQv_>qT=2fAml)`u)65LzZ$I?nBA2k!fPr6O-ce1~%mvVE_8 zF3GFy{ZLuC$9%sw%(Ti~3*t`LHds4#3K4%F;|%t>kbpa*V?0^9el{?JBVgZPlJGZ36Z9k9DlR);oP>_zvDi z5iW(WOxq!!oWAo)V>z`+_(iocjbXSUScj#rI~G^2oq+8oEYhdfxry&UO`vno%W2^{ zB44>4n#2aJby0mBPO6^@&3edu{44G?e1i$CrT_(sohJ$Or0fM5>M(&{J$P-)nIbRV zu4ROds^Bt1h2}06&^6@ueSuym@oc|*WRfsSMXr|e7=n#WwVB+P&#}x$7K&A9HB~j) zq5<6Hm+o*vuzHO@WVLk-<2-hg;+urF4p95`L)KUV>4`=6S1Z2@wRFZ{-BSAa>(=h( zsy^O9c5|}kNaLV8Tk(sCQZZuDGSsqS_`!o}bJiP%M#&JI_VQ|Utp~5W1WGiWJQ8GL zQ8=zcTaV+WP+e3bVpJpNnHmeKa}6}>B$f5vKoTahOkn(YHSEIBI5O?jE3fi(h&F>C zEjg-KUYMLHaO0>rW7*tB^nRhK6|g5C_!I?tQ#+(dge@JoRv+gQ&75#nTLs%YKqJTk zPfK_gA_dJlSc!4ECG>rPJ@y1?t_I4A)RPsu2h9pJmw1YvBJ3mdAal1xifitBc+wfK zGi3#!{O7;t>-oX>%G4#AA1RZE2y9dO?ykqY;ZS5AXd!m2ZHzawgKBAYXLy-7$~( z<_Si`gYE`O`Z!2_Nb^x%)+tp<6@l7s(->47>t(zM5bF>bFvF@G2WGNCg3~Cmxrc2a z6$?sfFgZXZcCF0>ub08`TWv`+hGZOFnZ@%E!OWONctV|2-pEamjT0?MxI!#Wv&*_d zd|?lZ`iRVN82U?@c9D45=Pf|DRe}Nn;{D6rR>9cB*umJw(AenjeYZ~KTvk&V!)NWT zzJUfk1hyV^K@Yyc0Y+;mO-4<=KST(+QJ?-~dDmgirRBz^t<3(dv)v*`cgBd|5)?m; z6B)u@GP3VGiO)4YWBdNiRMpa#`0ofjd~1$t`|fM_1*f`i+%Ks5kp>+8E?TidD)7@# zPFvcz=Ol<-PH8mflEcPLDUa|+p8y2j*2~W7#?xG4Hs{&5ZOK17R?%dPE!={$X3y{j zQ6&wknyW~M@Ru!VHJcqW3|pvNn#k|{(T=%acm8Hs2;x_?_LX&(%P&zC+t|3RueLW>hO!-QYy44eR+PHlw@Bg4i5>Mxhz)| zRxZToasBQsxRb$*D1&>_Ij`80)}*GRq++G&;ZzWk8WtArsl0rv`(-&5c2gNThnsE? zE}2~i?9-_ySyu*k2o+4nk;9IYVm}CQ(4xs^{nxd~A^w9Jdk!PW<+E_k=ps@Mc-D)) zwn4=@_s?yD8TASou<$^iB%2t$fj5vvTvz!(hT_*Z{_JRW1IBqMnU+-%WAvj63&_JB zS*}D8L(ff|31eato=(c^}+Z^wk+J0-a3ef9?uifpe9+EZIYJLm&WH-Wbz)m9-JUg8}`H3q_4}O zce4Yug-xtAE_vnB6_(TL%b2KTQLbvn>{*cd3ZE5MEcH6*`6{Unwi8gr#4dc$+TK9^ zJXGhL7%eIRxaj-@NJY!_m(LzQFF_@ZfBV^QQ_{Aa)3 z{aDqL>Q9a)O!oeJDzm3`P2QlC!s2UWN0+|>V9;&jvn%C;?)Pib>~cy$&Wk;--L!qc zBhl;Wa+8R$(6H$fb-AQG1!1U#e_2Wh7@V`>LZ0racY+Lx8dLP{sQ5fY^Z`uMc-nY>FVvELyb-$-SWPCi{+2+vW@ ze#6N&)A$M*aAomL0Fu&BfolqK2(N(_Ftb@-HK;zX>x19L9$$NSe1ha8lfvECT(z$T z!Ikk?K@A<7x89N~b>HUMuDsS`qW$rN1|xu`a&%~tYEqN zzat`X@0K|FF_bs2cqczcIP`_$PUqrH&bVxT4;_49=IA^dud+ff zWf#R4%v&I;-5{WS6Qke4o;Pay9ilp!efVUqGnQ$if=0D!h;_Tx)Swk;cbO(+UQ{xWczI!=yH)OtngA(cA{u^l!c*c+Nz9*&?l%ro9GNoXkQW} z5YX9sARwl{YNEegk*ZqSDeYqVv>UmOS91`cixC48EMUZrh6F=nz3=Qx;+LRBEC;5+ zVGT9XcVs;a*3=ZXE?ZLZ#4fAvg(0tBLZd{cr;Hq%NOti!kDS&$t@X7sT}r;wJ@;O# z39V_-7ZPWzS$`aJb#LGI&b;>?PsD%OFLRZTMAL%T1B)_$Fai>0XNA!Bl1P!Ybo&5= zj~9Qq4IITy+!mVW{;|gtWWv7mU1sk$k_Q~TxIKHgOgaIu_76YW$=k?SxKa60+lgU1 zs5LtXM^#z8X#6y|Y3Rny9-8sT!R?qbuD7urrr5wXG#TA<-pOttVR8{vj7wezFw;p~ z$1;=Uagglj&Rt0Op{37V6o=SSnQ=*NZ-`tM2CNyXo8&N=5XYG)5YU^QvAxenWe7!W z)mEYGVu5+$bU8a*nV9Tow;axBX=#Q4Z@IHtVr^`f6u2dicj+rL8md%S{;ak{4c^&y z&FTzmb9#6%O1(18QCa3&A_WHN>ANJA3LW8zfDsyLH&Q9m4dv*&z~fOf(m)meQG~

    aY>HarG{<jaN5;n{x(1AyG9r_N9xS*~Q%5c85sNBTkMAKiD2U8REUgt= zjBIjOp8H{n*Rh=v<^?ipx}OsBqzqh|Esu;}p z7Yiv*9v-{$oF>gfv57AW+2Q3PA2w8NS(=ns4_!)yhg53;FW(W z6P%jwTop}a4e?`fF{8@dCZp^-#duy4CMBM%qoO6S58Hqmyopq$P;Qi3B*T2t`45*t zxP+nmt+@5W3XM?6A&;|m`w7Q%es$wSVrcp1lCf{CMoa8e z+M^8}QLd`$RBQM-s;)6zVuTfYH|zZ1K(HZ-`E05Rsg3h#V*Fv$L&b$rin%p^+u2LC z=ibQ+-yYZ0PNfF{qZe#Sq#v8TWE*E~#vacU)h1Qg2D$?Z7d>d5_GHc;-$VVyB&1dW z7{p1wU#H5-ey;50P|Zq_+k(NmCF5JV5=m(9mt*=OLyY*t4+fllL9Hab*!?e@$YMuggUt<>@W*qd1`_=(jkyzy-$vaH zb|YQTCH63%7RMH+T9NxJqd8gRvpMN>9W9J^>%NU>k?M4~2O;7O`|K1HYD!962Sig0 zZ<)_``5}cR4H~@+p;DndVVk}UQo5C9_Op{X?!%#WtGm}MVC?PJn}+Nx7Zg1NB;6mn z9;HPh=&pYPK~Gi3+`){NY|>3CFvfH9RB2Mq(Q?Qi(xz#Wu2IFIawpL4vdjogT$pXd zrGECJ5~Nx`A91(cj&@!+t3kO|@8VFgt;gS97Fp|5_mM+Q^MjVjF*5_{we5ayw9R8_ zd#tB980aUu$m_?5)9-b69uiOE$;4@okSPIO2g*HA=YT+y8Dv|iF3o=o6GFP-yV@HM z!*oHMDZ8lVoO}!a^=8fxkXndxEil@#F81ntW4)^&jVJW`E;>6C*n>H;8)@hcP9iZM zJ|?0vI97gRbP`Ke|5rzWYPuMy;mZfHCw@l;wO!l?y)jz|ep_jT@;t?2X> zqhvzY?#DA0UaE3jVa3^4x}Qb9l`KDJW4#HlCtic@Eq%3 zC$usy(FdNl?QvP|k?%)xe5hOWPj?aqTPAq@-t!!;t=k2ri2DMbx&K-baL)<7wol2< z@3qJ`Ztnw^uFHjDmC@OKg5+pDAWrL@8nj*&T{LFpI10J(e!(!bXRTyti>LhZa`DuU zE=6WBq-5ynqq=-tj*dTG@ug0}X&}xb)`{CA)Z=q}Tjr!QUx8Ie*0pcg@&(nqvHELaW!N@U61T z@dvS*a7e6the3Tsr#ejU-u%DZ5SYJx5#E<&z8Yt~pd)@$?VDe>G7QA@D8FmLJM*Z%RAV-Ve`dVH|)x-kLdg;cZ9!g}^i zhVd;6>FvAVb41Duw&lP_v+^xKMW1x3DWzB!kuYSH8Q$gN+%2rCuY(SqQPeuI`4rr6 zidO=U2g+r7o0yJ{$L!_<@?~ta>J!pEP}E#;ww06xfs_X^64VOHW^%KT#b6wRQ%5N? zM+Z4O^=zNTKP!gUY6!+1L8p9Q-eUeBttjvnDYxnaq;2Z7-@5`%HmMj?Fn(?aO=te4 z0zYQco*r7V;)D;b-4#pFK&XRnnD7%qUU7vsU!*XPyk+tBk(wjFX17z#P&xq*Q-Bj) z^z7Zs_N=cz`wZvRtmJ0n4L90jZd)dMy4AgFKJv@wlrKB$qAA8Es9Q@g$KxwIwjV$% z?agys$h)o-B6EXFZ%3s1DrriYm}dlTB=}lhv^fE1y#xnYoaWPgf_20 z;y6+Z&k#aVq{krh$O=*`y`>h-v38QW$}s2MJC(=1O4GL&1UX4y5EM{oz(oxZP&l9{ z#NSqadw~K1_<{enAOf8V{9KV1RuZ5Qml2_R9RdO*+524-5-1EH`T+}-{T8s(1t9+- z%HPEP{*voY_0OWx0y5$v!iq|?(jtE#051Q3AqQmH{%!e5t^mON2f4Mri?I!$n8ok( z|0<0CyDZR8Vc&lhHng?2wzYAju>$1hHn%bTk6=IJ2mikO1Z(~8VE+mHXW@ zJz)PX|F^aV|9gOcr_o=5KKu!&{XYZ!E&BWqg+Ky@0#sOAyA@&$FcBT@;^z-$SMKk|5^B_k!HnZ5|{uO z-2hLXKbQf+!vGEcgZl4A`l~7Yx@~7`O>5_1YiI1>WNz&E&s3fOD&ozn)*CnTw2mAk^aI^aqCI|1N5*MA1E`5%%Y1A?&serxk9 z;xs++SABqH#{ss@`6ont(*K4iWNTw$ZtCoy?__RkBkX2qZ1;2J-}B6J-;e!F+$;{@ zqWKfg0{MUA`7ML_!4Y8dmpT5A&h%^2;6FGL?fxpqzc->^ zXJGxoP#X8&8U8dM>(_(u>$I9bpc%jZcj$jihWNiukH5~Y_yayX=`Xw_Z5GY=GRfOU%7tuqW{6gQu|lA o{^V2tmFQPr=pRH2^?#A*_u~%+@caV-kpLb6us}dv9Y44JAH%rjD*ylh literal 0 HcmV?d00001 diff --git a/src/client/jni/libPVFS2JNI_common.h b/src/client/jni/libPVFS2JNI_common.h new file mode 100644 index 0000000..c5c28c7 --- /dev/null +++ b/src/client/jni/libPVFS2JNI_common.h @@ -0,0 +1,69 @@ +#ifndef LIBPVFS2JNI_COMMON_H +#define LIBPVFS2JNI_COMMON_H + +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif + +#ifdef _FORTIFY_SOURCE +# undef _FORTIFY_SOURCE +# define _FORTIFY_SOURCE 0 +#endif + +#include +#include + +#define JNI_INITIAL_ARRAY_LIST_SIZE 1024 +#define NULL_JOBJECT ((jobject) NULL) + +//#define JNI_DEBUG + +/* Helpful Debugging Macros for JNI Layer */ +#ifdef JNI_DEBUG +#undef JNI_DEBUG +#define JNI_DEBUG 1 /* Enable debugging information for JNI Layer. */ + +#define JNI_PRINT(...) \ + do \ + { \ + fprintf(stdout, __VA_ARGS__); \ + fflush(stdout); \ + } while(0) + +#define JNI_ERROR(...) \ + do \ + { \ + fprintf(stderr, __VA_ARGS__); \ + fflush(stderr); \ + } while(0) + +#define JNI_PFI() \ + do \ + { \ + printf("function called: {%s}\n", __PRETTY_FUNCTION__); \ + fflush(stdout); \ + } while(0) + +#define JNI_PERROR() \ + do \ + { \ + if(errno != 0) \ + { \ + fprintf(stderr, "errno= %d\t" \ + "Error detected on line %d in function %s\n\t", \ + errno, __LINE__, __PRETTY_FUNCTION__); \ + perror(""); \ + fflush(stderr); \ + } \ + } while(0) + +#else /* No debugging info. */ + +#define JNI_DEBUG 0 +#define JNI_PRINT(...) do {} while(0) +#define JNI_ERROR(...) do {} while(0) +#define JNI_PFI() do {} while(0) +#define JNI_PERROR() do {} while(0) +#endif + +#endif /* #ifndef LIBPVFS2JNI_COMMON_H */ diff --git a/src/client/jni/libPVFS2POSIXJNI.c b/src/client/jni/libPVFS2POSIXJNI.c new file mode 100644 index 0000000..f4a4014 --- /dev/null +++ b/src/client/jni/libPVFS2POSIXJNI.c @@ -0,0 +1,1576 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ + +#include "libPVFS2JNI_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "org_orangefs_usrint_PVFS2POSIXJNI.h" + +/* Forward Declarations */ +static int fill_stat(JNIEnv *env, struct stat *ptr, jobject *inst); +//static int fill_statfs(JNIEnv *env, struct statfs *ptr, jobject *inst); + +/* Convert allocated struct to an instance of our Stat Class */ +static int fill_stat(JNIEnv *env, struct stat *ptr, jobject *inst) +{ + int num_fields = 13; + char *field_names[] = + { + "st_dev", "st_ino", "st_mode", "st_nlink", "st_uid", "st_gid", + "st_rdev", "st_size", "st_blksize", "st_blocks", "st_atime", "st_mtime", + "st_ctime" }; + char *field_types[] = + { + "J", "J", "I", "I", "J", "J", "J", "J", "I", "J", "J", "J", "J" }; + jfieldID fids[num_fields]; + char *cls_name = "org/orangefs/usrint/Stat"; + jclass cls = (*env)->FindClass(env, cls_name); + if (!cls) + { + JNI_ERROR("invalid class: %s\n", cls_name); + return -1; + } + int fid_index = 0; + for (; fid_index < num_fields; fid_index++) + { + fids[fid_index] = (*env)->GetFieldID(env, cls, field_names[fid_index], + field_types[fid_index]); + if (!fids[fid_index]) + { + JNI_ERROR("invalid field requested: %s\n", field_names[fid_index]); + return -1; + } + } + *inst = (*env)->AllocObject(env, cls); + /* Load object with data from structure using + * constructor or set methods. + */ + (*env)->SetLongField(env, *inst, fids[0], ptr->st_dev); + (*env)->SetLongField(env, *inst, fids[1], ptr->st_ino); + (*env)->SetIntField(env, *inst, fids[2], ptr->st_mode); + (*env)->SetIntField(env, *inst, fids[3], ptr->st_nlink); + (*env)->SetLongField(env, *inst, fids[4], ptr->st_uid); + (*env)->SetLongField(env, *inst, fids[5], ptr->st_gid); + (*env)->SetLongField(env, *inst, fids[6], ptr->st_rdev); + (*env)->SetLongField(env, *inst, fids[7], ptr->st_size); + (*env)->SetIntField(env, *inst, fids[8], ptr->st_blksize); + (*env)->SetLongField(env, *inst, fids[9], ptr->st_blocks); + (*env)->SetLongField(env, *inst, fids[10], ptr->st_atime); + (*env)->SetLongField(env, *inst, fids[11], ptr->st_mtime); + (*env)->SetLongField(env, *inst, fids[12], ptr->st_ctime); + return 0; +} + +/* Convert allocated structure to an instance of our Statfs Class */ +#if 0 +static int fill_statfs(JNIEnv *env, struct statfs *ptr, jobject *inst) +{ + int num_fields = 12; + char *field_names[] = + { + "f_type", "f_bsize", "f_blocks", "f_bfree", "f_bavail", "f_files", + "f_ffree", "f_flags", "f_namelen", "f_frsize", "f_spare", "f_fsid" }; + char *field_types[] = + { + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", "[J", "[I" }; + jfieldID fids[num_fields]; + char *cls_name = "org/orangefs/usrint/Statfs"; + jclass cls = (*env)->FindClass(env, cls_name); + if (!cls) + { + JNI_ERROR("invalid class: %s\n", cls_name); + return -1; + } + int fid_index = 0; + for (; fid_index < num_fields; fid_index++) + { + fids[fid_index] = (*env)->GetFieldID(env, cls, field_names[fid_index], + field_types[fid_index]); + if (!fids[fid_index]) + { + JNI_ERROR("invalid field requested: %s\n", field_names[fid_index]); + return -1; + } + } + + jmethodID mid = (*env)->GetMethodID(env, cls, "", "()V"); + *inst = (*env)->NewObject(env, cls, mid); + jlongArray ar; + jlongArray ar1; + int jval; + jlong cbuf[5]; + jlong cbuf1[2]; + for (jval = 0; jval < 5; jval++) + { + cbuf[jval] = ptr->f_spare[jval]; + + } + for (jval = 0; jval < 2; jval++) + { + cbuf1[jval] = ptr->f_fsid.__val[jval]; + + } + /* Load object with data from structure using + * constructor or set methods. + */ + (*env)->SetLongField(env, *inst, fids[0], ptr->f_type); + (*env)->SetLongField(env, *inst, fids[1], ptr->f_bsize); + (*env)->SetLongField(env, *inst, fids[2], ptr->f_blocks); + (*env)->SetLongField(env, *inst, fids[3], ptr->f_bfree); + (*env)->SetLongField(env, *inst, fids[4], ptr->f_bavail); + (*env)->SetLongField(env, *inst, fids[5], ptr->f_files); + (*env)->SetLongField(env, *inst, fids[6], ptr->f_ffree); + (*env)->SetLongField(env, *inst, fids[7], ptr->f_flags); + (*env)->SetLongField(env, *inst, fids[8], ptr->f_namelen); + (*env)->SetLongField(env, *inst, fids[9], ptr->f_frsize); + + ar = (*env)->GetObjectField(env, *inst, fids[10]); + (*env)->SetLongArrayRegion(env, ar, 0, 5, cbuf); + + ar1 = (*env)->GetObjectField(env, *inst, fids[11]); + (*env)->SetLongArrayRegion(env, ar1, 0, 2, cbuf1); + + return 0; +} +#endif + +/* access */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_access(JNIEnv *env, jobject obj, + jstring path, jlong mode) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = access(cpath, (mode_t) mode); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* chdir */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_chdir(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = chdir(cpath); + if (ret < 0) + { + JNI_PERROR(); + } + return ret; +} + +/* chmod */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_chmod(JNIEnv *env, jobject obj, + jstring path, jlong mode) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + + ret = chmod(cpath, (mode_t) mode); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* chown */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_chown(JNIEnv *env, jobject obj, + jstring path, jint owner, jint group) +{ + JNI_PFI(); + int ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = chown(cpath, (uid_t) owner, (gid_t) group); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* close */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_close(JNIEnv *env, jobject obj, int fd) +{ + JNI_PFI(); + int ret = close(fd); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* creat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_creat(JNIEnv *env, jobject obj, + jstring path, jlong mode) +{ + JNI_PFI(); + jint ret = 0; + + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + + ret = (jint) creat(cpath, (mode_t) mode); + if (ret == -1) + { + JNI_PERROR(); + } + return ret; +} + +/* dup */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_dup(JNIEnv *env, jobject obj, int oldfd) +{ + JNI_PFI(); + int ret = 0; + ret = dup(oldfd); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* dup2 */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_dup2(JNIEnv *env, jobject obj, int oldfd, + int newfd) +{ + JNI_PFI(); + int ret = 0; + ret = dup2(oldfd, newfd); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* faccessat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_faccessat(JNIEnv *env, jobject obj, + int fd, jstring path, jlong mode, jlong flags) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = faccessat(fd, cpath, (mode_t) mode, (int) flags); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fallocate */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fallocate(JNIEnv *env, jobject obj, + int fd, int mode, jlong offset, jlong length) +{ + JNI_PFI(); + int ret = 0; + ret = fallocate(fd, mode, (off_t) offset, (off_t) length); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fchdir */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fchdir(JNIEnv *env, jobject obj, int fd) +{ + JNI_PFI(); + int ret = fchdir(fd); + if (ret < 0) + { + JNI_PERROR(); + } + return ret; +} + +/* fchmod */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fchmod(JNIEnv *env, jobject obj, int fd, + jlong mode) +{ + JNI_PFI(); + int ret = fchmod(fd, (mode_t) mode); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fchmodat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fchmodat(JNIEnv *env, jobject obj, + int fd, jstring path, jlong mode, jlong flag) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = fchmodat(fd, cpath, (mode_t) mode, (int) flag); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fchown */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fchown(JNIEnv *env, jobject obj, int fd, + jint owner, jint group) +{ + JNI_PFI(); + int ret = fchown(fd, (uid_t) owner, (gid_t) group); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fchownat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fchownat(JNIEnv *env, jobject obj, + int fd, jstring path, jint owner, jint group, jlong flag) +{ + JNI_PFI(); + int ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = fchownat(fd, cpath, (uid_t) owner, (gid_t) group, (int) flag); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fdatasync */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fdatasync(JNIEnv *env, jobject obj, + int fd) +{ + JNI_PFI(); + jint ret = (jint) fdatasync(fd); + if (ret == -1) + { + JNI_PERROR(); + } + return ret; +} + +/* Fill PVFS2POSIXJNIFlags object */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fillPVFS2POSIXJNIFlags(JNIEnv *env, + jobject obj) +{ + jclass cls = (jobject) 0; + int num_fields = 48; + jfieldID fids[num_fields]; + + char *field_names[] = + { + /* index 0-9 */ + "O_WRONLY", "O_RDONLY", "O_RDWR", "O_APPEND", "O_ASYNC", "O_CLOEXEC", + "FD_CLOEXEC", "O_CREAT", "O_DIRECT", "O_DIRECTORY", + + /* index 10-19 */ + "O_EXCL", "O_LARGEFILE", "O_NOATIME", "O_NOCTTY", "O_NOFOLLOW", + "O_NONBLOCK", "O_TRUNC", "S_IRWXU", "S_IRUSR", "S_IWUSR", + + /* index 20-29 */ + "S_IXUSR", "S_IRWXG", "S_IRGRP", "S_IWGRP", "S_IXGRP", "S_IRWXO", + "S_IROTH", "S_IWOTH", "S_IXOTH", "S_IFMT", + + /* index 30-39 */ + "S_IFSOCK", "S_IFLNK", "S_IFREG", "S_IFBLK", "S_IFDIR", "S_IFCHR", + "S_IFIFO", "S_ISUID", "S_ISGID", "S_ISVTX", + + /* index 40-47 */ + "SEEK_SET", "SEEK_CUR", "SEEK_END", "AT_FDCWD", "AT_REMOVEDIR", + "AT_SYMLINK_NOFOLLOW", "ST_RDONLY", "ST_NOSUID" }; + + char *field_types[] = + { + /* index 0-9 */ + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", + /* index 10-19 */ + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", + /* index 20-29 */ + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", + /* index 30-39 */ + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", + /* index 40-47 */ + "J", "J", "J", "J", "J", "J", "J", "J" }; + + char *cls_name = "org/orangefs/usrint/PVFS2POSIXJNIFlags"; + cls = (*env)->FindClass(env, cls_name); + if (!cls) + { + JNI_ERROR("invalid class: %s\n", cls_name); + return (jobject) 0; + } + /* Allocates Memory for the Object specified by cls w/o calling its + * constructor. + */ + jobject inst = (*env)->AllocObject(env, cls); + /* Get the field ids */ + int fid_index = 0; + for (; fid_index < num_fields; fid_index++) + { + fids[fid_index] = (*env)->GetFieldID(env, cls, field_names[fid_index], + field_types[fid_index]); + if (!fids[fid_index]) + { + JNI_ERROR("invalid field requested: %s\n", field_names[fid_index]); + return (jobject) 0; + } + + } + + /* Load PVFS2POSIXJNIFlags object with data replaced by C-Preprocessor + * using set methods. + */ + + /* access modes for creat/open flags */ + (*env)->SetLongField(env, inst, fids[0], O_WRONLY); + (*env)->SetLongField(env, inst, fids[1], O_RDONLY); + (*env)->SetLongField(env, inst, fids[2], O_RDWR); + + /* creat flags */ + (*env)->SetLongField(env, inst, fids[3], O_APPEND); + (*env)->SetLongField(env, inst, fids[4], O_ASYNC); + (*env)->SetLongField(env, inst, fids[5], O_CLOEXEC); + (*env)->SetLongField(env, inst, fids[6], FD_CLOEXEC); + (*env)->SetLongField(env, inst, fids[7], O_CREAT); + (*env)->SetLongField(env, inst, fids[8], O_DIRECT); + (*env)->SetLongField(env, inst, fids[9], O_DIRECTORY); + (*env)->SetLongField(env, inst, fids[10], O_EXCL); + (*env)->SetLongField(env, inst, fids[11], O_LARGEFILE); + (*env)->SetLongField(env, inst, fids[12], O_NOATIME); + (*env)->SetLongField(env, inst, fids[13], O_NOCTTY); + (*env)->SetLongField(env, inst, fids[14], O_NOFOLLOW); + /* man says "O_NONBLOCK or O_NDELAY" but OrangeFS doesn't have O_NDELAY. */ + (*env)->SetLongField(env, inst, fids[15], O_NONBLOCK); + (*env)->SetLongField(env, inst, fids[16], O_TRUNC); + + /* Permission modes */ + (*env)->SetLongField(env, inst, fids[17], S_IRWXU); + (*env)->SetLongField(env, inst, fids[18], S_IRUSR); + (*env)->SetLongField(env, inst, fids[19], S_IWUSR); + (*env)->SetLongField(env, inst, fids[20], S_IXUSR); + (*env)->SetLongField(env, inst, fids[21], S_IRWXG); + (*env)->SetLongField(env, inst, fids[22], S_IRGRP); + (*env)->SetLongField(env, inst, fids[23], S_IWGRP); + (*env)->SetLongField(env, inst, fids[24], S_IXGRP); + (*env)->SetLongField(env, inst, fids[25], S_IRWXO); + (*env)->SetLongField(env, inst, fids[26], S_IROTH); + (*env)->SetLongField(env, inst, fids[27], S_IWOTH); + (*env)->SetLongField(env, inst, fids[28], S_IXOTH); + + /* other st_mode */ + (*env)->SetLongField(env, inst, fids[29], S_IFMT); + (*env)->SetLongField(env, inst, fids[30], S_IFSOCK); + (*env)->SetLongField(env, inst, fids[31], S_IFLNK); + (*env)->SetLongField(env, inst, fids[32], S_IFREG); + (*env)->SetLongField(env, inst, fids[33], S_IFBLK); + (*env)->SetLongField(env, inst, fids[34], S_IFDIR); + (*env)->SetLongField(env, inst, fids[35], S_IFCHR); + (*env)->SetLongField(env, inst, fids[36], S_IFIFO); + (*env)->SetLongField(env, inst, fids[37], S_ISUID); + (*env)->SetLongField(env, inst, fids[38], S_ISGID); + (*env)->SetLongField(env, inst, fids[39], S_ISVTX); + + /* seek whence */ + (*env)->SetLongField(env, inst, fids[40], SEEK_SET); + (*env)->SetLongField(env, inst, fids[41], SEEK_CUR); + (*env)->SetLongField(env, inst, fids[42], SEEK_END); + + /* fcntl.h 'AT' flags*/ + (*env)->SetLongField(env, inst, fids[43], AT_FDCWD); + (*env)->SetLongField(env, inst, fids[44], AT_REMOVEDIR); + (*env)->SetLongField(env, inst, fids[45], AT_SYMLINK_NOFOLLOW); + + /* statvfs mount flags */ + (*env)->SetLongField(env, inst, fids[46], ST_RDONLY); + (*env)->SetLongField(env, inst, fids[47], ST_NOSUID); + return inst; +} + +/* flistxattr */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_flistxattr(JNIEnv *env, jobject obj, + int fd, jstring list, jlong size) +{ + JNI_PFI(); + long ret = 0; + char clist[PVFS_MAX_XATTR_LISTLEN]; + int clist_len = (*env)->GetStringLength(env, list); + (*env)->GetStringUTFRegion(env, list, 0, clist_len, clist); + ret = flistxattr(fd, clist, (size_t) size); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* flock */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_flock(JNIEnv *env, jobject obj, int fd, + jlong op) +{ + JNI_PFI(); + int ret = flock(fd, (int) op); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fremovexattr */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fremovexattr(JNIEnv *env, jobject obj, + int fd, jstring name) +{ + JNI_PFI(); + int ret = 0; + char cname[PVFS_NAME_MAX]; + int cname_len = (*env)->GetStringLength(env, name); + (*env)->GetStringUTFRegion(env, name, 0, cname_len, cname); + ret = fremovexattr(fd, cname); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* fstat */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fstat(JNIEnv *env, jobject obj, int fd) +{ + JNI_PFI(); + int ret = -1; + struct stat stats; + ret = fstat(fd, &stats); + if (ret != 0) + { + JNI_PERROR(); + return (jobject) 0; + } + jobject stat_obj; + if (fill_stat(env, &stats, &stat_obj) == 0) + { + return stat_obj; + } + return (jobject) 0; +} + +/* fstatat */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fstatat(JNIEnv *env, jobject obj, int fd, + jstring path, jlong flag) +{ + JNI_PFI(); + int ret = -1; + struct stat stats; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = fstatat(fd, cpath, &stats, (int) flag); + if (ret < 0) + { + JNI_PERROR(); + return (jobject) 0; + } + jobject stat_obj; + if (fill_stat(env, &stats, &stat_obj) == 0) + { + return stat_obj; + } + return (jobject) 0; +} + +/* fstatfs */ +#if 0 +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fstatfs(JNIEnv *env, jobject obj, int fd) +{ + JNI_PFI(); + int ret = -1; + struct statfs st; + ret = fstatfs(fd, &st); + if (ret < 0) + { + JNI_PERROR(); + return (jobject) 0; + } + jobject statfs_obj; + if (fill_statfs(env, ptr, &statfs_obj) == 0) + { + return statfs_obj; + } + return (jobject) 0; +} +#endif + +/* TODO */ +#if 0 +/* fstatvfs */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fstatvfs(JNIEnv *env, jobject obj, jint fd) +{ + JNI_PFI(); + JNI_PRINT("fd = %d\n", (int) fd); + struct statvfs vfs_stat; + int ret = fstatvfs(fd, &vfs_stat); + if (ret == -1) + { + JNI_PERROR(); + } + /* TODO: create class representing statvfs structure. */ + return (jobject) 0; +} +#endif + +/* fsync */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_fsync(JNIEnv *env, jobject obj, int fd) +{ + JNI_PFI(); + int ret = fsync(fd); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* ftruncate */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_ftruncate(JNIEnv *env, jobject obj, + int fd, jlong length) +{ + JNI_PFI(); + int ret = 0; + ret = ftruncate(fd, (off_t) length); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* futimes */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_futimes(JNIEnv *env, jobject obj, + int fd, jlong actime_usec, jlong modtime_usec) +{ + JNI_PFI(); + int ret = -1; + struct timeval tv[2]; + /* If either are invalid then, have utime set actime and modtime to + * current time. */ + if (actime_usec == -1 || modtime_usec == -1) + { + ret = futimes(fd, NULL); + } + else + { + tv[0].tv_sec = actime_usec / 1000000L; + tv[0].tv_usec = actime_usec % 1000000L; + tv[1].tv_sec = modtime_usec / 1000000L; + tv[1].tv_usec = modtime_usec % 1000000L; + ret = futimes(fd, tv); + } + if (ret < 0) + { + JNI_PERROR(); + return -1; + } + return 0; +} + +/* futimesat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_futimesat(JNIEnv *env, jobject obj, + int dirfd, jstring path, jlong actime_usec, jlong modtime_usec) +{ + JNI_PFI(); + int ret = -1; + struct timeval tv[2]; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + + /* If either are invalid then, have utime set actime and modtime to + * current time. */ + if (actime_usec == -1 || modtime_usec == -1) + { + ret = futimesat(dirfd, cpath, NULL); + } + else + { + tv[0].tv_sec = actime_usec / 1000000L; + tv[0].tv_usec = actime_usec % 1000000L; + tv[1].tv_sec = modtime_usec / 1000000L; + tv[1].tv_usec = modtime_usec % 1000000L; + ret = futimesat(dirfd, cpath, tv); + } + if (ret < 0) + { + JNI_PERROR(); + return -1; + } + return 0; +} + +/* getdtablesize */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_getdtablesize(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + int ret = getdtablesize(); + return ret; +} + +/* getumask */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_getumask(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + jlong ret = (jlong) getumask(); + return ret; +} + +/* Returns non-zero (true) if the supplied mode corresponds to a directory. */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_isDir(JNIEnv *env, jobject obj, int mode) +{ + JNI_PFI(); + JNI_PRINT("mode = %d\n", mode); + return S_ISDIR(mode); +} + +/* link */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_link(JNIEnv *env, jobject obj, + jstring oldpath, jstring newpath) +{ + JNI_PFI(); + int ret = 0; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = link(coldpath, cnewpath); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* linkat */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_linkat(JNIEnv *env, jobject obj, + int olddirfd, jstring oldpath, int newdirfd, jstring newpath, + jlong flags) +{ + JNI_PFI(); + int ret = -1; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = linkat(olddirfd, coldpath, newdirfd, cnewpath, (int) flags); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* listxattr */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_listxattr(JNIEnv *env, jobject obj, + jstring path, jstring list, jlong size) +{ + JNI_PFI(); + long ret = 0; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char clist[PVFS_MAX_XATTR_LISTLEN]; + int clist_len = (*env)->GetStringLength(env, list); + (*env)->GetStringUTFRegion(env, list, 0, clist_len, clist); + ret = listxattr(cpath, clist, (size_t) size); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* llistxattr */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_llistxattr(JNIEnv *env, jobject obj, + jstring path, jstring list, jlong size) +{ + JNI_PFI(); + long ret = 0; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char clist[PVFS_MAX_XATTR_LISTLEN]; + int clist_len = (*env)->GetStringLength(env, list); + (*env)->GetStringUTFRegion(env, list, 0, clist_len, clist); + ret = llistxattr(cpath, clist, (size_t) size); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* lremovexattr */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_lremovexattr(JNIEnv *env, jobject obj, + jstring path, jstring name) +{ + JNI_PFI(); + int ret = 0; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char cname[PVFS_NAME_MAX]; + int cname_len = (*env)->GetStringLength(env, name); + (*env)->GetStringUTFRegion(env, name, 0, cname_len, cname); + ret = lremovexattr(cpath, cname); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* lseek */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_lseek(JNIEnv *env, jobject obj, int fd, + jlong offset, jlong whence) +{ + JNI_PFI(); + + off_t ret = lseek(fd, (off_t) offset, (int) whence); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* lstat */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_lstat(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + struct stat stats; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = lstat(cpath, &stats); + if (ret < 0) + { + JNI_PERROR(); + return (jobject) 0; + } + jobject stat_obj; + if (fill_stat(env, &stats, &stat_obj) == 0) + { + return stat_obj; + } + return (jobject) 0; +} + +/* mkdir */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_mkdir(JNIEnv *env, jobject obj, + jstring path, jlong mode) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = mkdir(cpath, (mode_t) mode); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* mkdirat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_mkdirat(JNIEnv *env, jobject obj, + int dirfd, jstring path, jlong mode) +{ + JNI_PFI(); + int ret = 0; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = mkdirat(dirfd, cpath, (mode_t) mode); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* mknod */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_mknod(JNIEnv *env, jobject obj, + jstring path, jlong mode, int dev) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = mknod(cpath, (mode_t) mode, (dev_t) dev); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* mknodat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_mknodat(JNIEnv *env, jobject obj, + int dirfd, jstring path, jlong mode, int dev) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = mknodat(dirfd, cpath, (mode_t) mode, (dev_t) dev); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* open */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_open(JNIEnv *env, jobject obj, + jstring path, jlong flags, jlong mode) +{ + JNI_PFI(); + int ret = 0; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + + JNI_PRINT("\tpath = %s\n", cpath); + if (((int) flags & O_CREAT) == O_CREAT) + { + JNI_PRINT("\tO_CREAT detected!\n"); + ret = open(cpath, (int) flags, (mode_t) mode); + } + else + { + JNI_PRINT("\tNo O_CREAT detected\n"); + ret = open(cpath, (int) flags); + } + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* openat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_openat(JNIEnv *env, jobject obj, + int dirfd, jstring path, jlong flags, jlong mode) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + + if (((int) flags & O_CREAT) == O_CREAT) + { + JNI_PRINT("\tO_CREAT detected!\n"); + ret = openat(dirfd, cpath, (int) flags, (mode_t) mode); + } + else + { + JNI_PRINT("\tNo O_CREAT detected\n"); + ret = openat(dirfd, cpath, (int) flags); + } + if (ret == -1) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* pread */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_pread(JNIEnv *env, jobject obj, int fd, + jbyteArray buf, jlong count, jlong offset) +{ + /* TODO */ + return -1; +} + +/* pwrite */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_pwrite(JNIEnv *env, jobject obj, int fd, + jbyteArray buf, jlong count, jlong offset) +{ + /* TODO */ + return -1; +} + +/* + * Allocated by Java code and freed when the Byte Buffer is garbage collected. + * See: src/client/jni/org/orangefs/usrint/OrangeFileSystemInputStream.java + * Use it to read bytes from files (even non-OrangeFS files). + */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_read(JNIEnv *env, jobject obj, int fd, + jobject buf, jlong count) +{ + JNI_PFI(); + jlong ret = 0; + void * buf_addr = 0; + JNI_PRINT("\tfd = %d\n\n\tcount = %lu\n", fd, (uint64_t ) count); + buf_addr = (*env)->GetDirectBufferAddress(env, buf); + if (!buf_addr) + { + JNI_ERROR("buf_addr returned by " "GetDirectBufferAddress is NULL\n"); + ret = -1; + return ret; + } + ret = (jlong) read(fd, buf_addr, (size_t) count); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* readlink */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_readlink(JNIEnv *env, jobject obj, + jstring path, jstring buf, jlong bufsiz) +{ + JNI_PFI(); + jlong ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + long cbufsiz = (long) bufsiz; + char cbuf[cbufsiz]; + int cbuf_len = (*env)->GetStringLength(env, buf); + (*env)->GetStringUTFRegion(env, path, 0, cbuf_len, cbuf); + ret = (jlong) readlink(cpath, cbuf, (size_t) bufsiz); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* readlinkat */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_readlinkat(JNIEnv *env, jobject obj, + int fd, jstring path, jstring buf, jlong bufsiz) +{ + JNI_PFI(); + jlong ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + long cbufsiz = (long) bufsiz; + char cbuf[cbufsiz]; + int cbuf_len = (*env)->GetStringLength(env, buf); + (*env)->GetStringUTFRegion(env, path, 0, cbuf_len, cbuf); + ret = (jlong) readlinkat(fd, cpath, cbuf, (size_t) bufsiz); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* removexattr */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_removexattr(JNIEnv *env, jobject obj, + jstring path, jstring name) +{ + JNI_PFI(); + int ret = 0; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char cname[PVFS_NAME_MAX]; + int cname_len = (*env)->GetStringLength(env, name); + (*env)->GetStringUTFRegion(env, name, 0, cname_len, cname); + ret = removexattr(cpath, cname); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* rename */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_rename(JNIEnv *env, jobject obj, + jstring oldpath, jstring newpath) +{ + JNI_PFI(); + int ret = -1; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = rename(coldpath, cnewpath); + if (ret == -1) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* renameat */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_renameat(JNIEnv *env, jobject obj, + int olddirfd, jstring oldpath, int newdirfd, jstring newpath) +{ + JNI_PFI(); + int ret = 0; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = renameat(olddirfd, coldpath, newdirfd, cnewpath); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* rmdir */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_rmdir(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = rmdir(cpath); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* stat */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_stat(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + struct stat stats; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + JNI_PRINT("path = %s\n", cpath); + ret = stat(cpath, &stats); + if (ret != 0) + { + JNI_PERROR(); + return (jobject) 0; + } + jobject stat_obj; + if (fill_stat(env, &stats, &stat_obj) == 0) + { + return stat_obj; + } + return (jobject) 0; +} + +/* statfs */ +#if 0 +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_statfs(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + struct statfs st; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = statfs(cpath, &st); + + if (ret < 0) + { + JNI_PERROR(); + return (jobject) 0; + } + + jobject statfs_obj; + if (fill_statfs(env, &st, &statfs_obj) == 0) + { + return statfs_obj; + } + return (jobject) 0; +} +#endif + +/* TODO */ +#if 0 +/* statvfs */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_statvfs(JNIEnv *env, jobject obj, + jlong jarg, jstring path) +{ + JNI_PFI(); + int ret = 0; + struct statvfs *arg; + arg = (struct statvfs *) jarg; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = statvfs(cpath, arg); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} +#endif + +/* symlink */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_symlink(JNIEnv *env, jobject obj, + jstring oldpath, jstring newpath) +{ + JNI_PFI(); + int ret = -1; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = symlink(coldpath, cnewpath); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* symlinkat */ +JNIEXPORT int JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_symlinkat(JNIEnv *env, jobject obj, + jstring oldpath, int newdirfd, jstring newpath) +{ + JNI_PFI(); + int ret = -1; + char coldpath[PVFS_PATH_MAX]; + int coldpath_len = (*env)->GetStringLength(env, oldpath); + (*env)->GetStringUTFRegion(env, oldpath, 0, coldpath_len, coldpath); + char cnewpath[PVFS_PATH_MAX]; + int cnewpath_len = (*env)->GetStringLength(env, newpath); + (*env)->GetStringUTFRegion(env, newpath, 0, cnewpath_len, cnewpath); + ret = symlinkat(coldpath, newdirfd, cnewpath); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* sync */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_sync(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + /* sync is always successful */ + sync(); +} + +/* truncate */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_truncate(JNIEnv *env, jobject obj, + jstring path, jlong length) +{ + JNI_PFI(); + int ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = truncate(cpath, (off_t) length); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} + +/* umask */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_umask(JNIEnv *env, jobject obj, + jint mask) +{ + JNI_PFI(); + jint ret = (jint) umask((mode_t) mask); + JNI_PRINT("ret = %d\n", (int) ret); + return (int) ret; +} + +/* unlink */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_unlink(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = unlink(cpath); + if (ret == -1) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* unlinkat */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_unlinkat(JNIEnv *env, jobject obj, + int dirfd, jstring path, jlong flags) +{ + JNI_PFI(); + int ret = -1; + int cpath_len = (*env)->GetStringLength(env, path); + char cpath[cpath_len + 1]; + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = unlinkat(dirfd, cpath, (int) flags); + if (ret == -1) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* utime */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_utime(JNIEnv *env, jobject obj, + jstring path, jlong actime_sec, jlong modtime_sec) +{ + JNI_PFI(); + int ret = -1; + struct utimbuf utb; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + /* If either are invalid then, have utime set actime and modtime to + * current time. */ + if (actime_sec == -1 || modtime_sec == -1) + { + ret = utime(cpath, (const struct utimbuf *) NULL); + } + else + { + utb.actime = (time_t) actime_sec; + utb.modtime = (time_t) modtime_sec; + ret = utime(cpath, &utb); + } + if (ret < 0) + { + JNI_PERROR(); + return -1; + } + return 0; +} + +/* utimes */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_utimes(JNIEnv *env, jobject obj, + jstring path, jlong actime_usec, jlong modtime_usec) +{ + JNI_PFI(); + int ret = -1; + struct timeval tv[2]; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + /* If either are invalid then, have utime set actime and modtime to + * current time. */ + if (actime_usec == -1 || modtime_usec == -1) + { + ret = utimes(cpath, NULL); + } + else + { + tv[0].tv_sec = actime_usec / 1000000L; + tv[0].tv_usec = actime_usec % 1000000L; + tv[1].tv_sec = modtime_usec / 1000000L; + tv[1].tv_usec = modtime_usec % 1000000L; + ret = utimes(cpath, tv); + } + if (ret < 0) + { + JNI_PERROR(); + return -1; + } + return 0; +} + +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2POSIXJNI_write(JNIEnv *env, jobject obj, int fd, + jobject buf, jlong count) +{ + JNI_PFI(); + jlong ret = 0; + void * buf_addr = 0; + JNI_PRINT("\tfd = %d\n\tcount = %lu\n", fd, (uint64_t ) count); + buf_addr = (*env)->GetDirectBufferAddress(env, buf); + if (!buf_addr) + { + JNI_ERROR("buf_addr returned by GetDirectBufferAddress is NULL\n"); + ret = -1; + return ret; + } + ret = write(fd, buf_addr, (size_t) count); + if (ret < 0) + { + JNI_PERROR(); + ret = -1; + } + return ret; +} diff --git a/src/client/jni/libPVFS2STDIOJNI.c b/src/client/jni/libPVFS2STDIOJNI.c new file mode 100644 index 0000000..fea3607 --- /dev/null +++ b/src/client/jni/libPVFS2STDIOJNI.c @@ -0,0 +1,1579 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ + +#include "libPVFS2JNI_common.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "org_orangefs_usrint_PVFS2STDIOJNI.h" + +/* TODO: relocate these maybe to pvfs2-types.h? */ +/* From 'man useradd': "Usernames may only be up to 32 characters long." */ +#define MAX_USERNAME_LENGTH 32 +/* From 'man groupadd': "Groupnames may only be up to 32 characters long." */ +#define MAX_GROUPNAME_LENGTH 32 + +/* Forward declarations of non-native functions */ +static char *combine(char* s1, char* s2, char* dest); +static int fill_dirent(JNIEnv *env, struct dirent *ptr, jobject *inst); +static int get_comb_len(char* s1, char* s2); +static int get_groupname_by_gid(gid_t gid, char *groupname); +static int get_username_by_uid(uid_t uid, char *username); +static inline int is_dot_dir(char * dirent_name); +static inline int is_lostfound_dir(char * dirent_name); +/* TODO: relocate recursive delete related functions so other utilities can + * make use of them. */ +static int recursive_delete(char *dir); +static int remove_files_in_dir(char *dir, DIR* dirp); + +/** Combine the two strings with a forward slash between. + * Don't forget to memset the string!!! The resulting string is stored in dest. + * Ensure dest is large enough to contain the resulting string. + */ +static char *combine(char* s1, char* s2, char* dest) +{ + strcat(dest, s1); + strcat(dest, "/"); + return strcat(dest, s2); +} + +/* Convert allocated struct DIR to an instance of our Dirent Class */ +static int fill_dirent(JNIEnv *env, struct dirent *ptr, jobject *inst) +{ + int num_fields = 5; + char *field_names[] = + { + "d_ino", "d_off", "d_reclen", "d_type", "d_name" }; + char *field_types[] = + { + "J", "J", "I", "Ljava/lang/String;", "Ljava/lang/String;" }; + jfieldID fids[num_fields]; + char *cls_name = "org/orangefs/usrint/Dirent"; + jclass cls = (*env)->FindClass(env, cls_name); + if (!cls) + { + JNI_ERROR("invalid class: %s\n", cls_name); + return -1; + } + int fid_index = 0; + for (; fid_index < num_fields; fid_index++) + { + fids[fid_index] = (*env)->GetFieldID(env, cls, field_names[fid_index], + field_types[fid_index]); + if (!fids[fid_index]) + { + JNI_ERROR("invalid field requested: %s\n", field_names[fid_index]); + return -1; + } + } + *inst = (*env)->AllocObject(env, cls); + + /* Load object with data from structure using + * constructor or set methods. + */ + (*env)->SetLongField(env, *inst, fids[0], ptr->d_ino); + (*env)->SetLongField(env, *inst, fids[1], ptr->d_off); + (*env)->SetIntField(env, *inst, fids[2], ptr->d_reclen); + (*env)->SetCharField(env, *inst, fids[3], (char) ptr->d_type); + jstring d_name_string = (*env)->NewStringUTF(env, ptr->d_name); + (*env)->SetObjectField(env, *inst, fids[4], d_name_string); + return 0; +} + +/** Return the length of the resulting string assuming s1 and s2 will be + * combined with a separating slash and null terminating byte. + */ +static int get_comb_len(char* s1, char* s2) +{ + return (int) (strlen(s1) + strlen(s2) + 2); +} + +static int get_groupname_by_gid(gid_t gid, char *groupname) +{ + JNI_PFI(); + struct group* groupp = getgrgid(gid); + if (groupp == NULL ) + { + JNI_PERROR(); + return -1; + } + strcpy(groupname, groupp->gr_name); + return 0; +} + +static int get_username_by_uid(uid_t uid, char *username) +{ + JNI_PFI(); + struct passwd *pwdp = getpwuid(uid); + if (pwdp == NULL ) + { + JNI_PERROR(); + return -1; + } + strcpy(username, pwdp->pw_name); + return 0; +} + +/* Returns non-zero (true) if the supplied directory entry name corresponds + * to the dot directories: {".", ".."}. Otherwise, returns 0; + */ +static inline int is_dot_dir(char * dirent_name) +{ + return (int) ((strcmp(dirent_name, ".") == 0) + || (strcmp(dirent_name, "..") == 0)); +} + +/* Returns non-zero(true) if the supplied directory entry name corresponds to + * the OrangeFS specific directory called "lost+found". */ +static inline int is_lostfound_dir(char * dirent_name) +{ + return (int) (strcmp(dirent_name, "lost+found") == 0); +} + +/* Recursively delete the path specified by dir. */ +static int recursive_delete(char *dir) +{ + JNI_PFI(); + JNI_PRINT("dir=%s\n", dir); + int ret = -1; + DIR * dirp = NULL; + struct dirent * direntp = NULL; + + /* Open the directory specified by dir */ + errno = 0; + dirp = opendir(dir); + if (!dirp) + { + JNI_PERROR(); + return -1; + } + + /* Remove all files in the current directory */ + if (remove_files_in_dir(dir, dirp) != 0) + { + JNI_ERROR("remove_files_in_dir failed on directory: %s\n", dir); + return -1; + } + + /* Rewind directory stream and call recursive delete on the directories + * in this directory. + */ + rewinddir(dirp); + JNI_PRINT("rewinddir succeeded!\n"); + while(1) + { + JNI_PRINT("calling readdir on dirp=%p\n", (void *) dirp); + errno = 0; + if((direntp = readdir(dirp)) == NULL) + { + if(errno != 0) + { + JNI_PERROR(); + return -1; + } + break; + } + if(is_dot_dir(direntp->d_name) || is_lostfound_dir(direntp->d_name)) + { + continue; + } + size_t abs_path_len = get_comb_len(dir, direntp->d_name); + char abs_path[abs_path_len]; + memset((void *) abs_path, 0, abs_path_len); + combine(dir, direntp->d_name, abs_path); + /* Determine if this entry is a file or directory. */ + struct stat buf; + JNI_PRINT("calling pvfs_stat_mask on file: %s\n", abs_path); + errno = 0; + ret = pvfs_stat_mask(abs_path, &buf, PVFS_ATTR_SYS_TYPE); + if(ret < 0) + { + JNI_PERROR(); + return ret; + } + if(S_ISDIR(buf.st_mode)) + { + ret = recursive_delete(abs_path); + if(ret < 0) + { + JNI_ERROR("recursive_delete failed on path:%s\n", abs_path); + return -1; + } + } + } + + /* Close current directory before we attempt removal */ + errno = 0; + if (closedir(dirp) != 0) + { + JNI_PERROR(); + return -1; + } + errno = 0; + if (rmdir(dir) != 0) + { + JNI_PERROR(); + return -1; + } + return 0; +} + +/* Remove all files discovered in the open directory pointed to by dirp. */ +static int remove_files_in_dir(char *dir, DIR* dirp) +{ + int ret = -1; + struct dirent* direntp = NULL; + JNI_PFI(); + /* Rewind this directory stream back to the beginning. */ + JNI_PRINT("rewinding dirp = %p\n", dirp); + rewinddir(dirp); + JNI_PRINT("rewinddir succeeded!\n"); + /* Loop over directory contents */ + while(1) + { + errno = 0; + if((direntp = readdir(dirp)) == NULL) + { + if(errno != 0) + { + JNI_PERROR(); + return -1; + } + break; + } + JNI_PRINT("direntp->d_name = %s\n", direntp->d_name); + size_t abs_path_len = get_comb_len(dir, direntp->d_name); + char abs_path[abs_path_len]; + memset((void *) abs_path, 0, abs_path_len); + combine(dir, direntp->d_name, abs_path); + /* Determine if this entry is a file or directory. */ + struct stat buf; + errno = 0; + ret = pvfs_stat_mask(abs_path, &buf, PVFS_ATTR_SYS_TYPE); + if(ret < 0) + { + JNI_PERROR(); + return ret; + } + /* Skip directories. */ + if(S_ISDIR(buf.st_mode)) + { + continue; + } + /* Unlink file. */ + JNI_PRINT("Unlinking file=%s\n", abs_path); + errno = 0; + ret = unlink(abs_path); + if (ret == -1) + { + JNI_PERROR(); + return ret; + } + } + return 0; +} + +/* clearerr */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_clearerr(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + clearerr((FILE *) stream); +} + +/* clearerr_unlocked */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_clearerrUnlocked(JNIEnv *env, + jobject obj, jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + clearerr_unlocked((FILE *) stream); +} + +/* closedir */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_closedir(JNIEnv *env, jobject obj, + jlong dir) +{ + JNI_PFI(); + jint ret = closedir((DIR *) dir); + if (ret == -1) + { + JNI_PERROR(); + } + return ret; +} + +/* dirfd */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_dirfd(JNIEnv *env, jobject obj, + jlong dir) +{ + JNI_PFI(); + JNI_PRINT("dir = %llu\n", (long long unsigned int) dir); + jint ret = (jint) dirfd((DIR *) dir); + if (ret == -1) + { + JNI_ERROR("ret == -1"); + } + return ret; +} + +/* fclose */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fclose(JNIEnv *env, jobject obj, + jlong fp) +{ + JNI_PFI(); + JNI_PRINT("fp = %llu\n", (long long unsigned int ) fp); + int ret = EOF; + ret = fclose((FILE *) fp); + if (ret == EOF) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* fcloseall */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fcloseall(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + int ret = fcloseall(); + if (ret == EOF) + { + JNI_ERROR("fcloseall failed\n"); + } + return (jint) ret; +} + +/* fdopen */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fdopen(JNIEnv *env, jobject obj, jint fd, + jstring mode) +{ + JNI_PFI(); + jlong ret = 0; + char cmode[10]; + int cmode_len = (*env)->GetStringLength(env, mode); + (*env)->GetStringUTFRegion(env, mode, 0, cmode_len, cmode); + JNI_PRINT("fd = %d\n%s\n", (int) fd, cmode); + ret = (jlong) fdopen(fd, cmode); + if (ret == 0) + { + JNI_PERROR(); + } + return ret; +} + +/* fdopendir */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fdopendir(JNIEnv *env, jobject obj, + jint fd) +{ + JNI_PFI(); + JNI_PRINT("fd = %d\n", (int) fd); + struct dirent *dir; + jobject dir_obj = (jobject) 0; + dir = (struct dirent *) fdopendir((int) fd); + if (dir == NULL ) + { + JNI_PERROR(); + return dir_obj; + } + if (fill_dirent(env, dir, &dir_obj) != 0) + { + JNI_ERROR("fill_dirent failed"); + } + if(dir) + { + free(dir); + } + return dir_obj; +} + +/* feof */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_feof(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = feof((FILE *) stream); + if (ret != 0) + { + JNI_PRINT("EOF reached\n"); + } + return (jint) ret; +} + +/* feof_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_feofUnlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = feof_unlocked((FILE *) stream); + if (ret != 0) + { + JNI_PRINT("EOF reached\n"); + } + return (jint) ret; +} + +/* ferror */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_ferror(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = ferror((FILE *) stream); + if (ret != 0) + { + JNI_ERROR("ferror detected error.\n"); + } + return (jint) ret; +} + +/* ferror_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_ferrorUnlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = ferror_unlocked((FILE *) stream); + if (ret != 0) + { + JNI_ERROR("ferror_unlocked detected error.\n"); + } + return (jint) ret; +} + +/* fflush */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fflush(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + jint ret = (jint) fflush((FILE *) stream); + if (ret != 0) + { + JNI_PERROR(); + } + return ret; +} + +/*fflush_unlocked*/ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fflush_unlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + jint ret = (jint) fflush_unlocked((FILE *) stream); + if (ret < 0) + { + JNI_PERROR(); + } + return ret; +} + +/* fgetc */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fgetc(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = fgetc((FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* fgetc_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fgetcUnlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = fgetc_unlocked((FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* fgets */ +JNIEXPORT jstring JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fgets(JNIEnv *env, jobject obj, + jint size, jlong stream) +{ + JNI_PFI(); + JNI_PRINT("size = %d\nstream = %llu\n", (int) size, + (long long unsigned int) stream); + char cs[(int) size]; + char *ret = (char *) NULL; + ret = fgets(cs, (int) size, (FILE *) stream); + if (ret == (char *) NULL ) + { + JNI_ERROR("ret == EOF"); + } + return (*env)->NewStringUTF(env, ret); +} + +/* fgets_unlocked */ +JNIEXPORT jstring JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fgetsUnlocked(JNIEnv *env, jobject obj, + jint size, jlong stream) +{ + JNI_PFI(); + JNI_PRINT("size = %d\nstream = %llu\n", (int) size, + (long long unsigned int) stream); + char cs[(int) size]; + char *ret = (char *) NULL; + ret = fgets_unlocked(cs, (int) size, (FILE *) stream); + if (ret == (char *) NULL ) + { + JNI_ERROR("ret == EOF"); + } + return (*env)->NewStringUTF(env, ret); +} + +/* fileno */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fileno(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + jint fd = (jint) fileno((FILE *) stream); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + if (fd == -1) + { + JNI_PERROR(); + } + return fd; +} + +/* fileno_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_filenoUnlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + jint fd = (jint) fileno_unlocked((FILE *) stream); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + if (fd == -1) + { + JNI_PERROR(); + } + return fd; +} + +/* Fill PVFS2STDIOJNIFlags object */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fillPVFS2STDIOJNIFlags(JNIEnv *env, + jobject obj) +{ + int num_fields = 14; + jfieldID fids[num_fields]; + char *field_names[] = + { + /* index 0-9 */ + "SEEK_SET", "SEEK_CUR", "SEEK_END", "DT_BLK", "DT_CHR", "DT_DIR", + "DT_FIFO", "DT_LNK", "DT_REG", "DT_SOCK", + /* index 10-13 */ + "DT_UNKNOWN", "_IONBF", "_IOLBF", "_IOFBF" }; + + char *field_types[] = + { + /* index 0-9 */ + "J", "J", "J", "J", "J", "J", "J", "J", "J", "J", + /* index 10-13 */ + "J", "J", "J", "J" }; + + char *cls_name = "org/orangefs/usrint/PVFS2STDIOJNIFlags"; + jclass cls = (*env)->FindClass(env, cls_name); + if (!cls) + { + JNI_ERROR("invalid class: %s\n", cls_name); + return (jobject) 0 ; + } + /* Allocates Memory for the Object specified by cls w/o calling its + * constructor. + */ + jobject inst = (*env)->AllocObject(env, cls); + /* Get the field ids */ + int fid_index = 0; + for (; fid_index < num_fields; fid_index++) + { + fids[fid_index] = (*env)->GetFieldID(env, cls, field_names[fid_index], + field_types[fid_index]); + if (!fids[fid_index]) + { + JNI_ERROR("invalid field requested: %s\n", field_names[fid_index]); + return cls; + } + + } + + /* Load PVFS2STDIOJNIFlags object with data replaced by C-Preprocessor + * using set methods. + */ + /* seek whence */ + (*env)->SetLongField(env, inst, fids[0], SEEK_SET); + (*env)->SetLongField(env, inst, fids[1], SEEK_CUR); + (*env)->SetLongField(env, inst, fids[2], SEEK_END); + + /* readdir d_type */ + (*env)->SetLongField(env, inst, fids[3], DT_BLK); + (*env)->SetLongField(env, inst, fids[4], DT_CHR); + (*env)->SetLongField(env, inst, fids[5], DT_DIR); + (*env)->SetLongField(env, inst, fids[6], DT_FIFO); + (*env)->SetLongField(env, inst, fids[7], DT_LNK); + (*env)->SetLongField(env, inst, fids[8], DT_REG); + (*env)->SetLongField(env, inst, fids[9], DT_SOCK); + (*env)->SetLongField(env, inst, fids[10], DT_UNKNOWN); + + /* setvbuf modes */ + (*env)->SetLongField(env, inst, fids[11], _IONBF); + (*env)->SetLongField(env, inst, fids[12], _IOLBF); + (*env)->SetLongField(env, inst, fids[13], _IOFBF); + + return inst; +} + +/* flockfile */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_flockfile(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + flockfile((FILE *) stream); + return; +} + +/* fopen */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fopen(JNIEnv *env, jobject obj, + jstring path, jstring mode) +{ + JNI_PFI(); + jlong ret = -1; + char cpath[256]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char cmode[10]; + int cmode_len = (*env)->GetStringLength(env, mode); + (*env)->GetStringUTFRegion(env, mode, 0, cmode_len, cmode); + JNI_PRINT("%s\n%s\n", cpath, cmode); + ret = (jlong) fopen(cpath, cmode); + JNI_PRINT("FILE * ret = %llu\n", (long long unsigned int ) ret); + if (ret == 0) + { + JNI_PERROR(); + } + return ret; +} + +/*fputc*/ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fputc(JNIEnv *env, jobject obj, jint c, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("c = %c\nstream = %llu\n", (char) c, + (long long unsigned int) stream); + int ret = EOF; + ret = fputc((int) c, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/*fputc_unlocked*/ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fputcUnlocked(JNIEnv *env, jobject obj, + jint c, jlong stream) +{ + JNI_PFI(); + JNI_PRINT("c = %d\nstream = %llu\n", (char) c, + (long long unsigned int) stream); + int ret = EOF; + ret = fputc_unlocked((int) c, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* fputs */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fputs(JNIEnv *env, jobject obj, + jstring s, jlong stream) +{ + JNI_PFI(); + int ret = EOF; + int cs_len = (*env)->GetStringLength(env, s); + char cs[cs_len + 1]; + (*env)->GetStringUTFRegion(env, s, 0, cs_len, cs); + JNI_PRINT("s = %s\nstream = %llu\n", cs, (long long unsigned int) stream); + ret = fputs(cs, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* fputs_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fputsUnlocked(JNIEnv *env, jobject obj, + jstring s, jlong stream) +{ + JNI_PFI(); + int ret = EOF; + int cs_len = (*env)->GetStringLength(env, s); + char cs[cs_len + 1]; + (*env)->GetStringUTFRegion(env, s, 0, cs_len, cs); + JNI_PRINT("s = %s\nstream = %llu\n", cs, (long long unsigned int) stream); + ret = fputs_unlocked(cs, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* fread */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fread(JNIEnv *env, jobject obj, + jbyteArray ptr, jlong size, jlong nmemb, jlong stream) +{ + /* TODO: rewrite this using NIO ByteBuffer like PVFS2POSIXJNI_read. */ + JNI_PFI(); + jlong ret = 0; + jboolean is_copy; + if (ptr == NULL ) + { + JNI_ERROR("ptr is null"); + return ret; + } + jbyte * cptr = (*env)->GetByteArrayElements(env, ptr, &is_copy); + if (cptr == NULL ) + { + JNI_ERROR("cptr is null"); + return ret; + } + JNI_PRINT("size = %llu\nnmemb = %llu\nstream = %llu\n", + (long long unsigned int ) size, (long long unsigned int ) nmemb, + (long long unsigned int ) stream); + ret = (jlong) fread((void *) cptr, (size_t) size, (size_t) nmemb, + (FILE *) stream); + if (ret < nmemb) + { + JNI_PRINT("ret < nmemb, so check feof, then ferror if necessary."); + } + JNI_PRINT("\tread %llu items totaling %llu bytes\n", + (long long unsigned int ) ret, + (long long unsigned int ) ret * (long long unsigned int ) size); + /* copy back and free the ptr using 0 */ + (*env)->ReleaseByteArrayElements(env, ptr, cptr, 0); + return ret; +} + +/* fread_unlocked */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_freadUnlocked(JNIEnv *env, jobject obj, + jbyteArray ptr, jlong size, jlong nmemb, jlong stream) +{ + /* TODO: rewrite this using NIO ByteBuffer like PVFS2POSIXJNI_read. */ + JNI_PFI(); + jlong ret = 0; + jboolean is_copy; + if (ptr == 0) + { + JNI_ERROR("ptr is null"); + return ret; + } + jbyte * cptr = (*env)->GetByteArrayElements(env, ptr, &is_copy); + if (cptr == 0) + { + JNI_ERROR("cptr is null"); + return ret; + } + ret = (jlong) fread_unlocked((void *) cptr, (size_t) size, (size_t) nmemb, + (FILE *) stream); + if (ret < nmemb) + { + JNI_PRINT("ret < nmemb, so check feof, then ferror if necessary."); + } + JNI_PRINT("\tread %llu items totaling %llu bytes\n", + (long long unsigned int ) ret, + (long long unsigned int ) ret * (long long unsigned int ) size); + /* copy back and free the ptr using 0 */ + (*env)->ReleaseByteArrayElements(env, ptr, cptr, 0); + return ret; +} + +/* freopen */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_freopen(JNIEnv *env, jobject obj, + jstring path, jstring modes, jlong stream) +{ + JNI_PFI(); + jlong ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + char cmodes[10]; + int cmodes_len = (*env)->GetStringLength(env, modes); + (*env)->GetStringUTFRegion(env, modes, 0, cmodes_len, cmodes); + JNI_PRINT("path = %s\nmodes = %s\nstream = %llu\n", cpath, cmodes, + (long long unsigned int ) stream); + ret = (jlong) freopen(cpath, cmodes, (FILE *) stream); + if (ret == 0) + { + JNI_PERROR(); + } + else + { + JNI_PRINT("ret = %llu \n", (long long unsigned int ) ret); + } + return ret; +} + +/* fseek */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fseek(JNIEnv *env, jobject obj, + jlong stream, jlong offset, jlong whence) +{ + JNI_PFI(); + jint ret = (jint) fseek((FILE *) stream, (long) offset, (int) whence); + if (ret != 0) + { + JNI_PERROR(); + } + return ret; +} + +/* fseeko */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fseeko(JNIEnv *env, jobject obj, + jlong stream, jlong offset, jlong whence) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\noffset = %llu\nwhence = %llu\n", + (long long unsigned int) stream, (long long unsigned int) offset, + (long long unsigned int) whence); + jlong ret = (jlong) fseeko((FILE *) stream, (off_t) offset, (int) whence); + if (ret != 0) + { + JNI_PERROR(); + } + return ret; +} + +/* ftell */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_ftell(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + jlong ret = (jlong) ftell((FILE *) stream); + if (ret < 0) + { + JNI_PERROR(); + } + return ret; +} + +/* ftrylockfile */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_ftrylockfile(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + jint ret = (jint) ftrylockfile((FILE *) stream); + if (ret != 0) + { + JNI_ERROR("ret != 0, meaning the lock couldn't be obtained."); + } + return ret; +} + +/* funlockfile */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_funlockfile(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int ) stream); + funlockfile((FILE *) stream); + return; +} + +/* fwrite */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fwrite(JNIEnv *env, jobject obj, + jbyteArray ptr, jlong size, jlong nmemb, jlong stream) +{ + /* TODO: rewrite this using NIO ByteBuffer like PVFS2POSIXJNI_write. */ + JNI_PFI(); + jlong ret = 0; + jboolean is_copy; + if (ptr == NULL ) + { + JNI_ERROR("ptr is null"); + return ret; + } + jbyte * cptr = (*env)->GetByteArrayElements(env, ptr, &is_copy); + if (cptr == NULL ) + { + JNI_ERROR("cptr is null"); + return ret; + } + ret = (jlong) fwrite((void *) cptr, (size_t) size, (size_t) nmemb, + (FILE *) stream); + if (ret < nmemb) + { + JNI_ERROR("ret < nmemb"); + } + JNI_PRINT("\twrote %llu items totaling %llu bytes\n", + (long long unsigned int ) ret, + (long long unsigned int ) ret * (long long unsigned int ) size); + /* copy back and free the ptr using 0 */ + (*env)->ReleaseByteArrayElements(env, ptr, cptr, 0); + return ret; +} + +/* fwrite_unlocked */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_fwriteUnlocked(JNIEnv *env, jobject obj, + jbyteArray ptr, jlong size, jlong nmemb, jlong stream) +{ + /* TODO: rewrite this using NIO ByteBuffer like PVFS2POSIXJNI_write. */ + JNI_PFI(); + jlong ret = 0; + jboolean is_copy; + if (ptr == 0) + { + JNI_ERROR("ptr is NULL"); + return ret; + } + jbyte * cptr = (*env)->GetByteArrayElements(env, ptr, &is_copy); + if (cptr == 0) + { + JNI_ERROR("cptr is NULL"); + return ret; + } + ret = (jlong) fwrite_unlocked((void *) cptr, (size_t) size, (size_t) nmemb, + (FILE *) stream); + if (ret < nmemb) + { + JNI_ERROR("ret < nmemb"); + } + JNI_PRINT("\twrote %llu items totaling %llu bytes\n", + (long long unsigned int ) ret, + (long long unsigned int ) ret * (long long unsigned int ) size); + /* copy back and free the ptr using 0 */ + (*env)->ReleaseByteArrayElements(env, ptr, cptr, 0); + return ret; +} + +/* getc */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getc(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = getc((FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* getchar */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getchar(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + int ret = getchar(); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* getchar_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getcharUnlocked(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + int ret = getchar_unlocked(); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* getc_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getcUnlocked(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = getc_unlocked((FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* Return the directory entries of this directory as an array of Java Strings */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getEntriesInDir(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + jclass arrayListClass = (*env)->FindClass(env, "java/util/ArrayList"); + if(!arrayListClass) + { + JNI_ERROR("FindClass failed on class java/util/ArrayList\n"); + return NULL_JOBJECT; + } + jmethodID midInit = (*env)->GetMethodID(env, arrayListClass, "", + "(I)V"); + if(!midInit) + { + JNI_ERROR("GetMethodID failed on method: \n"); + return NULL_JOBJECT; + } + jobject objArrayList = (*env)->NewObject(env, arrayListClass, midInit, + (jint) JNI_INITIAL_ARRAY_LIST_SIZE); + if(!objArrayList) + { + JNI_ERROR("NewObject returned NULL.\n"); + return NULL_JOBJECT; + } + jmethodID midAdd = (*env)->GetMethodID(env, arrayListClass, "add", + "(Ljava/lang/Object;)Z"); + if(!midAdd) + { + JNI_ERROR("GetMethodID failed on method: add.\n"); + return NULL_JOBJECT; + } + jmethodID midEnsureCapacity = (*env)->GetMethodID(env, arrayListClass, + "ensureCapacity", "(I)V"); + if(!midEnsureCapacity) + { + JNI_ERROR("GetMethodID failed on method: ensureCapacity.\n"); + return NULL_JOBJECT; + } + + char cpath[PVFS_NAME_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + /* Check for exception. */ + if((*env)->ExceptionCheck(env) == JNI_TRUE) + { + JNI_ERROR("Detected Exception following GetStringUTF.\n"); + (*env)->ExceptionDescribe(env); + return NULL_JOBJECT; + } + + DIR * dirp = NULL; + struct dirent * direntp = NULL; + + /* Open the directory specified by cpath */ + dirp = opendir(cpath); + if (!dirp) + { + JNI_PERROR(); + return NULL_JOBJECT; + } + + /* Iterate over directory entries and add valid filenames to ArrayList */ + int cnt = 0; + do + { + direntp = readdir(dirp); + if (direntp) + { + if (is_dot_dir(direntp->d_name) || + is_lostfound_dir(direntp->d_name)) + { + continue; + } + /* create java string from dirent name then add to object array */ + jobject fileName = (*env)->NewStringUTF(env, direntp->d_name); + if(!fileName) + { + JNI_ERROR("NewStringUTF returned Null.\n"); + goto error_out; + } + //add entry name to ArrayList + jboolean addBoolean = (*env)->CallBooleanMethod(env, objArrayList, + midAdd, fileName); + if (addBoolean == JNI_FALSE) + { + JNI_ERROR("CallBooleanMethod returned JNI_FALSE.\n"); + goto error_out; + } + /* Increment count of valid directory entries */ + cnt++; + if(cnt % JNI_INITIAL_ARRAY_LIST_SIZE == 0) + { + /* Ensure capacity for the next entries. Not necessary, + * but may reduce runtime by reducing incremental allocations + * that would otherwise be required for directories with many + * entries. + */ + (*env)->CallVoidMethod(env, objArrayList, midEnsureCapacity, + (jint) (cnt + JNI_INITIAL_ARRAY_LIST_SIZE)); + } + } + } while (direntp); + JNI_PRINT("dir entries = %d\n", cnt); +error_out: + if(closedir(dirp) != 0) + { + JNI_PERROR(); + return NULL_JOBJECT; + } + return objArrayList; +} + +JNIEXPORT jobjectArray JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getUsernameGroupname(JNIEnv *env, + jobject obj, jint uid, jint gid) +{ + JNI_PFI(); + int ret = 0; + jobjectArray obj_ret = (jobjectArray) (jobject) 0; + char username[MAX_USERNAME_LENGTH + 1]; + char groupname[MAX_GROUPNAME_LENGTH + 1]; + + ret = get_username_by_uid(uid, username); + if (ret != 0) + { + return obj_ret; + } + JNI_PRINT("uid, username = <%u, %s>\n", uid, username); + + ret = get_groupname_by_gid(gid, groupname); + if (ret != 0) + { + return obj_ret; + } + JNI_PRINT("gid, groupname = <%u, %s>\n", gid, groupname); + + obj_ret = (*env)->NewObjectArray(env, (jsize) 2, + (*env)->FindClass(env, "java/lang/String"), + (*env)->NewStringUTF(env, "")); + + (*env)->SetObjectArrayElement(env, obj_ret, 0, + (*env)->NewStringUTF(env, username)); + (*env)->SetObjectArrayElement(env, obj_ret, 1, + (*env)->NewStringUTF(env, groupname)); + return obj_ret; +} + +/* getw */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_getw(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + int ret = getw((FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* mkdtemp */ +JNIEXPORT jstring JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_mkdtemp(JNIEnv *env, jobject obj, + jstring tmplate) +{ + JNI_PFI(); + /* TODO: remove this hard-coded value. */ + char ctmplate[1024]; + int ctmplate_len = (*env)->GetStringLength(env, tmplate); + (*env)->GetStringUTFRegion(env, tmplate, 0, ctmplate_len, ctmplate); + JNI_PRINT("tmplate = %s\n", ctmplate); + char * ret = mkdtemp(ctmplate); + if (ret == (void *) NULL ) + { + JNI_PERROR(); + } + return (*env)->NewStringUTF(env, ret); +} + +/* mkstemp */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_mkstemp(JNIEnv *env, jobject obj, + jstring tmplate) +{ + JNI_PFI(); + /* TODO: remove this hard-coded value. */ + char ctmplate[1024]; + int ctmplate_len = (*env)->GetStringLength(env, tmplate); + (*env)->GetStringUTFRegion(env, tmplate, 0, ctmplate_len, ctmplate); + JNI_PRINT("tmplate = %s\n", ctmplate); + int ret = mkstemp(ctmplate); + if (ret == -1) + { + JNI_PERROR(); + } + return (jint) ret; +} + +/* opendir */ +JNIEXPORT jobject JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_opendir(JNIEnv *env, jobject obj, + jstring name) +{ + JNI_PFI(); + struct dirent *dir; + jobject dir_obj = (jobject) 0; + char cname[PVFS_NAME_MAX]; + int cname_len = (*env)->GetStringLength(env, name); + (*env)->GetStringUTFRegion(env, name, 0, cname_len, cname); + JNI_PRINT("name = %s\n", cname); + dir = (struct dirent *) opendir(cname); + if (dir == NULL ) + { + JNI_PERROR(); + return dir_obj; + } + if (fill_dirent(env, dir, &dir_obj) != 0) + { + JNI_ERROR("fill_dirent failed"); + } + if(dir) + { + free(dir); + } + return dir_obj; +} + +/* putc */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_putc(JNIEnv *env, jobject obj, jint c, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("c = %d\nstream = %llu\n", (char) c, + (long long unsigned int) stream); + int ret = EOF; + ret = putc((int) c, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* putchar */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_putchar(JNIEnv *env, jobject obj, jint c) +{ + JNI_PFI(); + JNI_PRINT("c = %d\n", (char) c); + int ret = EOF; + ret = putchar((int) c); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/*putchar_unlocked*/ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_putcharUnlocked(JNIEnv *env, jobject obj, + jint c) +{ + JNI_PFI(); + JNI_PRINT("c = %d\n", (char) c); + int ret = EOF; + ret = putchar_unlocked((int) c); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* putc_unlocked */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_putcUnlocked(JNIEnv *env, jobject obj, + jint c, jlong stream) +{ + JNI_PFI(); + JNI_PRINT("c = %d\nstream = %llu\n", (char) c, + (long long unsigned int) stream); + int ret = EOF; + ret = putc_unlocked((int) c, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* puts */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_puts(JNIEnv *env, jobject obj, jstring s) +{ + JNI_PFI(); + int ret = EOF; + int cs_len = (*env)->GetStringLength(env, s); + char cs[cs_len + 1]; + (*env)->GetStringUTFRegion(env, s, 0, cs_len, cs); + JNI_PRINT("s = %s\n", cs); + ret = puts(cs); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* putw */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_putw(JNIEnv *env, jobject obj, jint wd, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("wd = %d\n", (int) wd); + int ret = putw((int) wd, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} + +/* readdir */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_readdir(JNIEnv *env, jobject obj, + jlong dirp) +{ + JNI_PFI(); + JNI_PRINT("dirp = %llu\n", (long long unsigned int) dirp); + jlong direntp = 0; + int errno_before = errno; + direntp = (jlong) readdir((DIR *) dirp); + if (direntp == (jlong) NULL ) + { + if (errno_before != errno) + { + JNI_PERROR(); + return 0; + } + JNI_PRINT( + "readdir returned NULL (no error), reached end of directory stream"); + } + return direntp; +} + +/* recursive_delete */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_recursiveDelete(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + jint ret = -1; + char cpath[PVFS_NAME_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + ret = recursive_delete(cpath); + if (ret == -1) + { + JNI_ERROR("recursiveDelete error\n"); + } + return ret; +} + +/* remove */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_remove(JNIEnv *env, jobject obj, + jstring path) +{ + JNI_PFI(); + jint ret = -1; + char cpath[PVFS_PATH_MAX]; + int cpath_len = (*env)->GetStringLength(env, path); + (*env)->GetStringUTFRegion(env, path, 0, cpath_len, cpath); + JNI_PRINT("path = %s\n", cpath); + ret = (jint) remove(cpath); + if (ret != 0) + { + JNI_PERROR(); + } + return ret; +} + +/* rewinddir */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_rewinddir(JNIEnv *env, jobject obj, + jlong dir) +{ + JNI_PFI(); + JNI_PRINT("dir = %llu\n", (long long unsigned int) dir); + rewinddir((DIR *) dir); +} + +/* seekdir */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_seekdir(JNIEnv *env, jobject obj, + jlong dir, jlong offset) +{ + JNI_PFI(); + JNI_PRINT("dir = %llu\noffset = %llu", (long long unsigned int ) dir, + (long long unsigned int ) offset); + seekdir((DIR *) dir, (off_t) offset); +} + +#if 0 +/* setbuf */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_setbuf(JNIEnv *env, jobject obj, + jlong stream, jstring buf) +{ + /* TODO: use directly allocated NIO ByteBuffer */ + JNI_PFI(); + char cbuf[1024]; + int cbuf_len = (*env)->GetStringLength(env, buf); + (*env)->GetStringUTFRegion(env, buf, 0, cbuf_len, cbuf); + setbuf((FILE *) stream, cbuf); +} + +/* setbuffer */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_setbuffer(JNIEnv *env, jobject obj, + jlong stream, jstring buf, jlong size) +{ + /* TODO: use directly allocated NIO ByteBuffer */ + JNI_PFI(); + char cbuf[size]; + int cbuf_len = (*env)->GetStringLength(env, buf); + (*env)->GetStringUTFRegion(env, buf, 0, cbuf_len, cbuf); + setbuffer((FILE *) stream, cbuf, (size_t) size); +} + +/* setlinebuf */ +JNIEXPORT void JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_setlinebuf(JNIEnv *env, jobject obj, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("stream = %llu\n", (long long unsigned int) stream); + setlinebuf((FILE *) stream); +} + +/* setvbuf*/ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_setvbuf(JNIEnv *env, jobject obj, + jlong stream, jlong buf, jint mode, jlong size) +{ + /* TODO: use directly allocated NIO ByteBuffer */ + JNI_PFI(); + JNI_PRINT("stream = %llu\nmode = %d\nsize = %llu\n", + (long long unsigned int) stream, (int) mode, + (long long unsigned int) size); + jint ret = (jint) setvbuf((FILE *) stream, (char *) buf, (int) mode, + (size_t) size); + if (ret != 0) + { + JNI_PERROR(); + } + return ret; +} +#endif + +/* telldir */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_telldir(JNIEnv *env, jobject obj, + jlong dir) +{ + JNI_PFI(); + JNI_PRINT("dir = %llu", (long long unsigned int ) dir); + jlong ret = (jlong) telldir((DIR *) dir); + if (ret == -1) + { + JNI_PERROR(); + } + return ret; +} + +/* tmpfile */ +JNIEXPORT jlong JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_tmpfile(JNIEnv *env, jobject obj) +{ + JNI_PFI(); + FILE * fd = tmpfile(); + if (fd == (FILE *) NULL ) + { + JNI_PERROR(); + } + return (jlong) fd; +} + +/* ungetc */ +JNIEXPORT jint JNICALL +Java_org_orangefs_usrint_PVFS2STDIOJNI_ungetc(JNIEnv *env, jobject obj, jint c, + jlong stream) +{ + JNI_PFI(); + JNI_PRINT("size = %d\nstream = %llu\n", (int) c, + (long long unsigned int) stream); + int ret = ungetc((int) c, (FILE *) stream); + if (ret == EOF) + { + JNI_ERROR("ret == EOF"); + } + return (jint) ret; +} diff --git a/src/client/jni/module.mk.in b/src/client/jni/module.mk.in new file mode 100644 index 0000000..3c56d96 --- /dev/null +++ b/src/client/jni/module.mk.in @@ -0,0 +1,46 @@ +ifdef BUILD_JNI + +DIR := src/client/jni +ORGDIR := $(DIR)/org/orangefs/usrint + +USRC := \ + $(DIR)/libPVFS2POSIXJNI.c \ + $(DIR)/libPVFS2STDIOJNI.c + +JNIPOSIXJAVA := \ + $(ORGDIR)/PVFS2POSIXJNI.java \ + $(ORGDIR)/PVFS2POSIXJNIFlags.java \ + $(ORGDIR)/Stat.java \ +# TODO +# $(ORGDIR)/Statfs.java \ +# $(ORGDIR)/Statvfs.java \ + +JNISTDIOJAVA := \ + $(ORGDIR)/PVFS2STDIOJNI.java \ + $(ORGDIR)/PVFS2STDIOJNIFlags.java \ + $(ORGDIR)/Dirent.java \ + +JNISTREAMSCHANNELSJAVA := \ + $(ORGDIR)/Orange.java \ + $(ORGDIR)/OrangeFileSystemInputStream.java \ + $(ORGDIR)/OrangeFileSystemOutputStream.java \ + $(ORGDIR)/OrangeFileSystemInputChannel.java \ + $(ORGDIR)/OrangeFileSystemOutputChannel.java + + +# list of all .c files (generated or otherwise) that belong in library +ULIBSRC += $(USRC) + +endif # BUILD_JNI + +# TODO: Remove BUILD_HADOOP after OrangeFS Hadoop code is commited to Apache +# Hadoop. +ifdef BUILD_HADOOP + +HADOOP_ORGDIR := src/client/jni/org/orangefs/hadoop/fs/ofs + +HADOOPJAVA := \ + $(HADOOP_ORGDIR)/OrangeFileSystem.java \ + $(HADOOP_ORGDIR)/OrangeFileSystemFSInputStream.java + +endif #BUILD_HADOOP diff --git a/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystem.java b/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystem.java new file mode 100644 index 0000000..1f00ef4 --- /dev/null +++ b/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystem.java @@ -0,0 +1,516 @@ +/* + * (C) 2012 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.hadoop.fs.ofs; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.net.URI; +import java.util.ArrayList; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.conf.Configuration; +import org.apache.hadoop.fs.FSDataInputStream; +import org.apache.hadoop.fs.FSDataOutputStream; +import org.apache.hadoop.fs.FileStatus; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.FileUtil; +import org.apache.hadoop.fs.Path; +import org.apache.hadoop.fs.permission.FsPermission; +import org.apache.hadoop.util.Progressable; +import org.orangefs.usrint.Orange; +import org.orangefs.usrint.OrangeFileSystemOutputStream; +import org.orangefs.usrint.PVFS2POSIXJNIFlags; +import org.orangefs.usrint.PVFS2STDIOJNIFlags; +import org.orangefs.usrint.Stat; + +/* An extension of the Hadoop FileSystem class utilizing OrangeFS as the + * file system. + */ +public class OrangeFileSystem extends FileSystem { + private Orange orange; + public PVFS2POSIXJNIFlags pf; + public PVFS2STDIOJNIFlags sf; + private URI uri; + private String ofsMount; + private Path workingDirectory; + private FileSystem localFS; + private static final Log OFSLOG = LogFactory.getLog(OrangeFileSystem.class); + private boolean initialized; + + /* + * After OrangeFileSystem is constructed, called initialize to set fields. + */ + public OrangeFileSystem() { + this.orange = Orange.getInstance(); + this.pf = orange.posix.f; + this.sf = orange.stdio.f; + this.initialized = false; + } + + /* Append to an existing file (optional operation). */ + @Override + public FSDataOutputStream append(Path f, int bufferSize, + Progressable progress) throws IOException { + Path fOFS = new Path(getOFSPathName(f)); + OFSLOG.debug("append parameters: {\n\tPath f= " + fOFS + + "\n\tint bufferSize= " + bufferSize); + OrangeFileSystemOutputStream ofsOutputStream = new OrangeFileSystemOutputStream( + fOFS.toString(), bufferSize, (short) 0, true); + return new FSDataOutputStream(ofsOutputStream, statistics); + } + + @Override + public void completeLocalOutput(Path fsOutputFile, Path tmpLocalFile) + throws IOException { + moveFromLocalFile(tmpLocalFile, fsOutputFile); + } + + @Override + public void copyFromLocalFile(boolean delSrc, Path src, Path dst) + throws IOException { + FileUtil.copy(localFS, src, this, dst, delSrc, getConf()); + } + + @Override + public void copyToLocalFile(boolean delSrc, Path src, Path dst) + throws IOException { + FileUtil.copy(this, src, localFS, dst, delSrc, getConf()); + } + + /* + * Opens an FSDataOutputStream at the indicated Path with write-progress + * reporting. + */ + @Override + public FSDataOutputStream create(Path f, FsPermission permission, + boolean overwrite, int bufferSize, short replication, + long blockSize, Progressable progress) throws IOException { + Path fOFS = null; + Path fParent = null; + FSDataOutputStream fsdos = null; + fOFS = new Path(getOFSPathName(f)); + OFSLOG.debug("create parameters: {\n\tPath f= " + f.toString() + + "\n\tFsPermission permission= " + permission.toString() + + "\n\tboolean overwrite= " + overwrite + + "\n\tint bufferSize= " + bufferSize + + "\n\tshort replication= " + replication + + "\n\tlong blockSize= " + blockSize); + /* Does this file exist */ + if (exists(f)) { + /* Delete existing file */ + if (overwrite) { + delete(f, false); + } + /* Cannot delete existing file if it exists (without overwrite). */ + else { + throw new IOException( + "file: " + + fOFS + + " exists and overwrite wasn't specified with this creation."); + } + } + /* New file */ + else { + /* + * Check if parent directory exists.. if it doesn't call mkdirs on + * it. + */ + fParent = f.getParent(); + OFSLOG.debug("fParent = " + fParent); + if (fParent != null && !exists(fParent)) { + /* Try to create the directories. */ + if (!mkdirs(fParent, permission)) { + /* mkdirs could fail if another task creates the parent + * directory after we checked to see if the parent exists. + * So, check if the parent exists again to make sure + * mkdirs didn't fail because another task already + * successfully called mkdir on the parent + * directory/directories. + */ + if(!exists(fParent)) { + throw new IOException( + "Failed to create parent directory/directories: " + + fParent.toString()); + } + } + } + } + fsdos = new FSDataOutputStream(new OrangeFileSystemOutputStream(fOFS + .toString(), bufferSize, replication, false), statistics); + /* Set the desired permission. */ + setPermission(f, permission); + return fsdos; + } + + /* Deprecated. Use delete(Path, boolean) instead. */ + @Override + @Deprecated + public boolean delete(Path f) { + return false; + } + + /* Delete a file/folder, potentially recursively */ + @Override + public boolean delete(Path f, boolean recursive) throws IOException { + boolean ret = false; + FileStatus status = null; + Path fOFS = new Path(getOFSPathName(f)); + OFSLOG.debug("Path f = " + f); + OFSLOG.debug((recursive) ? "Recursive Delete!" : "Non-recursive Delete"); + try { + status = getFileStatus(f); + } + catch (FileNotFoundException e) { + OFSLOG.debug(makeAbsolute(f) + " not found!"); + return false; + } + catch (IOException e) { + OFSLOG.error("File:" + makeAbsolute(f)); + return false; + } + if(status.isDir()) { + if(!recursive) { + OFSLOG.debug("Couldn't delete Path f = " + f + " since it is " + + "a directory but recursive is false."); + return false; + } + // Call recursive delete on path + OFSLOG.debug("Path f =" + f + + " is a directory and recursive is true." + + " Recursively deleting directory."); + ret = (orange.stdio.recursiveDelete(fOFS.toString()) == 0) ? true + : false; + } + else { + OFSLOG.debug("Path f =" + f + + " exists and is a regular file. unlinking."); + ret = (orange.posix.unlink(fOFS.toString()) == 0) ? true : false; + } + // Return false on failure. + if(!ret) { + OFSLOG.debug("remove failed: ret == false\n"); + } + return ret; + } + + /* Check if exists. */ + @Override + public boolean exists(Path f) { + /* Stat file */ + try { + @SuppressWarnings("unused") + FileStatus status = getFileStatus(f); + } + catch (FileNotFoundException e) { + OFSLOG.debug(makeAbsolute(f) + " not found!"); + return false; + } + catch (IOException e) { + OFSLOG.error("File:" + makeAbsolute(f)); + return false; + } + return true; + } + + /* Return a file status object that represents the path. */ + @Override + public FileStatus getFileStatus(Path f) throws FileNotFoundException, + IOException { + Stat stats = null; + FileStatus fileStatus = null; + boolean isdir = false; + int block_replication = 0; /* TODO: handle replication. */ + int intPermission = 0; + String octal = null; + FsPermission permission = null; + Path fOFS = new Path(getOFSPathName(f)); + OFSLOG.debug("f = " + makeAbsolute(f)); + stats = orange.posix.stat(fOFS.toString()); + if (stats == null) { + OFSLOG.debug("stat(" + makeAbsolute(f) + ") returned null"); + throw new FileNotFoundException(); + } + isdir = orange.posix.isDir(stats.st_mode) == 0 ? false : true; + OFSLOG.debug("file/directory=" + (isdir == true ? "directory" : "file")); + /* Get UGO permissions out of st_mode... */ + intPermission = stats.st_mode & 0777; + octal = Integer.toOctalString(intPermission); + OFSLOG.debug("stats.st_mode: " + stats.st_mode); + OFSLOG.debug("intPermission: " + intPermission); + OFSLOG.debug("octal perms: " + octal); + permission = new FsPermission(octal); + OFSLOG.debug(permission.toString()); + String[] ug = orange.stdio.getUsernameGroupname((int) stats.st_uid, + (int) stats.st_gid); + if (ug == null) { + OFSLOG.debug("getUsernameGroupname returned null"); + throw new IOException(); + } + /**/ + OFSLOG.debug("uid, username = <" + stats.st_uid + ", " + ug[0] + ">"); + OFSLOG.debug("gid, groupname = <" + stats.st_gid + ", " + ug[1] + ">"); + /**/ + fileStatus = new FileStatus(stats.st_size, isdir, block_replication, + stats.st_blksize, stats.st_mtime * 1000, stats.st_atime * 1000, + permission, ug[0], ug[1], makeAbsolute(f).makeQualified(this)); + return fileStatus; + } + + @Override + public Path getHomeDirectory() { + return new Path("/user/" + System.getProperty("user.name")) + .makeQualified(this); + } + + /* + * Return a Path as a String that OrangeFS can use. ie. removes URI scheme + * and authority and prepends ofsMount + */ + private String getOFSPathName(Path path) { + String ret = ofsMount + makeAbsolute(path).toUri().getPath(); + OFSLOG.debug("ret = " + ret); + return ret; + } + + /* + * Returns a Path array representing parent directories of a given a path + */ + public Path[] getParentPaths(Path f) throws IOException { + String[] split = null; + Path[] ret = null; + String currentPath = ""; + OFSLOG.debug("getParentPaths: f = " + makeAbsolute(f).toUri().getPath()); + split = makeAbsolute(f).toUri().getPath().split(Path.SEPARATOR); + /* + * split.length - 2 since we ignore the first and last element of + * 'split'. the first element is empty and the last is the basename of + * 'f' (not a parent). + */ + if ((split.length - 2) <= 0) { + return null; + } + ret = new Path[split.length - 2]; + /* + * Start a i = 1, since first element of split == "" i < split.length -1 + * since we are only interested in parent paths. + */ + for (int i = 1; i < split.length - 1; i++) { + currentPath += Path.SEPARATOR + split[i]; + ret[i - 1] = new Path(currentPath); + OFSLOG.debug("ret[" + (i - 1) + "]= " + ret[i - 1]); + } + return ret; + } + + /* Returns a URI whose scheme and authority identify this FileSystem. */ + @Override + public URI getUri() { + return uri; + } + + /* Get the current working directory for the given file system. */ + @Override + public Path getWorkingDirectory() { + return workingDirectory; + } + + /* + * Called after a new FileSystem instance is constructed. Params: uri - a + * uri whose authority section names the host, port, etc. for this + * FileSystem conf - the configuration + */ + @Override + public void initialize(URI uri, Configuration conf) throws IOException { + if (uri == null) { + throw new IOException("uri is null"); + } + if (conf == null) { + throw new IOException("conf is null"); + } + if (this.initialized == true) { + return; + } + if (uri.getHost() == null) { + throw new IOException("Incomplete OrangeFS URI, no host: " + uri); + } + this.uri = URI.create(uri.getScheme() + "://" + uri.getAuthority()); + OFSLOG.debug("uri: " + this.uri.toString()); + OFSLOG.debug("conf: " + conf.toString()); + setConf(conf); + /* Get OFS statistics */ + statistics = getStatistics(uri.getScheme(), getClass()); + OFSLOG.debug("OrangeFileSystem.statistics: " + + this.statistics.toString()); + this.ofsMount = conf.get("fs.ofs.mntLocation", null); + if (this.ofsMount == null || this.ofsMount.length() == 0) { + throw new IOException( + "Missing fs.ofs.mntLocation. Check your configuration."); + } + this.localFS = FileSystem.getLocal(conf); + workingDirectory = new Path("/user/" + System.getProperty("user.name")) + .makeQualified(this); + OFSLOG.debug("workingDirectory = " + workingDirectory.toString()); + } + + public boolean isDir(Path f) throws FileNotFoundException { + Path fOFS = new Path(getOFSPathName(f)); + Stat stats = orange.posix.stat(fOFS.toString()); + if (stats == null) { + OFSLOG.error(makeAbsolute(f) + " not found!"); + throw new FileNotFoundException(); + } + return orange.posix.isDir(stats.st_mode) != 0 ? true : false; + } + + /* List the statuses of the files/directories in the given path if the path + * is a directory. + */ + @Override + public FileStatus[] listStatus(Path f) throws IOException { + Path fOFS = new Path(getOFSPathName(f)); + OFSLOG.debug("Path f = " + makeAbsolute(f).toString()); + ArrayList arrayList = orange.stdio.getEntriesInDir(fOFS.toString()); + if(arrayList == null) { + return null; + } + Object [] fileNames = arrayList.toArray(); + String fAbs = makeAbsolute(f).toString() + "/"; + FileStatus[] statusArray = new FileStatus[fileNames.length]; + for (int i = 0; i < fileNames.length; i++) { + try { + statusArray[i] = getFileStatus(new Path(fAbs + fileNames[i].toString())); + } + catch (FileNotFoundException e) { + // TODO + return null; + } + catch (IOException e) { + // TODO + return null; + } + } + return statusArray; + } + + public Path makeAbsolute(Path path) { + if (path.isAbsolute()) { + return path; + } + return new Path(workingDirectory, path); + } + + /* Make the given file and all non-existent parents into directories. */ + @Override + public boolean mkdirs(Path f, FsPermission permission) throws IOException { + int ret = 0; + long mode = 0; + Path[] parents = null; + mode = permission.toShort(); + OFSLOG.debug("mkdirs attempting to create directory: " + + makeAbsolute(f).toString()); + OFSLOG.debug("permission = " + permission); + /* Check to see if the directory already exists. */ + if (exists(f)) { + if (isDir(f)) { + OFSLOG.warn("directory=" + makeAbsolute(f).toString() + + " already exists"); + setPermission(f, permission); + return true; + } + else { + OFSLOG.warn("path exists but is not a directory: " + + makeAbsolute(f)); + return false; + } + } + /* + * At this point, a directory should be created unless a parent already + * exists as a file. + */ + parents = getParentPaths(f); + if (parents != null) { + /* Attempt creation of parent directories */ + for (int i = 0; i < parents.length; i++) { + if (exists(parents[i])) { + if (!isDir(parents[i])) { + OFSLOG.warn("parent path is not a directory: " + + parents[i]); + return false; + } + } + else { + /* Create the missing parent and setPermission. */ + ret = orange.posix.mkdir(getOFSPathName(parents[i]), mode); + if (ret == 0) { + setPermission(parents[i], permission); + } + else { + OFSLOG.error("mkdir failed on parent directory = " + + parents[i] + ", permission = " + + permission.toString()); + return false; + } + } + } + } + /* Now create the directory f */ + ret = orange.posix.mkdir(getOFSPathName(f), mode); + if (ret == 0) { + setPermission(f, permission); + return true; + } + else { + OFSLOG.error("mkdir failed on parent path f =" + makeAbsolute(f) + + ", permission = " + permission.toString()); + return false; + } + } + + /* Opens an FSDataInputStream at the indicated Path. */ + @Override + public FSDataInputStream open(Path f, int bufferSize) throws IOException { + Path fOFS = new Path(getOFSPathName(f)); + return new FSDataInputStream(new OrangeFileSystemFSInputStream(fOFS + .toString(), bufferSize, statistics)); + } + + /* Renames Path src to Path dst. */ + @Override + public boolean rename(Path src, Path dst) throws IOException { + int ret = orange.posix.rename(getOFSPathName(src), getOFSPathName(dst)); + return ret == 0; + } + + @Override + public void setPermission(Path p, FsPermission permission) + throws IOException { + int mode = 0; + Path fOFS = null; + if (permission == null) { + return; + } + fOFS = new Path(getOFSPathName(p)); + mode = permission.toShort(); + OFSLOG.debug("permission (symbolic) = " + permission.toString()); + if (orange.posix.chmod(fOFS.toString(), mode) < 0) { + throw new IOException("Failed to set permissions on path = " + + makeAbsolute(p) + ", mode = " + mode); + } + } + + /* Set the current working directory for the given file system. */ + @Override + public void setWorkingDirectory(Path new_dir) { + workingDirectory = makeAbsolute(new_dir); + } + + @Override + public Path startLocalOutput(Path fsOutputFile, Path tmpLocalFile) + throws IOException { + return tmpLocalFile; + } +} diff --git a/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystemFSInputStream.java b/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystemFSInputStream.java new file mode 100644 index 0000000..a7dd574 --- /dev/null +++ b/src/client/jni/org/orangefs/hadoop/fs/ofs/OrangeFileSystemFSInputStream.java @@ -0,0 +1,132 @@ +/* + * (C) 2012 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.hadoop.fs.ofs; + +import java.io.Closeable; +import java.io.IOException; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.apache.hadoop.fs.FileSystem; +import org.apache.hadoop.fs.PositionedReadable; +import org.apache.hadoop.fs.Seekable; +import org.orangefs.usrint.OrangeFileSystemInputStream; + +public class OrangeFileSystemFSInputStream extends OrangeFileSystemInputStream + implements Closeable, Seekable, PositionedReadable { + private FileSystem.Statistics statistics; + public static final Log OFSLOG = LogFactory + .getLog(OrangeFileSystemFSInputStream.class); + + /* + * Constructor passes parameters to parent class and initializes statistics + */ + public OrangeFileSystemFSInputStream(String path, int bufferSize, + FileSystem.Statistics statistics) throws IOException { + super(path, bufferSize); + this.statistics = statistics; + } + + /* *** This method declared abstract in FSInputStream *** */ + @Override + public long getPos() throws IOException { + return super.tell(); + } + + /* Override parent class implementation to include FileSystem.Statistics */ + @Override + public synchronized int read() throws IOException { + int ret = super.read(); + if (ret != -1 && statistics != null) { + OFSLOG.debug("<<<<< OrangeFileSystemFSInputStream: int ret = " + + ret + " >>>>>"); + statistics.incrementBytesRead(1); + } + if (statistics == null) { + OFSLOG.warn("couldn't increment statistics: statistics is null!"); + } + return ret; + } + + /* Override parent class implementation to include FileSystem.Statistics */ + @Override + public synchronized int read(byte[] b) throws IOException { + int ret = super.read(b); + if (ret > 0 && statistics != null) { + statistics.incrementBytesRead(ret); + OFSLOG.debug("<<<<< OrangeFileSystemFSInputStream: byte[] ret = " + + ret + " >>>>>"); + } + if (statistics == null) { + OFSLOG.warn("couldn't increment statistics: statistics is null!"); + } + return ret; + } + + /* Override parent class implementation to include FileSystem.Statistics */ + @Override + public synchronized int read(byte[] b, int off, int len) throws IOException { + int ret = super.read(b, off, len); + if (ret > 0 && statistics != null) { + OFSLOG.debug("<<<<< OrangeFileSystemFSInputStream: off ret = " + + ret + " >>>>>"); + statistics.incrementBytesRead(ret); + } + if (statistics == null) { + OFSLOG.debug("couldn't increment statistics: statistics is null!"); + } + return ret; + } + + /* This method has an implementation in abstract class FSInputStream */ + @Override + public int read(long position, byte[] buffer, int offset, int length) + throws IOException { + long oldPos = getPos(); + seek(position); + int ret = read(buffer, offset, length); + seek(oldPos); + return ret; + } + + /* This method has an implementation in abstract class FSInputStream */ + @Override + public void readFully(long position, byte[] buffer) throws IOException { + long oldPos = getPos(); + seek(position); + int ret = read(buffer); + if (ret < buffer.length) { + throw new IOException("readFully read < buffer.length bytes."); + } + seek(oldPos); + } + + /* This method has an implementation in abstract class FSInputStream */ + @Override + public void readFully(long position, byte[] buffer, int offset, int length) + throws IOException { + long oldPos = getPos(); + seek(position); + int ret = read(buffer, offset, length); + if (ret < length) { + throw new IOException("readFully read < buffer.length bytes."); + } + seek(oldPos); + } + + /* *** This method declared abstract in FSInputStream *** */ + @Override + public synchronized void seek(long pos) throws IOException { + super.seek(pos); + } + + /* *** This method declared abstract in FSInputStream *** */ + @Override + public synchronized boolean seekToNewSource(long targetPos) + throws IOException { + return false; + } +} diff --git a/src/client/jni/org/orangefs/usrint/Dirent.java b/src/client/jni/org/orangefs/usrint/Dirent.java new file mode 100644 index 0000000..d1e3c79 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/Dirent.java @@ -0,0 +1,55 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ + +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +/* Class representing C struct: 'struct dirent' */ +public class Dirent { + + long d_ino; + long d_off; + int d_reclen; + String d_type; + String d_name; + + /* + * This probably won't get called much since we're depending upon a native + * method to initialize this object. + */ + Dirent() { + + } + + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + + Field[] fields = this.getClass().getDeclaredFields(); + + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} \ No newline at end of file diff --git a/src/client/jni/org/orangefs/usrint/Orange.java b/src/client/jni/org/orangefs/usrint/Orange.java new file mode 100644 index 0000000..efca365 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/Orange.java @@ -0,0 +1,28 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +/* This is class that allows the JNI layer of the OrangeFS Direct Client + * interface to be instantiated. Follows the singleton pattern. */ +public class Orange { + private static class OrangeHolder { + public static final Orange INSTANCE = new Orange(); + } + @SuppressWarnings("unused") + private static Orange orange = null; + public static Orange getInstance() { + return OrangeHolder.INSTANCE; + } + + public PVFS2POSIXJNI posix; + + public PVFS2STDIOJNI stdio; + + private Orange() { + posix = new PVFS2POSIXJNI(); + stdio = new PVFS2STDIOJNI(); + } +} diff --git a/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputChannel.java b/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputChannel.java new file mode 100644 index 0000000..5b68268 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputChannel.java @@ -0,0 +1,158 @@ +/* + * (C) 2013 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.ReadableByteChannel; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/* Seekable OrangeFS channel for reading bytes. */ +public class OrangeFileSystemInputChannel implements ReadableByteChannel { + /* Interface Related Fields */ + private Orange orange; + private PVFS2POSIXJNIFlags pf; + /* Channel Related Fields */ + private int fd; + private int bufferSize; + private ByteBuffer channelBuffer; + /* OFSLOG for logging */ + public static final Log OFSLOG = LogFactory + .getLog(OrangeFileSystemInputChannel.class); + + public OrangeFileSystemInputChannel(int fd, int bufferSize) { + this.orange = Orange.getInstance(); + pf = orange.posix.f; + this.fd = fd; + this.bufferSize = bufferSize; + channelBuffer = ByteBuffer.allocateDirect(bufferSize); + channelBuffer.flip(); + } + + @Override + public synchronized void close() throws IOException { + if (fd < 0) { + return; + } + int ret = orange.posix.close(fd); + if (ret < 0) { + throw new IOException("close error: ret = " + ret + ", fd = " + fd); + } + fd = -1; + } + + @Override + public synchronized boolean isOpen() { + return fd >= 0; + } + + @Override + public synchronized int read(ByteBuffer dst) throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + int initialDstRemaining = dst.remaining(); + int dstRemaining = 0; + int channelBufferRemaining = 0; + int channelBufferLimit = 0; + int channelBufferPosition = 0; + int finalDstRemaining = 0; + int bytesRead = 0; + /* Put bytes from channelBuffer into dst */ + while (dst.hasRemaining()) { + dstRemaining = dst.remaining(); + /* Read from OrangeFS if channelBuffer is empty */ + if (!channelBuffer.hasRemaining()) { + /* clear buffer then readOFS */ + channelBuffer.clear(); + readOFS(); + if (channelBuffer.position() == 0) { + channelBuffer.limit(0); + break; + } + channelBuffer.flip(); + } + channelBufferRemaining = channelBuffer.remaining(); + channelBufferLimit = channelBuffer.limit(); + channelBufferPosition = channelBuffer.position(); + /* + * Potentially limit put from channelBuffer into the dst buffer, put + * the data, then restore limit if necessary. + */ + if (channelBufferRemaining > dstRemaining) { + channelBuffer.limit(channelBufferPosition + dstRemaining); + dst.put(channelBuffer); + channelBuffer.limit(channelBufferLimit); + } + else { + dst.put(channelBuffer); + } + } + /* + * Return the number of bytes read. Return -1 for EOF + */ + finalDstRemaining = dst.remaining(); + bytesRead = initialDstRemaining - finalDstRemaining; + if (initialDstRemaining == 0 || bytesRead > 0) { + OFSLOG.debug("read: " + bytesRead); + return bytesRead; + } + else { + OFSLOG.debug("no bytes read...EOF"); + return -1; + } + } + + /* + * When this method is called, the position should equal 0, and the limit + * should equal the capacity, via clear(). + */ + private synchronized void readOFS() throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + /* Attempt read of bufferSize bytes from OrangeFS into channelBuffer. */ + long ret = orange.posix.read(fd, channelBuffer, bufferSize); + if (ret < 0) { + throw new IOException("orange.posix.read failed."); + } + /* Set the position to the number of bytes read. */ + channelBuffer.position((int) ret); + } + + public synchronized void seek(long pos) throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + /* Reset the channelBuffer since we are seeking */ + channelBuffer.position(0).limit(0); + long ret = orange.posix.lseek(fd, pos, pf.SEEK_SET); + if (ret < 0 || ret != pos) { + throw new IOException("seek error: pos = " + pos + ", ret = " + ret); + } + } + + /* Returns current position within the file */ + public synchronized long tell() throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + /* + * Note: no seeking is performed here, so no need to reset ChannelBuffer + */ + long ret = orange.posix.lseek(fd, 0, pf.SEEK_CUR); + if (ret < 0) { + throw new IOException("lseek error: ret = " + ret); + } + /* + * We must offset the return of lseek by the bytes remaining in the + * buffer. + */ + return ret - channelBuffer.remaining(); + } +} diff --git a/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputStream.java b/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputStream.java new file mode 100644 index 0000000..4d826b6 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/OrangeFileSystemInputStream.java @@ -0,0 +1,157 @@ +/* + * (C) 2012 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class OrangeFileSystemInputStream extends InputStream implements + Closeable { + /* Interface Related Fields */ + private Orange orange; + private PVFS2POSIXJNIFlags pf; + /* File Related Fields */ + private OrangeFileSystemInputChannel inChannel; + private String path; + private long fileSize; + private static final Log OFSLOG = LogFactory + .getLog(OrangeFileSystemInputStream.class); + + public OrangeFileSystemInputStream(String path, int bufferSize) + throws IOException { + int fd = -1; + this.orange = Orange.getInstance(); + pf = orange.posix.f; + this.path = path; + /* Perform open */ + fd = orange.posix.open(path, pf.O_RDONLY, 0); + if (fd < 0) { + throw new IOException(path + " couldn't be opened. (open)"); + } + /* Obtain the fileSize */ + fileSize = orange.posix.lseek(fd, 0, pf.SEEK_END); + if (fileSize < 0 || orange.posix.lseek(fd, 0, pf.SEEK_SET) < 0) { + throw new IOException("Error determining fileSize: lseek: " + + fileSize); + } + /* Open the input channel */ + inChannel = new OrangeFileSystemInputChannel(fd, bufferSize); + } + + @Override + public synchronized int available() throws IOException { + if (inChannel == null) { + throw new IOException("InputChannel is null."); + } + return (int) (fileSize - inChannel.tell()); + } + + @Override + public synchronized void close() throws IOException { + if (inChannel == null) { + return; + } + inChannel.close(); + inChannel = null; + } + + public String getPath() throws IOException { + return path; + } + + @Override + public void mark(int readLimit) { + } + + @Override + public boolean markSupported() { + return false; + } + + @Override + public synchronized int read() throws IOException { + byte[] b = new byte[1]; + int rc = read(b, 0, 1); + if (rc == 1) { + int retVal = 0xff & b[0]; + /* Return byte as int */ + return retVal; + } + /* Return EOF */ + return -1; + } + + @Override + public synchronized int read(byte[] b) throws IOException { + return read(b, 0, b.length); + } + + @Override + public synchronized int read(byte[] b, int off, int len) throws IOException { + if (inChannel == null) { + throw new IOException("InputChannel is null."); + } + if (len == 0) { + return 0; + } + int ret = inChannel.read(ByteBuffer.wrap(b, off, len)); + OFSLOG.debug("inChannel.read ret = " + ret); + if (ret <= 0) { + OFSLOG.debug("Nothing read -> " + ret + " / " + len); + return -1; + } + return ret; + } + + @Override + public void reset() throws IOException { + throw new IOException("No support for marking."); + } + + public synchronized void seek(long pos) throws IOException { + if (inChannel == null) { + throw new IOException("InputChannel is null."); + } + if (pos >= fileSize) { + throw new IOException("Attempted to seek past EOF: fileSize = " + + fileSize + ", pos = " + pos); + } + inChannel.seek(pos); + } + + public synchronized boolean seekToNewSource(long targetPos) throws IOException { + return false; + } + + @Override + public synchronized long skip(long n) throws IOException { + if (n < 0) { + return 0; + } + if (inChannel == null) { + throw new IOException("InputChannel is null."); + } + long fileBytesAvailable = available(); + if (n > fileBytesAvailable) { + n = fileBytesAvailable; + } + inChannel.seek(n); + return n; + } + + /* Returns current position within the file */ + public long tell() throws IOException { + if (inChannel == null) { + throw new IOException("InputChannel is null."); + } + return inChannel.tell(); + } +} diff --git a/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputChannel.java b/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputChannel.java new file mode 100644 index 0000000..26a2f09 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputChannel.java @@ -0,0 +1,132 @@ +package org.orangefs.usrint; + +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.channels.WritableByteChannel; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +public class OrangeFileSystemOutputChannel implements WritableByteChannel { + /* Interface Related Fields */ + private Orange orange; + private PVFS2POSIXJNIFlags pf; + /* Channel Related Fields */ + private int fd; + private ByteBuffer channelBuffer; + /* OFSLOG for logging */ + public static final Log OFSLOG = LogFactory + .getLog(OrangeFileSystemInputChannel.class); + + public OrangeFileSystemOutputChannel(int fd, int bufferSize) { + this.orange = Orange.getInstance(); + pf = orange.posix.f; + this.fd = fd; + channelBuffer = ByteBuffer.allocateDirect(bufferSize); + } + + /* Flush the outChannel and close the file */ + @Override + public synchronized void close() throws IOException { + if (fd < 0) { + return; + } + flush(); + int ret = orange.posix.close(fd); + if (ret < 0) { + throw new IOException("close failed"); + } + } + + /* Flush what's left in the channelBuffer to the file system */ + public synchronized void flush() throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open"); + } + channelBuffer.flip(); + if (channelBuffer.hasRemaining()) { + long ret = orange.posix.write(fd, channelBuffer, channelBuffer + .remaining()); + if (ret < 0) { + throw new IOException("write error"); + } + channelBuffer.clear(); + } + } + + @Override + public synchronized boolean isOpen() { + return fd >= 0; + } + + public synchronized void seek(long pos) throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + /* Flush the channelBuffer since we are seeking */ + flush(); + long ret = orange.posix.lseek(fd, pos, pf.SEEK_SET); + if (ret < 0 || ret != pos) { + throw new IOException("seek error: pos = " + pos + ", ret = " + ret); + } + } + + public synchronized long tell() throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + /* + * Note: no seeking is performed here, so no need to reset ChannelBuffer + */ + long ret = orange.posix.lseek(fd, 0, pf.SEEK_CUR); + if (ret < 0) { + throw new IOException("lseek error: ret = " + ret); + } + /* + * We must offset the return of lseek by the bytes remaining in the + * buffer. + */ + return ret + channelBuffer.position(); + } + + @Override + public synchronized int write(ByteBuffer src) throws IOException { + if (fd < 0) { + throw new IOException("file descriptor isn't open."); + } + int initialSrcRemaining = src.remaining(); + int srcRemaining = 0; + int srcPosition = 0; + int srcLimit = 0; + int channelBufferRemaining = 0; + int finalSrcRemaining = 0; + int bytesWritten = 0; + /* Put bytes from src into channelBuffer. */ + while (src.hasRemaining()) { + srcRemaining = src.remaining(); + srcPosition = src.position(); + // Write to OrangeFS if channelBuffer is full + if (!channelBuffer.hasRemaining()) { + flush(); + } + channelBufferRemaining = channelBuffer.remaining(); + srcLimit = src.limit(); + /* + * Limit src if necessary, put src into channel buffer, and restore + * the limit if necessary. + */ + if (srcRemaining > channelBufferRemaining) { + src.limit(srcPosition + channelBufferRemaining); + channelBuffer.put(src); + src.limit(srcLimit); + } + else { + channelBuffer.put(src); + } + } + /* Return the number of bytes written. */ + finalSrcRemaining = src.remaining(); + bytesWritten = initialSrcRemaining - finalSrcRemaining; + return bytesWritten; + } +} diff --git a/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputStream.java b/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputStream.java new file mode 100644 index 0000000..adb2379 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/OrangeFileSystemOutputStream.java @@ -0,0 +1,164 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.io.IOException; +import java.io.OutputStream; +import java.nio.ByteBuffer; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +/* An OFS compatible File Output Stream */ +public class OrangeFileSystemOutputStream extends OutputStream { + /* Interface Related Fields */ + private Orange orange; + private PVFS2POSIXJNIFlags pf; + /* File Related Fields */ + private OrangeFileSystemOutputChannel outChannel; + private String path; + /* TODO */ + @SuppressWarnings("unused") + private short replication; + private static final Log OFSLOG = LogFactory + .getLog(OrangeFileSystemOutputStream.class); + + /* TODO: comments */ + public OrangeFileSystemOutputStream(String path, int bufferSize, + short replication, boolean append) throws IOException { + int ret = -1; + /* Initialize Interface and Flags */ + this.orange = Orange.getInstance(); + pf = orange.posix.f; + this.path = path; + /* + * TODO: replication + */ + this.replication = 0; + /* Perform open */ + ret = orange.posix.open(path, pf.O_CREAT | (append ? pf.O_APPEND : 0) + | pf.O_WRONLY, pf.S_IRWXU | pf.S_IRWXG | pf.S_IRWXO); + if (ret < 0) { + throw new IOException(path + " couldn't be opened. (open)"); + } + outChannel = new OrangeFileSystemOutputChannel(ret, bufferSize); + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + OFSLOG.debug(path + " opened successfully. fd = " + ret + + " , bufferSize = " + bufferSize); + } + + /* + * Closes this output stream and releases any system resources associated + * with this stream. The general contract of close is that it closes the + * output stream. A closed stream cannot perform output operations and + * cannot be reopened. The close method of OutputStream does nothing. + */ + @Override + public synchronized void close() throws IOException { + if (outChannel == null) { + return; + } + /* Note: flush occurs when the outChannel is closed. */ + outChannel.close(); + outChannel = null; + } + + /* + * Flushes this output stream and forces any buffered output bytes to be + * written out. The general contract of flush is that calling it is an + * indication that, if any bytes previously written have been buffered by + * the implementation of the output stream, such bytes should immediately be + * written to their intended destination. If the intended destination of + * this stream is an abstraction provided by the underlying operating + * system, for example a file, then flushing the stream guarantees only that + * bytes previously written to the stream are passed to the operating system + * for writing; it does not guarantee that they are actually written to a + * physical device such as a disk drive. The flush method of OutputStream + * does nothing. + */ + @Override + public void flush() throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + outChannel.flush(); + } + + public String getPath() throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + return path; + } + + /* Returns current position within the file */ + public long tell() throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null."); + } + return outChannel.tell(); + } + + /* + * Writes len bytes from the specified byte array starting at offset off to + * this output stream. The general contract for write(b, off, len) is that + * some of the bytes in the array b are written to the output stream in + * order; element b[off] is the first byte written and b[off+len-1] is the + * last byte written by this operation. If b is null, a NullPointerException + * is thrown. If off is negative, or len is negative, or off+len is greater + * than the length of the array b, then an IndexOutOfBoundsException is + * thrown. + */ + @Override + public void write(byte b[], int off, int len) throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + if (b == null) { + throw new NullPointerException("b is null"); + } + if (off < 0 || len < 0 || (off + len) > b.length) { + throw new IndexOutOfBoundsException( + "off or length is < 0; or off + len is > b.length: off = " + + off + ", len = " + len); + } + if (off < 0) { + return; + } + outChannel.write(ByteBuffer.wrap(b, off, len)); + } + + /* + * Writes b.length bytes from the specified byte array to this output + * stream. The general contract for write(b) is that it should have exactly + * the same effect as the call write(b, 0, b.length). + */ + @Override + public void write(byte[] b) throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + write(b, 0, b.length); + } + + /* + * Writes the specified byte to this output stream. The general contract for + * write is that one byte is written to the output stream. The byte to be + * written is the eight low-order bits of the argument b. The 24 high-order + * bits of b are ignored. Subclasses of OutputStream must provide an + * implementation for this method. + */ + @Override + public void write(int b) throws IOException { + if (outChannel == null) { + throw new IOException("outChannel is null"); + } + byte[] byteArray = { (byte) (b & 0x000000ff) }; + write(byteArray, 0, 1); + } +} diff --git a/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNI.java b/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNI.java new file mode 100644 index 0000000..d3d86a8 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNI.java @@ -0,0 +1,209 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.lang.reflect.Field; +import java.nio.ByteBuffer; + +public class PVFS2POSIXJNI { + public PVFS2POSIXJNIFlags f; + static { + String ldlPath = System.getenv("JNI_LIBRARY_PATH"); + String libFirst = "libpvfs2.so"; + String libSecond = "libofs.so"; + try { + System.load(ldlPath + "/" + libFirst); + } + catch (UnsatisfiedLinkError error) { + error.printStackTrace(); + System.err.println("Couldn't load " + libFirst); + System.err.println("JNI_LIBRARY_PATH = " + + ldlPath); + System.exit(-1); + } + try { + System.load(ldlPath + "/" + libSecond); + } + catch (UnsatisfiedLinkError error) { + error.printStackTrace(); + System.err.println("Couldn't load " + libSecond); + System.err.println("JNI_LIBRARY_PATH = " + + ldlPath); + System.exit(-1); + } + } + + public PVFS2POSIXJNI() { + /* Instantiate PVFS2POSIXJNIFlags */ + this.f = this.fillPVFS2POSIXJNIFlags(); + } + + public native int access(String path, long mode); + + public native int chdir(String path); + + public native int chmod(String path, long mode); + + public native int chown(String path, int owner, int group); + + public native int close(int fd); + + public native int creat(String path, long mode); + + public native int cwdInit(String buf, long size); + + public native int dup(int oldfd); + + public native int dup2(int oldfd, int newfd); + + public native int faccessat(int fd, String path, long mode, long flags); + + public native int fallocate(int fd, int mode, long offset, long length); + + public native int fchdir(int fd); + + public native int fchmod(int fd, long mode); + + public native int fchmodat(int fd, String path, long mode, long flags); + + public native int fchown(int fd, int owner, int group); + + public native int fchownat(int fd, String path, int owner, int group, + long flags); + + public native int fdatasync(int fd); + + public native PVFS2POSIXJNIFlags fillPVFS2POSIXJNIFlags(); + + public native long flistxattr(int fd, String list, long size); + + public native int flock(int fd, long op); + + public native int fremovexattr(int fd, String name); + + public native Stat fstat(int fd); + + public native Stat fstatat(int fd, String path, long flags); + + /* TODO: public native Statfs fstatfs(int fd); */ + + /* TODO: fstatvfs */ + public native int fsync(int fd); + + public native int ftruncate(int fd, long length); + + public native int futimes(int fd, long actime_usec, long modtime_usec); + + public native int futimesat(int dirfd, String path, long actime_usec, + long modtime_usec); + + public native int getdtablesize(); + + public native long getumask(); + + public native int isDir(int mode); + + public native int lchown(String path, int owner, int group); + + public native int link(String oldpath, String newpath); + + public native int linkat(int olddirfd, String oldpath, int newdirfd, + String newpath, long flags); + + public native long listxattr(String path, String list, long size); + + public native long llistxattr(String path, String list, long size); + + public native int lremovexattr(String path, String name); + + public native long lseek(int fd, long offset, long whence); + + public native Stat lstat(String path); + + public native int mkdir(String path, long mode); + + public native int mkdirat(int dirfd, String path, long mode); + + public native int mknod(String path, long mode, int dev); + + public native int mknodat(int dirfd, String path, long mode, int dev); + + public native int open(String path, long flags, long mode); + + public native int openat(int dirfd, String path, long flags, long mode); + + public native long pread(int fd, byte[] buf, long count, long offset); + + public native long pwrite(int fd, byte[] buf, long count, long offset); + + public native long read(int fd, ByteBuffer buf, long count); + + public native long readlink(String path, String buf, long bufsiz); + + public native long readlinkat(int fd, String path, String buf, long bufsiz); + + public native int removexattr(String path, String name); + + public native int rename(String oldpath, String newpath); + + public native int renameat(int olddirfd, String oldpath, int newdirfd, + String newpath); + + public native int rmdir(String path); + + public native Stat stat(String path); + + /* TODO: public native Statfs statfs(String path); */ + + /* TODO: statvfs */ + public native int symlink(String oldpath, String newpath); + + public native int symlinkat(String oldpath, int newdirfd, String newpath); + + public native void sync(); + + /* TODO? */ + // public native long readv(int fd, Iovec [] vector, int count); + // public native long writev(int fd, Iovec [] vector, int count); + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + Field[] fields = this.getClass().getDeclaredFields(); + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } + + public native int truncate(String path, long length); + + public native int umask(int mask); + + public native int unlink(String path); + + public native int unlinkat(int dirfd, String path, long flags); + + public native int utime(String path, long actime_sec, long modtime_sec); + + public native int utimes(String path, long actime_usec, long modtime_usec); + + public native long write(int fd, ByteBuffer buf, long count); +} diff --git a/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNIFlags.java b/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNIFlags.java new file mode 100644 index 0000000..f4b9c1a --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/PVFS2POSIXJNIFlags.java @@ -0,0 +1,95 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +public class PVFS2POSIXJNIFlags { + /* + * Fields set by JNI function fill_PVFS2POSIXJNIFlags. + */ + /* 0-9 */ + public long O_WRONLY; + public long O_RDONLY; + public long O_RDWR; + public long O_APPEND; + public long O_ASYNC; + public long O_CLOEXEC; + public long FD_CLOEXEC; + public long O_CREAT; + public long O_DIRECT; + public long O_DIRECTORY; + /* 10-19 */ + public long O_EXCL; + public long O_LARGEFILE; + public long O_NOATIME; + public long O_NOCTTY; + public long O_NOFOLLOW; + public long O_NONBLOCK; + public long O_TRUNC; + public long S_IRWXU; + public long S_IRUSR; + public long S_IWUSR; + /* 20-29 */ + public long S_IXUSR; + public long S_IRWXG; + public long S_IRGRP; + public long S_IWGRP; + public long S_IXGRP; + public long S_IRWXO; + public long S_IROTH; + public long S_IWOTH; + public long S_IXOTH; + public long S_IFMT; + /* 30-39 */ + public long S_IFSOCK; + public long S_IFLNK; + public long S_IFREG; + public long S_IFBLK; + public long S_IFDIR; + public long S_IFCHR; + public long S_IFIFO; + public long S_ISUID; + public long S_ISGID; + public long S_ISVTX; + /* 40-47 */ + public long SEEK_SET; + public long SEEK_CUR; + public long SEEK_END; + public long AT_FDCWD; + public long AT_REMOVEDIR; + public long AT_SYMLINK_NOFOLLOW; + public long ST_RDONLY; + public long ST_NOSUID; + + /* Constructor is irrelevant. Call native method fillPVFS2POSIXJNIFlags */ + private PVFS2POSIXJNIFlags() { + } + + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + Field[] fields = this.getClass().getDeclaredFields(); + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} diff --git a/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNI.java b/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNI.java new file mode 100644 index 0000000..54004cd --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNI.java @@ -0,0 +1,194 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.lang.reflect.Field; +import java.util.ArrayList; + +public class PVFS2STDIOJNI { + public PVFS2STDIOJNIFlags f; + static { + String ldlPath = System.getenv("JNI_LIBRARY_PATH"); + String libFirst = "libpvfs2.so"; + String libSecond = "libofs.so"; + try { + System.load(ldlPath + "/" + libFirst); + } + catch (UnsatisfiedLinkError error) { + error.printStackTrace(); + System.err.println("Couldn't load " + libFirst); + System.err.println("JNI_LIBRARY_PATH = " + ldlPath); + System.exit(-1); + } + try { + System.load(ldlPath + "/" + libSecond); + } + catch (UnsatisfiedLinkError error) { + error.printStackTrace(); + System.err.println("Couldn't load " + libSecond); + System.err.println("JNI_LIBRARY_PATH = " + ldlPath); + System.exit(-1); + } + } + + public PVFS2STDIOJNI() { + this.f = this.fillPVFS2STDIOJNIFlags(); + } + + public native void clearerr(long stream); + + public native void clearerrUnlocked(long stream); + + public native int closedir(long dir); + + public native int dirfd(long dir); + + public native int fclose(long stream); + + public native int fcloseall(); + + public native long fdopen(int fd, String mode); + + public native Dirent fdopendir(int fd); + + public native int feof(long stream); + + public native int feofUnlocked(long stream); + + public native int ferror(long stream); + + public native int ferrorUnlocked(long stream); + + public native int fflush(long stream); + + public native int fflushUnlocked(long stream); + + public native int fgetc(long stream); + + public native int fgetcUnlocked(long stream); + + public native String fgets(int size, long stream); + + public native String fgetsUnlocked(int size, long stream); + + public native int fileno(long stream); + + public native int filenoUnlocked(long stream); + + public native PVFS2STDIOJNIFlags fillPVFS2STDIOJNIFlags(); + + public native void flockfile(long stream); + + public native long fopen(String path, String mode); + + public native int fputc(int c, long stream); + + public native int fputcUnlocked(int c, long stream); + + public native int fputs(String s, long stream); + + public native int fputsUnlocked(String s, long stream); + + public native long fread(byte[] ptr, long size, long nmemb, long stream); + + public native long freadUnlocked(byte[] ptr, long size, long nmemb, + long stream); + + public native long freopen(String path, String mode, long stream); + + public native int fseek(long stream, long offset, long whence); + + public native long fseeko(long stream, long offset, long whence); + + public native long ftell(long stream); + + public native int ftrylockfile(long stream); + + public native void funlockfile(long stream); + + public native long fwrite(byte[] ptr, long size, long nmemb, long stream); + + public native long fwriteUnlocked(byte[] ptr, long size, long nmemb, + long stream); + + public native int getc(long stream); + + public native int getchar(); + + public native int getcharUnlocked(); + + public native int getcUnlocked(long stream); + + public native ArrayList getEntriesInDir(String path); + + public native String[] getUsernameGroupname(int uid, int gid); + + public native int getw(long stream); + + public native String mkdtemp(String tmplate); + + public native int mkstemp(String tmplate); + + public native Dirent opendir(String name); + + public native int putc(int c, long stream); + + public native int putchar(int c); + + public native int putcharUnlocked(int c); + + public native int putcUnlocked(int c, long stream); + + public native int puts(String s); + + public native int putw(int wd, long stream); + + public native long readdir(long dirp); + + public native int recursiveDelete(String path); + + public native int remove(String path); + + public native void rewinddir(long dir); + + public native void seekdir(long dir, long offset); + + /* TODO - use NIO ByteBuffer */ + /* public native void setbuf(long stream, String buf); */ + /* public native void setbuffer(long stream, String buf, long size); */ + /* public native void setlinebuf(long stream); */ + /* public native int setvbuf(long stream, long buf, long mode, long size); */ + public native long telldir(long dir); + + public native long tmpfile(); + + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + Field[] fields = this.getClass().getDeclaredFields(); + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } + + public native int ungetc(int c, long stream); +} diff --git a/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNIFlags.java b/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNIFlags.java new file mode 100644 index 0000000..6a4162e --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/PVFS2STDIOJNIFlags.java @@ -0,0 +1,63 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +public class PVFS2STDIOJNIFlags { + /* + * Fields set by JNI function fill_PVFS2STDIOJNIFlags. See + * libPVFS2STDIOJNI.c + */ + + /* seek whence */ + public long SEEK_SET; + public long SEEK_CUR; + public long SEEK_END; + + /* readdir d_type */ + public long DT_BLK; + public long DT_CHR; + public long DT_DIR; + public long DT_FIFO; + public long DT_LNK; + public long DT_REG; + public long DT_SOCK; + public long DT_UNKNOWN; + + /* setvbuf modes */ + public long _IONBF; + public long _IOLBF; + public long _IOFBF; + + /* Constructor is irrelevant. Call native method fillPVFS2STDIOJNIFlags */ + public PVFS2STDIOJNIFlags() { + } + + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + Field[] fields = this.getClass().getDeclaredFields(); + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} diff --git a/src/client/jni/org/orangefs/usrint/Stat.java b/src/client/jni/org/orangefs/usrint/Stat.java new file mode 100644 index 0000000..a18351b --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/Stat.java @@ -0,0 +1,57 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +/* Class representing C struct: 'struct stat' */ +public class Stat { + public long st_dev; + public long st_ino; + public int st_mode; + public int st_nlink; + public long st_uid; + public long st_gid; + public long st_rdev; + public long st_size; + public int st_blksize; + public long st_blocks; + public long st_atime; + public long st_mtime; + public long st_ctime; + + /* + * This probably won't get called much since we're depending upon a native + * method to initialize this object. + */ + Stat() { + } + + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + Field[] fields = this.getClass().getDeclaredFields(); + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} \ No newline at end of file diff --git a/src/client/jni/org/orangefs/usrint/Statfs.java b/src/client/jni/org/orangefs/usrint/Statfs.java new file mode 100644 index 0000000..b5631b8 --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/Statfs.java @@ -0,0 +1,61 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ + +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +/* Class representing C struct: 'struct statfs' */ +public class Statfs { + + long f_type; + long f_bsize; + long f_blocks; + long f_bfree; + long f_bavail; + long f_files; + long f_ffree; + long f_flags; + long f_namelen; + long f_frsize; + long[] f_spare = new long[5]; + + /* + * This probably won't get called much since we're depending upon a native + * method to initialize this object. + */ + Statfs() { + + } + + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + + Field[] fields = this.getClass().getDeclaredFields(); + + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} \ No newline at end of file diff --git a/src/client/jni/org/orangefs/usrint/Statvfs.java b/src/client/jni/org/orangefs/usrint/Statvfs.java new file mode 100644 index 0000000..a403dff --- /dev/null +++ b/src/client/jni/org/orangefs/usrint/Statvfs.java @@ -0,0 +1,61 @@ +/* + * (C) 2011 Clemson University + * + * See COPYING in top-level directory. + */ + +package org.orangefs.usrint; + +import java.lang.reflect.Field; + +/* Class representing C struct: 'struct statvfs' */ +public class Statvfs { + + long f_bsize; + long f_frsize; + long f_blocks; + long f_bfree; + long f_bavail; + long f_files; + long f_ffree; + long f_favail; + long f_fsid; + long f_flag; + long f_namemax; + + /* + * This probably won't get called much since we're depending upon a native + * method to initialize this object. + */ + Statvfs() { + + } + + /* Generic Object Dump to String */ + @Override + public String toString() { + StringBuilder result = new StringBuilder(); + String newLine = System.getProperty("line.separator"); + + result.append(this.getClass().getName()); + result.append(" Object {"); + result.append(newLine); + + Field[] fields = this.getClass().getDeclaredFields(); + + for (Field field : fields) { + result.append(" "); + try { + result.append(field.getName()); + result.append(": "); + result.append(field.get(this)); + } + catch (IllegalAccessException ex) { + System.out.println(ex); + } + result.append(newLine); + } + result.append("}"); + return result.toString(); + } +} \ No newline at end of file diff --git a/src/client/sysint/acache.c b/src/client/sysint/acache.c index 760f153..8c743f1 100644 --- a/src/client/sysint/acache.c +++ b/src/client/sysint/acache.c @@ -277,7 +277,7 @@ int PINT_acache_get_cached_entry( uint64_t current_time_msecs = 0; /* Flags indicating whether dynamic attrs or capabilities attr have expired. */ /* unsigned char capabilities_expired = 0; */ - unsigned char dynamic_attrs_expired = 0; + /* TODO unsigned char dynamic_attrs_expired = 0; */ gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: get_cached_entry(): H=%llu\n", llu(refn.handle)); @@ -338,7 +338,7 @@ int PINT_acache_get_cached_entry( if((current_time_msecs - tmp_payload->msecs_dynamic) > DYNAMIC_ACACHE_DEFAULT_TIMEOUT_MSECS) { - dynamic_attrs_expired = 1; + /* TODO dynamic_attrs_expired = 1; */ /* Mark the dynamic attrs invalid */ tmp_payload->attr_status = -PVFS_ETIME; *attr_status = -PVFS_ETIME; @@ -549,7 +549,7 @@ int PINT_acache_update( gossip_debug(GOSSIP_ACACHE_DEBUG, "acache: update(): H=%llu\n", llu(refn.handle)); - + if(!attr && !size) { return(-PVFS_EINVAL); @@ -605,7 +605,6 @@ int PINT_acache_update( if(attr->mask & PVFS_ATTR_META_DIST) { tmp_payload->dist = PINT_dist_copy(attr->u.meta.dist); - if(!tmp_payload->dist) { ret = -PVFS_ENOMEM; @@ -671,7 +670,7 @@ int PINT_acache_update( } gen_mutex_unlock(&acache_mutex); - + return(0); err: diff --git a/src/client/sysint/client-state-machine.h b/src/client/sysint/client-state-machine.h index 170844d..68f34ed 100644 --- a/src/client/sysint/client-state-machine.h +++ b/src/client/sysint/client-state-machine.h @@ -15,6 +15,7 @@ NOTE: state-machine.h is included at the bottom so we can define all the client-sm structures before it's included */ +#include "pvfs2-internal.h" #include "pvfs2-sysint.h" #include "pvfs2-types.h" #include "pvfs2-storage.h" @@ -322,12 +323,14 @@ struct PINT_client_readdirplus_sm typedef struct { char *seg_name; - char *seg_remaining; + char *path_remaining; PVFS_object_attr seg_attr; PVFS_object_ref seg_starting_refn; PVFS_object_ref seg_resolved_refn; } PINT_client_lookup_sm_segment; +#define PVFS2_MAX_LOOKUP_CONTEXTS 256 + /* * A context is a group of segments that have been looked up * on a server. A server can resolve more than one segment @@ -609,7 +612,8 @@ typedef struct PINT_client_sm /* generic getattr used with getattr sub state machines */ PINT_sm_getattr_state getattr; /* generic dirent array used by both readdir and readdirplus state machines */ - PINT_sm_readdir_state readdir; + PINT_sm_readdir_state readdir_state; + struct PINT_client_readdir_sm readdir; /* fetch_config state used by the nested fetch config state machines */ struct PINT_server_fetch_config_sm_state fetch_config; @@ -633,7 +637,6 @@ typedef struct PINT_client_sm struct PINT_client_setattr_sm setattr; struct PINT_client_io_sm io; struct PINT_client_flush_sm flush; - struct PINT_client_readdir_sm readdir; struct PINT_client_readdirplus_sm readdirplus; struct PINT_client_lookup_sm lookup; struct PINT_client_rename_sm rename; @@ -770,14 +773,9 @@ void PINT_sys_release(PVFS_sys_op_id op_id); void PINT_mgmt_release(PVFS_mgmt_op_id op_id); /* internal helper macros */ +/* TODO V3 Rewrite this as genuine function and inline if necessary */ #define PINT_init_sysint_credentials(sm_p_cred_p, user_cred_p)\ do { \ - if (user_cred_p == NULL) \ - { \ - gossip_lerr("Invalid user credentials! (nil)\n"); \ - free(sm_p); \ - return -PVFS_EINVAL; \ - } \ sm_p_cred_p = PVFS_util_dup_credentials(user_cred_p); \ if (!sm_p_cred_p) \ { \ diff --git a/src/client/sysint/error-details.c b/src/client/sysint/error-details.c index 223262a..050e7ad 100644 --- a/src/client/sysint/error-details.c +++ b/src/client/sysint/error-details.c @@ -7,6 +7,7 @@ #include #include "pvfs2-types.h" +#include "pvfs2-internal.h" /* PVFS2 error details functions * diff --git a/src/client/sysint/finalize.c b/src/client/sysint/finalize.c index 9f4c48f..d71ee73 100644 --- a/src/client/sysint/finalize.c +++ b/src/client/sysint/finalize.c @@ -9,6 +9,7 @@ #include #endif +#include "pvfs2-internal.h" #include "pint-sysint-utils.h" #include "acache.h" #include "ncache.h" @@ -31,11 +32,27 @@ extern PINT_smcb *g_smcb; /* PVFS_finalize * * shuts down the PVFS system interface + * should not be recursive so simple run-once mechanism * * returns 0 on success, -errno on failure */ int PVFS_sys_finalize() { + static int finiflag = 0; + static gen_mutex_t finimutex = GEN_MUTEX_INITIALIZER; + + /* first time runs, other wait until completed then exit */ + if (finiflag) + { + return 0; + } + gen_mutex_lock(&finimutex); + if (finiflag) + { + gen_mutex_unlock(&finimutex); + return 0; + } + id_gen_safe_finalize(); PINT_util_digest_finalize(); @@ -72,6 +89,8 @@ int PVFS_sys_finalize() PINT_client_state_machine_release(g_smcb); + finiflag = 1; + gen_mutex_unlock(&finimutex); return 0; } diff --git a/src/client/sysint/fs-add.sm b/src/client/sysint/fs-add.sm index 61ee79b..6baaf29 100644 --- a/src/client/sysint/fs-add.sm +++ b/src/client/sysint/fs-add.sm @@ -160,6 +160,7 @@ PVFS_error PVFS_isys_fs_add( ret = BMI_addr_lookup(&test_addr, mntent->pvfs_config_servers[i]); if (ret == 0) { + /* Bail out when first valid BMI method is found */ break; } } @@ -177,11 +178,12 @@ PVFS_error PVFS_isys_fs_add( } mntent->the_pvfs_config_server = mntent->pvfs_config_servers[i]; - PINT_smcb_alloc(&smcb, PVFS_SYS_FS_ADD, - sizeof(struct PINT_client_sm), - client_op_state_get_machine, - client_state_machine_terminate, - pint_client_sm_context); + PINT_smcb_alloc(&smcb, + PVFS_SYS_FS_ADD, + sizeof(struct PINT_client_sm), + client_op_state_get_machine, + client_state_machine_terminate, + pint_client_sm_context); if (smcb == NULL) { return -PVFS_ENOMEM; @@ -189,9 +191,8 @@ PVFS_error PVFS_isys_fs_add( sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); sm_p->u.get_config.mntent = mntent; - sm_p->u.get_config.config = - (struct server_configuration_s *)malloc( - sizeof(struct server_configuration_s)); + sm_p->u.get_config.config = (struct server_configuration_s *)malloc( + sizeof(struct server_configuration_s)); if (!sm_p->u.get_config.config) { ret = -PVFS_ENOMEM; @@ -213,8 +214,7 @@ PVFS_error PVFS_isys_fs_add( PINT_msgpair_init(&sm_p->msgarray_op); PINT_init_sysint_credentials(sm_p->cred_p, &creds); - return PINT_client_state_machine_post( - smcb, op_id, user_ptr); + return PINT_client_state_machine_post(smcb, op_id, user_ptr); } int PVFS_sys_fs_add(struct PVFS_sys_mntent *mntent) diff --git a/src/client/sysint/getparent.c b/src/client/sysint/getparent.c index 6d8c45e..09c9968 100644 --- a/src/client/sysint/getparent.c +++ b/src/client/sysint/getparent.c @@ -7,6 +7,7 @@ #include #include "pvfs2-sysint.h" +#include "pvfs2-internal.h" #include "str-utils.h" #include "gossip.h" #include "pvfs2-util.h" diff --git a/src/client/sysint/initialize.c b/src/client/sysint/initialize.c index a1faac0..10ce6a1 100644 --- a/src/client/sysint/initialize.c +++ b/src/client/sysint/initialize.c @@ -15,6 +15,7 @@ #include #endif +#include "pvfs2-internal.h" #include "acache.h" #include "ncache.h" #include "pint-cached-config.h" @@ -111,7 +112,8 @@ int PVFS_sys_initialize(uint64_t default_debug_mask) /** * (ClientID, Rank, RequestID, Handle, Sys) */ - PINT_event_define_event(NULL, "sys", "%d%d%d%llu%d", "", &PINT_client_sys_event_id); + PINT_event_define_event(NULL, "sys", "%d%d%d%llu%d", "", + &PINT_client_sys_event_id); event_mask = getenv("PVFS2_EVENTMASK"); if (event_mask) @@ -257,7 +259,7 @@ int PVFS_sys_initialize(uint64_t default_debug_mask) return 0; - error_exit: +error_exit: id_gen_safe_finalize(); diff --git a/src/client/sysint/mgmt-misc.c b/src/client/sysint/mgmt-misc.c index 8775c6e..54bc85a 100644 --- a/src/client/sysint/mgmt-misc.c +++ b/src/client/sysint/mgmt-misc.c @@ -14,6 +14,7 @@ #include +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-mgmt.h" #include "bmi.h" diff --git a/src/client/sysint/ncache.c b/src/client/sysint/ncache.c index a624bc4..dbad391 100644 --- a/src/client/sysint/ncache.c +++ b/src/client/sysint/ncache.c @@ -164,9 +164,11 @@ void PINT_ncache_finalize(void) { gen_mutex_lock(&ncache_mutex); - assert(ncache != NULL); - PINT_tcache_finalize(ncache); - ncache = NULL; + if (ncache == NULL) + { + PINT_tcache_finalize(ncache); + ncache = NULL; + } gen_mutex_unlock(&ncache_mutex); return; diff --git a/src/client/sysint/osd.c b/src/client/sysint/osd.c index e2f5867..2ea11e2 100644 --- a/src/client/sysint/osd.c +++ b/src/client/sysint/osd.c @@ -148,6 +148,13 @@ int PINT_copy_osd_object_attr(PVFS_object_attr *attr, struct osd_command *cmd) if (mask & PVFS_ATTR_META_DFILES) { /* u.meta.dfile_count */ attr->u.meta.dfile_count = cmd->attr[6].outlen/sizeof(PVFS_handle); + + if (!attr->u.meta.dfile_count) + { + attr->u.meta.dfile_count = 1; + cmd->attr[6].outlen = sizeof(PVFS_handle); + } + /* u.meta.dfile_array */ df_array_size = cmd->attr[6].outlen; if (df_array_size) { @@ -160,8 +167,9 @@ int PINT_copy_osd_object_attr(PVFS_object_attr *attr, struct osd_command *cmd) if (!attr->u.meta.dfile_array) { return ret; } - memcpy(attr->u.meta.dfile_array, cmd->attr[6].val, - df_array_size); + /*memcpy(attr->u.meta.dfile_array, cmd->attr[6].val, + df_array_size);*/ + attr->u.meta.dfile_array[0] = 0; } else { attr->u.meta.dfile_array = NULL; } diff --git a/src/client/sysint/osd.h b/src/client/sysint/osd.h index 6a95910..38226ec 100644 --- a/src/client/sysint/osd.h +++ b/src/client/sysint/osd.h @@ -23,7 +23,7 @@ /* The partitions; one for datafiles, another for metafiles and dir objects. */ #define PVFS_OSD_DATA_PID 0x10000LLU -#define PVFS_OSD_META_PID 0x10000LLU +#define PVFS_OSD_META_PID 0x20000LLU /* Pages for object and directory attributes */ #define PVFS_USEROBJECT_DIR_PG 0x30000 diff --git a/src/client/sysint/osdsm.sm b/src/client/sysint/osdsm.sm index 6662247..6d76ce2 100644 --- a/src/client/sysint/osdsm.sm +++ b/src/client/sysint/osdsm.sm @@ -137,7 +137,6 @@ static int osd_msgpairarray_post(struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); int ret = -PVFS_EINVAL, i; - PVFS_msg_tag_t session_tag; PINT_sm_msgpair_state *msg_p; gossip_debug( @@ -166,8 +165,6 @@ static int osd_msgpairarray_post(struct PINT_smcb *smcb, job_status_s *js_p) msg_p->op_status = 0; - session_tag = PINT_util_get_next_tag(); - gossip_debug(GOSSIP_MSGPAIR_DEBUG, "%s: submit sm %p msgpair %d svr_addr %llx\n", __func__, sm_p, i, llu(msg_p->svr_addr)); diff --git a/src/client/sysint/remove.sm b/src/client/sysint/remove.sm index 7bd8fba..75d5f01 100644 --- a/src/client/sysint/remove.sm +++ b/src/client/sysint/remove.sm @@ -150,14 +150,12 @@ static PINT_sm_action remove_getattr_init( struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, sm_p->object_ref, PVFS_ATTR_META_ALL|PVFS_ATTR_COMMON_TYPE, PVFS_TYPE_NONE, 0); - return SM_ACTION_COMPLETE; } @@ -178,7 +176,7 @@ static PINT_sm_action remove_getattr_analyze_results( switch(attr->objtype) { case PVFS_TYPE_METAFILE: - assert(attr->mask & PVFS_ATTR_META_DFILES); + assert(attr->mask & PVFS_ATTR_META_DFILES); gossip_debug(GOSSIP_CLIENT_DEBUG, "%s: must remove %d datafiles\n", __func__, attr->u.meta.dfile_count); @@ -226,7 +224,7 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( gossip_debug(GOSSIP_CLIENT_DEBUG, "remove state: datafile_remove_setup_msgpair\n"); - + attr = &sm_p->getattr.attr; assert(attr); @@ -262,7 +260,7 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( attr->u.meta.dfile_array, sm_p->hints); } - + msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = (attr->u.meta.dfile_array ? attr->u.meta.dfile_array[0] : sm_p->object_ref.handle); msg_p->retry_flag = PVFS_MSGPAIR_RETRY; /* TODO: Do we want retry? */ @@ -270,7 +268,7 @@ static PINT_sm_action remove_datafile_remove_setup_msgpair( ret = PINT_cached_config_map_to_server( &msg_p->svr_addr, msg_p->handle, msg_p->fs_id); - + if (ret) { gossip_err("Failed to map meta server address\n"); diff --git a/src/client/sysint/server-get-config.sm b/src/client/sysint/server-get-config.sm index 1ac4e6e..bf86482 100644 --- a/src/client/sysint/server-get-config.sm +++ b/src/client/sysint/server-get-config.sm @@ -24,13 +24,13 @@ extern job_context_id pint_client_sm_context; -static int server_parse_config( - struct server_configuration_s *config, - char *fs_config_buf, - uint32_t fs_config_buf_size); +static int server_parse_config(struct server_configuration_s *config, + char *fs_config_buf, + uint32_t fs_config_buf_size); -static int server_get_config_comp_fn( - void *v_p, struct PVFS_server_resp *resp_p, int i); +static int server_get_config_comp_fn(void *v_p, + struct PVFS_server_resp *resp_p, + int i); enum { OSD_MSGPAIR = 2001, @@ -93,16 +93,18 @@ machine pvfs2_server_get_config_sm %% /* - given mount information, retrieve the server's configuration by - issuing a getconfig operation. on successful response, we parse the - configuration and fill in the config object specified. - - returns 0 on success, -errno on error -*/ -int PINT_server_get_config( - struct server_configuration_s *config, - struct PVFS_sys_mntent* mntent_p, - PVFS_hint hints) + * given mount information, retrieve the server's configuration by + * issuing a getconfig operation. on successful response, we parse the + * configuration and fill in the config object specified. + * + * returns 0 on success, -errno on error + * + * This function is never called except by a test program. This SM is + * normally called as part of the fs_add SM. + */ +int PINT_server_get_config(struct server_configuration_s *config, + struct PVFS_sys_mntent* mntent_p, + PVFS_hint hints) { int ret = -PVFS_EINVAL; PINT_smcb *smcb = NULL; @@ -125,10 +127,10 @@ int PINT_server_get_config( mntent_p->pvfs_fs_name); PINT_smcb_alloc(&smcb, PVFS_SERVER_GET_CONFIG, - sizeof(struct PINT_client_sm), - client_op_state_get_machine, - client_state_machine_terminate, - pint_client_sm_context); + sizeof(struct PINT_client_sm), + client_op_state_get_machine, + client_state_machine_terminate, + pint_client_sm_context); if (smcb == NULL) { return -PVFS_ENOMEM; @@ -172,10 +174,9 @@ int PINT_server_get_config( } #ifdef WIN32 -static int server_parse_config( - struct server_configuration_s *config, - char *fs_config_buf, - uint32_t fs_config_buf_size) +static int server_parse_config(struct server_configuration_s *config, + char *fs_config_buf, + uint32_t fs_config_buf_size) { int ret = 1, template_index = 1; char temp_path[MAX_PATH], temp_file[MAX_PATH]; @@ -212,8 +213,13 @@ static int server_parse_config( return ret; } - hFile = CreateFile(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, - FILE_ATTRIBUTE_NORMAL, NULL); + hFile = CreateFile(temp_file, + GENERIC_WRITE, + 0, + NULL, + CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, + NULL); if (hFile == INVALID_HANDLE_VALUE) { @@ -244,10 +250,9 @@ static int server_parse_config( return ret; } #else -static int server_parse_config( - struct server_configuration_s *config, - char *fs_config_buf, - uint32_t fs_config_buf_size) +static int server_parse_config(struct server_configuration_s *config, + char *fs_config_buf, + uint32_t fs_config_buf_size) { int ret = 1, template_index = 1; int fs_fd = 0; @@ -283,8 +288,9 @@ static int server_parse_config( assert(!fs_config_buf[fs_config_buf_size - 1]); - if (write(fs_fd,fs_config_buf, - (fs_config_buf_size - 1)) == (fs_config_buf_size - 1)) + if (write(fs_fd, + fs_config_buf, + (fs_config_buf_size - 1)) == (fs_config_buf_size - 1)) { server_alias = PINT_util_guess_alias(); ret = PINT_parse_config(config, fs_template, server_alias, 0); @@ -303,8 +309,8 @@ static int server_parse_config( } #endif -static PINT_sm_action server_get_config_setup_msgpair( - struct PINT_smcb *smcb, job_status_s *js_p) +static PINT_sm_action server_get_config_setup_msgpair(struct PINT_smcb *smcb, + job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -PVFS_EINVAL; @@ -355,13 +361,13 @@ static PINT_sm_action server_get_config_setup_msgpair( msg_p->retry_flag = PVFS_MSGPAIR_RETRY; msg_p->comp_fn = server_get_config_comp_fn; msg_p->svr_addr = serv_addr; - + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); return SM_ACTION_COMPLETE; } -static PINT_sm_action server_get_config_cleanup( - struct PINT_smcb *smcb, job_status_s *js_p) +static PINT_sm_action server_get_config_cleanup(struct PINT_smcb *smcb, + job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); if (sm_p && !sm_p->u.get_config.persist_config_buffers) @@ -375,8 +381,8 @@ static PINT_sm_action server_get_config_cleanup( return SM_ACTION_COMPLETE; } -static PINT_sm_action server_get_config_parse( - struct PINT_smcb *smcb, job_status_s *js_p) +static PINT_sm_action server_get_config_parse(struct PINT_smcb *smcb, + job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -1; @@ -384,9 +390,9 @@ static PINT_sm_action server_get_config_parse( if(sm_p->u.get_config.config) { - ret = server_parse_config( - sm_p->u.get_config.config, sm_p->u.get_config.fs_config_buf, - sm_p->u.get_config.fs_config_buf_size); + ret = server_parse_config(sm_p->u.get_config.config, + sm_p->u.get_config.fs_config_buf, + sm_p->u.get_config.fs_config_buf_size); if (ret) { gossip_err("Failed to get_config from host %s\n", @@ -398,8 +404,9 @@ static PINT_sm_action server_get_config_parse( if(sm_p->u.get_config.mntent->fs_id == PVFS_FS_ID_NULL) { - cur_fs = PINT_config_find_fs_name(sm_p->u.get_config.config, - sm_p->u.get_config.mntent->pvfs_fs_name); + cur_fs = PINT_config_find_fs_name( + sm_p->u.get_config.config, + sm_p->u.get_config.mntent->pvfs_fs_name); if (!cur_fs) { gossip_err("Warning:\n Cannot retrieve information about " @@ -432,8 +439,8 @@ static PINT_sm_action server_get_config_parse( } -static PINT_sm_action server_get_config_parent_cleanup( - struct PINT_smcb *smcb, job_status_s *js_p) +static PINT_sm_action server_get_config_parent_cleanup(struct PINT_smcb *smcb, + job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); sm_p->error_code = js_p->error_code; @@ -443,10 +450,9 @@ static PINT_sm_action server_get_config_parent_cleanup( } -static int server_get_config_comp_fn( - void *v_p, - struct PVFS_server_resp *resp_p, - int i) +static int server_get_config_comp_fn(void *v_p, + struct PVFS_server_resp *resp_p, + int i) { PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); @@ -478,14 +484,15 @@ static int server_get_config_comp_fn( assert(i==0); /* if this particular request was successful, then store the server - * response and let the caller sort it out */ + * response and let the caller sort it out + */ if (sm_p->msgarray_op.msgarray[i].op_status == 0) { sm_p->u.get_config.fs_config_buf = - strdup(resp_p->u.getconfig.fs_config_buf); + strdup(resp_p->u.getconfig.fs_config_buf); sm_p->u.get_config.fs_config_buf_size = - resp_p->u.getconfig.fs_config_buf_size; + resp_p->u.getconfig.fs_config_buf_size; } /* if this is the last response, check all of the status values diff --git a/src/client/sysint/sys-create.sm b/src/client/sysint/sys-create.sm index c6940d9..f5f993c 100644 --- a/src/client/sysint/sys-create.sm +++ b/src/client/sysint/sys-create.sm @@ -226,11 +226,12 @@ PVFS_error PVFS_isys_create( return -PVFS_ENAMETOOLONG; } - PINT_smcb_alloc(&smcb, PVFS_SYS_CREATE, - sizeof(struct PINT_client_sm), - client_op_state_get_machine, - client_state_machine_terminate, - pint_client_sm_context); + PINT_smcb_alloc(&smcb, + PVFS_SYS_CREATE, + sizeof(struct PINT_client_sm), + client_op_state_get_machine, + client_state_machine_terminate, + pint_client_sm_context); if (smcb == NULL) { return -PVFS_ENOMEM; @@ -250,7 +251,10 @@ PVFS_error PVFS_isys_create( sm_p->u.create.stored_error_code = 0; sm_p->u.create.retry_count = 0; PVFS_hint_copy(hints, &sm_p->hints); - PVFS_hint_add(&sm_p->hints, PVFS_HINT_HANDLE_NAME, sizeof(PVFS_handle), &parent_ref.handle); + PVFS_hint_add(&sm_p->hints, + PVFS_HINT_HANDLE_NAME, + sizeof(PVFS_handle), + &parent_ref.handle); sm_p->parent_ref = parent_ref; if(attr.mask & PVFS_ATTR_SYS_DFILE_COUNT) @@ -350,21 +354,6 @@ PVFS_error PVFS_sys_create( { PVFS_error ret = -PVFS_EINVAL, error = 0; PVFS_sys_op_id op_id; - int ios_num; - struct server_configuration_s *server_config; - - server_config = PINT_get_server_config_struct( - parent_ref.fs_id); - PINT_cached_config_get_num_io(parent_ref.fs_id, &ios_num); - if(server_config->energysaving) - { - if(server_config->econumnodes >= ios_num) - { - server_config->econumnodes = 0; - server_config->energysaving = 0; - } - } - PINT_put_server_config_struct(server_config); gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_create entered\n"); @@ -397,6 +386,7 @@ static PINT_sm_action create_init( struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); job_id_t tmp_id; + assert((js_p->error_code == 0) || (js_p->error_code == CREATE_RETRY)); @@ -508,8 +498,8 @@ static int create_datafiles_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { - int ret; - PVFS_error status; + int ret = 0; + PVFS_error status = 0; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); @@ -558,11 +548,6 @@ static int create_datafiles_comp_fn(void *v_p, if (is_osd) { uint64_t oid; - PVFS_handle_extent_array *ea - = &sm_p->u.create.io_handle_extent_array[index]; - PVFS_handle first = ea->extent_array[0].first; - PVFS_handle last = ea->extent_array[0].last; - ret = osd_command_attr_resolve(&sm_p->msgarray_op.msgarray[index].osd_command); if (ret) @@ -706,7 +691,6 @@ static PINT_sm_action create_create_setup_msgpair( sm_p->object_ref.fs_id, sm_p->u.create.attr, sm_p->u.create.num_data_files, - server_config->econumnodes, sm_p->u.create.layout, sm_p->hints); js_p->error_code = 0; @@ -740,7 +724,7 @@ static PINT_sm_action create_datafiles_setup_msgpair_array( int is_osd; int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); PINT_sm_msgpair_state *msg_p = NULL; - int num_attr = 8, i; + int num_attr = 7, i; gossip_debug(GOSSIP_CLIENT_DEBUG, "create state: " "datafiles_setup_msgpair_array\n"); @@ -861,16 +845,16 @@ static PINT_sm_action create_datafiles_setup_msgpair_array( attrs[5].val = dist_buf; attrs[5].len = PINT_DIST_PACK_SIZE(sm_p->u.create.dist); - if(!sm_p->getattr.attr.cid) { - sm_p->getattr.attr.cid = sm_p->object_ref.handle; /* root directory */ - } - set_htonll(&attrval, sm_p->getattr.attr.cid); + //if(!sm_p->getattr.attr.cid) { + //sm_p->getattr.attr.cid = sm_p->object_ref.handle; /* root directory */ + //} + //set_htonll(&attrval, sm_p->getattr.attr.cid); - attrs[7].type = ATTR_SET; - attrs[7].page = ANY_PG + USER_COLL_PG; - attrs[7].number = 7; - attrs[7].val = &attrval; - attrs[7].len = 8; + //attrs[7].type = ATTR_SET; + //attrs[7].page = ANY_PG + USER_COLL_PG; + //attrs[7].number = 7; + //attrs[7].val = &attrval; + //attrs[7].len = 8; if (sm_p->u.create.datafile_handles) { @@ -916,7 +900,8 @@ static PINT_sm_action create_datafiles_setup_msgpair_array( if(!sm_p->getattr.attr.cid) { sm_p->getattr.attr.cid = COLLECTION_OID_LB; /* root directory */ } - set_htonll(&attrval, sm_p->getattr.attr.cid); + //set_htonll(&attrval, sm_p->getattr.attr.cid); + set_htonll(&attrval, 0); ret = osd_command_set_create(command, PVFS_OSD_DATA_PID, sm_p->u.create.datafile_handles[0], 1); if (ret) { @@ -957,7 +942,6 @@ static PINT_sm_action create_datafiles_setup_msgpair_array( } PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); - return SM_ACTION_COMPLETE; } @@ -1000,14 +984,14 @@ static PINT_sm_action create_crdirent_setup_msgpair( js_p->error_code = OSD_MSGPAIR; return SM_ACTION_COMPLETE; } else { - PINT_SERVREQ_CRDIRENT_FILL( - msg_p->req, - *sm_p->cred_p, - sm_p->u.create.object_name, - sm_p->u.create.metafile_handle, - sm_p->object_ref.handle, - sm_p->object_ref.fs_id, - sm_p->hints); + PINT_SERVREQ_CRDIRENT_FILL( + msg_p->req, + *sm_p->cred_p, + sm_p->u.create.object_name, + sm_p->u.create.metafile_handle, + sm_p->object_ref.handle, + sm_p->object_ref.fs_id, + sm_p->hints); js_p->error_code = 0; } msg_p->fs_id = sm_p->object_ref.fs_id; @@ -1063,7 +1047,7 @@ static PINT_sm_action create_cleanup( metafile_ref.handle = sm_p->u.create.metafile_handle; metafile_ref.fs_id = sm_p->object_ref.fs_id; metafile_ref.cid = sm_p->getattr.attr.cid; - + /* fill in outgoing response fields */ sm_p->u.create.create_resp->ref = metafile_ref; @@ -1276,7 +1260,7 @@ static PINT_sm_action create_parent_getattr_inspect( * directly into a 64 bit integer, rather than converting * from the int format that dotconf supports. */ - ret = sscanf(val[i], SCANF_lld, &tmp_val); + ret = sscanf(val[i], SCANF_lld, (SCANF_lld_type *)&tmp_val); if(ret != 1) { gossip_err( diff --git a/src/client/sysint/sys-dist.c b/src/client/sysint/sys-dist.c index 3512be4..68a7369 100644 --- a/src/client/sysint/sys-dist.c +++ b/src/client/sysint/sys-dist.c @@ -6,6 +6,7 @@ #include #include #include "gossip.h" +#include "pvfs2-internal.h" #include "pint-distribution.h" #include "pvfs2-sysint.h" diff --git a/src/client/sysint/sys-getattr.sm b/src/client/sysint/sys-getattr.sm index b571562..dec0cac 100644 --- a/src/client/sysint/sys-getattr.sm +++ b/src/client/sysint/sys-getattr.sm @@ -75,7 +75,7 @@ nested machine pvfs2_client_datafile_getattr_sizes_sm success => datafile_getattr_xfer_msgpairarray; default => datafile_getattr_cleanup; } - + state datafile_getattr_xfer_osd_msgpairarray { jump pvfs2_osd_msgpairarray_sm; @@ -445,7 +445,7 @@ static PINT_sm_action getattr_acache_lookup( gossip_debug(GOSSIP_GETATTR_DEBUG,"missing attrmask AFTER:\n"); PINT_attrmask_print(GOSSIP_GETATTR_DEBUG,missing_attrs); - if((missing_attrs == PVFS_ATTR_DATA_SIZE && size_status == 0) || + if((missing_attrs == (PVFS_ATTR_DATA_SIZE | PVFS_ATTR_COMMON_ATIME | PVFS_ATTR_COMMON_CTIME | PVFS_ATTR_COMMON_MTIME) && size_status == 0) || (missing_attrs == 0)) { /* nothing's missing, a hit! */ @@ -703,7 +703,7 @@ static int getattr_object_getattr_comp_fn( assert(resp_p->op == PVFS_SERV_GETATTR); gossip_debug(GOSSIP_GETATTR_DEBUG, - "getattr_object_getattr_comp_fn called\n"); + "getattr_object_getattr_comp_fn called\n"); if (resp_p->status != 0) { @@ -716,7 +716,9 @@ static int getattr_object_getattr_comp_fn( * caching. */ PINT_copy_object_attr(&sm_p->getattr.attr, - &resp_p->u.getattr.attr); + &resp_p->u.getattr.attr); + + attr = &sm_p->getattr.attr; } /* if the ref_type mask is set to a non-zero value (!PVFS_TYPE_NONE) @@ -789,8 +791,6 @@ static int getattr_object_getattr_comp_fn( /* if we requested the datafile handles for the file, did * the datafile array get populated? */ - //assert(attr->u.meta.dfile_array && - // (attr->u.meta.dfile_count > 0)); gossip_debug(GOSSIP_GETATTR_DEBUG, "getattr_object_getattr_comp_fn: " @@ -1039,8 +1039,7 @@ static int getattr_datafile_getattr_comp_fn( struct PVFS_servreq_tree_get_file_size *tree = &(msg->req.u.tree_get_file_size); int is_osd = fsid_is_osd(sm_p->object_ref.fs_id); - PVFS_error status; - int64_t size; + PVFS_error status = 0; PINT_sm_getattr_state *getattr = &(sm_p->getattr); PINT_client_getattr_mirror_ctx *ctx = NULL; @@ -1077,7 +1076,6 @@ static int getattr_datafile_getattr_comp_fn( command->attr->outlen); return ret; } - size = get_ntohll(command->attr->val); osd_command_attr_free(command); } else { /* if we are mirroring, then we need to check the error code returned from @@ -1375,7 +1373,7 @@ static PINT_sm_action getattr_datafile_getattr_cleanup( static PINT_sm_action getattr_acache_insert( struct PINT_smcb *smcb, job_status_s *js_p) -{ +{ struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PVFS_size* tmp_size = NULL; @@ -1386,7 +1384,7 @@ static PINT_sm_action getattr_acache_insert( /* see if we have a size value to cache */ if (sm_p->getattr.attr.objtype == PVFS_TYPE_METAFILE && sm_p->getattr.req_attrmask & PVFS_ATTR_DATA_SIZE) - { + { if(!(sm_p->getattr.attr.mask & PVFS_ATTR_META_UNSTUFFED)) { /* stuffed file case */ diff --git a/src/client/sysint/sys-io.sm b/src/client/sysint/sys-io.sm index 768f09c..0c19784 100644 --- a/src/client/sysint/sys-io.sm +++ b/src/client/sysint/sys-io.sm @@ -454,7 +454,7 @@ static PINT_sm_action io_init( IO_ATTR_MASKS, PVFS_TYPE_METAFILE, 0); - + if (js_p->error_code == IO_RETRY || (js_p->error_code == IO_RETRY_NODELAY)) { @@ -480,23 +480,35 @@ static PINT_sm_action io_init( sm_p->msgarray_op.params.retry_delay, smcb, 0, js_p, &tmp_id, pint_client_sm_context); } - return SM_ACTION_COMPLETE; } static PINT_sm_action io_inspect_attr( struct PINT_smcb *smcb, job_status_s *js_p) { + struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int is_osd_meta = fsid_is_osd_meta(sm_p->getattr.object_ref.fs_id); int is_osd_md = fsid_is_osd_md(sm_p->getattr.object_ref.fs_id); - if (PINT_smcb_cancelled(smcb)) { js_p->error_code = -PVFS_ECANCEL; return SM_ACTION_COMPLETE; } + /* first make sure this is an appropriate object */ + if (sm_p->getattr.attr.objtype == PVFS_TYPE_DIRECTORY) + { + js_p->error_code = -PVFS_EISDIR; + return(SM_ACTION_COMPLETE); + } + if (sm_p->getattr.attr.objtype != PVFS_TYPE_METAFILE || + sm_p->getattr.attr.u.meta.dist == NULL) + { + js_p->error_code = -PVFS_EINVAL; + return(SM_ACTION_COMPLETE); + } + /* determine if we need to unstuff or not to service this request */ js_p->error_code = unstuff_needed( sm_p->u.io.mem_req, @@ -602,11 +614,11 @@ static PINT_sm_action io_datafile_setup_msgpairs( switch(attr->objtype) { case PVFS_TYPE_METAFILE: + assert(attr->mask & PVFS_ATTR_META_DFILES); assert(attr->mask & PVFS_ATTR_META_DIST); assert(attr->u.meta.dist_size > 0); assert(attr->u.meta.dfile_array); - //assert(attr->u.meta.dfile_count > 0); if (attr->mask & PVFS_ATTR_META_MIRROR_DFILES && !is_osd) { assert(attr->u.meta.mirror_dfile_array); @@ -620,7 +632,6 @@ static PINT_sm_action io_datafile_setup_msgpairs( js_p->error_code = -PVFS_EBADF; goto exit; } - /* cannot write to an immutable file */ if (sm_p->u.io.io_type == PVFS_IO_WRITE && (attr->u.meta.hint.flags & PVFS_IMMUTABLE_FL)) @@ -657,8 +668,8 @@ static PINT_sm_action io_datafile_setup_msgpairs( js_p->error_code = -PVFS_ENOMEM; goto datafile_index_array_destroy; } - - if (is_osd & !attr->u.meta.dfile_count) + + if (is_osd) { /* underlying storage is OSD */ gossip_debug(GOSSIP_IO_DEBUG, " %s: doing OSD I/O\n", __func__); @@ -666,7 +677,7 @@ static PINT_sm_action io_datafile_setup_msgpairs( js_p->error_code = IO_DO_OSD_IO; goto sio_array_destroy; } - + ret = io_find_target_datafiles( sm_p->u.io.mem_req, sm_p->u.io.file_req, @@ -2058,6 +2069,8 @@ static inline int io_decode_ack_response( { PVFS_perror_gossip("io_process_context_recv (op_status)", cur_ctx->msg.op_status); + gossip_err("server: %s\n" + , BMI_addr_rev_lookup(cur_ctx->msg.svr_addr)); ret = cur_ctx->msg.op_status; } @@ -2654,6 +2667,7 @@ static int io_find_target_datafiles( for(i = 0; i < input_handle_count; i++) { int max_unexp_payload; + ret = io_get_max_unexp_size( file_req, input_handle_array[i], fs_id, io_type, &max_unexp_payload); diff --git a/src/client/sysint/sys-lookup.sm b/src/client/sysint/sys-lookup.sm index 4ec3fc3..57e3279 100644 --- a/src/client/sysint/sys-lookup.sm +++ b/src/client/sysint/sys-lookup.sm @@ -23,6 +23,7 @@ #include "pint-cached-config.h" #include "PINT-reqproto-encode.h" #include "pvfs2-internal.h" +#include "pvfs-path.h" #include "osd-util/osd-util.h" extern job_context_id pint_client_sm_context; @@ -68,9 +69,10 @@ machine pvfs2_client_lookup_sm { state lookup_segment_start { - run lookup_segment_start; + run lookup_segment_start; + LOOKUP_CONTINUE => lookup_context_check_completion; success => lookup_segment_query_ncache; - default => lookup_segment_lookup_failure; + default => lookup_segment_lookup_failure; } state lookup_segment_query_ncache @@ -79,10 +81,23 @@ machine pvfs2_client_lookup_sm success => lookup_segment_verify_attr_present; default => lookup_segment_setup_msgpair; } +/* + state lookup_segment_setup_parent_getattr + { + run lookup_segment_setup_parent_getattr; + default => lookup_segment_parent_getattr; + } + state lookup_segment_parent_getattr + { + jump pvfs2_client_getattr_sm; + success => lookup_segment_setup_msgpair; + default => lookup_segment_lookup_failure; + } +*/ state lookup_segment_setup_msgpair { - run lookup_segment_setup_msgpair; + run lookup_segment_setup_msgpair; success => lookup_segment_lookup_xfer_msgpair; OSD_MSGPAIR => lookup_segment_lookup_xfer_osd_msgpair; default => lookup_segment_lookup_failure; @@ -98,19 +113,19 @@ machine pvfs2_client_lookup_sm state lookup_segment_lookup_xfer_msgpair { jump pvfs2_msgpairarray_sm; - success => lookup_segment_verify_attr_present; + success => lookup_segment_verify_attr_present; default => lookup_segment_lookup_failure; } state lookup_segment_lookup_failure { - run lookup_segment_lookup_failure; - default => lookup_cleanup; + run lookup_segment_lookup_failure; + default => lookup_cleanup; } state lookup_segment_verify_attr_present { - run lookup_segment_verify_attr_present; + run lookup_segment_verify_attr_present; success => lookup_segment_check_attr_type; default => lookup_segment_getattr; } @@ -168,12 +183,14 @@ static int initialize_context( char *pathname, PVFS_object_ref ctx_starting_refn) { - int i, ret = -PVFS_EINVAL, pathlen = 0, num_segments = 0; + int i, j, ret = -PVFS_EINVAL, pathlen = 0, num_segments = 0; void *state = NULL; int cur_seg_index = 0, prev_ctx_index = 0; char *cur_seg_name = NULL; - char *orig_pathname = NULL, *seg_remaining = NULL, *slash_str = NULL; - PINT_client_lookup_sm_segment *cur_seg = NULL; + char *orig_pathname = NULL; + char *path_remaining; + PINT_client_lookup_sm_segment *cur_seg = NULL, *i_seg = NULL, + *j_seg = NULL; int num_consecutive_prev_ctx_dot_dots = 0; PINT_client_lookup_sm_ctx *ctx = NULL; PINT_client_lookup_sm_ctx *prev_ctx = NULL; @@ -182,26 +199,34 @@ static int initialize_context( assert(lookup_sm->current_context <= lookup_sm->context_count); - if(lookup_sm->current_context == lookup_sm->context_count) + if (lookup_sm->current_context == lookup_sm->context_count) { - /* we have usee the last available context */ + /* we have used the last available context */ lookup_sm->context_count++; - if(lookup_sm->context_count == 1) + if (lookup_sm->context_count == 1) { /* first context, so allocate one */ lookup_sm->contexts = malloc(sizeof(PINT_client_lookup_sm_ctx)); - if(!lookup_sm->contexts) + if (!lookup_sm->contexts) { return -PVFS_ENOMEM; } } + else if (lookup_sm->context_count >= PVFS2_MAX_LOOKUP_CONTEXTS) + { + /* too many contexts resulting from too many symlinks */ + gossip_debug(GOSSIP_LOOKUP_DEBUG, "%s: too many contexts\n", + __func__); + lookup_sm->context_count--; + return -PVFS_EMLINK; + } else { - /* no the first one, so realloc to get one more */ + /* not the first one, so realloc to get one more */ lookup_sm->contexts = realloc(lookup_sm->contexts, sizeof(PINT_client_lookup_sm_ctx) * lookup_sm->context_count); - if(!lookup_sm->contexts) + if (!lookup_sm->contexts) { return -PVFS_ENOMEM; } @@ -246,8 +271,8 @@ static int initialize_context( /* initialize all segments within the context */ orig_pathname = strdup(pathname); gossip_debug(GOSSIP_LOOKUP_DEBUG, " original pathname is: %s\n", - orig_pathname); - while(!PINT_string_next_segment(pathname, &cur_seg_name, &state)) + orig_pathname); + while (!PINT_string_next_segment(pathname, &cur_seg_name, &state)) { /* grab the next segment in the context to fill in */ cur_seg = &(ctx->segments[cur_seg_index]); @@ -265,7 +290,7 @@ static int initialize_context( num_consecutive_prev_ctx_dot_dots = 0; gossip_debug(GOSSIP_LOOKUP_DEBUG, - " ignoring useless segment\n"); + " ignoring useless segment\n"); continue; } else if (strcmp(cur_seg_name,"..") == 0) @@ -282,9 +307,8 @@ static int initialize_context( { PINT_client_lookup_sm_segment *prev_ctx_prev_seg; - gossip_debug( - GOSSIP_LOOKUP_DEBUG, " got a '..' segment that " - "requires attention of the previous context\n"); + gossip_debug(GOSSIP_LOOKUP_DEBUG, " got a '..' segment that " + "requires attention of the previous context\n"); init_next_prev_segment: /* @@ -297,18 +321,29 @@ static int initialize_context( "more previous contexts available: " "failing lookup\n"); free(orig_pathname); - return -PVFS_ENOENT; + return -PVFS_ENOTPVFS; } prev_ctx = &lookup_sm->contexts[prev_ctx_index]; assert(prev_ctx); - assert(prev_ctx->current_segment > 0); + if (prev_ctx->current_segment > 0) + { + /* whoops, we just ran out of back to back over + * hopefully this is a relative lookup and a higher + * level can work this out. All we can do is fail + * with a meaningful error code + */ + gossip_debug(GOSSIP_LOOKUP_DEBUG, "there are no " + "more previous segments available: " + "failing lookup\n"); + free(orig_pathname); + return -PVFS_ENOTPVFS; + } num_consecutive_prev_ctx_dot_dots++; - gossip_debug( - GOSSIP_LOOKUP_DEBUG, "num consecutive '..' " - "segments requiring the previous segment " - "is now %d\n", num_consecutive_prev_ctx_dot_dots); + gossip_debug(GOSSIP_LOOKUP_DEBUG, "num consecutive '..' " + "segments requiring the previous segment " + "is now %d\n", num_consecutive_prev_ctx_dot_dots); /* further, if we have a number of consecutive '..' @@ -329,16 +364,16 @@ static int initialize_context( prev_ctx_index--; goto init_next_prev_segment; } - gossip_debug( - GOSSIP_LOOKUP_DEBUG, "there are no more segments " - "in the previous context: failing lookup\n"); + gossip_debug(GOSSIP_LOOKUP_DEBUG, "there are no more " + "segments in the previous context: failing " + "lookup\n"); free(orig_pathname); - return -PVFS_ENOENT; + return -PVFS_ENOTPVFS; } prev_ctx_prev_seg = &prev_ctx->segments[ - prev_ctx->current_segment - - num_consecutive_prev_ctx_dot_dots]; + prev_ctx->current_segment - + num_consecutive_prev_ctx_dot_dots]; assert(prev_ctx_prev_seg); /* @@ -347,12 +382,10 @@ static int initialize_context( copied from the last context in this case. (so we drop through to segment init) */ - ctx_starting_refn = - prev_ctx_prev_seg->seg_starting_refn; + ctx_starting_refn = prev_ctx_prev_seg->seg_starting_refn; cur_seg_name = prev_ctx_prev_seg->seg_name; - gossip_debug( - GOSSIP_LOOKUP_DEBUG, - "using previous segment: %s\n", cur_seg_name); + gossip_debug(GOSSIP_LOOKUP_DEBUG, + "using previous segment: %s\n", cur_seg_name); cur_seg_index--; } @@ -385,33 +418,9 @@ static int initialize_context( cur_seg->seg_name = strdup(cur_seg_name); assert(cur_seg->seg_name); - slash_str = orig_pathname; - for (i = 0; i < cur_seg_index; i++) - { - slash_str = strchr(slash_str, '/'); - if (slash_str == NULL) - { - break; - } - slash_str++; - } - /* seg_remaining = strstr(orig_pathname, cur_seg_name); */ - seg_remaining = slash_str; - if (seg_remaining) - { - gossip_debug(GOSSIP_LOOKUP_DEBUG, - " *seg_remaining is: %s\n", seg_remaining); - - cur_seg->seg_remaining = strdup(seg_remaining); - assert(cur_seg->seg_remaining); - } - else - { - cur_seg->seg_remaining = NULL; - } - cur_seg_index++; - } + } /* while (next segment) */ + free(orig_pathname); #if 0 @@ -419,7 +428,7 @@ static int initialize_context( { int i = 0; gossip_debug(GOSSIP_LOOKUP_DEBUG, "Processed context path is:\n"); - for(i = 0; i < cur_seg_index; i++) + for (i = 0; i < cur_seg_index; i++) { assert(ctx->segments[i].seg_name); gossip_debug(GOSSIP_LOOKUP_DEBUG, "/%s", @@ -429,8 +438,63 @@ static int initialize_context( } #endif - ctx->total_segments = cur_seg_index; assert(ctx->current_segment == 0); + + ctx->total_segments = cur_seg_index; + /* if we ended up with no segments to resolve, use the + context's starting segment + */ + if (ctx->total_segments == 0) + { + /* clear the first segment, and fill in only the starting refn */ + cur_seg = &ctx->segments[0]; + if (cur_seg->seg_name) + { + free(cur_seg->seg_name); + cur_seg->seg_name = NULL; + } + if (cur_seg->path_remaining) + { + free(cur_seg->path_remaining); + cur_seg->path_remaining = NULL; + } + memset(cur_seg, 0, sizeof(PINT_client_lookup_sm_segment)); + cur_seg->seg_resolved_refn = ctx_starting_refn; + } + else + { + /* fill in the path_remaining fields of each segment. + this path starts with the segment name and continues to + the end of the full path. + NOTE: the length of the path has already been checked, + so no length-checking is done here. + */ + path_remaining = (char *) malloc(PVFS_REQ_LIMIT_PATH_NAME_BYTES); + if (!path_remaining) + { + return -PVFS_ENOMEM; + } + for (i = 0; i < ctx->total_segments; i++) + { + i_seg = &ctx->segments[i]; + for (j = i, path_remaining[0] = '\0'; + j < ctx->total_segments; j++) + { + j_seg = &ctx->segments[j]; + if (path_remaining[0] != '\0') + { + strcat(path_remaining, "/"); + } + strcat(path_remaining, j_seg->seg_name); + } + i_seg->path_remaining = strdup(path_remaining); + assert(i_seg->path_remaining); + gossip_debug(GOSSIP_LOOKUP_DEBUG, " path_remaining[%d] = %s\n", + i, i_seg->path_remaining); + } + free(path_remaining); + } + ret = 0; return ret; } @@ -441,7 +505,7 @@ static void finalize_context( int i = 0; PINT_client_lookup_sm_segment *cur_seg = NULL; - for(i = 0; i < MAX_LOOKUP_SEGMENTS; i++) + for (i = 0; i < MAX_LOOKUP_SEGMENTS; i++) { cur_seg = &ctx->segments[i]; assert(cur_seg); @@ -454,12 +518,12 @@ static void finalize_context( cur_seg->seg_name = NULL; } - if (cur_seg->seg_remaining) + if (cur_seg->path_remaining) { gossip_debug(GOSSIP_LOOKUP_DEBUG, "Freeing remaining " - "segment %s\n", cur_seg->seg_remaining); - free(cur_seg->seg_remaining); - cur_seg->seg_remaining = NULL; + "path %s\n", cur_seg->path_remaining); + free(cur_seg->path_remaining); + cur_seg->path_remaining = NULL; } PINT_free_object_attr(&(cur_seg->seg_attr)); } @@ -493,10 +557,10 @@ PVFS_error PVFS_isys_ref_lookup( } PINT_smcb_alloc(&smcb, PVFS_SYS_LOOKUP, - sizeof(struct PINT_client_sm), - client_op_state_get_machine, - client_state_machine_terminate, - pint_client_sm_context); + sizeof(struct PINT_client_sm), + client_op_state_get_machine, + client_state_machine_terminate, + pint_client_sm_context); if (smcb == NULL) { return -PVFS_ENOMEM; @@ -511,22 +575,27 @@ PVFS_error PVFS_isys_ref_lookup( sm_p->u.lookup.follow_link = follow_link; sm_p->u.lookup.current_context = 0; PVFS_hint_copy(hints, &sm_p->hints); - PVFS_hint_add(&sm_p->hints, PVFS_HINT_HANDLE_NAME, sizeof(PVFS_handle), &parent.handle); + PVFS_hint_add(&sm_p->hints, + PVFS_HINT_HANDLE_NAME, + sizeof(PVFS_handle), + &parent.handle); ret = initialize_context(&sm_p->u.lookup, relative_pathname, parent); if (ret != 0) { - gossip_err("%s: failed to init context (path = %s)\n", - __func__, relative_pathname); - - if (ret == -PVFS_ENOENT && sm_p->u.lookup.lookup_resp->error_path) + if (ret == -PVFS_ENOTPVFS && sm_p->u.lookup.lookup_resp->error_path) { /* copy out error path */ strncpy(sm_p->u.lookup.lookup_resp->error_path, relative_pathname, sm_p->u.lookup.lookup_resp->error_path_size); } + else + { + gossip_err("%s: failed to init context (path = %s)\n", + __func__, relative_pathname); + } PVFS_util_release_credentials(sm_p->cred_p); PINT_smcb_free(smcb); return ret; @@ -535,8 +604,7 @@ PVFS_error PVFS_isys_ref_lookup( gossip_debug(GOSSIP_CLIENT_DEBUG, "lookup got: %s (parent %llu)\n", relative_pathname, llu(parent.handle)); - return PINT_client_state_machine_post( - smcb, op_id, user_ptr); + return PINT_client_state_machine_post(smcb, op_id, user_ptr); } /** Dereference a path string relative to a parent directory. @@ -555,9 +623,15 @@ PVFS_error PVFS_sys_ref_lookup( gossip_debug(GOSSIP_CLIENT_DEBUG, "PVFS_sys_ref_lookup entered\n"); - ret = PVFS_isys_ref_lookup( - fs_id, relative_pathname, parent, credentials, resp, - follow_link, &op_id, hints, resp); + ret = PVFS_isys_ref_lookup(fs_id, + relative_pathname, + parent, + credentials, + resp, + follow_link, + &op_id, + hints, + resp); if (ret) { @@ -565,7 +639,7 @@ PVFS_error PVFS_sys_ref_lookup( return ret; } - if(op_id != -1) + if (op_id != -1) { /* did not complete immediately, so we wait */ ret = PVFS_sys_wait(op_id, "lookup", &error); @@ -573,7 +647,7 @@ PVFS_error PVFS_sys_ref_lookup( { PVFS_perror_gossip("PVFS_sys_wait call", ret); } - if(error) + if (error) { ret = error; } @@ -600,8 +674,8 @@ PVFS_error PVFS_sys_lookup( parent.handle = 0; parent.fs_id = fs_id; - ret = PINT_cached_config_get_root_handle( - parent.fs_id,&parent.handle); + ret = PINT_cached_config_get_root_handle(parent.fs_id, + &parent.handle); if (ret < 0) { @@ -624,8 +698,13 @@ PVFS_error PVFS_sys_lookup( without doing this function call. */ char *path = ((name[0] == '/') ? &name[1] : name); - ret = PVFS_sys_ref_lookup( - fs_id, path, parent, credentials, resp, follow_link, hints); + ret = PVFS_sys_ref_lookup(fs_id, + path, + parent, + credentials, + resp, + follow_link, + hints); } } return ret; @@ -639,9 +718,27 @@ PVFS_error PVFS_sys_lookup( static PINT_sm_action lookup_segment_start(struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_debug(GOSSIP_CLIENT_DEBUG, "%s\n", __func__); + struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); + PINT_client_lookup_sm_ctx *cur_ctx = NULL; + + cur_ctx = GET_CURRENT_CONTEXT(sm_p); + assert(cur_ctx); + + gossip_debug(GOSSIP_CLIENT_DEBUG, "%s: %d of %d segments\n", __func__, + cur_ctx->current_segment, cur_ctx->total_segments); + + /* if this context has no segments to resolve, proceed to + check_completion + */ + if (cur_ctx->total_segments == 0) + { + js_p->error_code = LOOKUP_CONTINUE; + } + else + { + js_p->error_code = 0; + } - js_p->error_code = 0; return SM_ACTION_COMPLETE; } @@ -672,7 +769,9 @@ static int lookup_segment_query_ncache(struct PINT_smcb *smcb, cur_seg->seg_resolved_refn.handle = object_ref.handle; cur_seg->seg_resolved_refn.fs_id = object_ref.fs_id; js_p->error_code = 0; /* hit */ - } else { + } + else + { gossip_debug(GOSSIP_NCACHE_DEBUG, "*** ncache clean miss on first segment of %s\n", cur_seg->seg_name); @@ -681,7 +780,29 @@ static int lookup_segment_query_ncache(struct PINT_smcb *smcb, } return SM_ACTION_COMPLETE; } +/* +static PINT_sm_action lookup_segment_setup_parent_getattr( + struct PINT_smcb *smcb, job_status_s *js_p) +{ + struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); + PINT_client_lookup_sm_segment *cur_seg = NULL; + + gossip_debug(GOSSIP_CLIENT_DEBUG, "lookup state: " + "lookup_segment_setup_parent_getattr\n"); + + cur_seg = GET_CURRENT_SEGMENT(sm_p); + + PINT_SM_GETATTR_STATE_FILL( + sm_p->getattr, + cur_seg->seg_starting_refn, + (PVFS_ATTR_COMMON_ALL|PVFS_ATTR_DIR_HINT), + PVFS_TYPE_DIRECTORY, + 0); + js_p->error_code = 0; + return SM_ACTION_COMPLETE; +} +*/ /* * This is called if the ncache lookup failed. It builds the msgpair * so that the next state can jump into xfer msgpair. @@ -747,36 +868,36 @@ static PINT_sm_action lookup_segment_setup_msgpair(struct PINT_smcb *smcb, js_p->error_code = OSD_MSGPAIR; } else { - /* - the pvfs2 lookup_path server operation has an optimization that - allows several path components to be resolved at once. this - code here resolves on a segment-by-segment basis, but we can - handle the multi-segment resolution by advancing through all - handles/attrs returned and populating the segments on - completion. the lookup_comp_fn does just this. - - one way to disable use of this optimization is to make sure - seg_to_lookup is set to seg_name, and never seg_remaining. that - guarantees we're issuing a lookup on a single path segment - */ - seg_to_lookup = cur_seg->seg_remaining ? cur_seg->seg_remaining : - cur_seg->seg_name; - - PINT_SERVREQ_LOOKUP_PATH_FILL( - msg_p->req, - *sm_p->cred_p, - seg_to_lookup, - cur_seg->seg_starting_refn.fs_id, - cur_seg->seg_starting_refn.handle, - PVFS_ATTR_COMMON_ALL, - sm_p->hints); - - js_p->error_code = 0; + /* + the pvfs2 lookup_path server operation has an optimization that + allows several path components to be resolved at once. this + code here resolves on a segment-by-segment basis, but we can + handle the multi-segment resolution by advancing through all + handles/attrs returned and populating the segments on + completion. the lookup_comp_fn does just this. + + one way to disable use of this optimization is to make sure + seg_to_lookup is set to seg_name, and never path_remaining. that + guarantees we're issuing a lookup on a single path segment + */ + seg_to_lookup = cur_seg->path_remaining ? cur_seg->path_remaining : + cur_seg->seg_name; + + PINT_SERVREQ_LOOKUP_PATH_FILL( + msg_p->req, + *sm_p->cred_p, + seg_to_lookup, + cur_seg->seg_starting_refn.fs_id, + cur_seg->seg_starting_refn.handle, + PVFS_ATTR_COMMON_ALL, + sm_p->hints); + + js_p->error_code = 0; } - gossip_debug( - GOSSIP_LOOKUP_DEBUG, "Looking up segment %s under handle %llu\n", - seg_to_lookup, llu(cur_seg->seg_starting_refn.handle)); + gossip_debug(GOSSIP_LOOKUP_DEBUG, "Looking up segment %s under handle " + "%llu\n", seg_to_lookup, + llu(cur_seg->seg_starting_refn.handle)); msg_p->fs_id = cur_seg->seg_starting_refn.fs_id; msg_p->handle = cur_seg->seg_starting_refn.handle; @@ -816,7 +937,7 @@ static PINT_sm_action lookup_segment_verify_attr_present( NOTE: there are two cases here where we need to fetch the attrs. 1) either the attrs are not present at all (i.e. objtype is - uninitialized). this is normal for a distributed meta data + uninitialized). this is normal for distributed metadata setups (where we got a handle but still need to fetch the attrs) 2) we got a symlink back from the lookup and we need to fetch the target path. if we got a symlink, we ALWAYS need to fetch @@ -827,7 +948,6 @@ static PINT_sm_action lookup_segment_verify_attr_present( This second case is handled in check_attr_type method. */ - if ((cur_seg->seg_attr.objtype == PVFS_TYPE_NONE) || (cur_seg->seg_attr.objtype == PVFS_TYPE_SYMLINK)) { @@ -835,6 +955,7 @@ static PINT_sm_action lookup_segment_verify_attr_present( gossip_debug(GOSSIP_LOOKUP_DEBUG, " -- NO attrs for %s\n", cur_seg->seg_name); + PINT_SM_GETATTR_STATE_CLEAR(sm_p->getattr); PINT_SM_GETATTR_STATE_FILL( sm_p->getattr, cur_seg->seg_resolved_refn, @@ -973,12 +1094,16 @@ static PINT_sm_action lookup_segment_handle_relative_link( cur_seg->seg_starting_refn); if (ret) { + /* we tried to resolve the symlink but failed */ + /* we will punt and expand the path externally */ + /* this will look up segments one at a time */ if (ret == -PVFS_ENOENT && sm_p->u.lookup.lookup_resp->error_path) { /* copy out error path */ strncpy(sm_p->u.lookup.lookup_resp->error_path, relative_symlink_target, sm_p->u.lookup.lookup_resp->error_path_size); + ret = -PVFS_ENOTPVFS; } js_p->error_code = ret; } @@ -991,9 +1116,10 @@ static PINT_sm_action lookup_segment_handle_absolute_link( struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -PVFS_EINVAL; PINT_client_lookup_sm_segment *cur_seg = NULL; - char absolute_symlink_target[PVFS_NAME_MAX] = {0}; +#if 0 + char absolute_symlink_target[PVFS_PATH_MAX] = {0}; PVFS_object_ref root_refn; - PVFS_fs_id fs_id; +#endif /* NOTE: if we have an absolute link, we need to essentially @@ -1010,29 +1136,25 @@ static PINT_sm_action lookup_segment_handle_absolute_link( cur_seg = GET_CURRENT_SEGMENT(sm_p); assert(cur_seg); - ret = PVFS_util_resolve(cur_seg->seg_attr.u.sym.target_path, - &fs_id, - absolute_symlink_target, - PVFS_NAME_MAX); - if (ret < 0) + /* if we have an absolute link just bail out and expand the path */ + /* from outside of the SM then rerun the SM if it is still PVFS */ + ret = -PVFS_ENOENT; /* this forces the if */ + gossip_debug(GOSSIP_CLIENT_DEBUG, + "PVFS_util_resolve returned %d on %s\n", + ret, cur_seg->seg_attr.u.sym.target_path); + if (ret == -PVFS_ENOENT && sm_p->u.lookup.lookup_resp->error_path) { - gossip_debug(GOSSIP_CLIENT_DEBUG, - "PVFS_util_resolve returned %d on %s\n", - ret, cur_seg->seg_attr.u.sym.target_path); - if (ret == -PVFS_ENOENT && sm_p->u.lookup.lookup_resp->error_path) - { - /* copy out error path */ - strncpy(sm_p->u.lookup.lookup_resp->error_path, - cur_seg->seg_attr.u.sym.target_path, - /*absolute_symlink_target,*/ - sm_p->u.lookup.lookup_resp->error_path_size); - /* set special error code */ - ret = -PVFS_ENOTPVFS; - } - js_p->error_code = ret; - return SM_ACTION_COMPLETE; + /* copy out error path */ + strncpy(sm_p->u.lookup.lookup_resp->error_path, + cur_seg->seg_attr.u.sym.target_path, + /*absolute_symlink_target,*/ + sm_p->u.lookup.lookup_resp->error_path_size); + /* set special error code */ + ret = -PVFS_ENOTPVFS; } - + js_p->error_code = ret; + return SM_ACTION_COMPLETE; +#if 0 sm_p->u.lookup.current_context++; /* @@ -1043,8 +1165,8 @@ static PINT_sm_action lookup_segment_handle_absolute_link( fs_id that this lookup started with. */ root_refn.fs_id = sm_p->u.lookup.starting_refn.fs_id; - ret = PINT_cached_config_get_root_handle( - root_refn.fs_id, &root_refn.handle); + ret = PINT_cached_config_get_root_handle(root_refn.fs_id, + &root_refn.handle); assert(ret == 0); ret = initialize_context(&sm_p->u.lookup, @@ -1062,6 +1184,7 @@ static PINT_sm_action lookup_segment_handle_absolute_link( js_p->error_code = ret; } return SM_ACTION_COMPLETE; +#endif } static PINT_sm_action lookup_context_check_completion( @@ -1091,7 +1214,7 @@ static PINT_sm_action lookup_context_check_completion( check_for_completion: cur_ctx->current_segment++; - if (cur_ctx->current_segment == cur_ctx->total_segments) + if (cur_ctx->current_segment >= cur_ctx->total_segments) { /* if we've run out of segments, we've completed a context @@ -1172,11 +1295,11 @@ static PINT_sm_action lookup_cleanup( sm_p->error_code = js_p->error_code; /* clean up all used memory for this lookup */ - for(i = 0; i < sm_p->u.lookup.context_count; i++) + for (i = 0; i < sm_p->u.lookup.context_count; i++) { finalize_context(&sm_p->u.lookup.contexts[i]); } - if(sm_p->u.lookup.context_count > 0) + if (sm_p->u.lookup.context_count > 0) { free(sm_p->u.lookup.contexts); } @@ -1277,7 +1400,7 @@ static int lookup_segment_lookup_comp_fn( those resolved handles. in addition, we fill in the attribute information for each segment if the attrs are available here */ - for(i = 0; i < resp_p->u.lookup_path.handle_count; i++) + for (i = 0; i < resp_p->u.lookup_path.handle_count; i++) { cur_seg = GET_SEGMENT_AT(sm_p, current_seg_index + i); assert(cur_seg); @@ -1309,20 +1432,18 @@ static int lookup_segment_lookup_comp_fn( &(resp_p->u.lookup_path.attr_array[i])); } - gossip_debug( - GOSSIP_NCACHE_DEBUG, "*** ncache update on %s " - "target (%llu|%d) " - "parent (%llu|%d)\n", - cur_seg->seg_name, - llu(last_resolved_refn.handle), - last_resolved_refn.fs_id, - llu(cur_seg->seg_starting_refn.handle), - cur_seg->seg_starting_refn.fs_id); - - PINT_ncache_update( - (const char*) cur_seg->seg_name, - (const PVFS_object_ref*) &(last_resolved_refn), - (const PVFS_object_ref*) &(cur_seg->seg_starting_refn)); + gossip_debug(GOSSIP_NCACHE_DEBUG, "*** ncache update on %s target " + "(%llu|%d) parent (%llu|%d)\n", + cur_seg->seg_name, + llu(last_resolved_refn.handle), + last_resolved_refn.fs_id, + llu(cur_seg->seg_starting_refn.handle), + cur_seg->seg_starting_refn.fs_id); + + PINT_ncache_update((const char*) cur_seg->seg_name, + (const PVFS_object_ref*) &(last_resolved_refn), + (const PVFS_object_ref*) + &(cur_seg->seg_starting_refn)); } assert(i == resp_p->u.lookup_path.handle_count); diff --git a/src/client/sysint/sys-mkdir.sm b/src/client/sysint/sys-mkdir.sm index 68be5e1..8897ac4 100644 --- a/src/client/sysint/sys-mkdir.sm +++ b/src/client/sysint/sys-mkdir.sm @@ -88,7 +88,7 @@ machine pvfs2_client_mkdir_sm success => create_collection; default => mkdir_msg_failure; } - + state mkdir_msg_xfer_osd_msgpair { jump pvfs2_osd_msgpairarray_sm; @@ -330,7 +330,6 @@ static int mkdir_msg_comp_fn(void *v_p, int index) { int ret; - uint64_t oid; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); PVFS_object_attr attr; @@ -504,14 +503,14 @@ static PINT_sm_action mkdir_msg_setup_msgpair( js_p->error_code = OSD_MKDIR_MSGPAIR; } } else { - PINT_SERVREQ_MKDIR_FILL( + PINT_SERVREQ_MKDIR_FILL( msg_p->req, *sm_p->cred_p, sm_p->object_ref.fs_id, meta_handle_extent_array, sm_p->u.mkdir.sys_attr, sm_p->hints); - js_p->error_code = 0; + js_p->error_code = 0; } msg_p->fs_id = sm_p->object_ref.fs_id; @@ -767,17 +766,15 @@ static PINT_sm_action mkdir_crdirent_setup_msgpair( js_p->error_code = OSD_MKDIR_COLL_MSGPAIR; return SM_ACTION_COMPLETE; } else { - - PINT_SERVREQ_CRDIRENT_FILL( - msg_p->req, - *sm_p->cred_p, - sm_p->u.mkdir.object_name, - sm_p->u.mkdir.metafile_handle, - sm_p->object_ref.handle, - sm_p->object_ref.fs_id, - sm_p->hints); - - js_p->error_code = 0; + PINT_SERVREQ_CRDIRENT_FILL( + msg_p->req, + *sm_p->cred_p, + sm_p->u.mkdir.object_name, + sm_p->u.mkdir.metafile_handle, + sm_p->object_ref.handle, + sm_p->object_ref.fs_id, + sm_p->hints); + js_p->error_code = 0; } msg_p->fs_id = sm_p->object_ref.fs_id; diff --git a/src/client/sysint/sys-osd-dir.sm b/src/client/sysint/sys-osd-dir.sm index a798799..86bf8ba 100644 --- a/src/client/sysint/sys-osd-dir.sm +++ b/src/client/sysint/sys-osd-dir.sm @@ -247,7 +247,6 @@ static PINT_sm_action osd_dirops_init( static PINT_sm_action osd_dirops_attr1_init( struct PINT_smcb *smcb, job_status_s *js_p) { - osd_debug("osd_dirops_attr1_init\n"); job_id_t tmp_id; struct PINT_client_sm *sm_p; @@ -362,7 +361,6 @@ static int osd_dirops_attr1_remove_comp_fn(void *v_p, static PINT_sm_action osd_dirops_attr1_setup_msgpair( struct PINT_smcb *smcb, job_status_s *js_p) { - osd_debug("attr1_setup_msgpair\n"); int ret = 0; uint64_t oid; uint8_t *dirent = NULL; @@ -440,8 +438,6 @@ static PINT_sm_action osd_dirops_attr1_setup_msgpair( msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; object_name = sm_p->u.mkdir.object_name; - osd_debug("msg_p->handle: %d\n", msg_p->handle); - osd_debug("object_name: %s\n", object_name); /* cmp */ attr[0].type = ATTR_SET; @@ -535,7 +531,6 @@ static int osd_dirops_attr1_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { - osd_debug("attr1_comp_fn\n"); int ret = 0; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); @@ -559,7 +554,6 @@ static int osd_dirops_attr1_comp_fn(void *v_p, if (smcb->op == PVFS_SYS_CREATE || smcb->op == PVFS_SYS_MKDIR) { /* insert dirent operation */ if (command->attr[2].val == NULL) { - osd_debug("successful\n"); /* successful insert operation */ ret = 0; goto out; @@ -602,9 +596,6 @@ out: static PINT_sm_action osd_dirops_attr1_cleanup( struct PINT_smcb *smcb, job_status_s *js_p) { - struct PINT_client_sm *sm_p; - - sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); gossip_debug(GOSSIP_CLIENT_DEBUG, "osd_dirops_attr1 state: cleanup\n"); /* cleanup code goes here */ @@ -649,7 +640,6 @@ static PINT_sm_action osd_dirops_attr4_setup_lock_msgpair( { int ret = 0; uint64_t oid; - char *object_name = NULL; uint64_t *outbuf, *inbuf; PINT_sm_msgpair_state *msg_p = NULL; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); @@ -676,19 +666,16 @@ static PINT_sm_action osd_dirops_attr4_setup_lock_msgpair( oid = sm_p->object_ref.handle; msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; - object_name = sm_p->u.create.object_name; } else if (smcb->op == PVFS_SYS_MKDIR) { /* For a mkdir operation, object_ref refers to the dir. object */ oid = sm_p->object_ref.handle; msg_p->fs_id = sm_p->object_ref.fs_id; msg_p->handle = sm_p->object_ref.handle; - object_name = sm_p->u.mkdir.object_name; } else if (smcb->op == PVFS_SYS_REMOVE) { /* For a remove operation, parent_ref refers to the dir. object */ oid = sm_p->parent_ref.handle; msg_p->fs_id = sm_p->parent_ref.fs_id; msg_p->handle = sm_p->parent_ref.handle; - object_name = sm_p->u.remove.object_name; } else { return 1; } @@ -1260,9 +1247,6 @@ out: static PINT_sm_action osd_dirops_attr4_cleanup( struct PINT_smcb *smcb, job_status_s *js_p) { - struct PINT_client_sm *sm_p; - - sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); gossip_debug(GOSSIP_CLIENT_DEBUG, "osd_dirops_attr4 state: cleanup\n"); /* cleanup code goes here */ diff --git a/src/client/sysint/sys-osd-io.sm b/src/client/sysint/sys-osd-io.sm index de593b7..39c94df 100644 --- a/src/client/sysint/sys-osd-io.sm +++ b/src/client/sysint/sys-osd-io.sm @@ -77,18 +77,6 @@ nested machine pvfs2_client_osd_io_sm state analyze_results { run osd_io_analyze_results; - default => test_reconstruct; - } - - state test_reconstruct - { - run osd_reconstruct_setup_msgpair; - default => test_reconstruct_xfer_osd_msgpairs; - } - - state test_reconstruct_xfer_osd_msgpairs - { - jump pvfs2_osd_msgpairarray_sm; default => cleanup; } @@ -107,9 +95,18 @@ static int osd_io_init(struct PINT_smcb *smcb, job_status_s *js_p) struct PINT_client_io_sm *io = &sm_p->u.io; PVFS_object_attr *attr = &sm_p->getattr.attr; int i, ret; - - io->datafile_count = 1; - sm_p->getattr.attr.u.meta.dfile_count = 1; + int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); + PINT_llist *cur = NULL; + struct server_configuration_s *server_config; + struct host_alias_s *cur_alias; + int server_count = 0; + int randsrv = 0; + int iterator = 0; + + server_config = PINT_get_server_config_struct( + sm_p->object_ref.fs_id); + PINT_put_server_config_struct(server_config); + ret = PINT_msgpairarray_init(&sm_p->msgarray_op, io->datafile_count); if (ret) goto out; @@ -119,7 +116,7 @@ static int osd_io_init(struct PINT_smcb *smcb, job_status_s *js_p) /* * Build req states, one for each server, and lookup addresses. */ - ret = -ENOMEM; + ret = 0; io->file_req_state = PINT_new_request_states(io->file_req, io->datafile_count); if (!io->file_req_state) @@ -151,22 +148,56 @@ static int osd_io_init(struct PINT_smcb *smcb, job_status_s *js_p) io->file_data[0].extend_flag = 1; /* always disable fsize checking */ for (i=0; idatafile_count; i++) { - //PVFS_handle datafile_handle = attr->u.meta.dfile_array[ - // io->datafile_index_array[i]]; - PVFS_handle datafile_handle = sm_p->object_ref.handle; + PVFS_handle datafile_handle = (is_osd_md ? sm_p->object_ref.handle : attr->u.meta.dfile_array[io->datafile_index_array[i]]); gossip_debug(GOSSIP_IO_DEBUG, "%s: server %d/%d handle %llu\n", __func__, i, io->datafile_count, llu(datafile_handle)); - ret = PINT_cached_config_map_to_server( - &sm_p->msgarray_op.msgarray[i].svr_addr, datafile_handle, - sm_p->object_ref.fs_id); - if (ret) - goto out; + if (datafile_handle) /* if datafile_handle = 0, that means we are doing a post-create */ + { + ret = PINT_cached_config_map_to_server( + &sm_p->msgarray_op.msgarray[i].svr_addr, datafile_handle, + sm_p->object_ref.fs_id); + if (ret) + goto out; + } else { + cur = server_config->host_aliases; + while(cur) + { + cur_alias = PINT_llist_head(cur); + if (!cur_alias) + { + break; + } + + cur = PINT_llist_next(cur); + server_count++; + } + + randsrv = (rand() % server_count); + cur = server_config->host_aliases; + + while (cur) + { + cur_alias = PINT_llist_head(cur); + if (!cur_alias) + { + break; + } + if( (iterator >= randsrv) && (!strncmp(cur_alias->bmi_address, "osd", 3))) { + BMI_addr_lookup(&sm_p->msgarray_op.msgarray[i].svr_addr, cur_alias->bmi_address); + break; + } + + cur = PINT_llist_next(cur); + iterator++; + } + } io->file_req_state[i].target_offset = io->file_req_offset; io->file_req_state[i].final_offset = io->file_req_offset + io->mem_req->aggregate_size; + if (i > 0) memcpy(&io->file_data[i], &io->file_data[0], sizeof(io->file_data[0])); @@ -240,8 +271,7 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) PVFS_handle datafile_handle; int j; - //datafile_handle = attr->u.meta.dfile_array[io->datafile_index_array[i]]; - datafile_handle = sm_p->object_ref.handle; + datafile_handle = (is_osd_md ? sm_p->object_ref.handle : attr->u.meta.dfile_array[io->datafile_index_array[i]]); if (PINT_REQUEST_DONE(&io->file_req_state[i]) || io->short_read[i]) { gossip_debug(GOSSIP_IO_DEBUG, "%s: Nothing to do for server %d\n", @@ -443,15 +473,31 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) } else { - struct attribute_list attrs = {ATTR_SET, ANY_PG + USER_COLL_PG, 1, &attrval, 8}; + osd_command_set_create_and_write(command, PVFS_OSD_DATA_PID, datafile_handle, len, target_offset[0]); - if(!sm_p->getattr.attr.cid) { - sm_p->getattr.attr.cid = COLLECTION_OID_LB; /* root directory */ + if(!sm_p->getattr.attr.cid) { + sm_p->getattr.attr.cid = COLLECTION_OID_LB; /* root directory */ } set_htonll(&attrval, sm_p->getattr.attr.cid); - osd_command_set_create_and_write(command, PVFS_OSD_DATA_PID, datafile_handle, len, target_offset[0]); - osd_command_attr_build(command, &attrs, 1); + if (datafile_handle) + { + struct attribute_list attrs = {ATTR_SET, ANY_PG + USER_COLL_PG, 1, &attrval, 8}; + osd_command_attr_build(command, &attrs, 1); + } else { + struct attribute_list attrs[2]; + attrs[0].type = ATTR_SET; + attrs[0].page = ANY_PG + USER_COLL_PG; + attrs[0].number = 1; + attrs[0].val = &attrval; + attrs[0].len = 8; + attrs[1].type = ATTR_GET; + attrs[1].page = CUR_CMD_ATTR_PG; + attrs[1].number = CCAP_OID; + attrs[1].val = NULL; + attrs[1].len = CCAP_OID_LEN; + osd_command_attr_build(command, attrs, 2); + } } } else { @@ -463,7 +509,6 @@ static int osd_io_setup_msgpairs(struct PINT_smcb *smcb, job_status_s *js_p) command->iov_outlen = csegs_count; //~ printf("Contig WRITE %d\n", len); - } } else if (sresult.segs > 0) { /* either need a SGL or optimized SGL */ @@ -694,6 +739,7 @@ static int osd_io_completion_fn( struct PVFS_server_resp *resp_p __attribute__((unused)), int index) { + gossip_debug(GOSSIP_CLIENT_DEBUG, "osd_io_completion_fn\n"); struct PINT_smcb *smcb = user_args; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); struct PINT_client_io_sm *io = &sm_p->u.io; @@ -790,6 +836,13 @@ static int osd_io_maybe_xfer_more(struct PINT_smcb *smcb, job_status_s *js_p) struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); struct PINT_client_io_sm *io = &sm_p->u.io; int i, more = 1; + struct server_configuration_s *server_config; + PVFS_size tmp_size = 0; + gossip_debug(GOSSIP_CLIENT_DEBUG, "maybe_xfer_more\n"); + + server_config = PINT_get_server_config_struct( + sm_p->object_ref.fs_id); + PINT_put_server_config_struct(server_config); gossip_debug(GOSSIP_IO_DEBUG, "%s: total %lld want %lld.\n", __func__, lld(io->total_size), lld(io->mem_req->aggregate_size)); @@ -797,6 +850,16 @@ static int osd_io_maybe_xfer_more(struct PINT_smcb *smcb, job_status_s *js_p) if (io->total_size == io->mem_req->aggregate_size) more = 0; + /* retrieve the newly created oid if we are doing a post-create and write with oid = 0 */ + if (io->total_size <= KERNEL_BUFSIZE && server_config->post_create && !sm_p->getattr.attr.u.meta.dfile_array[io->datafile_index_array[0]]) + { + osd_command_attr_resolve(&sm_p->msgarray_op.msgarray[0].osd_command); + sm_p->getattr.attr.u.meta.dfile_array[io->datafile_index_array[0]] = get_ntohll(sm_p->msgarray_op.msgarray[0].osd_command.attr[1].val); + PINT_acache_update(sm_p->object_ref, + &sm_p->getattr.attr, + &tmp_size); + } + /* * If all short read, done. * @@ -844,7 +907,7 @@ extern int io_find_offset(struct PINT_client_sm *sm_p, PVFS_size contig_size, static int osd_io_analyze_results(struct PINT_smcb *smcb, job_status_s *js_p) { struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - PVFS_offset eor, filereq_ub_offset; + PVFS_offset filereq_ub_offset; int ret = 0; gossip_debug(GOSSIP_IO_DEBUG, "%s: total bytes transferred %lld\n", __func__, lld(sm_p->u.io.total_size)); @@ -864,7 +927,6 @@ static int osd_io_analyze_results(struct PINT_smcb *smcb, job_status_s *js_p) &filereq_ub_offset); if (ret) goto out; - eor = filereq_ub_offset + sm_p->u.io.file_req_offset; #if 0 /* Now we need to find out the maximum sizes of the bstreams. This * will be used to see if there is more data in the global file than @@ -900,6 +962,7 @@ out: static int osd_io_cleanup(struct PINT_smcb *smcb, job_status_s *js_p) { + gossip_debug(GOSSIP_CLIENT_DEBUG, "osd_io_cleanup\n"); struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); struct PINT_client_io_sm *io = &sm_p->u.io; struct server_configuration_s *server_config; @@ -922,50 +985,6 @@ static int osd_io_cleanup(struct PINT_smcb *smcb, job_status_s *js_p) return 1; } -static PINT_sm_action osd_reconstruct_setup_msgpair( - struct PINT_smcb *smcb, job_status_s *js_p) -{ - struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); - int ret = -PVFS_EINVAL; - PINT_sm_msgpair_state *msg_p = NULL; - - PINT_msgpair_init(&sm_p->msgarray_op); - msg_p = &sm_p->msgarray_op.msgpair; - - struct osd_command *command = &msg_p->osd_command; - - ret = osd_command_set_reconstruct(command, PVFS_OSD_DATA_PID); - - command->outdata = "test"; - command->outlen = 4; - - if (ret) { - osd_error_xerrno(ret, "%s: osd_command_set_remove failed", - __func__); - js_p->error_code = ret; - return 1; - } - - js_p->error_code = 0; - - msg_p->fs_id = sm_p->object_ref.fs_id; - msg_p->handle = sm_p->object_ref.handle; - msg_p->retry_flag = PVFS_MSGPAIR_RETRY; - msg_p->comp_fn = NULL; - - ret = PINT_cached_config_map_to_server( - &msg_p->svr_addr, msg_p->handle, msg_p->fs_id); - - if (ret) - { - gossip_err("Failed to map meta server address\n"); - js_p->error_code = ret; - } - - PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); - return SM_ACTION_COMPLETE; -} - /* * Local variables: * mode: c diff --git a/src/client/sysint/sys-readdir.sm b/src/client/sysint/sys-readdir.sm index 6cd8d98..8d0a847 100644 --- a/src/client/sysint/sys-readdir.sm +++ b/src/client/sysint/sys-readdir.sm @@ -1,5 +1,5 @@ /* - * (C) 2003 Clemson University and The University of Chicago + * (C) 2003 Clemson University and The University of Chicago * * See COPYING in top-level directory. */ @@ -153,19 +153,19 @@ PVFS_error PVFS_isys_readdir( PINT_init_msgarray_params(sm_p, ref.fs_id); PINT_init_sysint_credentials(sm_p->cred_p, credentials); - sm_p->u.readdir.readdir_resp = resp; + sm_p->readdir.readdir_resp = resp; sm_p->object_ref = ref; PVFS_hint_copy(hints, &sm_p->hints); PVFS_hint_add(&sm_p->hints, PVFS_HINT_HANDLE_NAME, sizeof(PVFS_handle), &ref.handle); /* point the sm dirent array and outcount to the readdir response field */ - sm_p->readdir.dirent_array = &resp->dirent_array; - sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; - sm_p->readdir.token = &resp->token; - sm_p->readdir.directory_version = &resp->directory_version; + sm_p->readdir_state.dirent_array = &resp->dirent_array; + sm_p->readdir_state.dirent_outcount = &resp->pvfs_dirent_outcount; + sm_p->readdir_state.token = &resp->token; + sm_p->readdir_state.directory_version = &resp->directory_version; - sm_p->readdir.pos_token = sm_p->u.readdir.pos_token = token; - sm_p->readdir.dirent_limit = sm_p->u.readdir.dirent_limit = pvfs_dirent_incount; + sm_p->readdir_state.pos_token = sm_p->readdir.pos_token = token; + sm_p->readdir_state.dirent_limit = sm_p->readdir.dirent_limit = pvfs_dirent_incount; gossip_debug(GOSSIP_READDIR_DEBUG, "Doing readdir on handle " "%llu on fs %d\n", llu(ref.handle), ref.fs_id); @@ -264,8 +264,8 @@ static PINT_sm_action readdir_msg_setup_msgpair( GOSSIP_READDIR_DEBUG, "%llu|%d | token is %llu | limit is %d\n", llu(sm_p->object_ref.handle), sm_p->object_ref.fs_id, - llu(sm_p->readdir.pos_token), - sm_p->readdir.dirent_limit); + llu(sm_p->readdir_state.pos_token), + sm_p->readdir_state.dirent_limit); PINT_msgpair_init(&sm_p->msgarray_op); msg_p = &sm_p->msgarray_op.msgpair; @@ -318,8 +318,8 @@ static PINT_sm_action readdir_msg_setup_msgpair( *sm_p->cred_p, sm_p->object_ref.fs_id, sm_p->object_ref.handle, - sm_p->u.readdir.pos_token, - sm_p->u.readdir.dirent_limit, + sm_p->readdir_state.pos_token, + sm_p->readdir_state.dirent_limit, sm_p->hints); } @@ -365,24 +365,24 @@ static int readdir_msg_comp_fn(void *v_p, * all the dirents in a single pass. So we don't really need token and * directory_version. */ - *(sm_p->readdir.token) = 0; - *(sm_p->readdir.directory_version) = 0; - *(sm_p->readdir.dirent_outcount) = command->numattr; + *(sm_p->readdir_state.token) = 0; + *(sm_p->readdir_state.directory_version) = 0; + *(sm_p->readdir_state.dirent_outcount) = command->numattr; dirent_array_len = command->numattr * sizeof(PVFS_dirent); /* The dirent_array must be freed by caller */ - *(sm_p->readdir.dirent_array) = malloc(dirent_array_len); - assert(*(sm_p->readdir.dirent_array)); + *(sm_p->readdir_state.dirent_array) = malloc(dirent_array_len); + assert(*(sm_p->readdir_state.dirent_array)); /* populate dirent_array */ for (i = 0; i < command->numattr; i++) { - PVFS_dirent *dirent = &(*sm_p->readdir.dirent_array)[i]; + PVFS_dirent *dirent = &(*sm_p->readdir_state.dirent_array)[i]; if (command->attr[i].outlen < 9) { gossip_err("%s: short dirent %d/%d len %d\n", __func__, i, command->numattr, command->attr[i].outlen); - *(sm_p->readdir.dirent_outcount) = 0; + *(sm_p->readdir_state.dirent_outcount) = 0; return -EINVAL; } dirent->handle = get_ntohll(command->attr[i].val); @@ -403,30 +403,30 @@ static int readdir_msg_comp_fn(void *v_p, /* convert servresp_readdir response to a sysresp_readdir obj */ - *(sm_p->readdir.token) = resp_p->u.readdir.token; - *(sm_p->readdir.directory_version) = + *(sm_p->readdir_state.token) = resp_p->u.readdir.token; + *(sm_p->readdir_state.directory_version) = resp_p->u.readdir.directory_version; - *(sm_p->readdir.dirent_outcount) = + *(sm_p->readdir_state.dirent_outcount) = resp_p->u.readdir.dirent_count; - if (*(sm_p->readdir.dirent_outcount) > 0) + if (*(sm_p->readdir_state.dirent_outcount) > 0) { int dirent_array_len = - (sizeof(PVFS_dirent) * *(sm_p->readdir.dirent_outcount)); + (sizeof(PVFS_dirent) * *(sm_p->readdir_state.dirent_outcount)); /* this dirent_array MUST be freed by caller */ - *(sm_p->readdir.dirent_array) = + *(sm_p->readdir_state.dirent_array) = (PVFS_dirent *) malloc(dirent_array_len); - assert(*(sm_p->readdir.dirent_array)); + assert(*(sm_p->readdir_state.dirent_array)); - memcpy(*(sm_p->readdir.dirent_array), + memcpy(*(sm_p->readdir_state.dirent_array), resp_p->u.readdir.dirent_array, dirent_array_len); } } gossip_debug(GOSSIP_READDIR_DEBUG, "*** Got %d directory entries " "[version %lld]\n", - *(sm_p->readdir.dirent_outcount), - lld(*(sm_p->readdir.directory_version))); + *(sm_p->readdir_state.dirent_outcount), + lld(*(sm_p->readdir_state.directory_version))); return 0; } @@ -451,11 +451,11 @@ static PINT_sm_action readdir_cleanup( { /* insert all handles into the ncache while we have them */ tmp_ref.fs_id = sm_p->object_ref.fs_id; - for(i = 0; i < *(sm_p->readdir.dirent_outcount); i++) + for(i = 0; i < *(sm_p->readdir_state.dirent_outcount); i++) { - tmp_ref.handle = (*(sm_p->readdir.dirent_array))[i].handle; + tmp_ref.handle = (*(sm_p->readdir_state.dirent_array))[i].handle; PINT_ncache_update( - (const char *) (*(sm_p->readdir.dirent_array))[i].d_name, + (const char *) (*(sm_p->readdir_state.dirent_array))[i].d_name, (const PVFS_object_ref *) &(tmp_ref), (const PVFS_object_ref *) &(sm_p->object_ref)); } diff --git a/src/client/sysint/sys-readdirplus.sm b/src/client/sysint/sys-readdirplus.sm index 4f22b2c..65647d6 100644 --- a/src/client/sysint/sys-readdirplus.sm +++ b/src/client/sysint/sys-readdirplus.sm @@ -162,7 +162,7 @@ PVFS_error PVFS_isys_readdirplus( return ret; } - if (pvfs_dirent_incount > PVFS_REQ_LIMIT_DIRENT_COUNT) + if (pvfs_dirent_incount > PVFS_REQ_LIMIT_DIRENT_COUNT_READDIRPLUS) { gossip_lerr("PVFS_isys_readdirplus unable to handle request " "for %d entries.\n", pvfs_dirent_incount); @@ -185,13 +185,13 @@ PVFS_error PVFS_isys_readdirplus( sm_p->object_ref = ref; PVFS_hint_copy(hints, &sm_p->hints); /* point the sm dirent array and outcount to the readdirplus response field */ - sm_p->readdir.dirent_array = &resp->dirent_array; - sm_p->readdir.dirent_outcount = &resp->pvfs_dirent_outcount; - sm_p->readdir.token = &resp->token; - sm_p->readdir.directory_version = &resp->directory_version; + sm_p->readdir_state.dirent_array = &resp->dirent_array; + sm_p->readdir_state.dirent_outcount = &resp->pvfs_dirent_outcount; + sm_p->readdir_state.token = &resp->token; + sm_p->readdir_state.directory_version = &resp->directory_version; - sm_p->readdir.pos_token = sm_p->u.readdirplus.pos_token = token; - sm_p->readdir.dirent_limit = sm_p->u.readdirplus.dirent_limit = pvfs_dirent_incount; + sm_p->readdir_state.pos_token = sm_p->u.readdirplus.pos_token = token; + sm_p->readdir_state.dirent_limit = sm_p->u.readdirplus.dirent_limit = pvfs_dirent_incount; /* We store the object attr mask in the sm structure */ sm_p->u.readdirplus.attrmask = PVFS_util_sys_to_object_attr_mask(attrmask); sm_p->u.readdirplus.readdirplus_resp = resp; @@ -425,7 +425,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) PVFS_sysresp_readdirplus *readdirplus_resp = sm_p->u.readdirplus.readdirplus_resp; int i, ret, err_array_len, attr_array_len; - int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); assert(readdirplus_resp); err_array_len = (sizeof(PVFS_error) * readdirplus_resp->pvfs_dirent_outcount); @@ -469,7 +468,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) { sm_p->u.readdirplus.obj_attr_array = (PVFS_object_attr *) calloc(sm_p->u.readdirplus.nhandles, sizeof(PVFS_object_attr)); - if (sm_p->u.readdirplus.obj_attr_array == NULL) { free(readdirplus_resp->attr_array); @@ -482,7 +480,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) sm_p->u.readdirplus.size_array = (PVFS_size **) calloc(sm_p->u.readdirplus.nhandles, sizeof(PVFS_size *)); - if (sm_p->u.readdirplus.size_array == NULL) { free(readdirplus_resp->attr_array); @@ -514,7 +511,6 @@ static int list_of_meta_servers(PINT_client_sm *sm_p) static PINT_sm_action readdirplus_fetch_attrs_setup_msgpair(struct PINT_smcb *smcb, job_status_s *js_p) { - gossip_err("fetch_attrs_setup_msgpair\n"); int i, ret; struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PINT_sm_msgpair_state *msg_p = NULL; @@ -533,87 +529,86 @@ static PINT_sm_action readdirplus_fetch_attrs_setup_msgpair(struct PINT_smcb *sm js_p->error_code = NO_WORK; return SM_ACTION_COMPLETE; } - - /* From the readdirplus structure figure out which meta servers - * we need to speak to to get the attribute information - */ - if ((ret = list_of_meta_servers(sm_p)) < 0) - { - gossip_err("Could not locate list of attribute servers %d\n", ret); - js_p->error_code = ret; - return SM_ACTION_COMPLETE; - } - if (sm_p->u.readdirplus.svr_count == 0) - { - gossip_err("Number of meta servers to contact cannot be 0 %d\n", -PVFS_EINVAL); - js_p->error_code = -PVFS_EINVAL; - return SM_ACTION_COMPLETE; - } + /* From the readdirplus structure figure out which meta servers + * we need to speak to to get the attribute information + */ + if ((ret = list_of_meta_servers(sm_p)) < 0) + { + gossip_err("Could not locate list of attribute servers %d\n", ret); + js_p->error_code = ret; + return SM_ACTION_COMPLETE; + } + if (sm_p->u.readdirplus.svr_count == 0) + { + gossip_err("Number of meta servers to contact cannot be 0 %d\n", -PVFS_EINVAL); + js_p->error_code = -PVFS_EINVAL; + return SM_ACTION_COMPLETE; + } - if (sm_p->u.readdirplus.remaining) - sm_p->u.readdirplus.nhandles = sm_p->u.readdirplus.remaining; + if (sm_p->u.readdirplus.remaining) + sm_p->u.readdirplus.nhandles = sm_p->u.readdirplus.remaining; - if (is_osd_md) /* we have a osd metadata server */ - { - if (server_config->coll_object) - { - if (sm_p->u.readdirplus.nhandles > 3600) - { - sm_p->u.readdirplus.remaining = sm_p->u.readdirplus.nhandles - 3600; - sm_p->u.readdirplus.nhandles = 3600; - } else { - sm_p->u.readdirplus.remaining = 0; - } + if (is_osd_md) /* we have a osd metadata server */ + { + if (server_config->coll_object) + { + if (sm_p->u.readdirplus.nhandles > 3600) + { + sm_p->u.readdirplus.remaining = sm_p->u.readdirplus.nhandles - 3600; + sm_p->u.readdirplus.nhandles = 3600; + } else { + sm_p->u.readdirplus.remaining = 0; + } - ret = PINT_msgpairarray_init( - &sm_p->msgarray_op, sm_p->u.readdirplus.svr_count); - if(ret != 0) - { - gossip_err("Failed to initialize %d msgpairs\n", - sm_p->u.readdirplus.svr_count); - js_p->error_code = ret; - return SM_ACTION_COMPLETE; - } + ret = PINT_msgpairarray_init( + &sm_p->msgarray_op, sm_p->u.readdirplus.svr_count); + if(ret != 0) + { + gossip_err("Failed to initialize %d msgpairs\n", + sm_p->u.readdirplus.svr_count); + js_p->error_code = ret; + return SM_ACTION_COMPLETE; + } - /*osd data server has the attributes of the file*/ - /*fetch the attributes from the I/O server*/ + /* osd data server has the attributes of the file */ + /* fetch the attributes from the I/O server */ - foreach_msgpair(&sm_p->msgarray_op, msg_p, i) - { - struct osd_command *command = &sm_p->msgarray_op.msgarray[i].osd_command; - - msg_p->handle = sm_p->object_ref.cid; - msg_p->fs_id = sm_p->object_ref.fs_id; - msg_p->retry_flag = PVFS_MSGPAIR_RETRY; - msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; - - ret = PINT_cached_config_map_to_server( - &msg_p->svr_addr, msg_p->handle, - sm_p->object_ref.fs_id); - - if (ret) - { - gossip_err("Failed to map meta server address\n"); - js_p->error_code = ret; - } - - int j, numattrs = 10; - struct attribute_list attrl[numattrs]; - - /* Set attr type */ - for (j = 0; j < numattrs; j++) { - if (sm_p->u.readdirplus.nhandles == 1) { - attrl[j].type = ATTR_GET; - } else { - attrl[j].type = ATTR_GET_MULTI; - } + foreach_msgpair(&sm_p->msgarray_op, msg_p, i) + { + struct osd_command *command = &sm_p->msgarray_op.msgarray[i].osd_command; + + msg_p->handle = sm_p->object_ref.cid; + msg_p->fs_id = sm_p->object_ref.fs_id; + msg_p->retry_flag = PVFS_MSGPAIR_RETRY; + msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; + + ret = PINT_cached_config_map_to_server( + &msg_p->svr_addr, msg_p->handle, + sm_p->object_ref.fs_id); + + if (ret) + { + gossip_err("Failed to map meta server address\n"); + js_p->error_code = ret; + } + + int j, numattrs = 10; + struct attribute_list attrl[numattrs]; + + /* Set attr type */ + for (j = 0; j < numattrs; j++) { + if (sm_p->u.readdirplus.nhandles == 1) { + attrl[j].type = ATTR_GET; + } else { + attrl[j].type = ATTR_GET_MULTI; + } } /* Set attr page and number */ for (j = 0; j < numattrs - 3; j++) { - attrl[j].page = ANY_PG + PVFS_USEROBJECT_ATTR_PG; - attrl[j].number = j; + attrl[j].page = ANY_PG + PVFS_USEROBJECT_ATTR_PG; + attrl[j].number = j; } /* uid, gid & perms */ @@ -642,170 +637,159 @@ static PINT_sm_action readdirplus_fetch_attrs_setup_msgpair(struct PINT_smcb *sm attrl[9].number = UTSAP_DATA_MTIME; attrl[9].len = UTSAP_DATA_MTIME_LEN; - ret = osd_command_set_get_member_attributes(command, PVFS_OSD_META_PID, sm_p->object_ref.handle, find_min_handle(&(sm_p->u.readdirplus.input_handle_array[sm_p->u.readdirplus.offset]), sm_p->u.readdirplus.nhandles), find_max_handle(&(sm_p->u.readdirplus.input_handle_array[sm_p->u.readdirplus.offset]), sm_p->u.readdirplus.nhandles)); if (ret) { - osd_error_xerrno(ret, "%s: osd_command_set_get_member_attributes failed", - __func__); - js_p->error_code = ret; - return 1; + osd_error_xerrno(ret, "%s: osd_command_set_get_member_attributes failed", __func__); + js_p->error_code = ret; + return 1; } ret = osd_command_multi_attr_build(command, attrl, numattrs, sm_p->u.readdirplus.nhandles); if (ret) { - osd_error_xerrno(ret, "%s: osd_command_attr_build failed", - __func__); - js_p->error_code = ret; - return 1; + osd_error_xerrno(ret, "%s: osd_command_attr_build failed", __func__); + js_p->error_code = ret; + return 1; } - } - } else { - if (sm_p->u.readdirplus.nhandles > PVFS_REQ_LIMIT_LISTATTR) - { - sm_p->u.readdirplus.remaining = sm_p->u.readdirplus.nhandles - PVFS_REQ_LIMIT_LISTATTR; - sm_p->u.readdirplus.nhandles = PVFS_REQ_LIMIT_LISTATTR; - } else { - sm_p->u.readdirplus.remaining = 0; - } - - ret = PINT_msgpairarray_init(&sm_p->msgarray_op, sm_p->u.readdirplus.nhandles); - if(ret != 0) - { - gossip_err("Failed to initialize %d msgpairs\n", - sm_p->u.readdirplus.svr_count); - js_p->error_code = ret; - return SM_ACTION_COMPLETE; - } - - foreach_msgpair(&sm_p->msgarray_op, msg_p, i) - { - struct osd_command *command = &sm_p->msgarray_op.msgarray[i].osd_command; - - msg_p->fs_id = sm_p->object_ref.fs_id; - msg_p->retry_flag = PVFS_MSGPAIR_RETRY; - msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; - //msg_p->svr_addr = sm_p->u.readdirplus.server_addresses[0]; - msg_p->handle = sm_p->u.readdirplus.input_handle_array[i+sm_p->u.readdirplus.offset].handle; - gossip_err("msg_p->handle: %d\n", msg_p->handle); - - ret = PINT_cached_config_map_to_server( - &msg_p->svr_addr, msg_p->handle, - sm_p->object_ref.fs_id); - - if (ret) - { - gossip_err("Failed to map meta server address\n"); - js_p->error_code = ret; - } - - int j, numattrs = 10; - struct attribute_list attrl[numattrs]; - - /* Set attr type, page and number */ - for (j = 0; j < numattrs - 3; j++) { - attrl[j].type = ATTR_GET; - attrl[j].page = ANY_PG + PVFS_USEROBJECT_ATTR_PG; - attrl[j].number = j; - } - - /* uid, gid & perms */ - attrl[0].len = sizeof(PVFS_uid); - attrl[1].len = sizeof(PVFS_gid); - attrl[2].len = sizeof(PVFS_permissions); - - /* mask, object type & dist */ - attrl[3].len = sizeof(uint32_t); - attrl[4].len = sizeof(PVFS_ds_type); - attrl[5].len = 1024; - - /* dfile_array */ - attrl[6].len = 1024; - - /* ctime, atime & mtime */ - attrl[7].type = ATTR_GET; - attrl[7].page = ANY_PG + USER_TMSTMP_PG; - attrl[7].number = UTSAP_CTIME; - attrl[7].len = UTSAP_CTIME_LEN; - - attrl[8].type = ATTR_GET; - attrl[8].page = ANY_PG + USER_TMSTMP_PG; - attrl[8].number = UTSAP_DATA_ATIME; - attrl[8].len = UTSAP_DATA_ATIME_LEN; - - attrl[9].type = ATTR_GET; - attrl[9].page = ANY_PG + USER_TMSTMP_PG; - attrl[9].number = UTSAP_DATA_MTIME; - attrl[9].len = UTSAP_DATA_MTIME_LEN; - - ret = osd_command_set_get_attributes(command, PVFS_OSD_META_PID, - msg_p->handle); - - if (ret) { - osd_error_xerrno(ret, - "%s: osd_command_set_get_attributes failed", - __func__); - js_p->error_code = ret; - return 1; - } - - ret = osd_command_attr_build(command, attrl, 10); - if (ret) { - osd_error_xerrno(ret, "%s: osd_command_attr_build failed", - __func__); - js_p->error_code = ret; - return 1; - } - } - } + } + } else { + if (sm_p->u.readdirplus.nhandles > PVFS_REQ_LIMIT_LISTATTR) + { + sm_p->u.readdirplus.remaining = sm_p->u.readdirplus.nhandles - PVFS_REQ_LIMIT_LISTATTR; + sm_p->u.readdirplus.nhandles = PVFS_REQ_LIMIT_LISTATTR; + } else { + sm_p->u.readdirplus.remaining = 0; + } - js_p->error_code = OSD_MSGPAIR; - } else { - ret = PINT_msgpairarray_init( - &sm_p->msgarray_op, sm_p->u.readdirplus.svr_count); - if(ret != 0) - { - gossip_err("Failed to initialize %d msgpairs\n", - sm_p->u.readdirplus.svr_count); - js_p->error_code = ret; - return SM_ACTION_COMPLETE; - } - foreach_msgpair(&sm_p->msgarray_op, msg_p, i) - { - msg_p->fs_id = sm_p->object_ref.fs_id; - msg_p->handle = PVFS_HANDLE_NULL; - msg_p->retry_flag = PVFS_MSGPAIR_RETRY; - msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; - msg_p->svr_addr = sm_p->u.readdirplus.server_addresses[i]; + ret = PINT_msgpairarray_init(&sm_p->msgarray_op, sm_p->u.readdirplus.nhandles); + if(ret != 0) + { + gossip_err("Failed to initialize %d msgpairs\n", sm_p->u.readdirplus.svr_count); + js_p->error_code = ret; + return SM_ACTION_COMPLETE; + } + + foreach_msgpair(&sm_p->msgarray_op, msg_p, i) + { + struct osd_command *command = &sm_p->msgarray_op.msgarray[i].osd_command; + + msg_p->fs_id = sm_p->object_ref.fs_id; + msg_p->retry_flag = PVFS_MSGPAIR_RETRY; + msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; + //msg_p->svr_addr = sm_p->u.readdirplus.server_addresses[0]; + msg_p->handle = sm_p->u.readdirplus.input_handle_array[i+sm_p->u.readdirplus.offset].handle; + + ret = PINT_cached_config_map_to_server( + &msg_p->svr_addr, msg_p->handle, + sm_p->object_ref.fs_id); + + if (ret) + { + gossip_err("Failed to map meta server address\n"); + js_p->error_code = ret; + } + + int j, numattrs = 10; + struct attribute_list attrl[numattrs]; + + /* Set attr type, page and number */ + for (j = 0; j < numattrs - 3; j++) { + attrl[j].type = ATTR_GET; + attrl[j].page = ANY_PG + PVFS_USEROBJECT_ATTR_PG; + attrl[j].number = j; + } + + /* uid, gid & perms */ + attrl[0].len = sizeof(PVFS_uid); + attrl[1].len = sizeof(PVFS_gid); + attrl[2].len = sizeof(PVFS_permissions); + + /* mask, object type & dist */ + attrl[3].len = sizeof(uint32_t); + attrl[4].len = sizeof(PVFS_ds_type); + attrl[5].len = 1024; + + /* dfile_array */ + attrl[6].len = 1024; + + /* ctime, atime & mtime */ + attrl[7].type = ATTR_GET; + attrl[7].page = ANY_PG + USER_TMSTMP_PG; + attrl[7].number = UTSAP_CTIME; + attrl[7].len = UTSAP_CTIME_LEN; + + attrl[8].type = ATTR_GET; + attrl[8].page = ANY_PG + USER_TMSTMP_PG; + attrl[8].number = UTSAP_DATA_ATIME; + attrl[8].len = UTSAP_DATA_ATIME_LEN; + + attrl[9].type = ATTR_GET; + attrl[9].page = ANY_PG + USER_TMSTMP_PG; + attrl[9].number = UTSAP_DATA_MTIME; + attrl[9].len = UTSAP_DATA_MTIME_LEN; + + ret = osd_command_set_get_attributes(command, PVFS_OSD_META_PID, msg_p->handle); + + if (ret) { + osd_error_xerrno(ret, "%s: osd_command_set_get_attributes failed", __func__); + js_p->error_code = ret; + return 1; + } + + ret = osd_command_attr_build(command, attrl, 10); + if (ret) { + osd_error_xerrno(ret, "%s: osd_command_attr_build failed", __func__); + js_p->error_code = ret; + return 1; + } + } + } + + js_p->error_code = OSD_MSGPAIR; + } else { + ret = PINT_msgpairarray_init( + &sm_p->msgarray_op, sm_p->u.readdirplus.svr_count); + if(ret != 0) + { + gossip_err("Failed to initialize %d msgpairs\n", + sm_p->u.readdirplus.svr_count); + js_p->error_code = ret; + return SM_ACTION_COMPLETE; + } + foreach_msgpair(&sm_p->msgarray_op, msg_p, i) + { + msg_p->fs_id = sm_p->object_ref.fs_id; + msg_p->handle = PVFS_HANDLE_NULL; + msg_p->retry_flag = PVFS_MSGPAIR_RETRY; + msg_p->comp_fn = readdirplus_fetch_attrs_comp_fn; + msg_p->svr_addr = sm_p->u.readdirplus.server_addresses[i]; - PINT_SERVREQ_LISTATTR_FILL( - msg_p->req, - *sm_p->cred_p, - sm_p->object_ref.fs_id, - sm_p->u.readdirplus.attrmask, - sm_p->u.readdirplus.handle_count[i], - sm_p->u.readdirplus.handles[i], - sm_p->hints); - /* immediate return. next state jumps to msgpairarray machine */ - js_p->error_code = 0; - } - } + PINT_SERVREQ_LISTATTR_FILL( + msg_p->req, + *sm_p->cred_p, + sm_p->object_ref.fs_id, + sm_p->u.readdirplus.attrmask, + sm_p->u.readdirplus.handle_count[i], + sm_p->u.readdirplus.handles[i], + sm_p->hints); + /* immediate return. next state jumps to msgpairarray machine */ + js_p->error_code = 0; + } + } - PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); - return SM_ACTION_COMPLETE; + PINT_sm_push_frame(smcb, 0, &sm_p->msgarray_op); + return SM_ACTION_COMPLETE; } - + /* Phase 1 completion callback */ static int readdirplus_fetch_attrs_comp_fn(void *v_p, struct PVFS_server_resp *resp_p, int index) { - gossip_err("fetch_attrs_comp_fn\n"); - int ret, status; + int status; PVFS_object_attr *attr = NULL; PINT_smcb *smcb = v_p; PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_MSGPAIR_PARENT_SM); int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); - int64_t size[sm_p->u.readdirplus.nhandles]; struct server_configuration_s *server_config; server_config = PINT_get_server_config_struct( @@ -829,25 +813,25 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, { return status; } - + /* Mark all handles in this server range as having failed a stat */ if (sm_p->msgarray_op.msgarray[index].op_status != 0) { int i, handle_index; for (i = 0; i < sm_p->u.readdirplus.handle_count[index]; i++) { get_handle_index(sm_p->u.readdirplus.input_handle_array, - sm_p->u.readdirplus.nhandles, - sm_p->u.readdirplus.handles[index][i], - &handle_index, - NULL); + sm_p->u.readdirplus.nhandles, + sm_p->u.readdirplus.handles[index][i], + &handle_index, + NULL); assert(handle_index >= 0); sm_p->u.readdirplus.readdirplus_resp->stat_err_array[handle_index] = - sm_p->msgarray_op.msgarray[index].op_status; + sm_p->msgarray_op.msgarray[index].op_status; } } else if (sm_p->msgarray_op.msgarray[index].op_status == 0) { /* fetch all errors from the servresp structure and copy the object attributes */ - int i, handle_index, aux_index; + int i, handle_index; if (is_osd_md) { struct osd_command *command = &sm_p->msgarray_op.msgarray[index].osd_command; @@ -915,48 +899,47 @@ static int readdirplus_fetch_attrs_comp_fn(void *v_p, for (i = 0; i < sm_p->u.readdirplus.handle_count[index]; i++) { get_handle_index(sm_p->u.readdirplus.input_handle_array, - sm_p->u.readdirplus.nhandles, - sm_p->u.readdirplus.handles[index][i], - &handle_index, - NULL); + sm_p->u.readdirplus.nhandles, + sm_p->u.readdirplus.handles[index][i], + &handle_index, + NULL); assert(handle_index >= 0); /* Copy any errors */ sm_p->u.readdirplus.readdirplus_resp->stat_err_array[handle_index] = - resp_p->u.listattr.error[i]; + resp_p->u.listattr.error[i]; if (resp_p->u.listattr.error[i] == 0) { /* if no errors, stash the object attributes */ PINT_copy_object_attr(&sm_p->u.readdirplus.obj_attr_array[handle_index], - &resp_p->u.listattr.attr[i]); + &resp_p->u.listattr.attr[i]); } } } } - - /* if this is the last response, check all the status values - and return error codes if any requests failed - */ - if (index == (sm_p->msgarray_op.count - 1)) - { - int i; - for (i = 0; i < sm_p->msgarray_op.count; i++) - { - if (sm_p->msgarray_op.msgarray[i].op_status != 0) - { - return sm_p->msgarray_op.msgarray[i].op_status; - } - } - /* destroy scratch space.. we need to reuse them in phase 2 */ - destroy_partition_handles(&sm_p->u.readdirplus.svr_count, - &sm_p->u.readdirplus.server_addresses, - &sm_p->u.readdirplus.handle_count, - &sm_p->u.readdirplus.handles); - free(sm_p->u.readdirplus.input_handle_array); - sm_p->u.readdirplus.input_handle_array = NULL; - sm_p->u.readdirplus.nhandles = 0; - } - return 0; + /* if this is the last response, check all the status values + and return error codes if any requests failed + */ + if (index == (sm_p->msgarray_op.count - 1)) + { + int i; + for (i = 0; i < sm_p->msgarray_op.count; i++) + { + if (sm_p->msgarray_op.msgarray[i].op_status != 0) + { + return sm_p->msgarray_op.msgarray[i].op_status; + } + } + /* destroy scratch space.. we need to reuse them in phase 2 */ + destroy_partition_handles(&sm_p->u.readdirplus.svr_count, + &sm_p->u.readdirplus.server_addresses, + &sm_p->u.readdirplus.handle_count, + &sm_p->u.readdirplus.handles); + free(sm_p->u.readdirplus.input_handle_array); + sm_p->u.readdirplus.input_handle_array = NULL; + sm_p->u.readdirplus.nhandles = 0; + } + return 0; } @@ -982,7 +965,6 @@ static int list_of_data_servers(PINT_client_sm *sm_p) sm_p->u.readdirplus.server_addresses = NULL; sm_p->u.readdirplus.handles = NULL; sm_p->u.readdirplus.handle_count = NULL; - /* Go thru the list of handles and find out which ones are regular files * and send out messages to servers for the sizes of the dfile handles */ @@ -1006,7 +988,6 @@ static int list_of_data_servers(PINT_client_sm *sm_p) } } } - /* no meta files */ if (nhandles == 0) return 0; @@ -1046,7 +1027,6 @@ static int list_of_data_servers(PINT_client_sm *sm_p) } } } - ret = create_partition_handles(sm_p->object_ref.fs_id, sm_p->u.readdirplus.nhandles, sm_p->u.readdirplus.input_handle_array, @@ -1066,7 +1046,6 @@ static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( struct PINT_client_sm *sm_p = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); PINT_sm_msgpair_state *msg_p; int is_osd = fsid_is_osd(sm_p->object_ref.fs_id); - int is_osd_md = fsid_is_osd_md(sm_p->object_ref.fs_id); struct server_configuration_s *server_config; server_config = PINT_get_server_config_struct( @@ -1074,26 +1053,26 @@ static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( PINT_put_server_config_struct(server_config); PINT_msgpairarray_destroy(&sm_p->msgarray_op); - + /* don't need sizes */ if (!(sm_p->u.readdirplus.attrmask & PVFS_ATTR_META_ALL) && !(sm_p->u.readdirplus.attrmask & PVFS_ATTR_DATA_SIZE)) { js_p->error_code = NO_WORK; return SM_ACTION_COMPLETE; } - - /* ok, now we have all the data files. split it on a per-server basis */ - if ((ret = list_of_data_servers(sm_p)) < 0) - { - js_p->error_code = ret; - return SM_ACTION_COMPLETE; - } - if (sm_p->u.readdirplus.svr_count == 0) - { - /* no need to contact any server since there are no regular meta files */ - js_p->error_code = NO_WORK; - return SM_ACTION_COMPLETE; - } + + /* ok, now we have all the data files. split it on a per-server basis */ + if ((ret = list_of_data_servers(sm_p)) < 0) + { + js_p->error_code = ret; + return SM_ACTION_COMPLETE; + } + if (sm_p->u.readdirplus.svr_count == 0) + { + /* no need to contact any server since there are no regular meta files */ + js_p->error_code = NO_WORK; + return SM_ACTION_COMPLETE; + } if (is_osd) { @@ -1255,6 +1234,7 @@ static PINT_sm_action readdirplus_fetch_sizes_setup_msgpair( msg_p->retry_flag = PVFS_MSGPAIR_RETRY; msg_p->comp_fn = readdirplus_fetch_sizes_comp_fn; msg_p->svr_addr = sm_p->u.readdirplus.server_addresses[i]; + } /* immediate return. next state jumps to msgpairarray machine */ js_p->error_code = 0; @@ -1542,8 +1522,8 @@ static PINT_sm_action readdirplus_cleanup( } else { - //gossip_err("Invalid type %d in readdirplus\n", - //readdirplus_resp->attr_array[i].objtype); + gossip_err("Invalid type %d in readdirplus\n", + readdirplus_resp->attr_array[i].objtype); } } } diff --git a/src/client/usrint/Makefile b/src/client/usrint/Makefile deleted file mode 100644 index fcdc019..0000000 --- a/src/client/usrint/Makefile +++ /dev/null @@ -1,21 +0,0 @@ - -PVFSDIR=../../../ -INCDIR=-I. -I$(PVFSDIR)/include -LIBDIR= - -CFLAGS=$(INCDIR) $(LIBDIR) - -OBJS=iocommon.o openfile-util.o posix-pvfs.o posix.o stdio.o - -INCS=usrint.h iocommon.h stdio-pvfs.h posix-pvfs.h openfile-util.h - -all: $(OBJS) - -clean: - rm *.o - -iocommon.o:$(INCS) -openfile-util.o:$(INCS) -posix-pvfs.o:$(INCS) -posix.o:$(INCS) -stdio.o:$(INCS) diff --git a/src/client/usrint/README_UCACHE b/src/client/usrint/README_UCACHE new file mode 100644 index 0000000..a960a99 --- /dev/null +++ b/src/client/usrint/README_UCACHE @@ -0,0 +1,252 @@ +OrangeFS User Cache Documentation +------------------------------------------------------------------------------- + +1. Overview + 1.1 The user cache (ucache) for OrangeFS is an optional layer of + functionality that can be used to improve I/O latency and + throughput of OrangeFS/PVFS files. Users can use the familiar + stdio library functions and POSIX system calls by statically + linking with our static library or LD_PRELOAD the shared + library. + +2. Installation + 2.0 Shared Memory Adjustments + Since the ucache relies on SYSV shared memory, the SYSV + shared memory limits on your system probably need to be + increased. + + For your convenience, a Linux compatible script has been + included to adjust these values for you. Though, in order + to make these changes permanent, appropriate steps must be taken: + + Linux users should run and follow the instructions as the script + executes: + + By default, the script is located in /src/apps/user. + The script depends upon the file ucache.conf to supply the script + with the necessary info to compute the total shared memory size + required by the ucache. Run as root: + + ./checkset_shmall_shmmax.linux + + At the end of the script there's a note about what to do to make + the shared memory limit changes persistent. + + 2.1 Configure ucache enabled + ./configure --enable-ucache + + 2.2 Configure ucache disabled + ./configure --disable-ucache + + Note: By default, currently, the ucache is not compiled automatically, + so if you wish to use it, make sure to perform the configure step in + in section 2.1. + + 2.3 Finish + make + make install + +3. ucached Daemon capabilities + 3.0 The ucache daemon (ucached) is a daemon that polls FIFO descriptors + to perform commands sent to it by the ucached daemon + client (ucached_cmd). When the daemon recieves a new command, + it attempts to execute the command and returns a response + through another FIFO back to ucached_cmd. The ucached must be + properly started before the ucache can be used. + + Following installation, by default, ucached and ucached_cmd are both + located in /usr/local/sbin. + + 3.1 Starting the ucache: + ucached_cmd s + + Note: this command effectively calls "ucached_cmd c" as a part of + starting the ucache, so the only time the user should call + "ucached_cmd c" themselves is only after they've destroyed the + shared memory segments with "ucached_cmd d" and would like them + recreated. + + 3.2 Exiting the ucache: + ucached_cmd x + + Note: this command effectivley calls "ucached_cmd d" as a part of exiting the + ucache, so the only time the user should call "ucached_cmd d" + themselves is if they want to destroy the shared memory segments + used by the ucache. + + 3.3 Remove the ucache related SYSV shared memory segments: + ucached_cmd d + + 3.4 Create and Initialize the SYSV shared memory segments: + ucached_cmd c + + 3.5 Dump info pertaining to the ucache to stdout: + ucached_cmd i + + *Note: info options can be specified that control the verbosity + of this output. The ordering of these options doesn't matter. + Multiple options can be used by simply appending additional + options to the previous ones. + + ex: ucached_cmd i spcf (note 'spcf' is equivalent to 'a') + + Options: + --------------------------------------------------------------- + Default - no info options (same as 'c') + + a Show All Info + + c Show ucache contents (append 'f' to see the free ucache elements, + see below) + + s Show Statistics Summary + + p Show ucache parameters + + f Show free ucache elements (must be used in conjunction with with + 'c' to affect output) + + Combo examples: + --------------------------------------------------------------- + i sc Show stats and ucache contents + + i cf Show ucache contents (including free ucache elements) + + i spc Show stats, parameters, and contents (but not free ucache + elements) + + ...etc + +4. Examples + 4.1 Simple Test Program +=============================================================================== + Compiled with: +gcc -g -Wall -O0 -o 14 14.c \ +-L/usr/local/lib -lofs -lpvfs2 -rdynamic -lssl -lcrypto -lpthread -ldl +=============================================================================== +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define B_SIZE (1024 * 256) +#define N_BLKS 679 + +int main(int argc, char **argv) +{ + /* Write buffer */ + size_t write_buff_size = N_BLKS * B_SIZE; + char *write_buff = (char *) malloc(write_buff_size); + assert(write_buff); + memset(write_buff, '0', write_buff_size); + + /* Open file */ + char fullpath[]= "/mnt/pvfs2/myfile"; + int file = open(fullpath, O_RDWR | O_CREAT, + S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); + if(file < 0) + { + perror("open"); + return -1; + } + + /* Perform the write */ + int howmany = write(file, write_buff, write_buff_size); + if(howmany < write_buff_size) + { + perror("write"); + close(file); + return -1; + } + + /* Seek back to beginning of file */ + off_t lseek_rc = lseek(file, 0, SEEK_SET); + if(lseek_rc == -1) + { + perror("lseek"); + close(file); + return -1; + } + + /* Read Buffer */ + int read_count = B_SIZE; + char read_buff[N_BLKS]; + + /* Perform many reads on small segments to demonstrate caching benefit */ + int i; + for(i = 0; i < read_count; i++) + { + howmany = read(file, read_buff, N_BLKS); + if(howmany != N_BLKS) + { + perror("read"); + close(file); + return -1; + } + } + + /* Close File */ + if(close(file) != 0) + { + perror("file close"); + return -1; + } + return 1; +} +=============================================================================== + + 4.2 Timed Test w/o Cache + time sudo ./14 + + real 1m35.229s + user 0m31.900s + sys 0m11.110s + + 4.3 Timed Test w/ Cache + time sudo ./14 + + real 0m2.365s + user 0m0.860s + sys 0m0.690s + + 4.4 Test w/ Cache Stats Summary + SUCCESS + user cache statistics: + hits= 262822 + misses= 679 + hit percentage= 99.742317 + pseudo_misses= 0 + block_count= 0 + file_count= 0 + +5. Limits + 5.1 Block Limit + The ucache is composed of blocks which store both hash table data to + facilitate ucache functionality and the actual data itself. Currently + the ucache is limited to 1024 blocks. + + 5.2 File Entry Limit + The ucache can keep up to 512 files in memory at once. Any files beyond + that will not use the ucache. Also, files are flushed from the ucache + when they are closed. + + 5.3 Memory Entry Limit + Memory entries represent the data block cached and some associated + cache meta-data. The ucache can keep up to 682 memory entries per + file at once. Any memory entries inserted beyond that limit will cause + eviction of the least recently used (LRU) memory entry of that file. + For the file being read/written, if no LRU memory entry is available + to be evicted, the LRU memory entry of the file in ucache with the most + memory entries is evicted. + +6. Issues + 6.1 Gossip + + 6.2 Multithreading + + 6.3 Multiprocessing diff --git a/src/client/usrint/error.c b/src/client/usrint/error.c new file mode 100644 index 0000000..ec9a071 --- /dev/null +++ b/src/client/usrint/error.c @@ -0,0 +1,132 @@ +/* Error handler for noninteractive utilities + Copyright (C) 1990-2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +/* Written by David MacKenzie . */ + +/* modifed for OrangeFS (PVFSv3) to a much simplified form + * WBL 4/2013 + */ + +#define USRINT_SOURCE 1 +#include "usrint.h" + +#define __REDIRECT(n,p,a) + +#include + +static void error_tail (int status, + int errnum, + const char *message, + va_list args) +{ + vfprintf (stderr, message, args); + va_end (args); + + ++error_message_count; + if (errnum) + { + char const *s; + s = strerror (errnum); + + if (! s) + { + fprintf (stderr, ": Unknown system error\n"); + } + else + { + fprintf (stderr, ": %s\n", s); + } + } + fflush (stderr); + if (status) + { + exit (status); + } +} + +/* Print the program name and error message MESSAGE, which is a printf-style + format string with optional args. + If ERRNUM is nonzero, print its corresponding system error message. + Exit with status STATUS if it is nonzero. */ +void error (int status, int errnum, const char *message, ...) +{ + va_list args; + + fflush (stdout); + if (error_print_progname) + { + (*error_print_progname) (); + } + else + { + fprintf (stderr, "%s: ", program_invocation_name); + } + + va_start (args, message); + error_tail (status, errnum, message, args); + va_end (args); +} + +void error_at_line (int status, + int errnum, + const char *file_name, + unsigned int line_number, + const char *message, + ...) +{ + va_list args; + + if (error_one_per_line) + { + static const char *old_file_name; + static unsigned int old_line_number; + + if (old_line_number == line_number + && (file_name == old_file_name + || (old_file_name != NULL + && file_name != NULL + && strcmp (old_file_name, file_name) == 0))) + { + /* Simply return and print nothing. */ + return; + } + + old_file_name = file_name; + old_line_number = line_number; + } + + fflush (stdout); + if (error_print_progname) + { + (*error_print_progname) (); + } + else + { + fprintf (stderr, "%s:", program_invocation_name); + } + + fprintf (stderr, + file_name != NULL ? "%s:%d: " : " ", + file_name, + line_number); + + va_start (args, message); + error_tail (status, errnum, message, args); + va_end (args); +} + diff --git a/src/client/usrint/error.h b/src/client/usrint/error.h new file mode 100644 index 0000000..8cf8b71 --- /dev/null +++ b/src/client/usrint/error.h @@ -0,0 +1,57 @@ +/* Declaration for error-reporting function + Copyright (C) 1995-1997,2003,2006,2007,2012 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _ERROR_H +#define _ERROR_H 1 + +#include + + +__BEGIN_DECLS + +/* Print a message with `fprintf (stderr, FORMAT, ...)'; + if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM). + If STATUS is nonzero, terminate the program with `exit (STATUS)'. */ + +extern void error (int __status, int __errnum, const char *__format, ...) + __attribute__ ((__format__ (__printf__, 3, 4))); + +extern void error_at_line (int __status, int __errnum, const char *__fname, + unsigned int __lineno, const char *__format, ...) + __attribute__ ((__format__ (__printf__, 5, 6))); + +/* If NULL, error will flush stdout, then print on stderr the program + name, a colon and a space. Otherwise, error will call this + function without parameters instead. */ +extern void (*error_print_progname) (void); + +/* This variable is incremented each time `error' is called. */ +extern unsigned int error_message_count; + +/* Sometimes we want to have at most one error per line. This + variable controls whether this mode is selected or not. */ +extern int error_one_per_line; + + +#if defined __extern_always_inline && defined __va_arg_pack +# include +#endif + +__END_DECLS + +#endif /* error.h */ diff --git a/src/client/usrint/fts.c b/src/client/usrint/fts.c new file mode 100644 index 0000000..c9ef846 --- /dev/null +++ b/src/client/usrint/fts.c @@ -0,0 +1,1150 @@ +/*- + * Copyright (c) 1990, 1993, 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94"; +#endif /* LIBC_SCCS and not lint */ + +#if 0 +#ifdef _FORTIFY_SOURCE +# undef _FORTIFY_SOURCE +# define _FORTIFY_SOURCE 0 +#endif +#endif + +#define USRINT_SOURCE 1 +#include "usrint.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* Largest alignment size needed, minus one. + Usually long double is the worst case. */ +#ifndef ALIGNBYTES +#define ALIGNBYTES (__alignof__ (long double) - 1) +#endif +/* Align P to that size. */ +#ifndef ALIGN +#define ALIGN(p) (((unsigned long int) (p) + ALIGNBYTES) & ~ALIGNBYTES) +#endif + + +static FTSENT *fts_alloc (FTS *, const char *, size_t) internal_function; +static FTSENT *fts_build (FTS *, int) internal_function; +static void fts_lfree (FTSENT *) internal_function; +static void fts_load (FTS *, FTSENT *) internal_function; +static size_t fts_maxarglen (char * const *) internal_function; +static void fts_padjust (FTS *, FTSENT *) internal_function; +static int fts_palloc (FTS *, size_t) internal_function; +static FTSENT *fts_sort (FTS *, FTSENT *, int) internal_function; +static u_short fts_stat (FTS *, FTSENT *, int) internal_function; +static int fts_safe_changedir (FTS *, FTSENT *, int, const char *) + internal_function; + +#ifndef MAX +#define MAX(a, b) ({ __typeof__ (a) _a = (a); \ + __typeof__ (b) _b = (b); \ + _a > _b ? _a : _b; }) +#endif + +#define ISDOT(a) (a[0] == '.' && (!a[1] || (a[1] == '.' && !a[2]))) + +#define CLR(opt) (sp->fts_options &= ~(opt)) +#define ISSET(opt) (sp->fts_options & (opt)) +#define SET(opt) (sp->fts_options |= (opt)) + +#define FCHDIR(sp, fd) (!ISSET(FTS_NOCHDIR) && __fchdir(fd)) + +/* fts_build flags */ +#define BCHILD 1 /* fts_children */ +#define BNAMES 2 /* fts_children, names only */ +#define BREAD 3 /* fts_read */ + +FTS * +fts_open(argv, options, compar) + char * const *argv; + register int options; + int (*compar) (const FTSENT **, const FTSENT **); +{ + register FTS *sp; + register FTSENT *p, *root; + register int nitems; + FTSENT *parent = NULL; + FTSENT *tmp = NULL; + + /* Options check. */ + if (options & ~FTS_OPTIONMASK) { + __set_errno (EINVAL); + return (NULL); + } + + /* Allocate/initialize the stream */ + if ((sp = malloc((u_int)sizeof(FTS))) == NULL) + return (NULL); + memset(sp, 0, sizeof(FTS)); + sp->fts_compar = (int (*) (const void *, const void *)) compar; + sp->fts_options = options; + + /* Logical walks turn on NOCHDIR; symbolic links are too hard. */ + if (ISSET(FTS_LOGICAL)) + SET(FTS_NOCHDIR); + + /* + * Start out with 1K of path space, and enough, in any case, + * to hold the user's paths. + */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif + size_t maxarglen = fts_maxarglen(argv); + if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN))) + goto mem1; + + /* Allocate/initialize root's parent. */ + if (*argv != NULL) { + if ((parent = fts_alloc(sp, "", 0)) == NULL) + goto mem2; + parent->fts_level = FTS_ROOTPARENTLEVEL; + } + + /* Allocate/initialize root(s). */ + for (root = NULL, nitems = 0; *argv != NULL; ++argv, ++nitems) { + /* Don't allow zero-length paths. */ + size_t len = strlen(*argv); + if (len == 0) { + __set_errno (ENOENT); + goto mem3; + } + + p = fts_alloc(sp, *argv, len); + p->fts_level = FTS_ROOTLEVEL; + p->fts_parent = parent; + p->fts_accpath = p->fts_name; + p->fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); + + /* Command-line "." and ".." are real directories. */ + if (p->fts_info == FTS_DOT) + p->fts_info = FTS_D; + + /* + * If comparison routine supplied, traverse in sorted + * order; otherwise traverse in the order specified. + */ + if (compar) { + p->fts_link = root; + root = p; + } else { + p->fts_link = NULL; + if (root == NULL) + tmp = root = p; + else { + tmp->fts_link = p; + tmp = p; + } + } + } + if (compar && nitems > 1) + root = fts_sort(sp, root, nitems); + + /* + * Allocate a dummy pointer and make fts_read think that we've just + * finished the node before the root(s); set p->fts_info to FTS_INIT + * so that everything about the "current" node is ignored. + */ + if ((sp->fts_cur = fts_alloc(sp, "", 0)) == NULL) + goto mem3; + sp->fts_cur->fts_link = root; + sp->fts_cur->fts_info = FTS_INIT; + + /* + * If using chdir(2), grab a file descriptor pointing to dot to ensure + * that we can get back here; this could be avoided for some paths, + * but almost certainly not worth the effort. Slashes, symbolic links, + * and ".." are all fairly nasty problems. Note, if we can't get the + * descriptor we run anyway, just more slowly. + */ + if (!ISSET(FTS_NOCHDIR) + && (sp->fts_rfd = __open(".", O_RDONLY, 0)) < 0) + SET(FTS_NOCHDIR); + + return (sp); + +mem3: fts_lfree(root); + free(parent); +mem2: free(sp->fts_path); +mem1: free(sp); + return (NULL); +} + +static void +internal_function +fts_load(sp, p) + FTS *sp; + register FTSENT *p; +{ + register int len; + register char *cp; + + /* + * Load the stream structure for the next traversal. Since we don't + * actually enter the directory until after the preorder visit, set + * the fts_accpath field specially so the chdir gets done to the right + * place and the user can access the first node. From fts_open it's + * known that the path will fit. + */ + len = p->fts_pathlen = p->fts_namelen; + memmove(sp->fts_path, p->fts_name, len + 1); + if ((cp = strrchr(p->fts_name, '/')) && (cp != p->fts_name || cp[1])) { + len = strlen(++cp); + memmove(p->fts_name, cp, len + 1); + p->fts_namelen = len; + } + p->fts_accpath = p->fts_path = sp->fts_path; + sp->fts_dev = p->fts_dev; +} + +int +fts_close(sp) + FTS *sp; +{ + register FTSENT *freep, *p; + int saved_errno; + + /* + * This still works if we haven't read anything -- the dummy structure + * points to the root list, so we step through to the end of the root + * list which has a valid parent pointer. + */ + if (sp->fts_cur) { + for (p = sp->fts_cur; p->fts_level >= FTS_ROOTLEVEL;) { + freep = p; + p = p->fts_link != NULL ? p->fts_link : p->fts_parent; + free(freep); + } + free(p); + } + + /* Free up child linked list, sort array, path buffer. */ + if (sp->fts_child) + fts_lfree(sp->fts_child); + free(sp->fts_array); + free(sp->fts_path); + + /* Return to original directory, save errno if necessary. */ + if (!ISSET(FTS_NOCHDIR)) { + saved_errno = __fchdir(sp->fts_rfd) ? errno : 0; + (void)__close(sp->fts_rfd); + + /* Set errno and return. */ + if (saved_errno != 0) { + /* Free up the stream pointer. */ + free(sp); + __set_errno (saved_errno); + return (-1); + } + } + + /* Free up the stream pointer. */ + free(sp); + return (0); +} + +/* + * Special case of "/" at the end of the path so that slashes aren't + * appended which would cause paths to be written as "....//foo". + */ +#define NAPPEND(p) \ + (p->fts_path[p->fts_pathlen - 1] == '/' \ + ? p->fts_pathlen - 1 : p->fts_pathlen) + +FTSENT * +fts_read(sp) + register FTS *sp; +{ + register FTSENT *p, *tmp; + register int instr; + register char *t; + int saved_errno; + + /* If finished or unrecoverable error, return NULL. */ + if (sp->fts_cur == NULL || ISSET(FTS_STOP)) + return (NULL); + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* Save and zero out user instructions. */ + instr = p->fts_instr; + p->fts_instr = FTS_NOINSTR; + + /* Any type of file may be re-visited; re-stat and re-turn. */ + if (instr == FTS_AGAIN) { + p->fts_info = fts_stat(sp, p, 0); + return (p); + } + + /* + * Following a symlink -- SLNONE test allows application to see + * SLNONE and recover. If indirecting through a symlink, have + * keep a pointer to current location. If unable to get that + * pointer, follow fails. + */ + if (instr == FTS_FOLLOW && + (p->fts_info == FTS_SL || p->fts_info == FTS_SLNONE)) { + p->fts_info = fts_stat(sp, p, 1); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = __open(".", O_RDONLY, 0)) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + return (p); + } + + /* Directory in pre-order. */ + if (p->fts_info == FTS_D) { + /* If skipped or crossed mount point, do post-order visit. */ + if (instr == FTS_SKIP || + (ISSET(FTS_XDEV) && p->fts_dev != sp->fts_dev)) { + if (p->fts_flags & FTS_SYMFOLLOW) + (void)__close(p->fts_symfd); + if (sp->fts_child) { + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + p->fts_info = FTS_DP; + return (p); + } + + /* Rebuild if only read the names and now traversing. */ + if (sp->fts_child != NULL && ISSET(FTS_NAMEONLY)) { + CLR(FTS_NAMEONLY); + fts_lfree(sp->fts_child); + sp->fts_child = NULL; + } + + /* + * Cd to the subdirectory. + * + * If have already read and now fail to chdir, whack the list + * to make the names come out right, and set the parent errno + * so the application will eventually get an error condition. + * Set the FTS_DONTCHDIR flag so that when we logically change + * directories back to the parent we don't do a chdir. + * + * If haven't read do so. If the read fails, fts_build sets + * FTS_STOP or the fts_info field of the node. + */ + if (sp->fts_child != NULL) { + if (fts_safe_changedir(sp, p, -1, p->fts_accpath)) { + p->fts_errno = errno; + p->fts_flags |= FTS_DONTCHDIR; + for (p = sp->fts_child; p != NULL; + p = p->fts_link) + p->fts_accpath = + p->fts_parent->fts_accpath; + } + } else if ((sp->fts_child = fts_build(sp, BREAD)) == NULL) { + if (ISSET(FTS_STOP)) + return (NULL); + return (p); + } + p = sp->fts_child; + sp->fts_child = NULL; + sp->fts_cur = p; + goto name; + } + + /* Move to the next node on this level. */ +next: tmp = p; + if ((p = p->fts_link) != NULL) { + sp->fts_cur = p; + free(tmp); + + /* + * If reached the top, return to the original directory (or + * the root of the tree), and load the paths for the next root. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (FCHDIR(sp, sp->fts_rfd)) { + SET(FTS_STOP); + return (NULL); + } + fts_load(sp, p); + return p; + } + + /* + * User may have called fts_set on the node. If skipped, + * ignore. If followed, get a file descriptor so we can + * get back if necessary. + */ + if (p->fts_instr == FTS_SKIP) + goto next; + if (p->fts_instr == FTS_FOLLOW) { + p->fts_info = fts_stat(sp, p, 1); + if (p->fts_info == FTS_D && !ISSET(FTS_NOCHDIR)) { + if ((p->fts_symfd = + __open(".", O_RDONLY, 0)) < 0) { + p->fts_errno = errno; + p->fts_info = FTS_ERR; + } else + p->fts_flags |= FTS_SYMFOLLOW; + } + p->fts_instr = FTS_NOINSTR; + } + +name: t = sp->fts_path + NAPPEND(p->fts_parent); + *t++ = '/'; + memmove(t, p->fts_name, p->fts_namelen + 1); + return p; + } + + /* Move up to the parent node. */ + p = tmp->fts_parent; + sp->fts_cur = p; + free(tmp); + + if (p->fts_level == FTS_ROOTPARENTLEVEL) { + /* + * Done; free everything up and set errno to 0 so the user + * can distinguish between error and EOF. + */ + free(p); + __set_errno (0); + return (sp->fts_cur = NULL); + } + + /* NUL terminate the pathname. */ + sp->fts_path[p->fts_pathlen] = '\0'; + + /* + * Return to the parent directory. If at a root node or came through + * a symlink, go back through the file descriptor. Otherwise, cd up + * one directory. + */ + if (p->fts_level == FTS_ROOTLEVEL) { + if (FCHDIR(sp, sp->fts_rfd)) { + SET(FTS_STOP); + return (NULL); + } + } else if (p->fts_flags & FTS_SYMFOLLOW) { + if (FCHDIR(sp, p->fts_symfd)) { + saved_errno = errno; + (void)__close(p->fts_symfd); + __set_errno (saved_errno); + SET(FTS_STOP); + return (NULL); + } + (void)__close(p->fts_symfd); + } else if (!(p->fts_flags & FTS_DONTCHDIR) && + fts_safe_changedir(sp, p->fts_parent, -1, "..")) { + SET(FTS_STOP); + return (NULL); + } + p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; + return p; +} + +/* + * Fts_set takes the stream as an argument although it's not used in this + * implementation; it would be necessary if anyone wanted to add global + * semantics to fts using fts_set. An error return is allowed for similar + * reasons. + */ +/* ARGSUSED */ +int +fts_set(sp, p, instr) + FTS *sp; + FTSENT *p; + int instr; +{ + if (instr != 0 && instr != FTS_AGAIN && instr != FTS_FOLLOW && + instr != FTS_NOINSTR && instr != FTS_SKIP) { + __set_errno (EINVAL); + return (1); + } + p->fts_instr = instr; + return (0); +} + +FTSENT * +fts_children(sp, instr) + register FTS *sp; + int instr; +{ + register FTSENT *p; + int fd; + + if (instr != 0 && instr != FTS_NAMEONLY) { + __set_errno (EINVAL); + return (NULL); + } + + /* Set current node pointer. */ + p = sp->fts_cur; + + /* + * Errno set to 0 so user can distinguish empty directory from + * an error. + */ + __set_errno (0); + + /* Fatal errors stop here. */ + if (ISSET(FTS_STOP)) + return (NULL); + + /* Return logical hierarchy of user's arguments. */ + if (p->fts_info == FTS_INIT) + return (p->fts_link); + + /* + * If not a directory being visited in pre-order, stop here. Could + * allow FTS_DNR, assuming the user has fixed the problem, but the + * same effect is available with FTS_AGAIN. + */ + if (p->fts_info != FTS_D /* && p->fts_info != FTS_DNR */) + return (NULL); + + /* Free up any previous child list. */ + if (sp->fts_child != NULL) + fts_lfree(sp->fts_child); + + if (instr == FTS_NAMEONLY) { + SET(FTS_NAMEONLY); + instr = BNAMES; + } else + instr = BCHILD; + + /* + * If using chdir on a relative path and called BEFORE fts_read does + * its chdir to the root of a traversal, we can lose -- we need to + * chdir into the subdirectory, and we don't know where the current + * directory is, so we can't get back so that the upcoming chdir by + * fts_read will work. + */ + if (p->fts_level != FTS_ROOTLEVEL || p->fts_accpath[0] == '/' || + ISSET(FTS_NOCHDIR)) + return (sp->fts_child = fts_build(sp, instr)); + + if ((fd = __open(".", O_RDONLY, 0)) < 0) + return (NULL); + sp->fts_child = fts_build(sp, instr); + if (__fchdir(fd)) + return (NULL); + (void)__close(fd); + return (sp->fts_child); +} + +/* + * This is the tricky part -- do not casually change *anything* in here. The + * idea is to build the linked list of entries that are used by fts_children + * and fts_read. There are lots of special cases. + * + * The real slowdown in walking the tree is the stat calls. If FTS_NOSTAT is + * set and it's a physical walk (so that symbolic links can't be directories), + * we can do things quickly. First, if it's a 4.4BSD file system, the type + * of the file is in the directory entry. Otherwise, we assume that the number + * of subdirectories in a node is equal to the number of links to the parent. + * The former skips all stat calls. The latter skips stat calls in any leaf + * directories and for any files after the subdirectories in the directory have + * been found, cutting the stat calls by about 2/3. + */ +static FTSENT * +internal_function +fts_build(sp, type) + register FTS *sp; + int type; +{ + register struct dirent *dp; + register FTSENT *p, *head; + register int nitems; + FTSENT *cur, *tail; + DIR *dirp; + void *oldaddr; + int cderrno, descend, len, level, nlinks, saved_errno, + nostat, doadjust; + size_t maxlen; + char *cp; + + /* Set current node pointer. */ + cur = sp->fts_cur; + + /* + * Open the directory for reading. If this fails, we're done. + * If being called from fts_read, set the fts_info field. + */ +#if defined FTS_WHITEOUT && 0 + if (ISSET(FTS_WHITEOUT)) + oflag = DTF_NODUP|DTF_REWIND; + else + oflag = DTF_HIDEW|DTF_NODUP|DTF_REWIND; +#else +# define __opendir2(path, flag) __opendir(path) +#endif + if ((dirp = __opendir2(cur->fts_accpath, oflag)) == NULL) { + if (type == BREAD) { + cur->fts_info = FTS_DNR; + cur->fts_errno = errno; + } + return (NULL); + } + + /* + * Nlinks is the number of possible entries of type directory in the + * directory if we're cheating on stat calls, 0 if we're not doing + * any stat calls at all, -1 if we're doing stats on everything. + */ + if (type == BNAMES) { + nlinks = 0; + /* Be quiet about nostat, GCC. */ + nostat = 0; + } else if (ISSET(FTS_NOSTAT) && ISSET(FTS_PHYSICAL)) { + nlinks = cur->fts_nlink - (ISSET(FTS_SEEDOT) ? 0 : 2); + nostat = 1; + } else { + nlinks = -1; + nostat = 0; + } + +#ifdef notdef + (void)printf("nlinks == %d (cur: %d)\n", nlinks, cur->fts_nlink); + (void)printf("NOSTAT %d PHYSICAL %d SEEDOT %d\n", + ISSET(FTS_NOSTAT), ISSET(FTS_PHYSICAL), ISSET(FTS_SEEDOT)); +#endif + /* + * If we're going to need to stat anything or we want to descend + * and stay in the directory, chdir. If this fails we keep going, + * but set a flag so we don't chdir after the post-order visit. + * We won't be able to stat anything, but we can still return the + * names themselves. Note, that since fts_read won't be able to + * chdir into the directory, it will have to return different path + * names than before, i.e. "a/b" instead of "b". Since the node + * has already been visited in pre-order, have to wait until the + * post-order visit to return the error. There is a special case + * here, if there was nothing to stat then it's not an error to + * not be able to stat. This is all fairly nasty. If a program + * needed sorted entries or stat information, they had better be + * checking FTS_NS on the returned nodes. + */ + cderrno = 0; + if (nlinks || type == BREAD) { + if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) { + if (nlinks && type == BREAD) + cur->fts_errno = errno; + cur->fts_flags |= FTS_DONTCHDIR; + descend = 0; + cderrno = errno; + (void)__closedir(dirp); + dirp = NULL; + } else + descend = 1; + } else + descend = 0; + + /* + * Figure out the max file name length that can be stored in the + * current path -- the inner loop allocates more path as necessary. + * We really wouldn't have to do the maxlen calculations here, we + * could do them in fts_read before returning the path, but it's a + * lot easier here since the length is part of the dirent structure. + * + * If not changing directories set a pointer so that can just append + * each new name into the path. + */ + len = NAPPEND(cur); + if (ISSET(FTS_NOCHDIR)) { + cp = sp->fts_path + len; + *cp++ = '/'; + } else { + /* GCC, you're too verbose. */ + cp = NULL; + } + len++; + maxlen = sp->fts_pathlen - len; + + level = cur->fts_level + 1; + + /* Read the directory, attaching each entry to the `link' pointer. */ + doadjust = 0; + for (head = tail = NULL, nitems = 0; dirp && (dp = __readdir(dirp));) { + if (!ISSET(FTS_SEEDOT) && ISDOT(dp->d_name)) + continue; + + if ((p = fts_alloc(sp, dp->d_name, _D_EXACT_NAMLEN (dp))) == NULL) + goto mem1; + if (_D_EXACT_NAMLEN (dp) >= maxlen) {/* include space for NUL */ + oldaddr = sp->fts_path; + if (fts_palloc(sp, _D_EXACT_NAMLEN (dp) + len + 1)) { + /* + * No more memory for path or structures. Save + * errno, free up the current structure and the + * structures already allocated. + */ +mem1: saved_errno = errno; + free(p); + fts_lfree(head); + (void)__closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (saved_errno); + return (NULL); + } + /* Did realloc() change the pointer? */ + if (oldaddr != sp->fts_path) { + doadjust = 1; + if (ISSET(FTS_NOCHDIR)) + cp = sp->fts_path + len; + } + maxlen = sp->fts_pathlen - len; + } + + if (len + _D_EXACT_NAMLEN (dp) >= USHRT_MAX) { + /* + * In an FTSENT, fts_pathlen is a u_short so it is + * possible to wraparound here. If we do, free up + * the current structure and the structures already + * allocated, then error out with ENAMETOOLONG. + */ + free(p); + fts_lfree(head); + (void)__closedir(dirp); + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + __set_errno (ENAMETOOLONG); + return (NULL); + } + p->fts_level = level; + p->fts_parent = sp->fts_cur; + p->fts_pathlen = len + _D_EXACT_NAMLEN (dp); + +#if defined FTS_WHITEOUT && 0 + if (dp->d_type == DT_WHT) + p->fts_flags |= FTS_ISW; +#endif + + /* Unreachable code. cderrno is only ever set to a nonnull + value if dirp is closed at the same time. But then we + cannot enter this loop. */ + if (0 && cderrno) { + if (nlinks) { + p->fts_info = FTS_NS; + p->fts_errno = cderrno; + } else + p->fts_info = FTS_NSOK; + p->fts_accpath = cur->fts_accpath; + } else if (nlinks == 0 +#if defined DT_DIR && defined _DIRENT_HAVE_D_TYPE + || (nostat && + dp->d_type != DT_DIR && dp->d_type != DT_UNKNOWN) +#endif + ) { + p->fts_accpath = + ISSET(FTS_NOCHDIR) ? p->fts_path : p->fts_name; + p->fts_info = FTS_NSOK; + } else { + /* Build a file name for fts_stat to stat. */ + if (ISSET(FTS_NOCHDIR)) { + p->fts_accpath = p->fts_path; + memmove(cp, p->fts_name, p->fts_namelen + 1); + } else + p->fts_accpath = p->fts_name; + /* Stat it. */ + p->fts_info = fts_stat(sp, p, 0); + + /* Decrement link count if applicable. */ + if (nlinks > 0 && (p->fts_info == FTS_D || + p->fts_info == FTS_DC || p->fts_info == FTS_DOT)) + --nlinks; + } + + /* We walk in directory order so "ls -f" doesn't get upset. */ + p->fts_link = NULL; + if (head == NULL) + head = tail = p; + else { + tail->fts_link = p; + tail = p; + } + ++nitems; + } + if (dirp) + (void)__closedir(dirp); + + /* + * If realloc() changed the address of the path, adjust the + * addresses for the rest of the tree and the dir list. + */ + if (doadjust) + fts_padjust(sp, head); + + /* + * If not changing directories, reset the path back to original + * state. + */ + if (ISSET(FTS_NOCHDIR)) { + if (len == sp->fts_pathlen || nitems == 0) + --cp; + *cp = '\0'; + } + + /* + * If descended after called from fts_children or after called from + * fts_read and nothing found, get back. At the root level we use + * the saved fd; if one of fts_open()'s arguments is a relative path + * to an empty directory, we wind up here with no other way back. If + * can't get back, we're done. + */ + if (descend && (type == BCHILD || !nitems) && + (cur->fts_level == FTS_ROOTLEVEL ? + FCHDIR(sp, sp->fts_rfd) : + fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) { + cur->fts_info = FTS_ERR; + SET(FTS_STOP); + fts_lfree(head); + return (NULL); + } + + /* If didn't find anything, return NULL. */ + if (!nitems) { + if (type == BREAD) + cur->fts_info = FTS_DP; + fts_lfree(head); + return (NULL); + } + + /* Sort the entries. */ + if (sp->fts_compar && nitems > 1) + head = fts_sort(sp, head, nitems); + return (head); +} + +static u_short +internal_function +fts_stat(sp, p, follow) + FTS *sp; + register FTSENT *p; + int follow; +{ + register FTSENT *t; + register dev_t dev; + register ino_t ino; + struct stat *sbp, sb; + int saved_errno; + + /* If user needs stat info, stat buffer already allocated. */ + sbp = ISSET(FTS_NOSTAT) ? &sb : p->fts_statp; + +#if defined FTS_WHITEOUT && 0 + /* check for whiteout */ + if (p->fts_flags & FTS_ISW) { + if (sbp != &sb) { + memset(sbp, '\0', sizeof (*sbp)); + sbp->st_mode = S_IFWHT; + } + return (FTS_W); + } +#endif + + /* + * If doing a logical walk, or application requested FTS_FOLLOW, do + * a stat(2). If that fails, check for a non-existent symlink. If + * fail, set the errno from the stat call. + */ + if (ISSET(FTS_LOGICAL) || follow) { + if (stat(p->fts_accpath, sbp)) { + saved_errno = errno; + if (!lstat(p->fts_accpath, sbp)) { + __set_errno (0); + return (FTS_SLNONE); + } + p->fts_errno = saved_errno; + goto err; + } + } else if (lstat(p->fts_accpath, sbp)) { + p->fts_errno = errno; +err: memset(sbp, 0, sizeof(struct stat)); + return (FTS_NS); + } + + if (S_ISDIR(sbp->st_mode)) { + /* + * Set the device/inode. Used to find cycles and check for + * crossing mount points. Also remember the link count, used + * in fts_build to limit the number of stat calls. It is + * understood that these fields are only referenced if fts_info + * is set to FTS_D. + */ + dev = p->fts_dev = sbp->st_dev; + ino = p->fts_ino = sbp->st_ino; + p->fts_nlink = sbp->st_nlink; + + if (ISDOT(p->fts_name)) + return (FTS_DOT); + + /* + * Cycle detection is done by brute force when the directory + * is first encountered. If the tree gets deep enough or the + * number of symbolic links to directories is high enough, + * something faster might be worthwhile. + */ + for (t = p->fts_parent; + t->fts_level >= FTS_ROOTLEVEL; t = t->fts_parent) + if (ino == t->fts_ino && dev == t->fts_dev) { + p->fts_cycle = t; + return (FTS_DC); + } + return (FTS_D); + } + if (S_ISLNK(sbp->st_mode)) + return (FTS_SL); + if (S_ISREG(sbp->st_mode)) + return (FTS_F); + return (FTS_DEFAULT); +} + +static FTSENT * +internal_function +fts_sort(sp, head, nitems) + FTS *sp; + FTSENT *head; + register int nitems; +{ + register FTSENT **ap, *p; + + /* + * Construct an array of pointers to the structures and call qsort(3). + * Reassemble the array in the order returned by qsort. If unable to + * sort for memory reasons, return the directory entries in their + * current order. Allocate enough space for the current needs plus + * 40 so don't realloc one entry at a time. + */ + if (nitems > sp->fts_nitems) { + struct _ftsent **a; + + sp->fts_nitems = nitems + 40; + if ((a = realloc(sp->fts_array, + (size_t)(sp->fts_nitems * sizeof(FTSENT *)))) == NULL) { + free(sp->fts_array); + sp->fts_array = NULL; + sp->fts_nitems = 0; + return (head); + } + sp->fts_array = a; + } + for (ap = sp->fts_array, p = head; p; p = p->fts_link) + *ap++ = p; + qsort((void *)sp->fts_array, nitems, sizeof(FTSENT *), sp->fts_compar); + for (head = *(ap = sp->fts_array); --nitems; ++ap) + ap[0]->fts_link = ap[1]; + ap[0]->fts_link = NULL; + return (head); +} + +static FTSENT * +internal_function +fts_alloc(sp, name, namelen) + FTS *sp; + const char *name; + size_t namelen; +{ + register FTSENT *p; + size_t len; + + /* + * The file name is a variable length array and no stat structure is + * necessary if the user has set the nostat bit. Allocate the FTSENT + * structure, the file name and the stat structure in one chunk, but + * be careful that the stat structure is reasonably aligned. Since the + * fts_name field is declared to be of size 1, the fts_name pointer is + * namelen + 2 before the first possible address of the stat structure. + */ + len = sizeof(FTSENT) + namelen; + if (!ISSET(FTS_NOSTAT)) + len += sizeof(struct stat) + ALIGNBYTES; + if ((p = malloc(len)) == NULL) + return (NULL); + + /* Copy the name and guarantee NUL termination. */ + memmove(p->fts_name, name, namelen); + p->fts_name[namelen] = '\0'; + + if (!ISSET(FTS_NOSTAT)) + p->fts_statp = (struct stat *)ALIGN(p->fts_name + namelen + 2); + p->fts_namelen = namelen; + p->fts_path = sp->fts_path; + p->fts_errno = 0; + p->fts_flags = 0; + p->fts_instr = FTS_NOINSTR; + p->fts_number = 0; + p->fts_pointer = NULL; + return (p); +} + +static void +internal_function +fts_lfree(head) + register FTSENT *head; +{ + register FTSENT *p; + + /* Free a linked list of structures. */ + while ((p = head)) { + head = head->fts_link; + free(p); + } +} + +/* + * Allow essentially unlimited paths; find, rm, ls should all work on any tree. + * Most systems will allow creation of paths much longer than MAXPATHLEN, even + * though the kernel won't resolve them. Add the size (not just what's needed) + * plus 256 bytes so don't realloc the path 2 bytes at a time. + */ +static int +internal_function +fts_palloc(sp, more) + FTS *sp; + size_t more; +{ + char *p; + + sp->fts_pathlen += more + 256; + /* + * Check for possible wraparound. In an FTS, fts_pathlen is + * a signed int but in an FTSENT it is an unsigned short. + * We limit fts_pathlen to USHRT_MAX to be safe in both cases. + */ + if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { + free(sp->fts_path); + sp->fts_path = NULL; + __set_errno (ENAMETOOLONG); + return (1); + } + p = realloc(sp->fts_path, sp->fts_pathlen); + if (p == NULL) { + free(sp->fts_path); + sp->fts_path = NULL; + return 1; + } + sp->fts_path = p; + return 0; +} + +/* + * When the path is realloc'd, have to fix all of the pointers in structures + * already returned. + */ +static void +internal_function +fts_padjust(sp, head) + FTS *sp; + FTSENT *head; +{ + FTSENT *p; + char *addr = sp->fts_path; + +#define ADJUST(p) do { \ + if ((p)->fts_accpath != (p)->fts_name) { \ + (p)->fts_accpath = \ + (char *)addr + ((p)->fts_accpath - (p)->fts_path); \ + } \ + (p)->fts_path = addr; \ +} while (0) + /* Adjust the current set of children. */ + for (p = sp->fts_child; p; p = p->fts_link) + ADJUST(p); + + /* Adjust the rest of the tree, including the current level. */ + for (p = head; p->fts_level >= FTS_ROOTLEVEL;) { + ADJUST(p); + p = p->fts_link ? p->fts_link : p->fts_parent; + } +} + +static size_t +internal_function +fts_maxarglen(argv) + char * const *argv; +{ + size_t len, max; + + for (max = 0; *argv; ++argv) + if ((len = strlen(*argv)) > max) + max = len; + return (max + 1); +} + +/* + * Change to dir specified by fd or p->fts_accpath without getting + * tricked by someone changing the world out from underneath us. + * Assumes p->fts_dev and p->fts_ino are filled in. + */ +static int +internal_function +fts_safe_changedir(sp, p, fd, path) + FTS *sp; + FTSENT *p; + int fd; + const char *path; +{ + int ret, oerrno, newfd; + struct stat64 sb; + + newfd = fd; + if (ISSET(FTS_NOCHDIR)) + return (0); + if (fd < 0 && (newfd = __open(path, O_RDONLY, 0)) < 0) + return (-1); + if (__fxstat64(_STAT_VER, newfd, &sb)) { + ret = -1; + goto bail; + } + if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) { + __set_errno (ENOENT); /* disinformation */ + ret = -1; + goto bail; + } + ret = __fchdir(newfd); +bail: + oerrno = errno; + if (fd < 0) + (void)__close(newfd); + __set_errno (oerrno); + return (ret); +} diff --git a/src/client/usrint/fts.h b/src/client/usrint/fts.h new file mode 100644 index 0000000..07a2b4c --- /dev/null +++ b/src/client/usrint/fts.h @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)fts.h 8.3 (Berkeley) 8/14/94 + */ + +#ifndef _FTS_H +#define _FTS_H 1 + +#include +#include + +/* Begin Modifications for PVFS USRLIB */ +#define internal_function +#define __open open +#define __close close +#define __opendir opendir +#define __readdir readdir +#define __closedir closedir +#define __fchdir fchdir +#ifndef __set_errno +#define __set_errno(Val) errno = (Val) +#endif + +#if 0 +/* The fts interface is incompatible with the LFS interface which + transparently uses the 64-bit file access functions. */ +#ifdef __USE_FILE_OFFSET64 +# error " cannot be used with -D_FILE_OFFSET_BITS==64" +#endif +#endif +/* End Modifications for PVFS USRLIB */ + + +typedef struct { + struct _ftsent *fts_cur; /* current node */ + struct _ftsent *fts_child; /* linked list of children */ + struct _ftsent **fts_array; /* sort array */ + dev_t fts_dev; /* starting device # */ + char *fts_path; /* path for this descent */ + int fts_rfd; /* fd for root */ + int fts_pathlen; /* sizeof(path) */ + int fts_nitems; /* elements in the sort array */ + int (*fts_compar) (const void *, const void *); /* compare fn */ + +#define FTS_COMFOLLOW 0x0001 /* follow command line symlinks */ +#define FTS_LOGICAL 0x0002 /* logical walk */ +#define FTS_NOCHDIR 0x0004 /* don't change directories */ +#define FTS_NOSTAT 0x0008 /* don't get stat info */ +#define FTS_PHYSICAL 0x0010 /* physical walk */ +#define FTS_SEEDOT 0x0020 /* return dot and dot-dot */ +#define FTS_XDEV 0x0040 /* don't cross devices */ +#define FTS_WHITEOUT 0x0080 /* return whiteout information */ +#define FTS_OPTIONMASK 0x00ff /* valid user option mask */ + +#define FTS_NAMEONLY 0x0100 /* (private) child names only */ +#define FTS_STOP 0x0200 /* (private) unrecoverable error */ + int fts_options; /* fts_open options, global flags */ +} FTS; + +typedef struct _ftsent { + struct _ftsent *fts_cycle; /* cycle node */ + struct _ftsent *fts_parent; /* parent directory */ + struct _ftsent *fts_link; /* next file in directory */ + long fts_number; /* local numeric value */ + void *fts_pointer; /* local address value */ + char *fts_accpath; /* access path */ + char *fts_path; /* root path */ + int fts_errno; /* errno for this node */ + int fts_symfd; /* fd for symlink */ + u_short fts_pathlen; /* strlen(fts_path) */ + u_short fts_namelen; /* strlen(fts_name) */ + + ino_t fts_ino; /* inode */ + dev_t fts_dev; /* device */ + nlink_t fts_nlink; /* link count */ + +#define FTS_ROOTPARENTLEVEL -1 +#define FTS_ROOTLEVEL 0 + short fts_level; /* depth (-1 to N) */ + +#define FTS_D 1 /* preorder directory */ +#define FTS_DC 2 /* directory that causes cycles */ +#define FTS_DEFAULT 3 /* none of the above */ +#define FTS_DNR 4 /* unreadable directory */ +#define FTS_DOT 5 /* dot or dot-dot */ +#define FTS_DP 6 /* postorder directory */ +#define FTS_ERR 7 /* error; errno is set */ +#define FTS_F 8 /* regular file */ +#define FTS_INIT 9 /* initialized only */ +#define FTS_NS 10 /* stat(2) failed */ +#define FTS_NSOK 11 /* no stat(2) requested */ +#define FTS_SL 12 /* symbolic link */ +#define FTS_SLNONE 13 /* symbolic link without target */ +#define FTS_W 14 /* whiteout object */ + u_short fts_info; /* user flags for FTSENT structure */ + +#define FTS_DONTCHDIR 0x01 /* don't chdir .. to the parent */ +#define FTS_SYMFOLLOW 0x02 /* followed a symlink to get here */ + u_short fts_flags; /* private flags for FTSENT structure */ + +#define FTS_AGAIN 1 /* read node again */ +#define FTS_FOLLOW 2 /* follow symbolic link */ +#define FTS_NOINSTR 3 /* no instructions */ +#define FTS_SKIP 4 /* discard node */ + u_short fts_instr; /* fts_set() instructions */ + + struct stat *fts_statp; /* stat(2) information */ + char fts_name[1]; /* file name */ +} FTSENT; + +__BEGIN_DECLS +FTSENT *fts_children (FTS *, int); +int fts_close (FTS *); +FTS *fts_open (char * const *, int, + int (*)(const FTSENT **, const FTSENT **)); +FTSENT *fts_read (FTS *); +int fts_set (FTS *, FTSENT *, int) __THROW; +__END_DECLS + +#endif /* fts.h */ diff --git a/src/client/usrint/glob.c b/src/client/usrint/glob.c new file mode 100644 index 0000000..90ef96c --- /dev/null +++ b/src/client/usrint/glob.c @@ -0,0 +1,1762 @@ +/* Copyright (C) 1991-2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010, 2011 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#define USRINT_SOURCE 1 +#include "usrint.h" + +#ifdef HAVE_CONFIG_H +# include +#endif + +#include + +#include +#include +#include +#include + + +/* Outcomment the following line for production quality code. */ +/* #define NDEBUG 1 */ +#include + +#include /* Needed on stupid SunOS for assert. */ + +#if !defined _LIBC || !defined GLOB_ONLY_P +#if defined HAVE_UNISTD_H || defined _LIBC +# include +# ifndef POSIX +# ifdef _POSIX_VERSION +# define POSIX +# endif +# endif +#endif + +#include + +#if defined HAVE_STDINT_H || defined _LIBC +# include +#elif !defined UINTPTR_MAX +# define UINTPTR_MAX (~((size_t) 0)) +#endif + +#include +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif + +#if defined HAVE_DIRENT_H || defined __GNU_LIBRARY__ +# include +# define NAMLEN(dirent) strlen((dirent)->d_name) +#else +# define dirent direct +# define NAMLEN(dirent) (dirent)->d_namlen +# ifdef HAVE_SYS_NDIR_H +# include +# endif +# ifdef HAVE_SYS_DIR_H +# include +# endif +# ifdef HAVE_NDIR_H +# include +# endif +# ifdef HAVE_VMSDIR_H +# include "vmsdir.h" +# endif /* HAVE_VMSDIR_H */ +#endif + + +/* In GNU systems, defines this macro for us. */ +#ifdef _D_NAMLEN +# undef NAMLEN +# define NAMLEN(d) _D_NAMLEN(d) +#endif + +/* When used in the GNU libc the symbol _DIRENT_HAVE_D_TYPE is available + if the `d_type' member for `struct dirent' is available. + HAVE_STRUCT_DIRENT_D_TYPE plays the same role in GNULIB. */ +#if defined _DIRENT_HAVE_D_TYPE || defined HAVE_STRUCT_DIRENT_D_TYPE +/* True if the directory entry D must be of type T. */ +# define DIRENT_MUST_BE(d, t) ((d)->d_type == (t)) + +/* True if the directory entry D might be a symbolic link. */ +# define DIRENT_MIGHT_BE_SYMLINK(d) \ + ((d)->d_type == DT_UNKNOWN || (d)->d_type == DT_LNK) + +/* True if the directory entry D might be a directory. */ +# define DIRENT_MIGHT_BE_DIR(d) \ + ((d)->d_type == DT_DIR || DIRENT_MIGHT_BE_SYMLINK (d)) + +#else /* !HAVE_D_TYPE */ +# define DIRENT_MUST_BE(d, t) false +# define DIRENT_MIGHT_BE_SYMLINK(d) true +# define DIRENT_MIGHT_BE_DIR(d) true +#endif /* HAVE_D_TYPE */ + +/* If the system has the `struct dirent64' type we use it internally. */ +#if defined _LIBC && !defined COMPILE_GLOB64 +# if defined HAVE_DIRENT_H || defined __GNU_LIBRARY__ +# define CONVERT_D_NAMLEN(d64, d32) +# else +# define CONVERT_D_NAMLEN(d64, d32) \ + (d64)->d_namlen = (d32)->d_namlen; +# endif + +# if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ +# define CONVERT_D_INO(d64, d32) +# else +# define CONVERT_D_INO(d64, d32) \ + (d64)->d_ino = (d32)->d_ino; +# endif + +# ifdef _DIRENT_HAVE_D_TYPE +# define CONVERT_D_TYPE(d64, d32) \ + (d64)->d_type = (d32)->d_type; +# else +# define CONVERT_D_TYPE(d64, d32) +# endif + +# define CONVERT_DIRENT_DIRENT64(d64, d32) \ + memcpy ((d64)->d_name, (d32)->d_name, NAMLEN (d32) + 1); \ + CONVERT_D_NAMLEN (d64, d32) \ + CONVERT_D_INO (d64, d32) \ + CONVERT_D_TYPE (d64, d32) +#endif + + +#if (defined POSIX || defined WINDOWS32) && !defined __GNU_LIBRARY__ +/* Posix does not require that the d_ino field be present, and some + systems do not provide it. */ +# define REAL_DIR_ENTRY(dp) 1 +#else +# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0) +#endif /* POSIX */ + +#include +#include + +/* NAME_MAX is usually defined in or . */ +#include +#ifndef NAME_MAX +# define NAME_MAX (sizeof (((struct dirent *) 0)->d_name)) +#endif + +#include + +#ifdef _LIBC +# undef strdup +# define strdup(str) __strdup (str) +# define sysconf(id) __sysconf (id) +# define closedir(dir) __closedir (dir) +# define opendir(name) __opendir (name) +# define readdir(str) __readdir64 (str) +# define getpwnam_r(name, bufp, buf, len, res) \ + __getpwnam_r (name, bufp, buf, len, res) +# ifndef __stat64 +# define __stat64(fname, buf) __xstat64 (_STAT_VER, fname, buf) +# endif +# define struct_stat64 struct stat64 +#else /* !_LIBC */ +/* Modifications 2/13 WBL for use in PVFS */ +#if 0 +# include "getlogin_r.h" +# include "mempcpy.h" +# include "stat-macros.h" +# include "strdup.h" +#endif +# include "unistd.h" +# define __alloca alloca +# define __libc_use_alloca(n) (0) +# define alloca_account(size, var) alloca(size) +#ifndef __strdup +# define __strdup strdup +#endif +/* End Modifications */ +# define __stat64(fname, buf) stat (fname, buf) +# define struct_stat64 struct stat +# define __stat(fname, buf) stat (fname, buf) +# define __readdir readdir +# define __readdir64 readdir64 +# define __glob_pattern_p glob_pattern_p +#endif /* _LIBC */ + +#include + +#ifdef _SC_GETPW_R_SIZE_MAX +# define GETPW_R_SIZE_MAX() sysconf (_SC_GETPW_R_SIZE_MAX) +#else +# define GETPW_R_SIZE_MAX() (-1) +#endif +#ifdef _SC_LOGIN_NAME_MAX +# define GET_LOGIN_NAME_MAX() sysconf (_SC_LOGIN_NAME_MAX) +#else +# define GET_LOGIN_NAME_MAX() (-1) +#endif + +#ifdef __THROWNL +static const char *next_brace_sub (const char *begin, int flags) __THROWNL; +#else +static const char *next_brace_sub (const char *begin, int flags) __THROW; +#endif /* __THROWNL */ + +#endif /* !defined _LIBC || !defined GLOB_ONLY_P */ + +#ifndef attribute_hidden +# define attribute_hidden +#endif + +static int glob_in_dir (const char *pattern, const char *directory, + int flags, int (*errfunc) (const char *, int), + glob_t *pglob, size_t alloca_used); +extern int __glob_pattern_type (const char *pattern, int quote) + attribute_hidden; + +#if !defined _LIBC || !defined GLOB_ONLY_P +#ifdef __THROWNL +static int prefix_array (const char *prefix, char **array, size_t n) __THROWNL; +static int collated_compare (const void *, const void *) __THROWNL; +#else +static int prefix_array (const char *prefix, char **array, size_t n) __THROW; +static int collated_compare (const void *, const void *) __THROW; +#endif /* __THROWNL */ + + +/* Find the end of the sub-pattern in a brace expression. */ +static const char * +next_brace_sub (const char *cp, int flags) +{ + unsigned int depth = 0; + while (*cp != '\0') + if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\') + { + if (*++cp == '\0') + break; + ++cp; + } + else + { + if ((*cp == '}' && depth-- == 0) || (*cp == ',' && depth == 0)) + break; + + if (*cp++ == '{') + depth++; + } + + return *cp != '\0' ? cp : NULL; +} + +#endif /* !defined _LIBC || !defined GLOB_ONLY_P */ + +/* Do glob searching for PATTERN, placing results in PGLOB. + The bits defined above may be set in FLAGS. + If a directory cannot be opened or read and ERRFUNC is not nil, + it is called with the pathname that caused the error, and the + `errno' value from the failing call; if it returns non-zero + `glob' returns GLOB_ABORTED; if it returns zero, the error is ignored. + If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. + Otherwise, `glob' returns zero. */ +int +#ifdef GLOB_ATTRIBUTE +GLOB_ATTRIBUTE +#endif +glob (pattern, flags, errfunc, pglob) + const char *pattern; + int flags; + int (*errfunc) (const char *, int); + glob_t *pglob; +{ + const char *filename; + char *dirname = NULL; + size_t dirlen; + int status; + size_t oldcount; + int meta; + int dirname_modified; + int malloc_dirname = 0; + glob_t dirs; + int retval = 0; + size_t alloca_used = 0; + + if (pattern == NULL || pglob == NULL || (flags & ~__GLOB_FLAGS) != 0) + { + __set_errno (EINVAL); + return -1; + } + + if (!(flags & GLOB_DOOFFS)) + /* Have to do this so `globfree' knows where to start freeing. It + also makes all the code that uses gl_offs simpler. */ + pglob->gl_offs = 0; + + if (flags & GLOB_BRACE) + { + const char *begin; + + if (flags & GLOB_NOESCAPE) + begin = strchr (pattern, '{'); + else + { + begin = pattern; + while (1) + { + if (*begin == '\0') + { + begin = NULL; + break; + } + + if (*begin == '\\' && begin[1] != '\0') + ++begin; + else if (*begin == '{') + break; + + ++begin; + } + } + + if (begin != NULL) + { + /* Allocate working buffer large enough for our work. Note that + we have at least an opening and closing brace. */ + size_t firstc; + char *alt_start; + const char *p; + const char *next; + const char *rest; + size_t rest_len; + char *onealt; + size_t pattern_len = strlen (pattern) - 1; +#ifdef _LIBC + int alloca_onealt = __libc_use_alloca (alloca_used + pattern_len); + if (alloca_onealt) + onealt = alloca_account (pattern_len, alloca_used); + else +#endif + { + onealt = (char *) malloc (pattern_len); + if (onealt == NULL) + { + if (!(flags & GLOB_APPEND)) + { + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + } + return GLOB_NOSPACE; + } + } + + /* We know the prefix for all sub-patterns. */ + alt_start = mempcpy (onealt, pattern, begin - pattern); + + /* Find the first sub-pattern and at the same time find the + rest after the closing brace. */ + next = next_brace_sub (begin + 1, flags); + if (next == NULL) + { + /* It is an illegal expression. */ + illegal_brace: +#ifdef _LIBC + if (__builtin_expect (!alloca_onealt, 0)) +#endif + free (onealt); + return glob (pattern, flags & ~GLOB_BRACE, errfunc, pglob); + } + + /* Now find the end of the whole brace expression. */ + rest = next; + while (*rest != '}') + { + rest = next_brace_sub (rest + 1, flags); + if (rest == NULL) + /* It is an illegal expression. */ + goto illegal_brace; + } + /* Please note that we now can be sure the brace expression + is well-formed. */ + rest_len = strlen (++rest) + 1; + + /* We have a brace expression. BEGIN points to the opening {, + NEXT points past the terminator of the first element, and END + points past the final }. We will accumulate result names from + recursive runs for each brace alternative in the buffer using + GLOB_APPEND. */ + + if (!(flags & GLOB_APPEND)) + { + /* This call is to set a new vector, so clear out the + vector so we can append to it. */ + pglob->gl_pathc = 0; + pglob->gl_pathv = NULL; + } + firstc = pglob->gl_pathc; + + p = begin + 1; + while (1) + { + int result; + + /* Construct the new glob expression. */ + mempcpy (mempcpy (alt_start, p, next - p), rest, rest_len); + + result = glob (onealt, + ((flags & ~(GLOB_NOCHECK | GLOB_NOMAGIC)) + | GLOB_APPEND), errfunc, pglob); + + /* If we got an error, return it. */ + if (result && result != GLOB_NOMATCH) + { +#ifdef _LIBC + if (__builtin_expect (!alloca_onealt, 0)) +#endif + free (onealt); + if (!(flags & GLOB_APPEND)) + { + globfree (pglob); + pglob->gl_pathc = 0; + } + return result; + } + + if (*next == '}') + /* We saw the last entry. */ + break; + + p = next + 1; + next = next_brace_sub (p, flags); + assert (next != NULL); + } + +#ifdef _LIBC + if (__builtin_expect (!alloca_onealt, 0)) +#endif + free (onealt); + + if (pglob->gl_pathc != firstc) + /* We found some entries. */ + return 0; + else if (!(flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) + return GLOB_NOMATCH; + } + } + + if (!(flags & GLOB_APPEND)) + { + pglob->gl_pathc = 0; + if (!(flags & GLOB_DOOFFS)) + pglob->gl_pathv = NULL; + else + { + size_t i; + + if (pglob->gl_offs >= ~((size_t) 0) / sizeof (char *)) + return GLOB_NOSPACE; + + pglob->gl_pathv = (char **) malloc ((pglob->gl_offs + 1) + * sizeof (char *)); + if (pglob->gl_pathv == NULL) + return GLOB_NOSPACE; + + for (i = 0; i <= pglob->gl_offs; ++i) + pglob->gl_pathv[i] = NULL; + } + } + + oldcount = pglob->gl_pathc + pglob->gl_offs; + + /* Find the filename. */ + filename = strrchr (pattern, '/'); +#if defined __MSDOS__ || defined WINDOWS32 + /* The case of "d:pattern". Since `:' is not allowed in + file names, we can safely assume that wherever it + happens in pattern, it signals the filename part. This + is so we could some day support patterns like "[a-z]:foo". */ + if (filename == NULL) + filename = strchr (pattern, ':'); +#endif /* __MSDOS__ || WINDOWS32 */ + dirname_modified = 0; + if (filename == NULL) + { + /* This can mean two things: a simple name or "~name". The latter + case is nothing but a notation for a directory. */ + if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && pattern[0] == '~') + { + dirname = (char *) pattern; + dirlen = strlen (pattern); + + /* Set FILENAME to NULL as a special flag. This is ugly but + other solutions would require much more code. We test for + this special case below. */ + filename = NULL; + } + else + { + if (__builtin_expect (pattern[0] == '\0', 0)) + { + dirs.gl_pathv = NULL; + goto no_matches; + } + + filename = pattern; +#ifdef _AMIGA + dirname = (char *) ""; +#else + dirname = (char *) "."; +#endif + dirlen = 0; + } + } + else if (filename == pattern + || (filename == pattern + 1 && pattern[0] == '\\' + && (flags & GLOB_NOESCAPE) == 0)) + { + /* "/pattern" or "\\/pattern". */ + dirname = (char *) "/"; + dirlen = 1; + ++filename; + } + else + { + char *newp; + dirlen = filename - pattern; +#if defined __MSDOS__ || defined WINDOWS32 + if (*filename == ':' + || (filename > pattern + 1 && filename[-1] == ':')) + { + char *drive_spec; + + ++dirlen; + drive_spec = (char *) __alloca (dirlen + 1); + *((char *) mempcpy (drive_spec, pattern, dirlen)) = '\0'; + /* For now, disallow wildcards in the drive spec, to + prevent infinite recursion in glob. */ + if (__glob_pattern_p (drive_spec, !(flags & GLOB_NOESCAPE))) + return GLOB_NOMATCH; + /* If this is "d:pattern", we need to copy `:' to DIRNAME + as well. If it's "d:/pattern", don't remove the slash + from "d:/", since "d:" and "d:/" are not the same.*/ + } +#endif +#ifdef _LIBC + if (__libc_use_alloca (alloca_used + dirlen + 1)) + newp = alloca_account (dirlen + 1, alloca_used); + else +#endif + { + newp = malloc (dirlen + 1); + if (newp == NULL) + return GLOB_NOSPACE; + malloc_dirname = 1; + } + *((char *) mempcpy (newp, pattern, dirlen)) = '\0'; + dirname = newp; + ++filename; + + if (filename[0] == '\0' +#if defined __MSDOS__ || defined WINDOWS32 + && dirname[dirlen - 1] != ':' + && (dirlen < 3 || dirname[dirlen - 2] != ':' + || dirname[dirlen - 1] != '/') +#endif + && dirlen > 1) + /* "pattern/". Expand "pattern", appending slashes. */ + { + int orig_flags = flags; + if (!(flags & GLOB_NOESCAPE) && dirname[dirlen - 1] == '\\') + { + /* "pattern\\/". Remove the final backslash if it hasn't + been quoted. */ + char *p = (char *) &dirname[dirlen - 1]; + + while (p > dirname && p[-1] == '\\') --p; + if ((&dirname[dirlen] - p) & 1) + { + *(char *) &dirname[--dirlen] = '\0'; + flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC); + } + } + int val = glob (dirname, flags | GLOB_MARK, errfunc, pglob); + if (val == 0) + pglob->gl_flags = ((pglob->gl_flags & ~GLOB_MARK) + | (flags & GLOB_MARK)); + else if (val == GLOB_NOMATCH && flags != orig_flags) + { + /* Make sure globfree (&dirs); is a nop. */ + dirs.gl_pathv = NULL; + flags = orig_flags; + oldcount = pglob->gl_pathc + pglob->gl_offs; + goto no_matches; + } + retval = val; + goto out; + } + } + +#ifndef VMS + if ((flags & (GLOB_TILDE|GLOB_TILDE_CHECK)) && dirname[0] == '~') + { + if (dirname[1] == '\0' || dirname[1] == '/' + || (!(flags & GLOB_NOESCAPE) && dirname[1] == '\\' + && (dirname[2] == '\0' || dirname[2] == '/'))) + { + /* Look up home directory. */ + char *home_dir = getenv ("HOME"); + int malloc_home_dir = 0; +# ifdef _AMIGA + if (home_dir == NULL || home_dir[0] == '\0') + home_dir = "SYS:"; +# else +# ifdef WINDOWS32 + if (home_dir == NULL || home_dir[0] == '\0') + home_dir = "c:/users/default"; /* poor default */ +# else + if (home_dir == NULL || home_dir[0] == '\0') + { + int success; + char *name; + size_t buflen = GET_LOGIN_NAME_MAX () + 1; + + if (buflen == 0) + /* `sysconf' does not support _SC_LOGIN_NAME_MAX. Try + a moderate value. */ + buflen = 20; + name = alloca_account (buflen, alloca_used); + + success = getlogin_r (name, buflen) == 0; + if (success) + { + struct passwd *p = NULL; + char *pwtmpbuf = NULL; + int malloc_pwtmpbuf = 0; +# if defined HAVE_GETPWNAM_R || defined _LIBC + struct passwd pwbuf; + int save = errno; + long int pwbuflen = GETPW_R_SIZE_MAX (); + +# ifndef _LIBC + if (pwbuflen == -1) + /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. + Try a moderate value. */ + pwbuflen = 1024; +# endif + if (__libc_use_alloca (alloca_used + pwbuflen)) + pwtmpbuf = alloca_account (pwbuflen, alloca_used); + else + { + pwtmpbuf = malloc (pwbuflen); + if (pwtmpbuf == NULL) + { + retval = GLOB_NOSPACE; + goto out; + } + malloc_pwtmpbuf = 1; + } + + while (getpwnam_r (name, &pwbuf, pwtmpbuf, pwbuflen, &p) + != 0) + { + if (errno != ERANGE) + { + p = NULL; + break; + } + + if (!malloc_pwtmpbuf + && __libc_use_alloca (alloca_used + + 2 * pwbuflen)) + pwtmpbuf = extend_alloca_account (pwtmpbuf, pwbuflen, + 2 * pwbuflen, + alloca_used); + else + { + char *newp = realloc (malloc_pwtmpbuf + ? pwtmpbuf : NULL, + 2 * pwbuflen); + if (newp == NULL) + { + if (__builtin_expect (malloc_pwtmpbuf, 0)) + free (pwtmpbuf); + retval = GLOB_NOSPACE; + goto out; + } + pwtmpbuf = newp; + pwbuflen = 2 * pwbuflen; + malloc_pwtmpbuf = 1; + } + __set_errno (save); + } +# else + p = getpwnam (name); +# endif + if (p != NULL) + { + if (!malloc_pwtmpbuf) + home_dir = p->pw_dir; + else + { + size_t home_dir_len = strlen (p->pw_dir) + 1; + if (__libc_use_alloca (alloca_used + home_dir_len)) + home_dir = alloca_account (home_dir_len, + alloca_used); + else + { + home_dir = malloc (home_dir_len); + if (home_dir == NULL) + { + free (pwtmpbuf); + retval = GLOB_NOSPACE; + goto out; + } + malloc_home_dir = 1; + } + memcpy (home_dir, p->pw_dir, home_dir_len); + + free (pwtmpbuf); + } + } + } + } + if (home_dir == NULL || home_dir[0] == '\0') + { + if (flags & GLOB_TILDE_CHECK) + { + if (__builtin_expect (malloc_home_dir, 0)) + free (home_dir); + retval = GLOB_NOMATCH; + goto out; + } + else + home_dir = (char *) "~"; /* No luck. */ + } +# endif /* WINDOWS32 */ +# endif + /* Now construct the full directory. */ + if (dirname[1] == '\0') + { + if (__builtin_expect (malloc_dirname, 0)) + free (dirname); + + dirname = home_dir; + dirlen = strlen (dirname); + malloc_dirname = malloc_home_dir; + } + else + { + char *newp; + size_t home_len = strlen (home_dir); + int use_alloca = __libc_use_alloca (alloca_used + + home_len + dirlen); + if (use_alloca) + newp = alloca_account (home_len + dirlen, alloca_used); + else + { + newp = malloc (home_len + dirlen); + if (newp == NULL) + { + if (__builtin_expect (malloc_home_dir, 0)) + free (home_dir); + retval = GLOB_NOSPACE; + goto out; + } + } + + mempcpy (mempcpy (newp, home_dir, home_len), + &dirname[1], dirlen); + + if (__builtin_expect (malloc_dirname, 0)) + free (dirname); + + dirname = newp; + dirlen += home_len - 1; + malloc_dirname = !use_alloca; + } + dirname_modified = 1; + } +# if !defined _AMIGA && !defined WINDOWS32 + else + { + char *end_name = strchr (dirname, '/'); + char *user_name; + int malloc_user_name = 0; + char *unescape = NULL; + + if (!(flags & GLOB_NOESCAPE)) + { + if (end_name == NULL) + { + unescape = strchr (dirname, '\\'); + if (unescape) + end_name = strchr (unescape, '\0'); + } + else + unescape = memchr (dirname, '\\', end_name - dirname); + } + if (end_name == NULL) + user_name = dirname + 1; + else + { + char *newp; + if (__libc_use_alloca (alloca_used + (end_name - dirname))) + newp = alloca_account (end_name - dirname, alloca_used); + else + { + newp = malloc (end_name - dirname); + if (newp == NULL) + { + retval = GLOB_NOSPACE; + goto out; + } + malloc_user_name = 1; + } + if (unescape != NULL) + { + char *p = mempcpy (newp, dirname + 1, + unescape - dirname - 1); + char *q = unescape; + while (*q != '\0') + { + if (*q == '\\') + { + if (q[1] == '\0') + { + /* "~fo\\o\\" unescape to user_name "foo\\", + but "~fo\\o\\/" unescape to user_name + "foo". */ + if (filename == NULL) + *p++ = '\\'; + break; + } + ++q; + } + *p++ = *q++; + } + *p = '\0'; + } + else + *((char *) mempcpy (newp, dirname + 1, end_name - dirname)) + = '\0'; + user_name = newp; + } + + /* Look up specific user's home directory. */ + { + struct passwd *p = NULL; + char *pwtmpbuf = NULL; + int malloc_pwtmpbuf = 0; +# if defined HAVE_GETPWNAM_R || defined _LIBC + long int buflen = GETPW_R_SIZE_MAX (); + struct passwd pwbuf; + int save = errno; + +# ifndef _LIBC + if (buflen == -1) + /* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a + moderate value. */ + buflen = 1024; +# endif + if (__libc_use_alloca (alloca_used + buflen)) + pwtmpbuf = alloca_account (buflen, alloca_used); + else + { + pwtmpbuf = malloc (buflen); + if (pwtmpbuf == NULL) + { + nomem_getpw: + if (__builtin_expect (malloc_user_name, 0)) + free (user_name); + retval = GLOB_NOSPACE; + goto out; + } + malloc_pwtmpbuf = 1; + } + + while (getpwnam_r (user_name, &pwbuf, pwtmpbuf, buflen, &p) != 0) + { + if (errno != ERANGE) + { + p = NULL; + break; + } + if (!malloc_pwtmpbuf + && __libc_use_alloca (alloca_used + 2 * buflen)) + pwtmpbuf = extend_alloca_account (pwtmpbuf, buflen, + 2 * buflen, alloca_used); + else + { + char *newp = realloc (malloc_pwtmpbuf ? pwtmpbuf : NULL, + 2 * buflen); + if (newp == NULL) + { + if (__builtin_expect (malloc_pwtmpbuf, 0)) + free (pwtmpbuf); + goto nomem_getpw; + } + pwtmpbuf = newp; + malloc_pwtmpbuf = 1; + } + __set_errno (save); + } +# else + p = getpwnam (user_name); +# endif + + if (__builtin_expect (malloc_user_name, 0)) + free (user_name); + + /* If we found a home directory use this. */ + if (p != NULL) + { + size_t home_len = strlen (p->pw_dir); + size_t rest_len = end_name == NULL ? 0 : strlen (end_name); + + if (__builtin_expect (malloc_dirname, 0)) + free (dirname); + malloc_dirname = 0; + + if (__libc_use_alloca (alloca_used + home_len + rest_len + 1)) + dirname = alloca_account (home_len + rest_len + 1, + alloca_used); + else + { + dirname = malloc (home_len + rest_len + 1); + if (dirname == NULL) + { + if (__builtin_expect (malloc_pwtmpbuf, 0)) + free (pwtmpbuf); + retval = GLOB_NOSPACE; + goto out; + } + malloc_dirname = 1; + } + *((char *) mempcpy (mempcpy (dirname, p->pw_dir, home_len), + end_name, rest_len)) = '\0'; + + dirlen = home_len + rest_len; + dirname_modified = 1; + + if (__builtin_expect (malloc_pwtmpbuf, 0)) + free (pwtmpbuf); + } + else + { + if (__builtin_expect (malloc_pwtmpbuf, 0)) + free (pwtmpbuf); + + if (flags & GLOB_TILDE_CHECK) + /* We have to regard it as an error if we cannot find the + home directory. */ + return GLOB_NOMATCH; + } + } + } +# endif /* Not Amiga && not WINDOWS32. */ + } +#endif /* Not VMS. */ + + /* Now test whether we looked for "~" or "~NAME". In this case we + can give the answer now. */ + if (filename == NULL) + { + struct stat st; + struct_stat64 st64; + + /* Return the directory if we don't check for error or if it exists. */ + if ((flags & GLOB_NOCHECK) + || (((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) + ? ((*pglob->gl_stat) (dirname, &st) == 0 + && S_ISDIR (st.st_mode)) + : (__stat64 (dirname, &st64) == 0 && S_ISDIR (st64.st_mode))))) + { + int newcount = pglob->gl_pathc + pglob->gl_offs; + char **new_gl_pathv; + + if (newcount > UINTPTR_MAX - (1 + 1) + || newcount + 1 + 1 > ~((size_t) 0) / sizeof (char *)) + { + nospace: + free (pglob->gl_pathv); + pglob->gl_pathv = NULL; + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } + + new_gl_pathv + = (char **) realloc (pglob->gl_pathv, + (newcount + 1 + 1) * sizeof (char *)); + if (new_gl_pathv == NULL) + goto nospace; + pglob->gl_pathv = new_gl_pathv; + + if (flags & GLOB_MARK) + { + char *p; + pglob->gl_pathv[newcount] = malloc (dirlen + 2); + if (pglob->gl_pathv[newcount] == NULL) + goto nospace; + p = mempcpy (pglob->gl_pathv[newcount], dirname, dirlen); + p[0] = '/'; + p[1] = '\0'; + } + else + { + pglob->gl_pathv[newcount] = strdup (dirname); + if (pglob->gl_pathv[newcount] == NULL) + goto nospace; + } + pglob->gl_pathv[++newcount] = NULL; + ++pglob->gl_pathc; + pglob->gl_flags = flags; + + return 0; + } + + /* Not found. */ + return GLOB_NOMATCH; + } + + meta = __glob_pattern_type (dirname, !(flags & GLOB_NOESCAPE)); + /* meta is 1 if correct glob pattern containing metacharacters. + If meta has bit (1 << 2) set, it means there was an unterminated + [ which we handle the same, using fnmatch. Broken unterminated + pattern bracket expressions ought to be rare enough that it is + not worth special casing them, fnmatch will do the right thing. */ + if (meta & 5) + { + /* The directory name contains metacharacters, so we + have to glob for the directory, and then glob for + the pattern in each directory found. */ + size_t i; + + if (!(flags & GLOB_NOESCAPE) && dirlen > 0 && dirname[dirlen - 1] == '\\') + { + /* "foo\\/bar". Remove the final backslash from dirname + if it has not been quoted. */ + char *p = (char *) &dirname[dirlen - 1]; + + while (p > dirname && p[-1] == '\\') --p; + if ((&dirname[dirlen] - p) & 1) + *(char *) &dirname[--dirlen] = '\0'; + } + + if (__builtin_expect ((flags & GLOB_ALTDIRFUNC) != 0, 0)) + { + /* Use the alternative access functions also in the recursive + call. */ + dirs.gl_opendir = pglob->gl_opendir; + dirs.gl_readdir = pglob->gl_readdir; + dirs.gl_closedir = pglob->gl_closedir; + dirs.gl_stat = pglob->gl_stat; + dirs.gl_lstat = pglob->gl_lstat; + } + + status = glob (dirname, + ((flags & (GLOB_ERR | GLOB_NOESCAPE + | GLOB_ALTDIRFUNC)) + | GLOB_NOSORT | GLOB_ONLYDIR), + errfunc, &dirs); + if (status != 0) + { + if ((flags & GLOB_NOCHECK) == 0 || status != GLOB_NOMATCH) + return status; + goto no_matches; + } + + /* We have successfully globbed the preceding directory name. + For each name we found, call glob_in_dir on it and FILENAME, + appending the results to PGLOB. */ + for (i = 0; i < dirs.gl_pathc; ++i) + { + int old_pathc; + +#ifdef SHELL + { + /* Make globbing interruptible in the bash shell. */ + extern int interrupt_state; + + if (interrupt_state) + { + globfree (&dirs); + return GLOB_ABORTED; + } + } +#endif /* SHELL. */ + + old_pathc = pglob->gl_pathc; + status = glob_in_dir (filename, dirs.gl_pathv[i], + ((flags | GLOB_APPEND) + & ~(GLOB_NOCHECK | GLOB_NOMAGIC)), + errfunc, pglob, alloca_used); + if (status == GLOB_NOMATCH) + /* No matches in this directory. Try the next. */ + continue; + + if (status != 0) + { + globfree (&dirs); + globfree (pglob); + pglob->gl_pathc = 0; + return status; + } + + /* Stick the directory on the front of each name. */ + if (prefix_array (dirs.gl_pathv[i], + &pglob->gl_pathv[old_pathc + pglob->gl_offs], + pglob->gl_pathc - old_pathc)) + { + globfree (&dirs); + globfree (pglob); + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } + } + + flags |= GLOB_MAGCHAR; + + /* We have ignored the GLOB_NOCHECK flag in the `glob_in_dir' calls. + But if we have not found any matching entry and the GLOB_NOCHECK + flag was set we must return the input pattern itself. */ + if (pglob->gl_pathc + pglob->gl_offs == oldcount) + { + no_matches: + /* No matches. */ + if (flags & GLOB_NOCHECK) + { + int newcount = pglob->gl_pathc + pglob->gl_offs; + char **new_gl_pathv; + + if (newcount > UINTPTR_MAX - 2 + || newcount + 2 > ~((size_t) 0) / sizeof (char *)) + { + nospace2: + globfree (&dirs); + return GLOB_NOSPACE; + } + + new_gl_pathv = (char **) realloc (pglob->gl_pathv, + (newcount + 2) + * sizeof (char *)); + if (new_gl_pathv == NULL) + goto nospace2; + pglob->gl_pathv = new_gl_pathv; + + pglob->gl_pathv[newcount] = __strdup (pattern); + if (pglob->gl_pathv[newcount] == NULL) + { + globfree (&dirs); + globfree (pglob); + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } + + ++pglob->gl_pathc; + ++newcount; + + pglob->gl_pathv[newcount] = NULL; + pglob->gl_flags = flags; + } + else + { + globfree (&dirs); + return GLOB_NOMATCH; + } + } + + globfree (&dirs); + } + else + { + int old_pathc = pglob->gl_pathc; + int orig_flags = flags; + + if (meta & 2) + { + char *p = strchr (dirname, '\\'), *q; + /* We need to unescape the dirname string. It is certainly + allocated by alloca, as otherwise filename would be NULL + or dirname wouldn't contain backslashes. */ + q = p; + do + { + if (*p == '\\') + { + *q = *++p; + --dirlen; + } + else + *q = *p; + ++q; + } + while (*p++ != '\0'); + dirname_modified = 1; + } + if (dirname_modified) + flags &= ~(GLOB_NOCHECK | GLOB_NOMAGIC); + status = glob_in_dir (filename, dirname, flags, errfunc, pglob, + alloca_used); + if (status != 0) + { + if (status == GLOB_NOMATCH && flags != orig_flags + && pglob->gl_pathc + pglob->gl_offs == oldcount) + { + /* Make sure globfree (&dirs); is a nop. */ + dirs.gl_pathv = NULL; + flags = orig_flags; + goto no_matches; + } + return status; + } + + if (dirlen > 0) + { + /* Stick the directory on the front of each name. */ + if (prefix_array (dirname, + &pglob->gl_pathv[old_pathc + pglob->gl_offs], + pglob->gl_pathc - old_pathc)) + { + globfree (pglob); + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } + } + } + + if (flags & GLOB_MARK) + { + /* Append slashes to directory names. */ + size_t i; + struct stat st; + struct_stat64 st64; + + for (i = oldcount; i < pglob->gl_pathc + pglob->gl_offs; ++i) + if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? ((*pglob->gl_stat) (pglob->gl_pathv[i], &st) == 0 + && S_ISDIR (st.st_mode)) + : (__stat64 (pglob->gl_pathv[i], &st64) == 0 + && S_ISDIR (st64.st_mode)))) + { + size_t len = strlen (pglob->gl_pathv[i]) + 2; + char *new = realloc (pglob->gl_pathv[i], len); + if (new == NULL) + { + globfree (pglob); + pglob->gl_pathc = 0; + return GLOB_NOSPACE; + } + strcpy (&new[len - 2], "/"); + pglob->gl_pathv[i] = new; + } + } + + if (!(flags & GLOB_NOSORT)) + { + /* Sort the vector. */ + qsort (&pglob->gl_pathv[oldcount], + pglob->gl_pathc + pglob->gl_offs - oldcount, + sizeof (char *), collated_compare); + } + + out: + if (__builtin_expect (malloc_dirname, 0)) + free (dirname); + + return retval; +} +#if defined _LIBC && !defined glob +libc_hidden_def (glob) +#endif + + +#if !defined _LIBC || !defined GLOB_ONLY_P + +/* Free storage allocated in PGLOB by a previous `glob' call. */ +void +globfree (pglob) + register glob_t *pglob; +{ + if (pglob->gl_pathv != NULL) + { + size_t i; + for (i = 0; i < pglob->gl_pathc; ++i) + free (pglob->gl_pathv[pglob->gl_offs + i]); + free (pglob->gl_pathv); + pglob->gl_pathv = NULL; + } +} +#if defined _LIBC && !defined globfree +libc_hidden_def (globfree) +#endif + + +/* Do a collated comparison of A and B. */ +static int +collated_compare (const void *a, const void *b) +{ + const char *const s1 = *(const char *const * const) a; + const char *const s2 = *(const char *const * const) b; + + if (s1 == s2) + return 0; + if (s1 == NULL) + return 1; + if (s2 == NULL) + return -1; + return strcoll (s1, s2); +} + + +/* Prepend DIRNAME to each of N members of ARRAY, replacing ARRAY's + elements in place. Return nonzero if out of memory, zero if successful. + A slash is inserted between DIRNAME and each elt of ARRAY, + unless DIRNAME is just "/". Each old element of ARRAY is freed. */ +static int +prefix_array (const char *dirname, char **array, size_t n) +{ + register size_t i; + size_t dirlen = strlen (dirname); +#if defined __MSDOS__ || defined WINDOWS32 + int sep_char = '/'; +# define DIRSEP_CHAR sep_char +#else +# define DIRSEP_CHAR '/' +#endif + + if (dirlen == 1 && dirname[0] == '/') + /* DIRNAME is just "/", so normal prepending would get us "//foo". + We want "/foo" instead, so don't prepend any chars from DIRNAME. */ + dirlen = 0; +#if defined __MSDOS__ || defined WINDOWS32 + else if (dirlen > 1) + { + if (dirname[dirlen - 1] == '/' && dirname[dirlen - 2] == ':') + /* DIRNAME is "d:/". Don't prepend the slash from DIRNAME. */ + --dirlen; + else if (dirname[dirlen - 1] == ':') + { + /* DIRNAME is "d:". Use `:' instead of `/'. */ + --dirlen; + sep_char = ':'; + } + } +#endif + + for (i = 0; i < n; ++i) + { + size_t eltlen = strlen (array[i]) + 1; + char *new = (char *) malloc (dirlen + 1 + eltlen); + if (new == NULL) + { + while (i > 0) + free (array[--i]); + return 1; + } + + { + char *endp = mempcpy (new, dirname, dirlen); + *endp++ = DIRSEP_CHAR; + mempcpy (endp, array[i], eltlen); + } + free (array[i]); + array[i] = new; + } + + return 0; +} + + +/* We must not compile this function twice. */ +#if !defined _LIBC || !defined NO_GLOB_PATTERN_P +int +__glob_pattern_type (pattern, quote) + const char *pattern; + int quote; +{ + register const char *p; + int ret = 0; + + for (p = pattern; *p != '\0'; ++p) + switch (*p) + { + case '?': + case '*': + return 1; + + case '\\': + if (quote) + { + if (p[1] != '\0') + ++p; + ret |= 2; + } + break; + + case '[': + ret |= 4; + break; + + case ']': + if (ret & 4) + return 1; + break; + } + + return ret; +} + +/* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ +int +__glob_pattern_p (pattern, quote) + const char *pattern; + int quote; +{ + return __glob_pattern_type (pattern, quote) == 1; +} +# ifdef _LIBC +weak_alias (__glob_pattern_p, glob_pattern_p) +# endif +#endif + +#endif /* !GLOB_ONLY_P */ + + +/* We put this in a separate function mainly to allow the memory + allocated with alloca to be recycled. */ +#if !defined _LIBC || !defined GLOB_ONLY_P +static int +__attribute_noinline__ +link_exists2_p (const char *dir, size_t dirlen, const char *fname, + glob_t *pglob +# ifndef _LIBC + , int flags +# endif + ) +{ + size_t fnamelen = strlen (fname); + char *fullname = (char *) __alloca (dirlen + 1 + fnamelen + 1); + struct stat st; +# ifndef _LIBC + struct_stat64 st64; +# endif + + mempcpy (mempcpy (mempcpy (fullname, dir, dirlen), "/", 1), + fname, fnamelen + 1); + +# ifdef _LIBC + return (*pglob->gl_stat) (fullname, &st) == 0; +# else + return ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? (*pglob->gl_stat) (fullname, &st) + : __stat64 (fullname, &st64)) == 0); +# endif +} +# ifdef _LIBC +# define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \ + (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) \ + ? link_exists2_p (dirname, dirnamelen, fname, pglob) \ + : ({ struct stat64 st64; \ + __fxstatat64 (_STAT_VER, dfd, fname, &st64, 0) == 0; })) +# else +# define link_exists_p(dfd, dirname, dirnamelen, fname, pglob, flags) \ + link_exists2_p (dirname, dirnamelen, fname, pglob, flags) +# endif +#endif + + +/* Like `glob', but PATTERN is a final pathname component, + and matches are searched for in DIRECTORY. + The GLOB_NOSORT bit in FLAGS is ignored. No sorting is ever done. + The GLOB_APPEND flag is assumed to be set (always appends). */ +static int +glob_in_dir (const char *pattern, const char *directory, int flags, + int (*errfunc) (const char *, int), + glob_t *pglob, size_t alloca_used) +{ + size_t dirlen = strlen (directory); + void *stream = NULL; + struct globnames + { + struct globnames *next; + size_t count; + char *name[64]; + }; +#define INITIAL_COUNT sizeof (init_names.name) / sizeof (init_names.name[0]) + struct globnames init_names; + struct globnames *names = &init_names; + struct globnames *names_alloca = &init_names; + size_t nfound = 0; + size_t cur = 0; + int meta; + int save; + + alloca_used += sizeof (init_names); + + init_names.next = NULL; + init_names.count = INITIAL_COUNT; + + meta = __glob_pattern_type (pattern, !(flags & GLOB_NOESCAPE)); + if (meta == 0 && (flags & (GLOB_NOCHECK|GLOB_NOMAGIC))) + { + /* We need not do any tests. The PATTERN contains no meta + characters and we must not return an error therefore the + result will always contain exactly one name. */ + flags |= GLOB_NOCHECK; + } + else if (meta == 0) + { + /* Since we use the normal file functions we can also use stat() + to verify the file is there. */ + union + { + struct stat st; + struct_stat64 st64; + } ust; + size_t patlen = strlen (pattern); + int alloca_fullname = __libc_use_alloca (alloca_used + + dirlen + 1 + patlen + 1); + char *fullname; + if (alloca_fullname) + fullname = alloca_account (dirlen + 1 + patlen + 1, alloca_used); + else + { + fullname = malloc (dirlen + 1 + patlen + 1); + if (fullname == NULL) + return GLOB_NOSPACE; + } + + mempcpy (mempcpy (mempcpy (fullname, directory, dirlen), + "/", 1), + pattern, patlen + 1); + if ((__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? (*pglob->gl_stat) (fullname, &ust.st) + : __stat64 (fullname, &ust.st64)) == 0) + /* We found this file to be existing. Now tell the rest + of the function to copy this name into the result. */ + flags |= GLOB_NOCHECK; + + if (__builtin_expect (!alloca_fullname, 0)) + free (fullname); + } + else + { + stream = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? (*pglob->gl_opendir) (directory) + : opendir (directory)); + if (stream == NULL) + { + if (errno != ENOTDIR + && ((errfunc != NULL && (*errfunc) (directory, errno)) + || (flags & GLOB_ERR))) + return GLOB_ABORTED; + } + else + { +#ifdef _LIBC + int dfd = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? -1 : dirfd ((DIR *) stream)); +#endif + int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) + | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0) +#if defined _AMIGA || defined VMS + | FNM_CASEFOLD +#endif + ); + flags |= GLOB_MAGCHAR; + + while (1) + { + const char *name; + size_t len; +#if defined _LIBC && !defined COMPILE_GLOB64 + struct dirent64 *d; + union + { + struct dirent64 d64; + char room [offsetof (struct dirent64, d_name[0]) + + NAME_MAX + 1]; + } + d64buf; + + if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) + { + struct dirent *d32 = (*pglob->gl_readdir) (stream); + if (d32 != NULL) + { + CONVERT_DIRENT_DIRENT64 (&d64buf.d64, d32); + d = &d64buf.d64; + } + else + d = NULL; + } + else + d = __readdir64 (stream); +#else + struct dirent *d = (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0) + ? ((struct dirent *) + (*pglob->gl_readdir) (stream)) + : __readdir (stream)); +#endif + if (d == NULL) + break; + if (! REAL_DIR_ENTRY (d)) + continue; + + /* If we shall match only directories use the information + provided by the dirent call if possible. */ + if ((flags & GLOB_ONLYDIR) && !DIRENT_MIGHT_BE_DIR (d)) + continue; + + name = d->d_name; + + if (fnmatch (pattern, name, fnm_flags) == 0) + { + /* If the file we found is a symlink we have to + make sure the target file exists. */ + if (!DIRENT_MIGHT_BE_SYMLINK (d) + || link_exists_p (dfd, directory, dirlen, name, pglob, + flags)) + { + if (cur == names->count) + { + struct globnames *newnames; + size_t count = names->count * 2; + size_t size = (sizeof (struct globnames) + + ((count - INITIAL_COUNT) + * sizeof (char *))); + if (__libc_use_alloca (alloca_used + size)) + newnames = names_alloca + = alloca_account (size, alloca_used); + else if ((newnames = malloc (size)) + == NULL) + goto memory_error; + newnames->count = count; + newnames->next = names; + names = newnames; + cur = 0; + } + len = NAMLEN (d); + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) + goto memory_error; + *((char *) mempcpy (names->name[cur++], name, len)) + = '\0'; + ++nfound; + } + } + } + } + } + + if (nfound == 0 && (flags & GLOB_NOCHECK)) + { + size_t len = strlen (pattern); + nfound = 1; + names->name[cur] = (char *) malloc (len + 1); + if (names->name[cur] == NULL) + goto memory_error; + *((char *) mempcpy (names->name[cur++], pattern, len)) = '\0'; + } + + int result = GLOB_NOMATCH; + if (nfound != 0) + { + result = 0; + + if (pglob->gl_pathc > UINTPTR_MAX - pglob->gl_offs + || pglob->gl_pathc + pglob->gl_offs > UINTPTR_MAX - nfound + || pglob->gl_pathc + pglob->gl_offs + nfound > UINTPTR_MAX - 1 + || (pglob->gl_pathc + pglob->gl_offs + nfound + 1 + > UINTPTR_MAX / sizeof (char *))) + goto memory_error; + + char **new_gl_pathv; + new_gl_pathv + = (char **) realloc (pglob->gl_pathv, + (pglob->gl_pathc + pglob->gl_offs + nfound + 1) + * sizeof (char *)); + if (new_gl_pathv == NULL) + { + memory_error: + while (1) + { + size_t i; + struct globnames *old = names; + for (i = 0; i < cur; ++i) + free (names->name[i]); + names = names->next; + /* NB: we will not leak memory here if we exit without + freeing the current block assigned to OLD. At least + the very first block is always allocated on the stack + and this is the block assigned to OLD here. */ + if (names == NULL) + { + assert (old == &init_names); + break; + } + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); + } + result = GLOB_NOSPACE; + } + else + { + while (1) + { + size_t i; + struct globnames *old = names; + for (i = 0; i < cur; ++i) + new_gl_pathv[pglob->gl_offs + pglob->gl_pathc++] + = names->name[i]; + names = names->next; + /* NB: we will not leak memory here if we exit without + freeing the current block assigned to OLD. At least + the very first block is always allocated on the stack + and this is the block assigned to OLD here. */ + if (names == NULL) + { + assert (old == &init_names); + break; + } + cur = names->count; + if (old == names_alloca) + names_alloca = names; + else + free (old); + } + + pglob->gl_pathv = new_gl_pathv; + + pglob->gl_pathv[pglob->gl_offs + pglob->gl_pathc] = NULL; + + pglob->gl_flags = flags; + } + } + + if (stream != NULL) + { + save = errno; + if (__builtin_expect (flags & GLOB_ALTDIRFUNC, 0)) + (*pglob->gl_closedir) (stream); + else + closedir (stream); + __set_errno (save); + } + + return result; +} diff --git a/src/client/usrint/glob.h b/src/client/usrint/glob.h new file mode 100644 index 0000000..8671b38 --- /dev/null +++ b/src/client/usrint/glob.h @@ -0,0 +1,182 @@ +/* Copyright (C) 1991,1992,1995-1998,2000,2001,2004,2010,2011,2012 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, see + . */ + +#ifndef _GLOB_H +#define _GLOB_H 1 + +#include + +__BEGIN_DECLS + +/* We need `size_t' for the following definitions. */ +#ifndef __size_t +typedef __SIZE_TYPE__ __size_t; +# if defined __USE_XOPEN || __USE_XOPEN2K8 +typedef __SIZE_TYPE__ size_t; +# endif +#else +/* The GNU CC stddef.h version defines __size_t as empty. We need a real + definition. */ +# undef __size_t +# define __size_t size_t +#endif + +/* Bits set in the FLAGS argument to `glob'. */ +#define GLOB_ERR (1 << 0)/* Return on read errors. */ +#define GLOB_MARK (1 << 1)/* Append a slash to each name. */ +#define GLOB_NOSORT (1 << 2)/* Don't sort the names. */ +#define GLOB_DOOFFS (1 << 3)/* Insert PGLOB->gl_offs NULLs. */ +#define GLOB_NOCHECK (1 << 4)/* If nothing matches, return the pattern. */ +#define GLOB_APPEND (1 << 5)/* Append to results of a previous call. */ +#define GLOB_NOESCAPE (1 << 6)/* Backslashes don't quote metacharacters. */ +#define GLOB_PERIOD (1 << 7)/* Leading `.' can be matched by metachars. */ + +#if !defined __USE_POSIX2 || defined __USE_BSD || defined __USE_GNU +# define GLOB_MAGCHAR (1 << 8)/* Set in gl_flags if any metachars seen. */ +# define GLOB_ALTDIRFUNC (1 << 9)/* Use gl_opendir et al functions. */ +# define GLOB_BRACE (1 << 10)/* Expand "{a,b}" to "a" "b". */ +# define GLOB_NOMAGIC (1 << 11)/* If no magic chars, return the pattern. */ +# define GLOB_TILDE (1 << 12)/* Expand ~user and ~ to home directories. */ +# define GLOB_ONLYDIR (1 << 13)/* Match only directories. */ +# define GLOB_TILDE_CHECK (1 << 14)/* Like GLOB_TILDE but return an error + if the user name is not available. */ +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ + GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ + GLOB_PERIOD|GLOB_ALTDIRFUNC|GLOB_BRACE| \ + GLOB_NOMAGIC|GLOB_TILDE|GLOB_ONLYDIR|GLOB_TILDE_CHECK) +#else +# define __GLOB_FLAGS (GLOB_ERR|GLOB_MARK|GLOB_NOSORT|GLOB_DOOFFS| \ + GLOB_NOESCAPE|GLOB_NOCHECK|GLOB_APPEND| \ + GLOB_PERIOD) +#endif + +/* Error returns from `glob'. */ +#define GLOB_NOSPACE 1 /* Ran out of memory. */ +#define GLOB_ABORTED 2 /* Read error. */ +#define GLOB_NOMATCH 3 /* No matches found. */ +#define GLOB_NOSYS 4 /* Not implemented. */ +#ifdef __USE_GNU +/* Previous versions of this file defined GLOB_ABEND instead of + GLOB_ABORTED. Provide a compatibility definition here. */ +# define GLOB_ABEND GLOB_ABORTED +#endif + +/* Structure describing a globbing run. */ +#ifdef __USE_GNU +struct stat; +#endif +typedef struct + { + __size_t gl_pathc; /* Count of paths matched by the pattern. */ + char **gl_pathv; /* List of matched pathnames. */ + __size_t gl_offs; /* Slots to reserve in `gl_pathv'. */ + int gl_flags; /* Set to FLAGS, maybe | GLOB_MAGCHAR. */ + + /* If the GLOB_ALTDIRFUNC flag is set, the following functions + are used instead of the normal file access functions. */ + void (*gl_closedir) (void *); +#ifdef __USE_GNU + struct dirent *(*gl_readdir) (void *); +#else + void *(*gl_readdir) (void *); +#endif + void *(*gl_opendir) (const char *); +#ifdef __USE_GNU + int (*gl_lstat) (const char *__restrict, struct stat *__restrict); + int (*gl_stat) (const char *__restrict, struct stat *__restrict); +#else + int (*gl_lstat) (const char *__restrict, void *__restrict); + int (*gl_stat) (const char *__restrict, void *__restrict); +#endif + } glob_t; + +#ifdef __USE_LARGEFILE64 +# ifdef __USE_GNU +struct stat64; +# endif +typedef struct + { + __size_t gl_pathc; + char **gl_pathv; + __size_t gl_offs; + int gl_flags; + + /* If the GLOB_ALTDIRFUNC flag is set, the following functions + are used instead of the normal file access functions. */ + void (*gl_closedir) (void *); +# ifdef __USE_GNU + struct dirent64 *(*gl_readdir) (void *); +# else + void *(*gl_readdir) (void *); +# endif + void *(*gl_opendir) (const char *); +# ifdef __USE_GNU + int (*gl_lstat) (const char *__restrict, struct stat64 *__restrict); + int (*gl_stat) (const char *__restrict, struct stat64 *__restrict); +# else + int (*gl_lstat) (const char *__restrict, void *__restrict); + int (*gl_stat) (const char *__restrict, void *__restrict); +# endif + } glob64_t; +#endif + +/* Do glob searching for PATTERN, placing results in PGLOB. + The bits defined above may be set in FLAGS. + If a directory cannot be opened or read and ERRFUNC is not nil, + it is called with the pathname that caused the error, and the + `errno' value from the failing call; if it returns non-zero + `glob' returns GLOB_ABEND; if it returns zero, the error is ignored. + If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned. + Otherwise, `glob' returns zero. */ +#if !defined __USE_FILE_OFFSET64 +extern int glob (const char *__restrict __pattern, int __flags, + int (*__errfunc) (const char *, int), + glob_t *__restrict __pglob) __THROW; + +/* Free storage allocated in PGLOB by a previous `glob' call. */ +extern void globfree (glob_t *__pglob) __THROW; +#else +extern int __REDIRECT_NTH (glob, (const char *__restrict __pattern, + int __flags, + int (*__errfunc) (const char *, int), + glob_t *__restrict __pglob), glob64); + +extern void __REDIRECT_NTH (globfree, (glob_t *__pglob), globfree64); +#endif + +#ifdef __USE_LARGEFILE64 +extern int glob64 (const char *__restrict __pattern, int __flags, + int (*__errfunc) (const char *, int), + glob64_t *__restrict __pglob) __THROW; + +extern void globfree64 (glob64_t *__pglob) __THROW; +#endif + + +#ifdef __USE_GNU +/* Return nonzero if PATTERN contains any metacharacters. + Metacharacters can be quoted with backslashes if QUOTE is nonzero. + + This function is not part of the interface specified by POSIX.2 + but several programs want to use it. */ +extern int glob_pattern_p (const char *__pattern, int __quote) __THROW; +#endif + +__END_DECLS + +#endif /* glob.h */ diff --git a/src/client/usrint/iocommon.c b/src/client/usrint/iocommon.c index 4060b06..2521b52 100644 --- a/src/client/usrint/iocommon.c +++ b/src/client/usrint/iocommon.c @@ -14,8 +14,10 @@ #include "posix-ops.h" #include "openfile-util.h" #include "iocommon.h" +#include "pvfs-path.h" #if PVFS_UCACHE_ENABLE #include "ucache.h" +#include "string.h" #endif #include #include @@ -52,7 +54,7 @@ int iocommon_fsync(pvfs_descriptor *pd) int orig_errno = errno; PVFS_credentials *credentials; - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); if (!pd || pd->is_in_use != PVFS_FS) { errno = EBADF; @@ -82,42 +84,106 @@ errorout: * assumes an absoluate path */ int iocommon_lookup_absolute(const char *abs_path, + int follow_links, PVFS_object_ref *ref, char *error_path, int error_path_size) { int rc = 0; int orig_errno = errno; - char pvfs_path[PVFS_PATH_MAX]; - PVFS_fs_id lookup_fs_id; + int local_path_alloc = 0; PVFS_credentials *credentials; PVFS_sysresp_lookup resp_lookup; + PVFS_path_t *Ppath; + + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_lookup_absolute: called with %s\n", abs_path); /* Initialize any variables */ memset(&resp_lookup, 0, sizeof(resp_lookup)); - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); + Ppath = PVFS_path_from_expanded((char *)abs_path); + if (!VALID_PATH_MAGIC(Ppath)) + { + /* this allocates a PVFS_path which must be + * freed below since we do not pass it back */ + Ppath = PVFS_new_path(abs_path); + abs_path = Ppath->expanded_path; + local_path_alloc = 1; + } + + if (!(PATH_QUALIFIED(Ppath) || PATH_EXPANDED(Ppath))) + { + /* saves original path and returns qualified path */ + /* this does not allocate a PVFS_path because the */ + /* input already is one */ + abs_path = PVFS_qualify_path(abs_path); + } + /* Determine the fs_id and pvfs_path */ errno = 0; - rc = PVFS_util_resolve(abs_path, &lookup_fs_id, pvfs_path, PVFS_PATH_MAX); - if (rc < 0) + /** + * All paths here should be fully resolved and processed + * to remove extra slashes, dots, and double dots. + * We could still have symbolic links that change things. + */ + if (!PATH_RESOLVED(Ppath)) { - if (rc == -PVFS_ENOENT) + rc = PVFS_util_resolve_absolute(abs_path); + if (rc < 0) { - errno = ESTALE; /* this signals open that resolve failed */ - rc = -1; - goto errorout; + if (rc == -PVFS_ENOENT) + { + errno = ESTALE; /* this signals open that resolve failed */ + rc = -1; + goto errorout; + } + if (!PATH_EXPANDED(Ppath)) + { + char *ret; + /* try fully expanding the path looking up each segment */ + /* this also should not allocate a PVFS_path */ + ret = PVFS_expand_path(abs_path, !follow_links); + if (ret && PATH_LOOKEDUP(Ppath)) + { + /* the expanding process looks up the final path */ + /* as a side effect so there is nothing left to do */ + ref->fs_id = Ppath->fs_id; + ref->handle = Ppath->handle; + } + else + { + /* there was an error */ + /* either it failed and we're done */ + /* or we tried to look up a file we wish to create */ + /* either way this routine is done it will fall back */ + rc = -1; + } + } + IOCOMMON_CHECK_ERR(rc); } - IOCOMMON_CHECK_ERR(rc); + } + + /* at this point we should have a resolved path */ + + if (PATH_MNTPOINT(Ppath)) + { + /* looking up the mountpoint, the PVFS root dir */ + /* which is known and stored in configuration */ + ref->fs_id = Ppath->fs_id; + rc = PINT_cached_config_get_root_handle(Ppath->fs_id, + &ref->handle); + /* return rc; */ + goto cleanup; } /* set up buffer to return partially looked up path */ /* in failure. This is most likely a non-PVFS path */ - /* Set up error path - TODO: orange-security + /* Set up error path */ if (error_path) { memset(error_path, 0, error_path_size); @@ -129,16 +195,26 @@ int iocommon_lookup_absolute(const char *abs_path, resp_lookup.error_path = NULL; resp_lookup.error_path_size = 0; } - */ + + /* let's try to do the lookup */ errno = 0; - rc = PVFS_sys_lookup(lookup_fs_id, pvfs_path, - credentials, &resp_lookup, - PVFS2_LOOKUP_LINK_FOLLOW, NULL); + rc = PVFS_sys_lookup(Ppath->fs_id, + Ppath->pvfs_path, + credentials, + &resp_lookup, + follow_links, + NULL); IOCOMMON_CHECK_ERR(rc); *ref = resp_lookup.ref; errorout: + /* no specific error handling */ +cleanup: + if (local_path_alloc) + { + PVFS_free_expanded((char *)abs_path); + } return rc; } @@ -151,6 +227,10 @@ errorout: * include file you look at). PVFS cannot deal with more * than 255 chars at a time so we must break long paths * into pieces and do multiple relative lookups + * + * rel_path is relative to PVFS object ref so this shoule + * all be in PVFS unless a symlink takes us back out of it. + * Therefore don't need to do anything to the path. */ int iocommon_lookup_relative(const char *rel_path, PVFS_object_ref parent_ref, /* by value */ @@ -167,15 +247,21 @@ int iocommon_lookup_relative(const char *rel_path, PVFS_credentials *credentials; PVFS_sysresp_lookup resp_lookup; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_lookup_relative: called with %s\n", rel_path); + /* Initialize any variables */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); memset(&resp_lookup, 0, sizeof(resp_lookup)); /* Set credentials */ iocommon_cred(&credentials); - /* Set up error path - TODO: orange-security + /* if the PVFS lookup hits a symlink out of PVFS space + * the remaining path will be returned in error_path + * and it will be handled upstream. + */ + if (error_path) { memset(error_path, 0, error_path_size); @@ -187,7 +273,11 @@ int iocommon_lookup_relative(const char *rel_path, resp_lookup.error_path = NULL; resp_lookup.error_path_size = 0; } - */ + + /* a path can be up toPVFS_PATH_MAX long, but a single lookup + * will only accept up to PVFS_NAME_MAX so this loop takes + * chunks of the path and if needed uses multiple lookups + */ current_seg_ref = parent_ref; cur = (char *)rel_path; @@ -302,8 +392,10 @@ static int iocommon_parse_serverlist(char *serverlist, errno = ENOMEM; return -1; } - PINT_cached_config_get_server_array(fsid, PINT_SERVER_TYPE_IO, - server_array, &count); + PINT_cached_config_get_server_array(fsid, + PINT_SERVER_TYPE_IO, + server_array, + &count); for (i = 0; i < slist->count; i++) { tok = strtok_r(NULL, ":", &save_ptr); @@ -324,6 +416,8 @@ static int iocommon_parse_serverlist(char *serverlist, /** * Create a file via the PVFS system interface + * parent_ref is a PVFS object so we should be all + * in PVFS space. */ int iocommon_create_file(const char *filename, mode_t mode, @@ -342,8 +436,11 @@ int iocommon_create_file(const char *filename, PVFS_sys_layout *layout = NULL; PVFS_hint hints = NULL; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_create_file: called with %s\n", filename); + /* Initialize */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); memset(&attr, 0, sizeof(attr)); memset(&resp_create, 0, sizeof(resp_create)); @@ -412,14 +509,6 @@ int iocommon_create_file(const char *filename, return rc; } } - /* check for nocache flag */ - value = PINT_hint_get_value_by_type(file_creation_param, - PINT_HINT_NOCACHE, - &length); - if (value) - { - /* this should probably move into the open routine */ - } /* look for hints handled on the server */ if (PVFS_hint_check_transfer(&file_creation_param)) { @@ -498,10 +587,268 @@ errorout: return rc; } +/** + * OK we tried to open a file and may have run into a symbolic link that + * points to NON-PVFS space or something equally weird so we will call + * PVFS_expand_path which will look up each segment of the path one at a + * time using either glibc or PVFS as needed. This is the long slow way + * but the only way to guarantee it is right. Most opens should never + * get to this. + */ +int iocommon_expand_path (PVFS_path_t *Ppath, + int follow_flag, + int flags, + mode_t mode, + pvfs_descriptor **pdp) +{ + int rc = 0; + char *path = NULL; + pvfs_descriptor *pd = NULL; + + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_expand_path: called with %s\n", Ppath->expanded_path); + + path = PVFS_expand_path(Ppath->expanded_path, !follow_flag); + if (PATH_LOOKEDUP(Ppath) && PATH_RESOLVED(Ppath)) + { + /* we found a valid PVFS path + * so we're done - expand path does not set up a descriptor here + */ + *pdp = NULL; + goto errorout; /* not really an error, but bailing out */ + } + if (!PATH_ERROR(Ppath)) + { + /* glibc file */ + struct stat sbuf; + /* try to open using glibc */ + rc = (*glibc_ops.open)(path, flags & 01777777, mode); + IOCOMMON_RETURN_ERR(rc); + + /* create a usrint file descriptor for it */ + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_expand_path calls pvfs_alloc_descriptor %d\n", rc); + pd = pvfs_alloc_descriptor(&glibc_ops, rc, NULL, 0); + pd->is_in_use = PVFS_FS; /* indicate fd is valid! */ + pd->true_fd = rc; + pd->s->flags = flags; /* open flags */ + + gen_mutex_unlock(&pd->lock); /* must release before fstat */ + fstat(rc, &sbuf); + pd->s->mode = sbuf.st_mode; + if (S_ISDIR(sbuf.st_mode)) + { + /* we assume path was qualified by PVFS_expand_path() */ + pd->s->dpath = pvfs_dpath_insert(path); + } + gen_mutex_unlock(&pd->s->lock); /* this is ok after fstat */ + + *pdp = pd; + goto errorout; /* not really an error, but bailing out */ + } + rc = Ppath->rc; + +errorout: + /* an error */ + return rc; +} + +/** + * This is done in many of the iocommon calls so this is just a helper + * function to keep amount of redundant code down. This routine is used + * with syscalls other than open and expect the path to be PVFS. + * + * pref and fref return object refs to parent and file if the pointer + * is not NULL. Some calls only need one or the other. If filename + * is not NULL the file name string is returned and must be freed by + * the caller. If pdir is not NULL, it is used for a relative lookup + * otherwise path should be absolute. + */ +int iocommon_lookup(char *path, + int followflag, + PVFS_object_ref *pref, /* OUT parent ref */ + PVFS_object_ref *fref, /* OUT file ref */ + char **filename, /* OUT text file name */ + PVFS_object_ref *pdir) /* IN path relative to this */ +{ + int rc = 0; + int internal_follow = PVFS2_LOOKUP_LINK_FOLLOW; + char *parentdir = NULL; /* text of parent path */ + char *file = NULL; /* text of file name */ + char *target = NULL; /* temp could be parent dir or file name */ + PVFS_object_ref *target_ref; /* temp ref could be dir or file name */ + int skip_file_lookup = 0; /* case where p and f are req but no p */ + pvfs_descriptor *pd = NULL; + PVFS_path_t *Ppath = NULL; + int flags = O_RDONLY; + int mode = 0644; + char error_path[PVFS_NAME_MAX]; + + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_lookup: called with %s\n", path); + + memset(error_path, 0, sizeof(error_path)); + + rc = split_pathname(path, &parentdir, &file); + IOCOMMON_RETURN_ERR(rc); + + /* Four cases here: + * 1) caller requests pref and fref + * look up the parentdir in the first section (via target) + * then look up the file in the second section + * 2) caller requests only fref + * look up the file in the first section (via target) + * 3) caller requests only pref + * look up parentdir in the first section (via target) + * 4) caller requests neither pref nor fref + * makes no sense - but can still return filename if requested + */ + + if (!fref && !pref) + { + /* fourth case, exit code copies file name if requested */ + goto errorout; + } + if (fref && !pref) + { + /* second case */ + /* this will use the parent code to do the file lookup */ + /* in one request - unless it fails */ + target = path; + target_ref = fref; + internal_follow = followflag; + } + else + { + /* this is first or third or 4th case */ + /* this is the normal lookup the dir first, file second */ + /* when looking up parent dir, always follow sym links */ + target = parentdir; + target_ref = pref; + } + if (pref || fref) + { + /* this is first, second, or third case */ + /* user asked for parent dir so look up dir first */ + if (!pdir) + { + /* no relative path was provided */ + errno = 0; + rc = iocommon_lookup_absolute(target, + internal_follow, + target_ref, /* OUT */ + error_path, /* OUT */ + sizeof(error_path)); + } + else + { + /* a relative path provided */ + if (!parentdir && pref) + { + /* first or third case but no parentdir in path + * split_pathname only returns a blank parentdir if + * there is only a filename and no slashes. + * The parent dir is pdir. Now look up file. + */ + target = file; + target_ref = fref; + *pref = *pdir; + internal_follow = followflag; + skip_file_lookup = 1; /* block the call to lookup_rel below */ + } + errno = 0; + rc = iocommon_lookup_relative(target, + *pdir, + internal_follow, + target_ref, /* OUT */ + error_path, /* OUT */ + sizeof(error_path)); + } + } + if (rc == 0 && pref && fref && !skip_file_lookup) + { + /* this is first case */ + /* we looked up parent, now look up file */ + errno = 0; + rc = iocommon_lookup_relative(file, + *pref, + followflag, + fref, /* OUT */ + error_path, /* OUT */ + sizeof(error_path)); + } + /* check to see if we need to expand the path */ + if (rc < 0 && errno == EIO && + pvfs_errno == PVFS_ENOTPVFS && + !PATH_EXPANDED(Ppath)) + { + /* last chance to get it open */ +#if 0 + if (pdir) + { + char *tmp_path; + int pathsz = strlen(pdir->s->dpath) + strlen(path); + tmp_path = (char *)malloc(pathsz + 2); + strcpy(tmp_path, pdir->s->dpath); + strcat(tmp_path, "/"); + strcat(tmp_path, path); + Ppath = PVFS_new_path(tmp_path); + } + else +#endif + { + Ppath = PVFS_path_from_expanded(path); + } + if (!VALID_PATH_MAGIC(Ppath)) + { + /* must be a PVFS_path before we call expand */ + rc = -1; + goto errorout; + } + rc = iocommon_expand_path(Ppath, internal_follow, flags, mode, &pd); + if (pd) + { + /* opened a glibc file - just close it */ + pvfs_free_descriptor(pd->fd); + /* need to return some kind of code here */ + return -1; + } + pref->fs_id = Ppath->fs_id; + pref->handle = Ppath->handle; +#if 0 + if (pdir) +#endif + { + PVFS_free_path(Ppath); + } + } + IOCOMMON_RETURN_ERR(rc); +errorout: + if (parentdir) + { + free(parentdir); + } + if (file) + { + if (filename) + { + *filename = file; + } + else + { + free(file); + } + } + return rc; +} /** pvfs_open implementation, return file info in fd - * assumes path is fully qualified * if pdir is not NULL, it is the parent directory + * + * By the time this is called path should be a PVFS_path_t + * and the path should be at least qualified, and resolved. + * We expect expanded calls to go directly to open_absolute. + * */ pvfs_descriptor *iocommon_open(const char *path, int flags, @@ -511,15 +858,22 @@ pvfs_descriptor *iocommon_open(const char *path, { int rc = 0; int orig_errno = errno; - int follow_link; + int follow_links = 0; + int cache_flag = 1; + int length = 0; + void *value = NULL; char *directory = NULL; char *filename = NULL; - char error_path[256]; + char error_path[PVFS_NAME_MAX]; + int defer_bits = 0; /* used when creating a file */ PVFS_object_ref file_ref; PVFS_object_ref parent_ref; pvfs_descriptor *pd = NULL; /* invalid pd until file is opened */ PVFS_sysresp_getattr attributes_resp; PVFS_credentials *credentials; + PVFS_path_t *Ppath; + + gossip_debug(GOSSIP_USRINT_DEBUG, "iocommon_open: called with %s\n", path); /* Initialize */ memset(&file_ref, 0, sizeof(file_ref)); @@ -527,141 +881,338 @@ pvfs_descriptor *iocommon_open(const char *path, memset(&attributes_resp, 0, sizeof(attributes_resp)); memset(error_path, 0, sizeof(error_path)); - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); - /* Split the path into a directory and file */ - rc = split_pathname(path, 0, &directory, &filename); - IOCOMMON_RETURN_ERR(rc); + /* see if this is a PVFS path and if so check it out completely */ + Ppath = PVFS_path_from_expanded(path); + if (VALID_PATH_MAGIC(Ppath)) + { + if (PATH_LOOKEDUP(Ppath)) + { + if (Ppath->filename && (Ppath->filename[0] == '\0')) + { + if (PATH_FOLLOWSYM(Ppath) && (flags & O_NOFOLLOW)) + { + /* oops this is an error */ + rc = -1; + errno = ELOOP; + goto errorout; + } + /* object was looked up completely */ + file_ref.fs_id = Ppath->fs_id; + file_ref.handle = Ppath->handle; + goto found; + } + /* object was partly looked up */ + } + if (PATH_RESOLVED(Ppath)) + { + /* resolution can be skipped ahead */ + } + } + /* else this was called with a plain path */ /* Check the flags to determine if links are followed */ if (flags & O_NOFOLLOW) { - follow_link = PVFS2_LOOKUP_LINK_NO_FOLLOW; + follow_links = PVFS2_LOOKUP_LINK_NO_FOLLOW; } else { - follow_link = PVFS2_LOOKUP_LINK_FOLLOW; + follow_links = PVFS2_LOOKUP_LINK_FOLLOW; } - /* Get reference for the parent directory */ - if (pdir == NULL) + /* now we are ready to try looking things up */ + if (!pdir) { - errno = 0; - rc = iocommon_lookup_absolute(directory, &parent_ref, NULL, 0); - if (rc < 0) + /* if a simple open try the full path first */ + rc = iocommon_lookup_absolute(path, + follow_links, + &file_ref, + error_path, + sizeof(error_path)); + if (rc >= 0) + { + goto found; + } + if (errno == EIO && pvfs_errno == PVFS_ENOTPVFS) { - if (errno == ESTALE) + /* nope, so cat the path to pdir's path and go for a + * full expand that handles links and everything + */ + int need_to_free = 0; + if (!VALID_PATH_MAGIC(Ppath)) + { + Ppath = PVFS_new_path(path); + need_to_free = 1; + } + + rc = iocommon_expand_path(Ppath, follow_links, flags, mode, &pd); + + if (PATH_LOOKEDUP(Ppath)) { - /* special case we are opening the root dir of PVFS */ - errno = 0; - rc = iocommon_lookup_absolute(path, &file_ref, NULL, 0); - /* in this case we don't need to look up anything else */ - /* jump right to found the file code */ - goto foundfile; + if (Ppath->filename && Ppath->filename[0] == '\0') + { + /* found pvfs file */ + file_ref.fs_id = Ppath->fs_id; + file_ref.handle = Ppath->handle; + if (need_to_free) + { + PVFS_free_path(Ppath); + } + goto found; + } + else + { + /* found non-pvfs file */ + if (need_to_free) + { + PVFS_free_path(Ppath); + } + return pd; + } + } + if (need_to_free) + { + PVFS_free_path(Ppath); } - IOCOMMON_RETURN_ERR(rc); } } else { - if (directory) + /* if an openat, try the full path relative to pdir */ + rc = iocommon_lookup_relative(path, + pdir->s->pvfs_ref, + follow_links, + &file_ref, + error_path, + sizeof(error_path)); + if (rc >= 0) { - errno = 0; - rc = iocommon_lookup_relative(directory, - pdir->s->pvfs_ref, - follow_link, - &parent_ref, - NULL, - 0); - IOCOMMON_RETURN_ERR(rc); + goto found; } - else + if (errno == EIO && pvfs_errno == PVFS_ENOTPVFS) { - parent_ref = pdir->s->pvfs_ref; + /* nope, so cat the path to pdir's path and go for a + * full expand that handles link and everything + */ + char *tmp_path; + int dlen = strlen(pdir->s->dpath); + int plen = strlen(path); + int mlen = dlen + plen + 2; + tmp_path = (char *)malloc(mlen); + strncpy(tmp_path, pdir->s->dpath, dlen + 1); + strncat(tmp_path, "/", 1); + strncat(tmp_path, path, plen); + Ppath = PVFS_new_path(tmp_path); + + rc = iocommon_expand_path(Ppath, follow_links, flags, mode, &pd); + + if (PATH_LOOKEDUP(Ppath) && Ppath->filename && + (Ppath->filename[0] == '\0')) + { + file_ref.fs_id = Ppath->fs_id; + file_ref.handle = Ppath->handle; + PVFS_free_path(Ppath); + free(tmp_path); + goto found; + } + /* What if we found a glibc path? */ + PVFS_free_path(Ppath); + free(tmp_path); } } - /* An open procedure safe for multiprocessing */ - - /* Attempt to find file */ - errno = 0; - rc = iocommon_lookup_relative(filename, - parent_ref, - follow_link, - &file_ref, - error_path, - sizeof(error_path)); -foundfile: - if ((rc == 0) && (flags & O_EXCL) && (flags & O_CREAT)) + /* + * if we got here opening the full path failed. see if the O_CREAT + * flag was given and file not found, if so try to open the parent + * dir then create the file + */ + if (errno != ENOENT || !(flags & O_CREAT)) { - /* File was found but EXCLUSIVE so fail */ - rc = -1; - errno = EEXIST; + /* either file not found and no create flag */ + /* or some other error */ goto errorout; } + + /* Split the path into a directory and file */ + rc = split_pathname(path, &directory, &filename); if (rc < 0) { - /* if an error code was returned */ - if (errno == EIO && pvfs_errno == PVFS_ENOTPVFS && - flags & O_NOTPVFS) - { - struct stat sbuf; - /* try to open using glibc */ - rc = (*glibc_ops.open)(error_path, flags & 01777777, mode); - IOCOMMON_RETURN_ERR(rc); - pd = pvfs_alloc_descriptor(&glibc_ops, -1, NULL, 0); - pd->is_in_use = PVFS_FS; /* indicate fd is valid! */ - pd->true_fd = rc; - pd->s->flags = flags; /* open flags */ - fstat(rc, &sbuf); - pd->s->mode = sbuf.st_mode; - gen_mutex_unlock(&pd->s->lock); - gen_mutex_unlock(&pd->lock); - goto errorout; /* not really an error, but bailing out */ - } - if (errno != ENOENT || !(flags & O_CREAT)) - { - /* either file not found and no create flag */ - /* or some other error */ + if (errno != EISDIR) + { goto errorout; } - /* file not found but create flag */ - /* clear errno, it was not an error */ - errno = orig_errno; + /* clear error */ + rc = 0; errno = 0; - rc = iocommon_create_file(filename, - mode, - file_creation_param, - parent_ref, - &file_ref); - if (rc < 0) + } + + if (!pdir) + { + /* if a simple open try the directory path */ + rc = iocommon_lookup_absolute(directory, + follow_links, + &parent_ref, + error_path, + sizeof(error_path)); + if(rc >= 0) + { + goto createfile; + } + if (errno == EIO && pvfs_errno == PVFS_ENOTPVFS) { - /* error on the create */ - if (errno != EEXIST) + /* nope, so cat the path to pdir's path and go for a + * full expand that handles links and everything + */ + Ppath = PVFS_new_path(directory); + + rc = iocommon_expand_path(Ppath, follow_links, flags, mode, &pd); + + if (PATH_LOOKEDUP(Ppath) && Ppath->filename && + (Ppath->filename[0] == '\0')) { - goto errorout; + file_ref.fs_id = Ppath->fs_id; + file_ref.handle = Ppath->handle; + PVFS_free_path(Ppath); + goto createfile; } - /* the file exists so must have been - * created by a different process - * just open it + /* What if we found a glibc path? */ + PVFS_free_path(Ppath); + } + } + else + { + /* if an openat, try the directory path relative to pdir */ + rc = iocommon_lookup_relative(directory, + pdir->s->pvfs_ref, + follow_links, + &parent_ref, + error_path, + sizeof(error_path)); + if(rc >= 0) + { + goto createfile; + } + if (errno == EIO && pvfs_errno == PVFS_ENOTPVFS) + { + /* nope, so cat the path to pdir's path and go for a + * full expand that handles link and everything */ - errno = 0; - rc = iocommon_lookup_relative(filename, - parent_ref, - follow_link, - &file_ref, - NULL, - 0); - IOCOMMON_RETURN_ERR(rc); + char *tmp_path; + int dlen = strlen(pdir->s->dpath); + int plen = strlen(directory); + int mlen = dlen + plen + 2; + tmp_path = (char *)malloc(mlen); + strncpy(tmp_path, pdir->s->dpath, dlen + 1); + strncat(tmp_path, "/", 1); + strncat(tmp_path, directory, plen); + Ppath = PVFS_new_path(tmp_path); + + rc = iocommon_expand_path(Ppath, follow_links, flags, mode, &pd); + + if (PATH_LOOKEDUP(Ppath) && Ppath->filename && + (Ppath->filename[0] == '\0')) + { + parent_ref.fs_id = Ppath->fs_id; + parent_ref.handle = Ppath->handle; + PVFS_free_path(Ppath); + free(tmp_path); + goto createfile; + } + /* What if we found a glibc path? */ + PVFS_free_path(Ppath); + free(tmp_path); } } + /* Still nothing, must be a file not found */ + errno = ENOENT; + goto errorout; + +createfile: + /* Now create the file relative to the directory */ + errno = orig_errno; + errno = 0; + /* see if the mode provides bits allowing the user to access the + * file - it might not in some situations and we want to set those + * bits on until this fd is closed. + */ + if ((((flags & O_RDONLY) || (flags & O_RDWR))) && !(mode & S_IRUSR)) + { + defer_bits |= S_IRUSR; + mode |= S_IRUSR; + } + if (((flags & O_WRONLY) || (flags & O_RDWR)) && !(mode & S_IWUSR)) + { + defer_bits |= S_IWUSR; + mode |= S_IWUSR; + } + rc = iocommon_create_file(filename, + mode, + file_creation_param, + parent_ref, + &file_ref); + if (rc >= 0) + { + goto finish; + } + /* error on the create */ + if (errno != EEXIST) + { + goto errorout; + } + /* + * The file exists so must have been + * created by a different process + * just open it - this should open + * because it returned the EEXIST above + */ + errno = 0; + rc = iocommon_lookup_relative(filename, + parent_ref, + follow_links, + &file_ref, + error_path, + sizeof(error_path)); + if (rc >= 0) + { + goto finish; + } + goto errorout; + +found: + /* We found the file, make sure we were supposed to */ + if ((rc == 0) && (flags & O_EXCL) && (flags & O_CREAT)) + { + /* File was found but EXCLUSIVE so fail */ + rc = -1; + errno = EEXIST; + goto errorout; + } + +finish: + /* We successfully looked up the file so complete the open */ /* If we get here the file was created and/or opened */ /* Translate the pvfs reference into a file descriptor */ /* Set the file information */ /* create fd object */ - pd = pvfs_alloc_descriptor(&pvfs_ops, -1, &file_ref, 0); + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_open calls pvfs_alloc_descriptor %d\n", -1); + + /* check for cache flag */ + /* At the moment the default is to cache */ + cache_flag = 1; + value = PINT_hint_get_value_by_type(file_creation_param, /* hints */ + PINT_HINT_CACHE, + &length); + if (value) + { + cache_flag = *(int *)value; + } + /* now allocate file descriptor */ + pd = pvfs_alloc_descriptor(&pvfs_ops, -1, &file_ref, cache_flag); if (!pd) { rc = -1; @@ -679,6 +1230,7 @@ foundfile: NULL); IOCOMMON_CHECK_ERR(rc); pd->s->mode = attributes_resp.attr.perms; /* this may change */ + pd->s->mode_deferred = defer_bits; /* save these until close */ if (attributes_resp.attr.objtype == PVFS_TYPE_METAFILE) { @@ -687,23 +1239,32 @@ foundfile: if (attributes_resp.attr.objtype == PVFS_TYPE_DIRECTORY) { pd->s->mode |= S_IFDIR; + /* set the path of this newly opened direcotry */ if (pdir) { - pd->s->dpath = (char *)malloc(strlen(pdir->s->dpath) + strlen(path) + 2); - strcpy(pd->s->dpath, pdir->s->dpath); - strcat(pd->s->dpath, "/"); - strcat(pd->s->dpath, path); + /* we opened relative to pdir so need to cat the paths */ + char *tpath; + int dlen = strlen(pdir->s->dpath); + int plen = strlen(path); + int mlen = dlen + plen + 2; + tpath = (char *)malloc(mlen); + strncpy(tpath, pdir->s->dpath, dlen + 1); + strncat(tpath, "/", 1); + strncat(tpath, path, plen); + pd->s->dpath = pvfs_dpath_insert(tpath); + free(tpath); } else { - pd->s->dpath = (char *)malloc(strlen(path) + 1); - strcpy(pd->s->dpath, path); + /* opened absolute so just use the path */ + pd->s->dpath = pvfs_dpath_insert(path); } } if (attributes_resp.attr.objtype == PVFS_TYPE_SYMLINK) { pd->s->mode |= S_IFLNK; } + /* ops below will lock if needed */ gen_mutex_unlock(&pd->s->lock); gen_mutex_unlock(&pd->lock); @@ -719,10 +1280,22 @@ foundfile: if (flags & O_APPEND) { rc = iocommon_lseek(pd, 0, 0, SEEK_END); + IOCOMMON_CHECK_ERR(rc); } + goto cleanup; + errorout: + /* if file was opened close it freeing up descriptor resources */ + if (pd) + { + pvfs_free_descriptor(pd->fd); + pd = NULL; + } + +cleanup: + /* Free directory and filename memory */ if (directory) { @@ -746,16 +1319,16 @@ errorout: * Implementation of truncate via PVFS * */ -int iocommon_truncate(PVFS_object_ref file_ref, off64_t length) +int iocommon_truncate(pvfs_descriptor *pd, off64_t length) { int rc = 0; int orig_errno = errno; PVFS_credentials *credentials; - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); errno = 0; - rc = PVFS_sys_truncate(file_ref, length, credentials, NULL); + rc = PVFS_sys_truncate(pd->s->pvfs_ref, length, credentials, NULL); IOCOMMON_CHECK_ERR(rc); errorout: @@ -805,7 +1378,8 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, &attributes_resp, NULL); IOCOMMON_CHECK_ERR(rc); - pd->s->file_pointer = attributes_resp.attr.size + (offset * unit_size); + pd->s->file_pointer = attributes_resp.attr.size + + (offset * unit_size); break; } default: @@ -813,34 +1387,65 @@ off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, errno = EINVAL; goto errorout; } + } - /* Sum the individal segment sizes */} + /* Sum the individal segment sizes */ /* if this is a directory adjust token, the hard way */ if (S_ISDIR(pd->s->mode)) { - int dirent_no; + int dirent_no = 0; + int dirent_total_count = 0; + int dirent_read_count = 0; PVFS_credentials *credentials; PVFS_sysresp_readdir readdir_resp; - memset(&readdir_resp, 0, sizeof(readdir_resp)); - iocommon_cred(&credentials); + if ((offset == 0 || unit_size == 0) && whence == SEEK_CUR) + { + /* just asking for file position don't change position */ + goto local_exit; + } + + if ((offset == 0 || unit_size == 0) && whence == SEEK_SET) + { + /* just asking for file position don't change position */ + pd->s->token = PVFS_READDIR_START; + goto local_exit; + } + dirent_no = pd->s->file_pointer / sizeof(PVFS_dirent); pd->s->file_pointer = dirent_no * sizeof(PVFS_dirent); pd->s->token = PVFS_READDIR_START; - if(dirent_no) + if (dirent_no) { + dirent_read_count = dirent_no; + if (dirent_read_count > PVFS_REQ_LIMIT_DIRENT_COUNT) + { + dirent_read_count = PVFS_REQ_LIMIT_DIRENT_COUNT; + } errno = 0; - rc = PVFS_sys_readdir(pd->s->pvfs_ref, - pd->s->token, - dirent_no, - credentials, - &readdir_resp, - NULL); - IOCOMMON_CHECK_ERR(rc); - pd->s->token = readdir_resp.token; - free(readdir_resp.dirent_array); + while (dirent_total_count < dirent_no) + { + if (dirent_read_count > dirent_no - dirent_total_count) + { + dirent_read_count = dirent_no - dirent_total_count; + } + memset(&readdir_resp, 0, sizeof(readdir_resp)); + iocommon_cred(&credentials); + rc = PVFS_sys_readdir(pd->s->pvfs_ref, + pd->s->token, + dirent_read_count, + credentials, + &readdir_resp, + NULL); + IOCOMMON_CHECK_ERR(rc); + dirent_total_count += readdir_resp.pvfs_dirent_outcount; + pd->s->token = readdir_resp.token; + free(readdir_resp.dirent_array); + } } } + +local_exit: gen_mutex_unlock(&pd->s->lock); return pd->s->file_pointer; @@ -859,51 +1464,33 @@ int iocommon_remove (const char *path, { int rc = 0; int orig_errno = errno; - char *parentdir = NULL; char *file = NULL; PVFS_object_ref parent_ref, file_ref; PVFS_credentials *credentials; PVFS_sys_attr attr; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_remove: called with %s\n", path); + /* Initialize */ memset(&parent_ref, 0, sizeof(parent_ref)); memset(&file_ref, 0, sizeof(file_ref)); memset(&attr, 0, sizeof(attr)); /* Initialize the system interface for this process */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); - rc = split_pathname(path, dirflag, &parentdir, &file); + /* open path needs to be nofollow */ + rc = iocommon_lookup((char *)path, + PVFS2_LOOKUP_LINK_NO_FOLLOW, + &parent_ref, + &file_ref, + &file, + pdir); IOCOMMON_RETURN_ERR(rc); - if (!pdir) - { - errno = 0; - rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - if (parentdir) - { - errno = 0; - rc = iocommon_lookup_relative(parentdir, *pdir, - PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - parent_ref = *pdir; - } - } - /* need to verify this is a file or symlink */ - errno = 0; - rc = iocommon_lookup_relative(file, parent_ref, - PVFS2_LOOKUP_LINK_NO_FOLLOW, &file_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - errno = 0; rc = iocommon_getattr(file_ref, &attr, PVFS_ATTR_SYS_TYPE); IOCOMMON_RETURN_ERR(rc); @@ -926,10 +1513,6 @@ int iocommon_remove (const char *path, IOCOMMON_CHECK_ERR(rc); errorout: - if (parentdir) - { - free(parentdir); - } if (file) { free(file); @@ -968,7 +1551,7 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, { int rc = 0; int orig_errno = errno; - char *olddir = NULL, *newdir = NULL, *oldname = NULL, *newname = NULL; + char *oldname = NULL, *newname = NULL; PVFS_object_ref oldref, newref; PVFS_credentials *creds; PVFS_hint hints = PVFS_HINT_NULL; @@ -978,68 +1561,41 @@ int iocommon_rename(PVFS_object_ref *oldpdir, const char *oldpath, memset(&newref, 0, sizeof(newref)); iocommon_cred(&creds); - rc = split_pathname(oldpath, 0, &olddir, &oldname); + /* open oldpath */ + rc = iocommon_lookup((char *)oldpath, + PVFS2_LOOKUP_LINK_FOLLOW, + &oldref, /* parent */ + NULL, + &oldname, /* filename */ + oldpdir); IOCOMMON_RETURN_ERR(rc); - if (!oldpdir) - { - errno = 0; - rc = iocommon_lookup_absolute(olddir, &oldref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - if (olddir) - { - errno = 0; - rc = iocommon_lookup_relative(olddir, *oldpdir, - PVFS2_LOOKUP_LINK_FOLLOW, &oldref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - oldref = *oldpdir; - } - } - rc = split_pathname(newpath, 0, &newdir, &newname); + /* open newpath */ + rc = iocommon_lookup((char *)newpath, + PVFS2_LOOKUP_LINK_FOLLOW, + &newref, /* parent */ + NULL, + &newname, /* filename */ + newpdir); IOCOMMON_RETURN_ERR(rc); - if (!newpdir) - { - errno = 0; - rc = iocommon_lookup_absolute(newdir, &newref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else + + /* check for the trivial case */ + if (newref.fs_id == oldref.fs_id && + newref.handle == oldref.handle && + !strcmp(oldname, newname)) { - if (newdir) - { - errno = 0; - rc = iocommon_lookup_relative(newdir, *newpdir, - PVFS2_LOOKUP_LINK_FOLLOW, &newref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - newref = *newpdir; - } + return 0; } + errno = 0; rc = PVFS_sys_rename(oldname, oldref, newname, newref, creds, hints); IOCOMMON_CHECK_ERR(rc); errorout: - if (olddir) - { - free(olddir); - } if (oldname) { free(oldname); } - if (newdir) - { - free(newdir); - } if (newname) { free(newname); @@ -1048,14 +1604,14 @@ errorout: } #if PVFS_UCACHE_ENABLE -/* Returns how many copy operations to/from the ucache will need to be +/* Returns how many copy operations to/from the ucache will need to be * completed. */ static int calc_copy_op_cnt( off64_t offset, /* offset into file where transfer should begin */ size_t req_size, /* total Request Size */ int req_blk_cnt, /* requested Block Count */ - size_t iovec_count, /* number of iovecs in vector */ + size_t iovec_count, /* number of iovecs in vector */ const struct iovec *vector /* pointer to array of iovecs */ ) { @@ -1069,8 +1625,8 @@ static int calc_copy_op_cnt( int i; /* For every block identify source and destination locations in memory and - * size of transfer between the ucache and memory buffer while maintaining: - * the size left in the request, the size left in the current iovec + * size of transfer between the ucache and memory buffer while maintaining: + * the size left in the request, the size left in the current iovec * segment, the size left in the current block, and which iovec segment is * currently being considered. */ @@ -1110,13 +1666,13 @@ static int calc_copy_op_cnt( iovec_left = vector[vec_ndx].iov_len; } } - /* Increment the number of the memcpy calls that will need to be - * performed + /* Increment the number of the memcpy calls that will need to be + * performed */ - copy_count++; + copy_count++; } - /* Break when there are no more bytes to be read/written so that the + /* Break when there are no more bytes to be read/written so that the * following if/else code block won't been run unless there is another * block of data to be transfered. */ if(size_left == 0) @@ -1132,28 +1688,28 @@ static int calc_copy_op_cnt( else { /* size_left is less than a full block's size, so size_left is all - * that needs to be transfered to/from this block + * that needs to be transfered to/from this block */ block_size_to_transfer = size_left; } } - /* Finally, return the number of memcpy operations that must be completed + /* Finally, return the number of memcpy operations that must be completed * to satisfy this request. */ return copy_count; } /** - * Provided two ucache related structures ureq and ucop, determine the - * reads/writes to be completed between the ucache and user memory (vector). + * Provided two ucache related structures ureq and ucop, determine the + * reads/writes to be completed between the ucache and user memory (vector). */ void calc_copy_ops( - off64_t offset, - size_t req_size, - struct ucache_req_s *ureq, - struct ucache_copy_s *ucop, - int copy_count, - const struct iovec *vector + off64_t offset, + size_t req_size, + struct ucache_req_s *ureq, + struct ucache_copy_s *ucop, + int copy_count, + const struct iovec *vector ) { int ureq_ndx = 0; @@ -1168,21 +1724,25 @@ void calc_copy_ops( /* Record necessary info for the future memcpy operation */ if(i == 0) { - ucop[i].cache_pos = ureq[ureq_ndx].ublk_ptr + - (offset % CACHE_BLOCK_SIZE); + ucop[i].cache_pos = (char *)ureq[ureq_ndx].ublk_ptr + + (offset % CACHE_BLOCK_SIZE); } else { - ucop[i].cache_pos = ureq[ureq_ndx].ublk_ptr + - (blk_tfer_size - blk_left); + ucop[i].cache_pos = (char *)ureq[ureq_ndx].ublk_ptr + + (blk_tfer_size - blk_left); } - ucop[i].buff_pos = vector[vec_ndx].iov_base + + ucop[i].buff_pos = (char *)vector[vec_ndx].iov_base + (vector[vec_ndx].iov_len - vec_left); - ucop[i].hit = ureq[ureq_ndx].ublk_hit; ucop[i].blk_index = ureq[ureq_ndx].ublk_index; if(vec_left > blk_left) /* Finish block */ { + if(size_left < blk_left) + { + ucop[i].size = size_left; + break; + } ucop[i].size = blk_left; vec_left -= blk_left; size_left -= blk_left; @@ -1200,6 +1760,11 @@ void calc_copy_ops( } else if(vec_left < blk_left) /* Finish iovec */ { + if(size_left < vec_left) + { + ucop[i].size = size_left; + break; + } ucop[i].size = vec_left; blk_left -= vec_left; size_left -= vec_left; @@ -1208,11 +1773,16 @@ void calc_copy_ops( } else /* They must be equal - finish both */ { + if(size_left < blk_left) + { + ucop[i].size = size_left; + break; + } ucop[i].size = blk_left; size_left -= blk_left; if(size_left >= CACHE_BLOCK_SIZE) { - blk_tfer_size = CACHE_BLOCK_SIZE; + blk_tfer_size = CACHE_BLOCK_SIZE; blk_left = blk_tfer_size; } else @@ -1228,7 +1798,7 @@ void calc_copy_ops( } static int cache_readorwrite( - enum PVFS_io_type which, + enum PVFS_io_type which, struct ucache_copy_s * ucop ) { @@ -1245,7 +1815,7 @@ static int cache_readorwrite( memcpy(ucop->cache_pos, ucop->buff_pos, ucop->size); rc = (int)ucop->size; } - return rc; + return rc; } int calc_req_blk_cnt(uint64_t offset, size_t req_size) @@ -1262,7 +1832,7 @@ int calc_req_blk_cnt(uint64_t offset, size_t req_size) } /* Count next blocks */ size_t req_left = req_size - (CACHE_BLOCK_SIZE - - (offset % CACHE_BLOCK_SIZE)); + (offset % CACHE_BLOCK_SIZE)); int blk_cnt = req_left / CACHE_BLOCK_SIZE; /* Account for last block if necessary */ @@ -1274,10 +1844,102 @@ int calc_req_blk_cnt(uint64_t offset, size_t req_size) return (blk_cnt + 1); /* Add one to account for first block */ } + +/* Return the sum of iov_len of iovecs in the iovec array pointed to by vector. */ +size_t sum_iovec_lengths(size_t iovec_count, const struct iovec *vector) +{ + size_t size = 0; + int i = 0; + for (i = 0; i < iovec_count; i++) + { + size += vector[i].iov_len; + } + return size; +} + +/** Attempt to read a full CACHE_BLOCK_SIZE into the ucache block. + * + * Also adjust req_size and req_blk_cnt used in + * iocommon_readorwrite to account for the scenarios where less + * data was read from the file system than was requested. + * + * Also, fent_size is updated to inform the ucache of the largest file size + * seen by the ucache related to this file. + * + * Upon ucache block removal, we use the file entry size to determine if the + * last block held in ucache isn't a full CACHE_BLOCK_SIZE. + * This ensures that the correct number of bytes are written to the + * file system on block removal. + */ +unsigned char read_full_block_into_ucache( + pvfs_descriptor *pd, /** Ultimately let's us id the file */ + PVFS_size offset, /** The original request offset */ + struct ucache_req_s *req, /** The ucache_req_s describing this block */ + int req_index, /** The index of this ucache_req_s in the overall array */ + uint64_t * fent_size, /** Pointer to this file entry size seen by ucache */ + size_t * req_size, /** Pointer to this iocommon_readorwrite request's size */ + int * req_blk_cnt /** Pointer to the number of ucache blocks determined by req_size and offset */ +) +{ + /* Return Boolean indicating we read a full ucache block */ + unsigned char rfb= 1; + + /* The byte count read by iocommon_vreadorwrite */ + int vread_count = 0; + + /* Attempt Read of Full Block From file system into user cache */ + struct iovec cache_vec = {req->ublk_ptr, CACHE_BLOCK_SIZE}; + lock_lock(get_lock(req->ublk_index)); + vread_count = iocommon_vreadorwrite(PVFS_IO_READ, + &pd->s->pvfs_ref, + req->ublk_tag, + 1, + &cache_vec); + + /* After reading, attempt update of *fent_size */ + if((req->ublk_tag + vread_count) > *fent_size) + { + *fent_size = req->ublk_tag + vread_count; + } + + /* Were we able to completely read this block? */ + if(vread_count != CACHE_BLOCK_SIZE) + { + /* This is the index of the last valid cache block in the ureq array */ + /* so add 1 to the index to get the correct block count. */ + *req_blk_cnt = req_index + 1; + + /* We need to recompute the req_size if less data was + * read than was requested. */ + size_t new_req_size = 0; + /* Did we fail to read a complete block on the first block of + * the request? + */ + if(offset >= req->ublk_tag) + { + new_req_size = vread_count - (offset - req->ublk_tag); + } + else + { + new_req_size = (req->ublk_tag - offset) + vread_count; + } + if(new_req_size < *req_size) + { + /* printf("Request expected:%Zu\tbut only read:%Zu\n", *req_size, new_req_size); */ + *req_size = new_req_size; + } + /* Unlock block */ + lock_unlock(get_lock(req->ublk_index)); + rfb = 0; + } + /* Unlock block */ + lock_unlock(get_lock(req->ublk_index)); + return rfb; +} #endif /* PVFS_UCACHE_ENABLE */ /** Do a blocking read or write, possibly utilizing the user cache. - * Returns -1 on error, some positive value on success; + * Returns -1 on error, some positive value on success; */ int iocommon_readorwrite(enum PVFS_io_type which, pvfs_descriptor *pd, @@ -1301,79 +1963,83 @@ int iocommon_readorwrite(enum PVFS_io_type which, if(!ucache_enabled || !pd->s->fent) { #endif /* PVFS_UCACHE_ENABLE */ - /* Bypass the ucache */ errno = 0; - rc = iocommon_vreadorwrite(which, &pd->s->pvfs_ref, offset, - iovec_count, vector); + rc = iocommon_vreadorwrite(which, + &pd->s->pvfs_ref, + offset, + iovec_count, + vector); return rc; #if PVFS_UCACHE_ENABLE } - - /* define all the values we'll need to fill the ucache_req_s struct */ - int i; /* index used for 'for loops' */ - int req_blk_cnt = 0; /* how many blocks to r/w */ - size_t req_size = 0; /* size in bytes of r/w */ - /* How many bytes is the request? */ - /* These will be contiguous in file starting at offset. */ - /* Also, they may be spread in out memory */ + /* Request is contiguous in file starting at offset. */ + /* Also, the iovec segments may be non-contiguous in memory */ /* Sum the individal segment sizes */ - for (i = 0; i < iovec_count; i++) - { - req_size += vector[i].iov_len; - } - + /* size in bytes the R/W request might encompass */ + size_t req_size = sum_iovec_lengths(iovec_count, vector); + /* Return zero here if we know there's nothing to be done. */ if(req_size == 0) { return 0; } - - struct file_ent_s *fent = pd->s->fent; - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); - int mtbl_data_size = 0; - if(which == PVFS_IO_WRITE) + +#if 0 + printf("iocommon_readorwrite: offset = %lu\treq_size = %lu\n", + offset, + req_size); + if(which == PVFS_IO_READ) { - mtbl_data_size = CACHE_BLOCK_SIZE * mtbl->num_blocks; + printf("attempting to read from ucache...\n"); } - - /* If the ucache request threshold is exceeded, flush and evict file, then - * peform nocache version of readorwrite */ - if((mtbl_data_size + req_size) > UCACHE_MAX_REQ) + else { + printf("attempting to write to ucache...\n"); + } +#endif + + /* Now, we know this isn't zero sized request */ + struct file_ent_s *fent = pd->s->fent; + uint64_t new_file_size = fent->size; + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + /* how many blocks the R/W request may encompass */ + int req_blk_cnt = calc_req_blk_cnt(offset, req_size); + int transfered = 0; /* count of the bytes transfered */ + + /* If the ucache per file blk request threshold is exceeded, flush and + * evict file, then peform nocache version of readorwrite. */ + if((req_blk_cnt + mtbl->num_blocks) > UCACHE_MAX_BLK_REQ) + { + /* + * printf("flushing file from ucache, since it's grown too large and " + * "continuing to service request without involving the ucache\n"); + */ /* Flush dirty blocks */ rc = ucache_flush_file(pd->s->fent); if(rc != 0) { - rc = -1; + /* TODO: alert user there was an error when flushing the ucache */ } - /*TODO Possibly remove the file - bad idea? What if it's referenced? */ - /* Bypass the ucache */ - rc = iocommon_vreadorwrite(which, &pd->s->pvfs_ref, offset, - iovec_count, vector); + rc = iocommon_vreadorwrite(which, + &pd->s->pvfs_ref, + offset, + iovec_count, + vector); return rc; } - /* Keep a running count of the bytes transfered */ - int transfered = 0; - - /* How many tags? */ - uint64_t start_tag = offset - (offset % CACHE_BLOCK_SIZE); - /* End_tag isn't really the last tag if the blk is alligned. - * This value is used to determine the req_blk_cnt only. - */ - uint64_t end_tag = 0; - end_tag = (offset + req_size) - ((offset + req_size) % CACHE_BLOCK_SIZE); - req_blk_cnt = calc_req_blk_cnt(offset, req_size); - - /* Now that we know the req_blk_cnt, allocate the required + /* Now that we know the req_blk_cnt, allocate the required * space for tags, hits boolean, and ptr to block in ucache shared memory. */ struct ucache_req_s ureq[req_blk_cnt]; - ureq[0].ublk_tag = start_tag; + memset(ureq, 0, sizeof(struct ucache_req_s) * req_blk_cnt); + ureq[0].ublk_tag = offset - (offset % CACHE_BLOCK_SIZE); /* first tag */ + + int i; /* index used for 'for loops' */ /* Loop over positions storing tags (ment identifiers) */ for(i = 1; i < req_blk_cnt; i++) { @@ -1383,24 +2049,16 @@ int iocommon_readorwrite(enum PVFS_io_type which, /* Now that tags are set fill in array of lookup responses */ for(i = 0; i < req_blk_cnt; i++) { - /* if lookup returns nil set char to 0, otherwise 1 */ - ureq[i].ublk_ptr = ucache_lookup(pd->s->fent, ureq[i].ublk_tag, - &(ureq[i].ublk_index)); - if(ureq[i].ublk_ptr == (void *)NIL) + struct ucache_req_s *this = &ureq[i]; + this->ublk_ptr = ucache_lookup(pd->s->fent, + this->ublk_tag, + &(this->ublk_index)); + if(this->ublk_ptr == (void *)NIL) { lock_lock(ucache_lock); ucache_stats->misses++; /* could overflow */ these_stats.misses++; lock_unlock(ucache_lock); - ureq[i].ublk_hit = 0; /* miss */ - /* Find a place for the block */ - ureq[i].ublk_ptr = ucache_insert(pd->s->fent, ureq[i].ublk_tag, - &(ureq[i].ublk_index)); - if((uint64_t)ureq[i].ublk_ptr == -1) - { - /* Cannot cache the rest of this file */ - } - assert(ureq[i].ublk_ptr != (void *)NILP); } else { @@ -1408,76 +2066,208 @@ int iocommon_readorwrite(enum PVFS_io_type which, ucache_stats->hits++; /* could overflow */ these_stats.hits++; lock_unlock(ucache_lock); - ureq[i].ublk_hit = 1; /* hit */ } } - if(which == PVFS_IO_READ) { /* Loop over ureq structure and perform reads on misses */ + /* Keep track of how much has been read so we can know if the last + * block successfully read is incomplete. + */ + /* Re-read last block if partial */ for(i = 0; i < req_blk_cnt; i++) { - if(ureq[i].ublk_hit == 0) + struct ucache_req_s *this = &ureq[i]; + if(this->ublk_ptr == (void *) NILP) /* ucache miss on block*/ { - /* Perform read */ - /* read single block from fs and write into ucache */ - struct iovec cache_vec = {ureq[i].ublk_ptr, CACHE_BLOCK_SIZE}; - lock_lock(get_lock(ureq[i].ublk_index)); - rc = iocommon_vreadorwrite(PVFS_IO_READ, - &pd->s->pvfs_ref, - ureq[i].ublk_tag, - 1, - &cache_vec); - lock_unlock(get_lock(ureq[i].ublk_index)); + this->ublk_ptr = ucache_insert(pd->s->fent, + this->ublk_tag, + &(this->ublk_index)); + /* ucache_insert fail */ + if(this->ublk_ptr == (void *) NILP) + { + /* Cannot cache the rest of this file */ + /* either try some other sort of eviction or perform no cache */ + + /** Alert the user that we are no longer caching this file, + * since we couldn't obtain a free cache block. + */ + /*TODO make this a gossip statement */ + /* printf("Flushing file from cache. Couldn't obtain block.\n"); */ + + /* Flush dirty blocks */ + rc = ucache_flush_file(pd->s->fent); + if(rc != 0) + { + /* TODO: alert user there was an error when flushing + * the ucache + */ + printf("warning: error detected when flushing file" + " from ucache.\n"); + } + /* Bypass the ucache */ + rc = iocommon_vreadorwrite(which, + &pd->s->pvfs_ref, + offset, + iovec_count, + vector); + return rc; + } + + /* Attempt read of full block from fs into ucache. + * Remember this locks, reads into, then unlocks the specifed + * block provided by this->ublk_ptr + */ + if(!read_full_block_into_ucache( + pd, offset, this, i, &new_file_size, &req_size, &req_blk_cnt) + ) + { + /* Stop trying to read if we couldn't read a full bock + * this time + */ + break; + } } } } - /* Read beginning and end blks into cache before writing if + /* Read beginning and end blks into cache before writing if * either end of the request are unalligned. */ if(which == PVFS_IO_WRITE) /* Write */ { - /* Consult ureq to see if block was hit or missed */ - /* Also see if block was alligned or not */ - if((ureq[0].ublk_hit == 0) && (offset != ureq[0].ublk_tag)) - { - /* Read first block from fs into ucache */ - struct iovec vector = {ureq[0].ublk_ptr, CACHE_BLOCK_SIZE}; - lock_lock(get_lock(ureq[0].ublk_index)); - rc = iocommon_vreadorwrite(PVFS_IO_READ, - &pd->s->pvfs_ref, - ureq[0].ublk_tag, - 1, - &vector); - lock_unlock(get_lock(ureq[0].ublk_index)); - } - if( req_blk_cnt > 1 && - (ureq[req_blk_cnt - 1].ublk_hit == 0) && - (((offset + req_size) % CACHE_BLOCK_SIZE) != 0) - ) - { - /* Read last block from fs into ucache */ - struct iovec vector = {ureq[req_blk_cnt - 1].ublk_ptr, - CACHE_BLOCK_SIZE}; - lock_lock(get_lock(ureq[req_blk_cnt - 1].ublk_index)); - rc = iocommon_vreadorwrite(PVFS_IO_READ, - &pd->s->pvfs_ref, - ureq[req_blk_cnt - 1].ublk_tag, - 1, - &vector); - lock_unlock(get_lock(ureq[req_blk_cnt - 1].ublk_index)); + unsigned char first_block_hit = 0; + unsigned char last_block_hit = 0; + + /* Attempt insertion of blocks reported missed during lookup */ + for(i = 0; i < req_blk_cnt; i++) + { + struct ucache_req_s *this = &ureq[i]; + if(this->ublk_ptr == (void *) NILP) /* ucache miss on block*/ + { + /* Attempt to make room for missed blocks */ + this->ublk_ptr = ucache_insert(pd->s->fent, + this->ublk_tag, + &(this->ublk_index)); + /* ucache_insert fail */ + if(this->ublk_ptr == (void *) NILP) + { + /* Cannot cache the rest of this file */ + /* either try some other sort of eviction or perform no cache */ + + /** Alert the user that we are no longer caching this file, + * since we couldn't obtain a free cache block. + */ + /*TODO make this a gossip statement */ + printf("Flushing file from cache. Couldn't obtain block.\n"); + + /* Flush dirty blocks */ + rc = ucache_flush_file(pd->s->fent); + if(rc != 0) + { + /* TODO: alert user there was an error when flushing + * the ucache + */ + printf("warning: error detected when flushing file" + " from ucache.\n"); + } + /* Bypass the ucache */ + rc = iocommon_vreadorwrite(which, + &pd->s->pvfs_ref, + offset, + iovec_count, + vector); + return rc; + } + } + else /* Block was hit */ + { + if(i == 0) + { + first_block_hit = 1; + } + if(i == (req_blk_cnt - 1)) + { + last_block_hit = 1; + } + } + } + + /* We aren't concerned about ucache block on the interior of this + * request, so we are only concerned about first and the last ucache + * blocks of this request. */ + + /* Write would leave the first block incomplete if the offset starts + * after the first block's tag or the request is less than a full sized + * block */ + if((ureq[0].ublk_tag != offset) || (req_size < CACHE_BLOCK_SIZE)) + { + /* If the first block was missed */ + if(first_block_hit == 0) + { + /* We create copies of the following two variables so that + * read_full_block_into_ucache won't adjust the originals + * like we intend on PVFS_IO_READ. + * Note that new_file_size may still be modified. + */ + size_t copy_of_req_size = req_size; + int copy_of_req_blk_cnt = req_blk_cnt; + read_full_block_into_ucache(pd, + offset, + &ureq[0], + 0, + &new_file_size, + ©_of_req_size, + ©_of_req_blk_cnt); + } + } + /* Last block if there is one and the write won't complete the block */ + if((req_blk_cnt > 1) && ((offset + req_size) % CACHE_BLOCK_SIZE != 0)) + { + /* If the last block was missed or if it was hit and the ucache + * block is currently incomplete from a ucache perspective. */ + if(last_block_hit == 0) + { + /* We create copies of the following two variables so that + * read_full_block_into_ucache won't adjust the originals + * like we intend on PVFS_IO_READ. + * Note that new_file_size may still be modified. + */ + size_t copy_of_req_size = req_size; + int copy_of_req_blk_cnt = req_blk_cnt; + read_full_block_into_ucache(pd, + offset, + &ureq[req_blk_cnt -1], + req_blk_cnt - 1, + &new_file_size, + ©_of_req_size, + ©_of_req_blk_cnt); + } + } + + /* After reading, attempt update of new_file_size */ + if(offset + req_size > new_file_size) + { + new_file_size = offset + req_size; } + + /* Now that we're sure of what the new file size will be, + * lock the global ucache lock and adjust the file entry's size + * as perceived by the ucache, then unlock the ucache. + */ + lock_lock(ucache_lock); + fent->size = new_file_size; + /* printf("fent->size = %lu KB\n", fent->size / 1024); */ + lock_unlock(ucache_lock); } /* At this point we know how many blocks the request will cover, the tags - * (indexes into file) of the blocks, whether the corresponding block was - * hit, and the ptr to the corresponding blk in memory. The blocks are also - * locked at this point. They will be unlocked as reads/writes happen. + * (indexes into file) of the blocks, and the ptr to the corresponding + * blk in memory, and the new file size max seen by ucache. */ - /* If only one iovec then we can assume there will be req_blk_cnt - * memcpy operations, otherwise we need to determine how many + /* If only one iovec then we can assume there will be req_blk_cnt + * memcpy operations, otherwise we need to determine how many * memcpy operations will be required so we can create the ucache_copy_s * struct array of proper length. */ @@ -1488,29 +2278,37 @@ int iocommon_readorwrite(enum PVFS_io_type which, } else { - copy_count = calc_copy_op_cnt(offset, req_size, req_blk_cnt, - iovec_count, vector); + copy_count = calc_copy_op_cnt(offset, + req_size, + req_blk_cnt, + iovec_count,vector); } /* Create copy structure and fill with appropriate values */ struct ucache_copy_s ucop[copy_count]; calc_copy_ops(offset, req_size, &ureq[0], &ucop[0], copy_count, vector); - /* The ucache copy structure should now be filled and we can procede with + /* The ucache copy structure should now be filled and we can procede with * the necessary memcpy operations. */ + int ureq_index = 0; for(i = 0; i < copy_count; i++) { /* perform copy operation */ - lock_lock(get_lock(ureq[i].ublk_index)); + lock_lock(get_lock(ureq[ureq_index].ublk_index)); transfered += cache_readorwrite(which, &ucop[i]); /* Unlock the block */ - lock_unlock(get_lock(ureq[i].ublk_index)); + lock_unlock(get_lock(ureq[ureq_index].ublk_index)); + /* Check if this ucop completed this block, so we can adjust the + * ureq_index accordingly */ + if((offset + transfered) >= + (ureq[ureq_index].ublk_tag + CACHE_BLOCK_SIZE)) + { + ureq_index++; + } } - rc = transfered; - + return transfered; #endif /* PVFS_UCACHE_ENABLE */ - return rc; } /** do a blocking read or write from an iovec @@ -1558,17 +2356,20 @@ int iocommon_vreadorwrite(enum PVFS_io_type which, * all sync reads or writes to disk come here */ int iocommon_readorwrite_nocache(enum PVFS_io_type which, - PVFS_object_ref *por, - PVFS_size offset, - void *buf, - PVFS_Request mem_req, - PVFS_Request file_req) + PVFS_object_ref *por, + PVFS_size offset, + void *buf, + PVFS_Request mem_req, + PVFS_Request file_req) { int rc = 0; int orig_errno = errno; PVFS_credentials *creds; PVFS_sysresp_io io_resp; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_readorwrite_nocache: called with %d\n", (int)por->handle); + if (!por) { errno = EBADF; @@ -1615,11 +2416,11 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, PVFS_sysresp_io *ret_resp, PVFS_Request *ret_memory_req) { - #ifndef UCACHE_ENABLED +#ifndef UCACHE_ENABLED // No cache return iocommon_ireadorwrite_nocache(which, pd, extra_offset, buf, etype_req, file_req, count, ret_op_id, ret_resp, ret_memory_req); - #endif // UCACHE_ENABLED +#endif // UCACHE_ENABLED //if read then check cache..if not there..then read from i/o node and store into correct location //Possibly Data Transfer @@ -1657,7 +2458,7 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, errno = EBADF; return -1; } - //Ensure descriptor is used for the correct type of access + /* Ensure descriptor is used for the correct type of access */ if ((which==PVFS_IO_READ && (O_WRONLY == (pd->s->flags & O_ACCMODE))) || (which==PVFS_IO_WRITE && (O_RDONLY == (pd->s->flags & O_ACCMODE)))) { @@ -1665,7 +2466,7 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, return PVFS_FD_FAILURE; } - //Create the memory request of a contiguous region: 'mem_req' x count + /* Create the memory request of a contiguous region: 'mem_req' x count */ rc = PVFS_Request_contiguous(count, etype_req, &contig_memory_req); iocommon_cred(&credentials); @@ -1684,7 +2485,8 @@ int iocommon_ireadorwrite(enum PVFS_io_type which, NULL); IOCOMMON_CHECK_ERR(rc); - assert(*ret_op_id!=-1);//TODO: handle this + /* TODO: handle this */ + assert(*ret_op_id!=-1); PVFS_Request_size(contig_memory_req, &req_size); gen_mutex_lock(&pd->s->lock); @@ -1707,6 +2509,9 @@ int iocommon_getattr(PVFS_object_ref obj, PVFS_sys_attr *attr, uint32_t mask) PVFS_credentials *credentials; PVFS_sysresp_getattr getattr_response; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_getattr: called with %d\n", (int)obj.handle); + /* Initialize */ memset(&getattr_response, 0, sizeof(getattr_response)); @@ -1721,6 +2526,15 @@ int iocommon_getattr(PVFS_object_ref obj, PVFS_sys_attr *attr, uint32_t mask) &getattr_response, NULL); IOCOMMON_CHECK_ERR(rc); *attr = getattr_response.attr; + if (attr->objtype == PVFS_TYPE_DIRECTORY) + { + attr->blksize = 1024; /* dir block sizes not maintained in PVFS */ + } + if (attr->objtype == PVFS_TYPE_SYMLINK) + { + attr->blksize = 1024; /* dir block sizes not maintained in PVFS */ + attr->size = strnlen(attr->link_target, PVFS_PATH_MAX); + } errorout: return rc; @@ -1735,10 +2549,20 @@ int iocommon_setattr(PVFS_object_ref obj, PVFS_sys_attr *attr) int orig_errno = errno; PVFS_credentials *credentials; + gossip_debug(GOSSIP_USRINT_DEBUG, + "iocommon_setattr: called with %d\n", (int)obj.handle); + /* check credentials */ iocommon_cred(&credentials); - /* now get attributes */ + /* Should we automatically set CTIME here? + * Seems like a good place to do so, all updates of the "inode" must + * go through here, for all potential user level interfaces, so this + * might be a good idea. Should only update if we change owner, + * group, permissions, more something else like that. + */ + + /* now set attributes */ rc = PVFS_sys_setattr(obj, *attr, credentials, NULL); IOCOMMON_CHECK_ERR(rc); @@ -1758,6 +2582,7 @@ int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask) } /* Initialize */ memset(&attr, 0, sizeof(attr)); + memset(buf, 0, sizeof(struct stat)); errno = 0; rc = iocommon_getattr(pd->s->pvfs_ref, &attr, mask); @@ -1770,25 +2595,25 @@ int iocommon_stat(pvfs_descriptor *pd, struct stat *buf, uint32_t mask) if (attr.objtype == PVFS_TYPE_METAFILE) { buf->st_mode |= S_IFREG; + buf->st_nlink = 1; /* PVFS does not allow hard links */ } if (attr.objtype == PVFS_TYPE_DIRECTORY) { buf->st_mode |= S_IFDIR; + buf->st_nlink = attr.dirent_count + 2; } if (attr.objtype == PVFS_TYPE_SYMLINK) { buf->st_mode |= S_IFLNK; + buf->st_nlink = 1; /* PVFS does not allow hard links */ } - buf->st_nlink = 1; /* PVFS does not allow hard links */ buf->st_uid = attr.owner; buf->st_gid = attr.group; buf->st_rdev = 0; /* no dev special files */ buf->st_size = attr.size; buf->st_blksize = attr.blksize; - if (attr.blksize) - { - buf->st_blocks = (attr.size + (attr.blksize - 1)) / attr.blksize; - } + buf->st_blocks = (attr.size + (S_BLKSIZE - 1)) / S_BLKSIZE; + /* we don't have nsec so we left the memset zero them */ buf->st_atime = attr.atime; buf->st_mtime = attr.mtime; buf->st_ctime = attr.ctime; @@ -1813,6 +2638,7 @@ int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask) } /* Initialize */ memset(&attr, 0, sizeof(attr)); + memset(buf, 0, sizeof(struct stat64)); errno = 0; rc = iocommon_getattr(pd->s->pvfs_ref, &attr, mask); @@ -1825,25 +2651,25 @@ int iocommon_stat64(pvfs_descriptor *pd, struct stat64 *buf, uint32_t mask) if (attr.objtype == PVFS_TYPE_METAFILE) { buf->st_mode |= S_IFREG; + buf->st_nlink = 1; /* PVFS does not allow hard links */ } if (attr.objtype == PVFS_TYPE_DIRECTORY) { buf->st_mode |= S_IFDIR; + buf->st_nlink = attr.dirent_count + 2; } if (attr.objtype == PVFS_TYPE_SYMLINK) { buf->st_mode |= S_IFLNK; + buf->st_nlink = 1; /* PVFS does not allow hard links */ } - buf->st_nlink = 1; /* PVFS does not allow hard links */ buf->st_uid = attr.owner; buf->st_gid = attr.group; buf->st_rdev = 0; /* no dev special files */ buf->st_size = attr.size; buf->st_blksize = attr.blksize; - if (attr.blksize) - { - buf->st_blocks = (attr.size + (attr.blksize - 1)) / attr.blksize; - } + buf->st_blocks = (attr.size + (S_BLKSIZE - 1)) / S_BLKSIZE; + /* we don't have nsec so we left the memset zero them */ buf->st_atime = attr.atime; buf->st_mtime = attr.mtime; buf->st_ctime = attr.ctime; @@ -1908,13 +2734,12 @@ int iocommon_make_directory(const char *pvfs_path, { int rc = 0; int orig_errno = errno; - char *parentdir = NULL; - char *filename = NULL; PVFS_sys_attr attr; PVFS_sysresp_lookup resp_lookup; PVFS_object_ref parent_ref; PVFS_sysresp_mkdir resp_mkdir; PVFS_credentials *credentials; + char *filename = NULL; /* Initialize any variables */ memset(&attr, 0, sizeof(attr)); @@ -1922,40 +2747,23 @@ int iocommon_make_directory(const char *pvfs_path, memset(&parent_ref, 0, sizeof(parent_ref)); memset(&resp_mkdir, 0, sizeof(resp_mkdir)); - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); - rc = split_pathname(pvfs_path, 1, &parentdir, &filename); - IOCOMMON_RETURN_ERR(rc); - /* Make sure we don't try and create the root or current directory */ /* lookup parent */ - if (!pdir) - { - errno = 0; - rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - if (parentdir) - { - errno = 0; - rc = iocommon_lookup_relative(parentdir, *pdir, - PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - parent_ref = *pdir; - } - } - - /* Set the attributes for the new directory */ + rc = iocommon_lookup((char *)pvfs_path, + PVFS2_LOOKUP_LINK_FOLLOW, + &parent_ref, + NULL, + &filename, + pdir); + IOCOMMON_RETURN_ERR(rc); + attr.owner = geteuid(); attr.group = getegid(); - attr.perms = mode & 07777; /* mask off stray bits */ + attr.perms = mode & 07777; /* mask of stray bits */ attr.mask = (PVFS_ATTR_SYS_ALL_SETABLE); errno = 0; @@ -1967,14 +2775,10 @@ int iocommon_make_directory(const char *pvfs_path, IOCOMMON_CHECK_ERR(rc); errorout: - if (parentdir) - { - free(parentdir); - } if (filename) { free(filename); - } + } return(rc); } @@ -1993,18 +2797,20 @@ int iocommon_readlink(pvfs_descriptor *pd, char *buf, int size) errno = 0; rc = iocommon_getattr(pd->s->pvfs_ref, &attr, PVFS_ATTR_SYS_TYPE | - PVFS_ATTR_SYS_LNK_TARGET); + PVFS_ATTR_SYS_SIZE | + PVFS_ATTR_SYS_LNK_TARGET); IOCOMMON_RETURN_ERR(rc); /* copy attributes into standard stat struct */ if (attr.objtype == PVFS_TYPE_SYMLINK) { strncpy(buf, attr.link_target, size); + rc = attr.size; } else { errno = EINVAL; - return -1; + rc = -1; } errorout: @@ -2017,53 +2823,38 @@ int iocommon_symlink(const char *pvfs_path, /* where new linkis created */ { int rc = 0; int orig_errno = errno; - char *parentdir = NULL; - char *filename = NULL; PVFS_sys_attr attr; PVFS_object_ref parent_ref; PVFS_sysresp_symlink resp_symlink; PVFS_credentials *credentials; + char *filename = NULL; /* Initialize any variables */ memset(&attr, 0, sizeof(attr)); memset(&parent_ref, 0, sizeof(parent_ref)); memset(&resp_symlink,0, sizeof(resp_symlink)); - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); - - rc = split_pathname(pvfs_path, 0, &parentdir, &filename); - IOCOMMON_RETURN_ERR(rc); - /* Make sure we don't try and create the root or current directory */ /* lookup parent */ - if (!pdir) - { - errno = 0; - rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - if (parentdir) - { - errno = 0; - rc = iocommon_lookup_relative(parentdir, *pdir, - PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - parent_ref = *pdir; - } - } - + rc = iocommon_lookup((char *)pvfs_path, + PVFS2_LOOKUP_LINK_FOLLOW, + &parent_ref, + NULL, + &filename, + pdir); + IOCOMMON_RETURN_ERR(rc); + /* Set the attributes for the new directory */ attr.owner = getuid(); attr.group = getgid(); attr.perms = 0777; + attr.atime = time(NULL); + attr.mtime = attr.atime; + attr.ctime = attr.atime; attr.mask = (PVFS_ATTR_SYS_ALL_SETABLE); errno = 0; @@ -2077,14 +2868,10 @@ int iocommon_symlink(const char *pvfs_path, /* where new linkis created */ IOCOMMON_CHECK_ERR(rc); errorout: - if (parentdir) - { - free(parentdir); - } if (filename) { free(filename); - } + } return(rc); } @@ -2125,6 +2912,8 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ gen_mutex_lock(&pd->s->lock); token = pd->s->token == 0 ? PVFS_READDIR_START : pd->s->token; + /* clear the output buffer */ + memset(dirp, 0, size); /* posix deals in bytes in buffer and bytes read */ /* PVFS deals in number of records to read or were read */ count = size / sizeof(struct dirent); @@ -2147,9 +2936,19 @@ int iocommon_getdents(pvfs_descriptor *pd, /**< pvfs fiel descriptor */ { /* copy a PVFS_dirent to a struct dirent */ dirp->d_ino = (long)readdir_resp.dirent_array[i].handle; +#ifdef _DIRENT_HAVE_D_OFF dirp->d_off = pd->s->file_pointer; +#endif +#ifdef _DIRENT_HAVE_D_RECLEN dirp->d_reclen = sizeof(PVFS_dirent); - memcpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); +#endif +#ifdef _DIRENT_HAVE_D_TYPE +#ifndef DT_UNKNOWN +#define DT_UNKNOWN 0 +#endif + dirp->d_type = DT_UNKNOWN; +#endif + strncpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); dirp->d_name[name_max] = 0; pd->s->file_pointer += sizeof(struct dirent); bytes += sizeof(struct dirent); @@ -2201,6 +3000,8 @@ int iocommon_getdents64(pvfs_descriptor *pd, gen_mutex_lock(&pd->s->lock); token = pd->s->token == 0 ? PVFS_READDIR_START : pd->s->token; + /* clear the output buffer */ + memset(dirp, 0, size); count = size / sizeof(struct dirent64); if (count > PVFS_REQ_LIMIT_DIRENT_COUNT) { @@ -2221,9 +3022,19 @@ int iocommon_getdents64(pvfs_descriptor *pd, { /* copy a PVFS_dirent to a struct dirent64 */ dirp->d_ino = (uint64_t)readdir_resp.dirent_array[i].handle; +#ifdef _DIRENT_HAVE_D_OFF dirp->d_off = (off64_t)pd->s->file_pointer; +#endif +#ifdef _DIRENT_HAVE_D_RECLEN dirp->d_reclen = sizeof(struct dirent64); - memcpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); +#endif +#ifdef _DIRENT_HAVE_D_TYPE +#ifndef DT_UNKNOWN +#define DT_UNKNOWN 0 +#endif + dirp->d_type = DT_UNKNOWN; +#endif + strncpy(dirp->d_name, readdir_resp.dirent_array[i].d_name, name_max); dirp->d_name[name_max] = 0; pd->s->file_pointer += sizeof(struct dirent64); bytes += sizeof(struct dirent64); @@ -2278,60 +3089,35 @@ int iocommon_access(const char *pvfs_path, PVFS_object_ref *pdir) { int rc = 0; - int orig_errno = errno; - char *parentdir = NULL; - char *file = NULL; int followflag = PVFS2_LOOKUP_LINK_FOLLOW; int uid = -1, gid = -1; - PVFS_object_ref parent_ref, file_ref; + PVFS_object_ref file_ref; PVFS_credentials *credentials; PVFS_sys_attr attr; /* Initialize */ - memset(&parent_ref, 0, sizeof(parent_ref)); memset(&file_ref, 0, sizeof(file_ref)); memset(&attr, 0, sizeof(attr)); /* Initialize the system interface for this process */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); - rc = split_pathname(pvfs_path, 0, &parentdir, &file); - IOCOMMON_RETURN_ERR(rc); - - if (!pdir) - { - errno = 0; - rc = iocommon_lookup_absolute(parentdir, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - if (parentdir) - { - errno = 0; - rc = iocommon_lookup_relative(parentdir, *pdir, - PVFS2_LOOKUP_LINK_FOLLOW, &parent_ref, NULL, 0); - IOCOMMON_RETURN_ERR(rc); - } - else - { - parent_ref = *pdir; - } - } /* Attempt to find file */ if (flags & AT_SYMLINK_NOFOLLOW) { followflag = PVFS2_LOOKUP_LINK_NO_FOLLOW; } - errno = 0; - rc = iocommon_lookup_relative(file, - parent_ref, - followflag, - &file_ref, - NULL, - 0); - IOCOMMON_CHECK_ERR(rc); + + /* lookup parent */ + rc = iocommon_lookup((char *)pvfs_path, + followflag, + NULL, + &file_ref, + NULL, + pdir); + IOCOMMON_RETURN_ERR(rc); + /* Get file atributes */ errno = 0; rc = iocommon_getattr(file_ref, &attr, PVFS_ATTR_SYS_COMMON_ALL); @@ -2383,14 +3169,6 @@ int iocommon_access(const char *pvfs_path, /* Access is allowed, rc should be 0 */ errorout: - if (parentdir) - { - free(parentdir); - } - if (file) - { - free(file); - } return rc; } @@ -2408,7 +3186,7 @@ int iocommon_statfs(pvfs_descriptor *pd, struct statfs *buf) return -1; } /* Initialize the system interface for this process */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); memset(&statfs_resp, 0, sizeof(statfs_resp)); @@ -2422,9 +3200,9 @@ int iocommon_statfs(pvfs_descriptor *pd, struct statfs *buf) /* this is a fudge because they don't line up */ buf->f_type = PVFS2_SUPER_MAGIC; buf->f_bsize = block_size; - buf->f_blocks = statfs_resp.statfs_buf.bytes_total/1024; - buf->f_bfree = statfs_resp.statfs_buf.bytes_available/1024; - buf->f_bavail = statfs_resp.statfs_buf.bytes_available/1024; + buf->f_blocks = statfs_resp.statfs_buf.bytes_total / 1024; + buf->f_bfree = statfs_resp.statfs_buf.bytes_available / 1024; + buf->f_bavail = statfs_resp.statfs_buf.bytes_available / 1024; buf->f_files = statfs_resp.statfs_buf.handles_total_count; buf->f_ffree = statfs_resp.statfs_buf.handles_available_count; buf->f_fsid.__val[0] = statfs_resp.statfs_buf.fs_id; @@ -2449,7 +3227,7 @@ int iocommon_statfs64(pvfs_descriptor *pd, struct statfs64 *buf) return -1; } /* Initialize the system interface for this process */ - pvfs_sys_init(); + PVFS_INIT(pvfs_sys_init); iocommon_cred(&credentials); memset(&statfs_resp, 0, sizeof(statfs_resp)); @@ -2463,9 +3241,9 @@ int iocommon_statfs64(pvfs_descriptor *pd, struct statfs64 *buf) /* this is a fudge because they don't line up */ buf->f_type = PVFS2_SUPER_MAGIC; buf->f_bsize = block_size; - buf->f_blocks = statfs_resp.statfs_buf.bytes_total/1024; - buf->f_bfree = statfs_resp.statfs_buf.bytes_available/1024; - buf->f_bavail = statfs_resp.statfs_buf.bytes_available/1024; + buf->f_blocks = statfs_resp.statfs_buf.bytes_total / 1024; + buf->f_bfree = statfs_resp.statfs_buf.bytes_available / 1024; + buf->f_bavail = statfs_resp.statfs_buf.bytes_available / 1024; buf->f_files = statfs_resp.statfs_buf.handles_total_count; buf->f_ffree = statfs_resp.statfs_buf.handles_available_count; buf->f_fsid.__val[0] = statfs_resp.statfs_buf.fs_id; diff --git a/src/client/usrint/iocommon.h b/src/client/usrint/iocommon.h index 296e804..45f93af 100644 --- a/src/client/usrint/iocommon.h +++ b/src/client/usrint/iocommon.h @@ -16,6 +16,7 @@ #include #include #include +#include /* Define GNU's O_NOFOLLOW flag to be false if its not set */ #ifndef O_NOFOLLOW @@ -34,7 +35,6 @@ struct ucache_req_s { uint64_t ublk_tag; /* ucache block tag (byte index into file) */ - unsigned char ublk_hit; /* boolean indicating 'block found in cache' */ void *ublk_ptr; /* where in ucache memory to read block from or write to */ uint16_t ublk_index; /* index of ucache block in shared memory segment */ }; @@ -44,7 +44,6 @@ struct ucache_copy_s void * cache_pos; void * buff_pos; size_t size; - unsigned char hit; uint16_t blk_index; }; @@ -61,13 +60,53 @@ void iocommon_ensure_init(void); void iocommon_cred(PVFS_credentials **credentials); + +void calc_copy_ops( off64_t offset, + size_t req_size, + struct ucache_req_s *ureq, + struct ucache_copy_s *ucop, + int copy_count, + const struct iovec *vector +); + +int calc_req_blk_cnt( uint64_t offset, + size_t req_size +); + +size_t sum_iovec_lengths( size_t iovec_count, + const struct iovec *vector +); + +unsigned char read_full_block_into_ucache( pvfs_descriptor *pd, + PVFS_size offset, + struct ucache_req_s *req, + int req_index, + uint64_t *fent_size, + size_t *req_size, + int *req_blk_cnt +); + extern int iocommon_fsync(pvfs_descriptor *pvfs_info); +int iocommon_expand_path (PVFS_path_t *Ppath, + int follow_flag, + int flags, + mode_t mode, + pvfs_descriptor **pdp); + +int iocommon_lookup(char *path, + int followflag, + PVFS_object_ref *pref, + PVFS_object_ref *fref, + char **filename, + PVFS_object_ref *pdir); + /* * Find the PVFS handle to an object (file, dir sym) * assumes an absoluate path */ extern int iocommon_lookup_absolute(const char *abs_path, + int follow_flag, PVFS_object_ref *ref, char *error_path, int error_path_size); @@ -100,8 +139,7 @@ extern pvfs_descriptor *iocommon_open(const char *pathname, int flag, mode_t file_permission, pvfs_descriptor *pdir); -extern int iocommon_truncate(PVFS_object_ref file_ref, - off64_t length); +extern int iocommon_truncate(pvfs_descriptor *pd, off64_t length); extern off64_t iocommon_lseek(pvfs_descriptor *pd, off64_t offset, diff --git a/src/client/usrint/locks.h b/src/client/usrint/locks.h new file mode 100644 index 0000000..c541046 --- /dev/null +++ b/src/client/usrint/locks.h @@ -0,0 +1,62 @@ +/* + * (C) 2011 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/** \file + * \ingroup usrint + * + * PVFS2 user interface routines + */ + +#ifndef LOCKS_H + +/** This file defines IO locks as used in libc because the standard + * include files do not export these definitions correctly if at all + * on newer systems. + */ + +typedef struct _PVFS_lock_s +{ + int lock; /* zero if unlocked, one if locked */ + int cnt; /* number of users holding the lock */ + void *owner; /* opaque pointer to the owner of the lock or NULL */ +} _PVFS_lock_t; /* replaces _IO_lock_t */ + +#define _PVFS_lock_initializer { 0, 0, NULL } +#define _PVFS_lock_finalizer { -1, -1, NULL } + +/* these export a pointer to a stream */ +#define _PVFS_lock_init(_stream_p) \ + do { \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->lock = 0; \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->cnt = 0; \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->owner = NULL; \ + } while (0) + +#define _PVFS_lock_fini(_stream_p) \ + do { \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->lock = -1; \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->cnt = -1; \ + ((_PVFS_lock_t *)((_stream_p)->_lock))->owner = NULL; \ + } while (0) + +#define _PVFS_lock_lock(_stream_p) stdio_ops.flockfile(_stream_p) \ + +#define _PVFS_lock_trylock(_stream_p) stdio_ops.ftrylockfile(_stream_p) \ + +#define _PVFS_lock_unlock(_stream_p) stdio_ops.funlockfile(_stream_p) \ + + +#endif /* LOCKS_H */ + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ + diff --git a/src/client/usrint/mmap.c b/src/client/usrint/mmap.c index 909e8f3..ddd8bbc 100644 --- a/src/client/usrint/mmap.c +++ b/src/client/usrint/mmap.c @@ -93,10 +93,10 @@ int pvfs_munmap(void *start, size_t length) struct pvfs_mmap_s *mapl, *temp; long long pagesize = getpagesize(); -#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ - if (((long)start % pagesize) != 0 || (length % pagesize) != 0) +#if PVFS2_SIZEOF_VOIDP == 64 + if (((uint64_t)start % pagesize) != 0 || (length % pagesize) != 0) #else - if (((long long)start % pagesize) != 0 || (length % pagesize) != 0) + if (((uint32_t)start % pagesize) != 0 || (length % pagesize) != 0) #endif { errno = EINVAL; @@ -137,10 +137,10 @@ int pvfs_msync(void *start, size_t length, int flags) struct pvfs_mmap_s *mapl, *temp; long long pagesize = getpagesize(); -#if __SIZEOF_POINTER__ == __SIZEOF_LONG__ - if (((long)start % pagesize) != 0 || (length % pagesize) != 0) +#if PVFS2_SIZEOF_VOIDP == 64 + if (((uint64_t)start % pagesize) != 0 || (length % pagesize) != 0) #else - if (((long long)start % pagesize) != 0 || (length % pagesize) != 0) + if (((uint32_t)start % pagesize) != 0 || (length % pagesize) != 0) #endif { errno = EINVAL; @@ -162,7 +162,7 @@ int pvfs_msync(void *start, size_t length, int flags) if (mapl->mflags & MAP_SHARED) { /* the diff between start and mst is distance from */ - /* start of buffer, and distnace from original offset */ + /* start of buffer, and distance from original offset */ rc = pvfs_pwrite(mapl->mfd, start, length, mapl->moff + ((u_char *)start - (u_char *)mapl->mst)); } diff --git a/src/client/usrint/module.mk.in b/src/client/usrint/module.mk.in index 364aeb3..b411b37 100644 --- a/src/client/usrint/module.mk.in +++ b/src/client/usrint/module.mk.in @@ -1,4 +1,4 @@ -ifdef BUILD_USRINT +ifeq ($(build_usrint),yes) DIR := src/client/usrint @@ -8,14 +8,27 @@ SRC := \ $(DIR)/iocommon.c \ $(DIR)/openfile-util.c \ $(DIR)/ucache.c \ - $(DIR)/mmap.c + $(DIR)/mmap.c \ + $(DIR)/pvfs-path.c \ + $(DIR)/pvfs-qualify-path.c USRC := \ $(DIR)/posix.c \ - $(DIR)/stdio.c + $(DIR)/stdio.c \ + $(DIR)/selinux.c \ + $(DIR)/fts.c \ + $(DIR)/glob.c \ + $(DIR)/error.c # list of all .c files (generated or otherwise) that belong in library LIBSRC += $(SRC) ULIBSRC += $(USRC) -endif # BUILD_USRINT +else +DIR := src/client/usrint +SRC := \ + $(DIR)/pvfs-qualify-path.c + +LIBSRC += $(SRC) + +endif # build_usrint diff --git a/src/client/usrint/openfile-util.c b/src/client/usrint/openfile-util.c index 705086d..945cc24 100644 --- a/src/client/usrint/openfile-util.c +++ b/src/client/usrint/openfile-util.c @@ -9,15 +9,21 @@ * * PVFS2 user interface routines - routines to manage open files */ +/* This prevents headers from defining sys calls as macros */ #define USRINT_SOURCE 1 + #include "usrint.h" #include +#include #ifndef SYS_readdir #define SYS_readdir 89 #endif +#include "quicklist.h" #include "posix-ops.h" #include "openfile-util.h" +#include "iocommon.h" #include "posix-pvfs.h" +#include "pvfs-path.h" #ifdef PVFS_AIO_ENABLE #include "aiocommon.h" #endif @@ -26,6 +32,49 @@ #include "ucache.h" #endif +/* Debugging macros for initialization when reegular IO is questionable + */ +#define PVFS_INIT_DEBUG 0 +#define BUFSZ 255 + +#define init_printerr(f) \ + do { \ + char str[BUFSZ]; \ + memset(str, 0, BUFSZ); \ + glibc_ops.snprintf(str, BUFSZ-1, f); \ + glibc_ops.write(2, str, BUFSZ); \ + } while (0) + +#define init_printerr1(f,v) \ + do { \ + char str[BUFSZ]; \ + memset(str, 0, BUFSZ); \ + glibc_ops.snprintf(str, BUFSZ-1, f, (v)); \ + glibc_ops.write(2, str, BUFSZ); \ + } while (0) + +#define init_printerr2(f,v1,v2) \ + do { \ + char str[BUFSZ]; \ + memset(str, 0, BUFSZ); \ + glibc_ops.snprintf(str, BUFSZ-1, f, (v1), (v2)); \ + glibc_ops.write(2, str, BUFSZ); \ + } while (0) + +#define init_perror(s) init_printerr2("PVFS init error: %s: %s\n", \ + s, \ + strerror(errno)); + +#if PVFS_INIT_DEBUG +# define init_debug(f) init_printerr(f) +# define init_debug1(f,v) init_printerr1(f, v) +# define init_debug2(f,v1,v2) init_printerr2(f, v1, v2) +#else +# define init_debug(f) +# define init_debug1(f,v) +# define init_debug2(f,v1,v2) +#endif + static struct glibc_redirect_s { int (*stat)(int ver, const char *path, struct stat *buf); @@ -40,84 +89,134 @@ static struct glibc_redirect_s int (*mknodat)(int ver, int dirfd, const char *path, mode_t mode, dev_t dev); } glibc_redirect; +/* this is for managing space in the shared memory area - first pass we + * allocated enough of everything we can use a trivial algorithm but we + * may choose to go to a more sophisticated version later + */ + +typedef struct pvfs_shmcontrol_s +{ + int64_t shm_magic; + void *shmctrl; /* pointer to this struct for reference */ + gen_mutex_t shmctrl_lock; /* these control the shm copy during a fork */ + gen_cond_t shmctrl_cond; + uint32_t shmctrl_copy; /* indicates a copy is going on during a fork */ + uint32_t shmctrl_shared; /* number of descendent processes sharing this */ + char shmctrl_cwd[PVFS_PATH_MAX]; /* the current working dir */ + pvfs_descriptor **descriptor_table; + uint32_t descriptor_table_count; /* number of active descriptors */ + uint32_t descriptor_table_size; /* total number of descriptors */ + gen_mutex_t descriptor_table_lock; + pvfs_descriptor *descriptor_pool; + uint32_t descriptor_pool_size; + pvfs_descriptor_status *status_pool; + uint32_t status_pool_size; + char *path_table; + uint32_t path_table_size; + int *fd_table; + uint32_t fd_table_size; + uint32_t fd_table_count; +} pvfs_shmcontrol_t; + +static pvfs_shmcontrol_t *shmctrl = NULL; +static char shmobjpath[50]; +static int shmobj = -1; +static int shmsize = 0; /* size of shm control area pointed to by shmctrl */ + +/* This is for managing a list of the above structs. This struct is + * referred to as a PDL for brevity, and the term may also refer to the + * pvfs_shmcontrol_t it points to when convenient. THe items on this + * list represent the shm areas of ancestor processes that we are + * currently sharing an open file descriptor with (really a status + * struct) and we keep a count of how many of these are still active. + * When that count becomes zero we can disconntect from the shm area and + * remove it from the list. Before doing so we should check if ANY + * other process is still shareing with it and unlink it as well if they + * are not. + */ + +typedef struct pvfs_desc_list_s +{ + char *name; /* global name of the PDL shm object */ + pvfs_shmcontrol_t *ptr; /* pointer to the PDL object */ + int64_t offset; /* difference between currant and prev mapping */ + int fd; /* fd PDL object is opened on */ + int size; /* size of PDL object */ + int shares; /* number of shares this process uses from PDL */ + struct qlist_head link; +} pvfs_desc_list_t; + +static QLIST_HEAD(desc_list); /* list of ancestor descriptor tables */ + +/* convenience macro for adjusting pointers */ +#define P2L(p,t) (t *)(((char *)(p)) + parent_offset) +#define PDLOFF(p,d) (((char *)(p)) + (d)->offset) + #define PREALLOC 3 -static char logfilepath[30]; -static int logfile; -static int descriptor_table_count = 0; -static int descriptor_table_size = 0; -static pvfs_descriptor **descriptor_table; +static pvfs_descriptor **descriptor_table = NULL; /* convenience pointer */ + +/* THese are used to index descriptors, statuses and dpaths we have + * allocated in the shm area. + */ +typedef struct index_rec_s +{ + struct qlist_head link; + int first; + int size; +} index_rec_t; + +static QLIST_HEAD(desc_index); /* the descriptor pool */ +static QLIST_HEAD(stat_index); /* the descriptor status pool */ +static QLIST_HEAD(path_index); /* pool for dpaths */ + static char rstate[256]; /* used for random number generation */ +/* static functions */ +static pvfs_descriptor *get_descriptor(void); +static void put_descriptor(pvfs_descriptor *pd); +static pvfs_descriptor_status *get_status(void); +static void put_status(pvfs_descriptor_status *pds); +static int pvfs_desc_alloc(struct qlist_head *pool); +static void pvfs_desc_free(int desc, struct qlist_head *pool); +static void path_index_return(char *path); +static char *path_index_find(int size); + +/* initialization stuff */ +static void rebuild_descriptor_table(pvfs_desc_list_t *pdl); +static void parent_fork_begin(void); /* fork parent handler */ +static void parent_fork_end(void); /* fork parent handler */ +static void add_descriptor_area_list(char *name, + int fd, + int size, + int64_t offset, + pvfs_shmcontrol_t *new); +static void close_descriptor_area_list(pvfs_desc_list_t *pdl); +static pvfs_desc_list_t *find_descriptor_area_list( + pvfs_descriptor_status *stat); +static pvfs_desc_list_t *first_descriptor_area_list(void); +static void init_descriptor_area(void); /* fork child handler */ +static void init_descriptor_area_internal(void); /* create new PDL */ +/* actual initialization functions */ +static int init_usrint_internal(void) + GCC_CONSTRUCTOR(INIT_PRIORITY_PVFSLIB); +static void cleanup_usrint_internal(void) + GCC_DESTRUCTOR(CLEANUP_PRIORITY_PVFSLIB); +/* static int pvfs_sys_init_elf(void) GCC_UNUSED; */ +static int pvfs_lib_init_flag = 0; /* initialization done */ + posix_ops glibc_ops; -pvfs_descriptor_status pvfs_stdin_status = -{ - .dup_cnt = 1, - .fsops = &glibc_ops, - .pvfs_ref.fs_id = 0, - .pvfs_ref.handle = 0, - .flags = O_RDONLY, - .mode = 0, - .file_pointer = 0, - .token = 0, - .dpath = NULL, - .fent = NULL -}; - -pvfs_descriptor pvfs_stdin = -{ - .is_in_use = PVFS_FS, - .fd = 0, - .true_fd = STDIN_FILENO, - .fdflags = 0, - .s = &pvfs_stdin_status -}; - -pvfs_descriptor_status pvfs_stdout_status = -{ - .dup_cnt = 1, - .fsops = &glibc_ops, - .pvfs_ref.fs_id = 0, - .pvfs_ref.handle = 0, - .flags = O_WRONLY | O_APPEND, - .mode = 0, - .file_pointer = 0, - .token = 0, - .dpath = NULL, - .fent = NULL -}; - -pvfs_descriptor pvfs_stdout = -{ - .is_in_use = PVFS_FS, - .fd = 1, - .true_fd = STDOUT_FILENO, - .fdflags = 0, - .s = &pvfs_stdout_status -}; - -pvfs_descriptor_status pvfs_stderr_status = -{ - .dup_cnt = 1, - .fsops = &glibc_ops, - .pvfs_ref.fs_id = 0, - .pvfs_ref.handle = 0, - .flags = O_WRONLY | O_APPEND, - .mode = 0, - .file_pointer = 0, - .token = 0, - .dpath = NULL, - .fent = NULL -}; - -pvfs_descriptor pvfs_stderr = +/* wrapper so we can call getpwd for initialization + */ +static int my_glibc_getcwd(char *buf, unsigned long size) { - .is_in_use = PVFS_FS, - .fd = 2, - .true_fd = STDERR_FILENO, - .fdflags = 0, - .s = &pvfs_stderr_status -}; + return syscall(SYS_getcwd, buf, size); +} + +/* wrappers for some glibc calls that that are actually redirects to + * other calls - get confused in the tables so a function is defined + * here + */ static int my_glibc_stat(const char *path, struct stat *buf) { @@ -141,12 +240,18 @@ static int my_glibc_fstat64(int fd, struct stat64 *buf) return glibc_redirect.fstat64(_STAT_VER, fd, buf); } -static int my_glibc_fstatat(int fd, const char *path, struct stat *buf, int flag) +static int my_glibc_fstatat(int fd, + const char *path, + struct stat *buf, + int flag) { return glibc_redirect.fstatat(_STAT_VER, fd, path, buf, flag); } -static int my_glibc_fstatat64(int fd, const char *path, struct stat64 *buf, int flag) +static int my_glibc_fstatat64(int fd, + const char *path, + struct stat64 *buf, + int flag) { return glibc_redirect.fstatat64(_STAT_VER, fd, path, buf, flag); } @@ -196,21 +301,22 @@ static int my_glibc_readdir(u_int fd, struct dirent *dirp, u_int count) return syscall(SYS_readdir, fd, dirp, count); } -static int my_glibc_getcwd(char *buf, unsigned long size) -{ - return syscall(SYS_getcwd, buf, size); -} - +/* This function creates a table of pointers to glibc functions for all + * of the io system calls so they can be called when needed + */ void load_glibc(void) { void *libc_handle; libc_handle = dlopen("libc.so.6", RTLD_LAZY|RTLD_GLOBAL); if (!libc_handle) { - fprintf(stderr,"Failed to open libc.so\n"); + /* stderr should be set up before this */ + //init_debug("Failed to open libc.so\n"); libc_handle = RTLD_NEXT; } memset((void *)&glibc_ops, 0, sizeof(glibc_ops)); + /* first set */ + glibc_ops.snprintf = dlsym(libc_handle, "snprintf"); glibc_ops.open = dlsym(libc_handle, "open"); glibc_ops.open64 = dlsym(libc_handle, "open64"); glibc_ops.openat = dlsym(libc_handle, "openat"); @@ -231,12 +337,14 @@ void load_glibc(void) glibc_ops.pwrite64 = dlsym(libc_handle, "pwrite64"); glibc_ops.lseek = dlsym(libc_handle, "lseek"); glibc_ops.lseek64 = dlsym(libc_handle, "lseek64"); + glibc_ops.perror = dlsym(libc_handle, "perror"); glibc_ops.truncate = dlsym(libc_handle, "truncate"); glibc_ops.truncate64 = dlsym(libc_handle, "truncate64"); glibc_ops.ftruncate = dlsym(libc_handle, "ftruncate"); glibc_ops.ftruncate64 = dlsym(libc_handle, "ftruncate64"); glibc_ops.fallocate = dlsym(libc_handle, "posix_fallocate"); glibc_ops.close = dlsym(libc_handle, "close"); + /* stats */ glibc_ops.stat = my_glibc_stat; glibc_redirect.stat = dlsym(libc_handle, "__xstat"); glibc_ops.stat64 = my_glibc_stat64; @@ -253,12 +361,14 @@ void load_glibc(void) glibc_redirect.lstat = dlsym(libc_handle, "__lxstat"); glibc_ops.lstat64 = my_glibc_lstat64; glibc_redirect.lstat64 = dlsym(libc_handle, "__lxstat64"); + /* times dups chowns mks */ glibc_ops.futimesat = dlsym(libc_handle, "futimesat"); glibc_ops.utimes = dlsym(libc_handle, "utimes"); glibc_ops.utime = dlsym(libc_handle, "utime"); glibc_ops.futimes = dlsym(libc_handle, "futimes"); glibc_ops.dup = dlsym(libc_handle, "dup"); glibc_ops.dup2 = dlsym(libc_handle, "dup2"); + glibc_ops.dup3 = dlsym(libc_handle, "dup3"); glibc_ops.chown = dlsym(libc_handle, "chown"); glibc_ops.fchown = dlsym(libc_handle, "fchown"); glibc_ops.fchownat = dlsym(libc_handle, "fchownat"); @@ -275,6 +385,7 @@ void load_glibc(void) glibc_ops.symlinkat = dlsym(libc_handle, "symlinkat"); glibc_ops.link = dlsym(libc_handle, "link"); glibc_ops.linkat = dlsym(libc_handle, "linkat"); + /* readdirs and misc */ glibc_ops.readdir = my_glibc_readdir; glibc_ops.getdents = my_glibc_getdents; glibc_ops.getdents64 = my_glibc_getdents64; @@ -326,12 +437,6 @@ void load_glibc(void) glibc_ops.recv = dlsym(libc_handle, "recv"); glibc_ops.recvfrom = dlsym(libc_handle, "recvfrom"); glibc_ops.recvmsg = dlsym(libc_handle, "recvmsg"); - //glibc_ops.select = dlsym(libc_handle, "select"); - //glibc_ops.FD_CLR = dlsym(libc_handle, "FD_CLR"); - //glibc_ops.FD_ISSET = dlsym(libc_handle, "FD_ISSET"); - //glibc_ops.FD_SET = dlsym(libc_handle, "FD_SET"); - //glibc_ops.FD_ZERO = dlsym(libc_handle, "FD_ZERO"); - //glibc_ops.pselect = dlsym(libc_handle, "pselect"); glibc_ops.send = dlsym(libc_handle, "send"); glibc_ops.sendto = dlsym(libc_handle, "sendto"); glibc_ops.sendmsg = dlsym(libc_handle, "sendmsg"); @@ -345,14 +450,23 @@ void load_glibc(void) glibc_ops.munmap = dlsym(libc_handle, "munmap"); glibc_ops.msync = dlsym(libc_handle, "msync"); #if 0 + /* might need these some day */ glibc_ops.acl_delete_def_file = dlsym(libc_handle, "acl_delete_def_file"); glibc_ops.acl_get_fd = dlsym(libc_handle, "acl_get_fd"); glibc_ops.acl_get_file = dlsym(libc_handle, "acl_get_file"); glibc_ops.acl_set_fd = dlsym(libc_handle, "acl_set_fd"); glibc_ops.acl_set_file = dlsym(libc_handle, "acl_set_file"); #endif - -/* PVFS does not implement socket ops */ + glibc_ops.getfscreatecon = dlsym(libc_handle, "getfscreatecon"); + glibc_ops.getfilecon = dlsym(libc_handle, "getfilecon"); + glibc_ops.lgetfilecon = dlsym(libc_handle, "lgetfilecon"); + glibc_ops.fgetfilecon = dlsym(libc_handle, "fgetfilecon"); + glibc_ops.setfscreatecon = dlsym(libc_handle, "setfscreatecon"); + glibc_ops.setfilecon = dlsym(libc_handle, "setfilecon"); + glibc_ops.lsetfilecon = dlsym(libc_handle, "lsetfilecon"); + glibc_ops.fsetfilecon = dlsym(libc_handle, "fsetfilecon"); + + /* PVFS does not implement socket ops */ pvfs_ops.socket = dlsym(libc_handle, "socket"); pvfs_ops.accept = dlsym(libc_handle, "accept"); pvfs_ops.bind = dlsym(libc_handle, "bind"); @@ -366,12 +480,6 @@ void load_glibc(void) pvfs_ops.recv = dlsym(libc_handle, "recv"); pvfs_ops.recvfrom = dlsym(libc_handle, "recvfrom"); pvfs_ops.recvmsg = dlsym(libc_handle, "recvmsg"); - //pvfs_ops.select = dlsym(libc_handle, "select"); - //pvfs_ops.FD_CLR = dlsym(libc_handle, "FD_CLR"); - //pvfs_ops.FD_ISSET = dlsym(libc_handle, "FD_ISSET"); - //pvfs_ops.FD_SET = dlsym(libc_handle, "FD_SET"); - //pvfs_ops.FD_ZERO = dlsym(libc_handle, "FD_ZERO"); - //pvfs_ops.pselect = dlsym(libc_handle, "pselect"); pvfs_ops.send = dlsym(libc_handle, "send"); pvfs_ops.sendto = dlsym(libc_handle, "sendto"); pvfs_ops.sendmsg = dlsym(libc_handle, "sendmsg"); @@ -387,22 +495,278 @@ void load_glibc(void) } } -/* - * runs on exit to do any cleanup +/* These routines manage free lists for descriptors, descriptor_status, + * and dpath strings all of which make up the parts of a pvfs file + * descriptor. These are kept in a shared memory segment and thus we + * can't malloc and free them. */ -static void usrint_cleanup(void) +static void pvfs_desc_free(int desc, struct qlist_head *pool) { - /* later check for an error that might want us */ - /* to keep this - for now it is empty */ - glibc_ops.unlink(logfilepath); - /* cache cleanup? */ -#if 0 - if (ucache_enabled) + index_rec_t *seg = NULL; + index_rec_t *prev = NULL; + index_rec_t *newseg = NULL; + int merged = 0; + int at_end = 0; + + /* FIXME: this should depend on which pool we are looking at */ + if (desc < 0 || desc >= shmctrl->descriptor_pool_size) + { + gossip_lerr(" returned descriptor not in table range\n"); + } + /* check for empty list */ + if (qlist_empty(pool)) + { + /* free list is empty */ + newseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + newseg->first = desc; + newseg->size = 1; + qlist_add_tail(&newseg->link, pool); + } + /* find the segment to insert the path before */ + qlist_for_each_entry (seg, pool, link) + { + if (seg->first > desc) + { + break; + } + } + if (&(seg->link) == pool) + { + /* we got to the end of the list */ + at_end = 1; + } + /* if the segment is not the first on the list */ + if (seg->link.prev != pool) + { + prev = qlist_entry(seg->link.prev, index_rec_t, link); + } + /* if path is adjacent to the segment merge */ + if (!at_end && (desc == (seg->first - 1))) + { + seg->first -= 1; + seg->size += 1; + merged = 1; + } + /* segment not the first and path is adjacent to previous merge */ + if (prev && ((prev->first + prev->size) == desc)) + { + /* if not already merged with segment merge with previous */ + if (!merged) + { + prev->size += 1; + } + /* otherwise a 3 way merge */ + else + { + prev->size += seg->size; + qlist_del(&seg->link); + free(seg); + } + merged = 1; + } + /* if no merging then insert the path */ + if (!merged) + { + newseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + newseg->first = desc; + newseg->size = 1; + /* strictly speaking if at_end, &seg->link == pool */ + if (at_end) + { + qlist_add_tail(&newseg->link, pool); + } + else + { + qlist_add_tail(&newseg->link, &seg->link); + } + } +} + +static int pvfs_desc_alloc(struct qlist_head *pool) +{ + int rval; + index_rec_t *seg; + if (qlist_empty(pool)) + { + /* free list is empty */ + gossip_lerr("pvfs_desc_alloc sees empty free list\n"); + return -1; + } + seg = qlist_entry(pool->next, index_rec_t, link); + if (seg->size > 1) + { + /* split the block */ + rval = seg->first; + seg->first += 1; + seg->size -= 1; + return rval; + } + else + { + /* remove the block */ + qlist_del(&seg->link); + rval = seg->first; + free(seg); + return rval; + } +} + +static void path_index_return(char *path) +{ + index_rec_t *seg = NULL; + index_rec_t *prev = NULL; + index_rec_t *newseg = NULL; + int merged = 0; + int size = 0; + int offset; + + if (path < shmctrl->path_table || + path > shmctrl->path_table + shmctrl->path_table_size) + { + gossip_lerr(" returned pointer not in path table range\n"); + } + + size = strlen(path) + 1; + memset(path, 0, size); + offset = path - shmctrl->path_table; + /* check for empty list */ + if (path_index.next == &path_index) + { + /* free list is empty */ + gossip_lerr("path_index_find sees empty free list\n"); + } + /* find the segment to insert the path before */ + qlist_for_each_entry (seg, &path_index, link) + { + if (seg->first > offset) + { + break; + } + } + if (&seg->link == &path_index) + { + /* we got to the end of the list */ + } + /* if the segment is not the first on the list */ + if (seg->link.prev != &path_index) { - ucache_finalize(); + prev = qlist_entry(seg->link.prev, index_rec_t, link); } + /* if path is adjacent to the segment merge */ + if (offset + size == seg->first) + { + seg->first = offset; + seg->size += size; + merged = 1; + } + /* segment not the first and path is adjacent to previous merge */ + if (prev && prev->first + prev->size == offset) + { + /* if not already merged with segment merge with previous */ + if (!merged) + { + prev->size += size; + } + /* otherwise a 3 way merge */ + else + { + prev->size += seg->size; + qlist_del(&seg->link); + free(seg); + } + merged = 1; + } + /* if no merging then insert the path */ + if (!merged) + { + newseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + newseg->first = offset; + newseg->size = size; + qlist_add_tail(&newseg->link, &seg->link); + } +} + +static char *path_index_find(int size) +{ + char *rval; + index_rec_t *seg; + if (path_index.next == &path_index) + { + /* free list is empty */ + gossip_lerr("path_index_find sees empty free list\n"); + return NULL; + } + qlist_for_each_entry (seg, &path_index, link) + { + if (seg->size > size) + { + /* split the block */ + rval = seg->first + shmctrl->path_table; + seg->first += size; + seg->size -= size; + return rval; + } + else if (seg->size == size) + { + /* remove the block */ + qlist_del(&seg->link); + rval = seg->first + shmctrl->path_table; + free(seg); + return rval; + } + } + /* exited the loop without finding a block */ + errno = ENOMEM; + return NULL; +} + +char *pvfs_dpath_insert(const char *path) +{ + int len = 0; + char *ixpath; + /* count bytes in path */ + len = strnlen(path, PVFS_PATH_MAX); + /* add space for terminator and ref ptr */ + len += 1; + /* find space in the index */ + ixpath = path_index_find(len); + /* copy path */ + memcpy(ixpath, path, len); + return ixpath; +} + +void pvfs_dpath_remove(char *path) +{ + path_index_return(path); +} + +/* + * runs on exit to do any cleanup + */ +static void cleanup_usrint_internal(void) +{ + struct qlist_head *qh, *qh_next; + + init_debug("Running cleanup\n"); + /* cache cleanup */ +#if PVFS_UCACHE_ENABLE + /* put code here to flush and/or close files */ #endif + /* shut down PVFS */ PVFS_sys_finalize(); + /* run down the list and close all shm areas */ + qlist_for_each_safe(qh, qh_next, &desc_list) + { + close_descriptor_area_list(qlist_entry(qh, pvfs_desc_list_t, link)); + } + /* unlink our area - remains until all others have unmapped */ + glibc_ops.unlink(shmobjpath); + /* ignore error here - should not be there anyway */ + /* clear globals */ + shmobj = -1; + shmctrl = NULL; + descriptor_table = NULL; + memset(shmobjpath, 0, sizeof(shmobjpath)); } #if PVFS_UCACHE_ENABLE @@ -416,119 +780,331 @@ int pvfs_ucache_enabled(void) } #endif -void pvfs_sys_init_doit(void); +/* + * On GCC we can make init_usrint_internal() a constructor so it runs + * before main. In this case, if there is a attempt to use one of our + * system calls we can assume it is for a non-pvfs file (this can be + * checked with pvfs_sys_init() which just checks the flag. If we do + * not have constructors its hard to tell so we just do the init and + * hope for the best. + * + * If we later decide to put shared libraries on PVFS this will break + * this assumption. The idea here is to limit the checking over and + * over again if we have initialized since we can't rely on the user to + * do it and there are so many entry points into the library. Obviously + * some day someone will want to put shared libes on PVFS and we'll have + * to work that out. + * + * Addendum - as of 4/1/2013 the GCC constructor mechanism does not + * guarantee that a module is initialized before another module can call + * a function in the first module. + */ + +#if 0 +/* This function inserts a call during module loading on an ELF system + * It is fragile and not portable but may give better results than the + * GCC constructor/destructor mechanism which calls constructors some + * time after loading modules and before main. In particular, the GCC + * construct does not guarantee that a function in the module will not + * be called by another module before initialization. + */ +static int pvfs_sys_init_elf(void) +{ + __asm__ (".section .init \n call pvfs_sys_init_elf \n .section .text\n"); + pvfs_sys_init_internal(); + return 1; +} +#endif +/* This is the function called by various routines to be SURE + * initialization has happened. This is usually done via the PVFS_INIT + * macro which can be used to compile these calls out. The idea is that + * calls prior to initialization should not call PVFS path's so - but + * this is not always the case. Currently this is forced to run + * initialization because we cannot control when our constructor runs + * relative to the libc (and possibly others) constructor. + */ int pvfs_sys_init(void) { - static int pvfs_initializing_flag = 0; - static int pvfs_lib_lock_initialized = 0; /* recursive lock init flag */ - static int pvfs_lib_init_flag = 0; + if (!pvfs_lib_init_flag) + { + return init_usrint_internal(); + } + return 0; +} +/* + * This is the initialization routine - sets up the usrlib as + * well as initiating the pvfslib including BMI, etc. + */ +static int init_usrint_internal(void) +{ + /* global var pvfs_lib_init_flag: initialization done */ + static int pvfs_initializing_flag = 0; /* initialization in progress */ + int errno_in = 0; + index_rec_t *ixseg = NULL; int rc = 0; + int i; - /* Mutex protecting initialization of recursive mutex */ - static gen_mutex_t mutex_mutex = GEN_MUTEX_INITIALIZER; /* The recursive mutex */ - static pthread_mutex_t rec_mutex; + static gen_mutex_t rec_mutex = GEN_RECURSIVE_MUTEX_INITIALIZER_NP; + /* only one initialize happens */ if(pvfs_lib_init_flag) - return 0; - - if(!pvfs_lib_lock_initialized) { - rc = gen_mutex_lock(&mutex_mutex); - if(!pvfs_lib_lock_initialized) - { - //init recursive mutex - pthread_mutexattr_t rec_attr; - rc = pthread_mutexattr_init(&rec_attr); - rc = pthread_mutexattr_settype(&rec_attr, PTHREAD_MUTEX_RECURSIVE); - rc = pthread_mutex_init(&rec_mutex, &rec_attr); - rc = pthread_mutexattr_destroy(&rec_attr); - pvfs_lib_lock_initialized = 1; - } - rc = gen_mutex_unlock(&mutex_mutex); + return 0; } - rc = pthread_mutex_lock(&rec_mutex); + /* preserve errno */ + errno_in = errno; + + /* make sure no double inits */ + gen_mutex_lock(&rec_mutex); if(pvfs_lib_init_flag || pvfs_initializing_flag) { - rc = pthread_mutex_unlock(&rec_mutex); + gen_mutex_unlock(&rec_mutex); + /* make sure errors in here don't carry out */ + errno = errno_in; return 1; } /* set this to prevent pvfs_sys_init from running recursively (indirect) */ pvfs_initializing_flag = 1; - //Perform Init - pvfs_sys_init_doit(); - pvfs_initializing_flag = 0; - pvfs_lib_init_flag = 1; - rc = pthread_mutex_unlock(&rec_mutex); - return 0; -} - -/* - * Perform PVFS initialization tasks - */ -void pvfs_sys_init_doit(void) { - struct rlimit rl; - int rc; - char curdir[PVFS_PATH_MAX]; + /**************************************/ + /* BEGIN INITIALIZATION */ + /**************************************/ - /* this allows system calls to run */ + /* this allows system calls to be run */ + /* init_glibc_malloc(); */ load_glibc(); + + init_debug("Beginning pvfs_sys_init_doit\n"); + PINT_initrand(); /* if this fails not much we can do about it */ - atexit(usrint_cleanup); + /* atexit(usrint_cleanup); */ + + /* we assume if we are running this code this program was + * just exec'd and the parent may or may not have been PVFS enabled + * + * first check for existing shm area - it should be on the magic fd + * PVFS_SHMOBJ, otherwise we assume the paretn was not PVFS enabled + * and we will have to create a new one from scratch. + */ - /* set up current working dir */ - memset(curdir, 0, sizeof(curdir)); - rc = my_glibc_getcwd(curdir, PVFS_PATH_MAX); - if (rc < 0) + if (glibc_ops.fcntl(PVFS_SHMOBJ, F_GETFL) >= 0) { - perror("failed to get CWD"); - exit(-1); - } - pvfs_cwd_init(curdir, PVFS_PATH_MAX); + struct stat sbuf; + int *fd_table; + + /* we found something on the magic fd */ + glibc_ops.fstat(PVFS_SHMOBJ, &sbuf); + shmsize = sbuf.st_size; + + /* map shm area */ + shmctrl = (pvfs_shmcontrol_t *)glibc_ops.mmap(NULL, + shmsize, + PROT_READ | PROT_WRITE, + MAP_SHARED, + PVFS_SHMOBJ, + 0); + if (shmctrl == ((void *)-1)) + { + glibc_ops.perror("failed to map parent descriptor table"); + exit(-1); + } + /* managed to map the object now look for a magic number */ + if (shmctrl->shm_magic == PVFS_SHM_MAGIC) + { + /* we found it! */ + shmobj = PVFS_SHMOBJ; + /* reconstruct the object name */ + memset(shmobjpath, 0, sizeof(shmobjpath)); + snprintf(shmobjpath, + 50, + _PATH_DEV "shm/pvfs-%06d-%06d", + (int)getuid(), + (int)getpid()); + } + else + { + /* something else is on the magic fd, will is bad news */ + glibc_ops.munmap(shmctrl, shmsize); + glibc_ops.perror("something occupies the PVFS fd"); + exit(-1); + } - rc = getrlimit(RLIMIT_NOFILE, &rl); - /* need to check for "INFINITY" */ + /* pointers in the parent not relocated yet */ + fd_table = (int *)((char *)shmctrl->fd_table + + ((char *)shmctrl - (char *)shmctrl->shmctrl)); - /* set up descriptor table */ - descriptor_table_size = rl.rlim_max; - descriptor_table = - (pvfs_descriptor **)malloc(sizeof(pvfs_descriptor *) * - descriptor_table_size); - if (!descriptor_table) - { - perror("failed to malloc descriptor table"); - exit(-1); + /* now load any shared PDLs that might be open */ + for (i = 0; i < shmctrl->fd_table_count; i++) + { + int psize; + int fd; + pvfs_shmcontrol_t *objptr; + fd = fd_table[i]; + if (glibc_ops.fcntl(fd, F_GETFL) >= 0) + { + struct stat sbuf; + glibc_ops.fstat(fd, &sbuf); + psize = sbuf.st_size; + + /* map shm area */ + objptr = (pvfs_shmcontrol_t *)glibc_ops.mmap(NULL, + psize, + PROT_READ | + PROT_WRITE, + MAP_SHARED, + fd, + 0); + if (objptr == ((void *)-1)) + { + glibc_ops.perror("failed to map ancestor descriptor table"); + continue; + } + /* managed to map the object now look for a magic number */ + if (objptr->shm_magic == PVFS_SHM_MAGIC) + { + add_descriptor_area_list(NULL, + fd, + psize, + (char *)objptr - + (char *)objptr->shmctrl, + objptr); + } + else + { + glibc_ops.perror("found non descriptor table"); + glibc_ops.munmap(objptr, psize); + continue; + } + } + else + { + glibc_ops.perror("non-open object found"); + continue; + } + } + + /* add our new PDL to the list */ + add_descriptor_area_list(shmobjpath, + shmobj, + shmsize, + (char *)shmctrl - (char *)shmctrl->shmctrl, + shmctrl); + + /* and adjust pointers */ + rebuild_descriptor_table(first_descriptor_area_list()); + + /* should be ready to go */ } - memset(descriptor_table, 0, - (sizeof(pvfs_descriptor *) * descriptor_table_size)); - descriptor_table[0] = &pvfs_stdin; - gen_mutex_init(&pvfs_stdin.lock); - gen_mutex_init(&pvfs_stdin.s->lock); - descriptor_table[1] = &pvfs_stdout; - gen_mutex_init(&pvfs_stdout.lock); - gen_mutex_init(&pvfs_stdin.s->lock); - descriptor_table[2] = &pvfs_stderr; - gen_mutex_init(&pvfs_stderr.lock); - gen_mutex_init(&pvfs_stdin.s->lock); - descriptor_table_count = PREALLOC; - - /* open log file */ - /* we dupe this FD to get FD's for pvfs files */ - memset(logfilepath, 0, sizeof(logfilepath)); - snprintf(logfilepath, 25, "/tmp/pvfsuid-%05d.log", (int)(getuid())); - logfile = glibc_ops.open(logfilepath, O_RDWR|O_CREAT, 0600); - if (logfile < 0) - { - perror("failed in pvfs_sys_init"); - exit(-1); + else + { + int flags; + struct stat sbuf; + int plen; + char buf[PVFS_PATH_MAX]; + + /* shmobj < 0 so we did not find the existing object */ + /* We assume this process is the first to run PVFS */ + /* so set up a new shared memory descriptor area and initialize */ + init_descriptor_area_internal(); + + /* add new PDL to the list */ + add_descriptor_area_list(shmobjpath, shmobj, shmsize, 0L, shmctrl); + + /* set up the CWD */ + memset(buf, 0, PVFS_PATH_MAX); + rc = my_glibc_getcwd(buf, PVFS_PATH_MAX); + if (rc < 0) + { + /* error */ + } + plen = strnlen(buf, PVFS_PATH_MAX); + pvfs_put_cwd(buf, plen); + + /* on exec the free lists, if they existed, were wiped. If we found + * the old shm area then we will rebuild the indices in + * rebuild_descriptor_table, if we are starting clean we will need a + * set of clean indices. + */ + + /* set up descriptor index free list */ + ixseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + if (!ixseg) + { + glibc_ops.perror("failed to malloc desc index pool"); + exit(-1); + } + ixseg->first = 0; + ixseg->size = shmctrl->descriptor_pool_size; + qlist_add(&ixseg->link, &desc_index); + + /* set up desc status index free list */ + ixseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + if (!ixseg) + { + glibc_ops.perror("failed to malloc stat index pool"); + exit(-1); + } + ixseg->first = 0; + ixseg->size = shmctrl->status_pool_size; + qlist_add(&ixseg->link, &stat_index); + + /* set up path index free list */ + ixseg = (index_rec_t *)malloc(sizeof(index_rec_t)); + if (!ixseg) + { + glibc_ops.perror("failed to malloc path index pool"); + exit(-1); + } + ixseg->first = 0; + ixseg->size = shmctrl->path_table_size; + qlist_add(&ixseg->link, &path_index); + + /* init default descriptors if they are in fact open */ + flags = glibc_ops.fcntl(STDIN_FILENO, F_GETFL); + if (flags != -1) + { + pvfs_alloc_descriptor(&glibc_ops, STDIN_FILENO, NULL, 0); + descriptor_table[STDIN_FILENO]->s->flags = flags; + glibc_ops.fstat(STDIN_FILENO, &sbuf); + descriptor_table[STDIN_FILENO]->s->mode = sbuf.st_mode; + gen_mutex_unlock(&descriptor_table[STDIN_FILENO]->s->lock); + gen_mutex_unlock(&descriptor_table[STDIN_FILENO]->lock); + } + + flags = glibc_ops.fcntl(STDOUT_FILENO, F_GETFL); + if (flags != -1) + { + pvfs_alloc_descriptor(&glibc_ops, STDOUT_FILENO, NULL, 0); + descriptor_table[STDOUT_FILENO]->s->flags = flags; + glibc_ops.fstat(STDOUT_FILENO, &sbuf); + descriptor_table[STDOUT_FILENO]->s->mode = sbuf.st_mode; + gen_mutex_unlock(&descriptor_table[STDOUT_FILENO]->s->lock); + gen_mutex_unlock(&descriptor_table[STDOUT_FILENO]->lock); + } + + flags = glibc_ops.fcntl(STDERR_FILENO, F_GETFL); + if (flags != -1) + { + pvfs_alloc_descriptor(&glibc_ops, STDERR_FILENO, NULL, 0); + descriptor_table[STDERR_FILENO]->s->flags = flags; + glibc_ops.fstat(STDERR_FILENO, &sbuf); + descriptor_table[STDERR_FILENO]->s->mode = sbuf.st_mode; + gen_mutex_unlock(&descriptor_table[STDERR_FILENO]->s->lock); + gen_mutex_unlock(&descriptor_table[STDERR_FILENO]->lock); + } + /* now ready to go */ } + /* set up fork handlers for shared memory area - not sure this is + * the best place to do it + */ + pthread_atfork(parent_fork_begin, parent_fork_end, init_descriptor_area); /* initalize PVFS */ /* this is very complex so most stuff needs to work @@ -540,14 +1116,23 @@ void pvfs_sys_init_doit(void) { errno = 0; } + /* set up current working dir - need this one and previous one */ + // pvfs_cwd_init(1); /* expand sym links*/ + /* call other initialization routines */ + /* lib calls should never print user error messages */ + /* user can do that with return codes */ + PVFS_perror_gossip_silent(); + #if PVFS_UCACHE_ENABLE - //gossip_enable_file(UCACHE_LOG_FILE, "a"); - //gossip_enable_stderr(); +#if 0 + gossip_enable_file(UCACHE_LOG_FILE, "a"); + gossip_enable_stderr(); +#endif /* ucache initialization - assumes shared memory previously - * aquired (using ucache daemon) + * acquired (using ucache daemon) */ rc = ucache_initialize(); if (rc < 0) @@ -556,87 +1141,977 @@ void pvfs_sys_init_doit(void) { /* Write a warning message in the ucache.log letting programmer know */ ucache_enabled = 0; - /* Enable the writing of the error message and write the message to file. */ - //gossip_set_debug_mask(1, GOSSIP_UCACHE_DEBUG); - //gossip_debug(GOSSIP_UCACHE_DEBUG, - // "WARNING: client caching configured enabled but couldn't inizialize\n"); + /* Enable the writing of the error message and */ + /* write the message to file. */ + /* gossip_set_debug_mask(1, GOSSIP_UCACHE_DEBUG);*/ + /* gossip_debug(GOSSIP_UCACHE_DEBUG, */ + /* "WARNING: client caching configured enabled but couldn't " + * "inizialize\n");*/ + } #endif #ifdef PVFS_AIO_ENABLE - /* initialize aio interface */ - aiocommon_init(); + /* initialize aio interface */ + aiocommon_init(); #endif + + init_debug("finished with initialization\n"); + + pvfs_lib_init_flag = 1; + pvfs_initializing_flag = 0; + gen_mutex_unlock(&rec_mutex); + /* make sure errors in here don't carry out */ + errno = errno_in; + return 0; } -int pvfs_descriptor_table_size(void) +static void parent_fork_begin(void) { - return descriptor_table_size; + init_debug("Parent preparing to fork\n"); + gen_mutex_lock(&shmctrl->shmctrl_lock); + shmctrl->shmctrl_copy = 1; + gen_mutex_unlock(&shmctrl->shmctrl_lock); } -/* - * Allocate a new pvfs_descriptor - * initialize fsops to the given set - */ - pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, - int fd, - PVFS_object_ref *file_ref, - int use_cache) - { - int newfd, flags = 0; - pvfs_descriptor *pd; - - pvfs_sys_init(); - if (fsops == NULL) +static void parent_fork_end(void) +{ + gen_mutex_lock(&shmctrl->shmctrl_lock); + while (shmctrl->shmctrl_copy) { - errno = EINVAL; - return NULL; + gen_cond_wait(&shmctrl->shmctrl_cond, &shmctrl->shmctrl_lock); + init_debug1("Parent wakes flag = %d\n", shmctrl->shmctrl_copy); } - if (fd == -1) + gen_mutex_unlock(&shmctrl->shmctrl_lock); + init_debug("Parent completes fork\n"); +} + +/* These functions manage a list of ancestor shared memory areas (PDLs) + * so we can share descriptor status with ancestor processes. + */ + +/* add a PDL to the list */ +static void add_descriptor_area_list(char *newname, + int newfd, + int newsize, + int64_t offset, + pvfs_shmcontrol_t *new) +{ + pvfs_desc_list_t *pdl; + int name_size; + + pdl = (pvfs_desc_list_t *)malloc(sizeof(pvfs_desc_list_t)); + if (!pdl) { - /* PVFS file allocate a real descriptor for it */ - newfd = glibc_ops.dup(logfile); + glibc_ops.perror("Ran out of memory allocating a PDL"); } - else + if (newname) { - /* opened by glibc, make sure this is a valid fd */ - newfd = fd; - flags = glibc_ops.fcntl(newfd, F_GETFL); - if (flags < 0) + name_size = strlen(newname); + if (name_size > 0) { - return NULL; - } - if (descriptor_table[newfd] != NULL) - { - errno = EINVAL; - return NULL; + pdl->name = (char *)malloc(name_size + 1); + memcpy(pdl->name, newname, name_size); } } + pdl->ptr = new; + pdl->offset = offset; + pdl->size = newsize; + pdl->fd = newfd; + pdl->shares = 0; /* indicates how many items in the desc are shared */ + pdl->ptr->shmctrl_shared++; /* indicates we are sharing this desc */ + qlist_add(&pdl->link, &desc_list); +} - /* allocate new descriptor */ - descriptor_table_count++; - pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); - if (!pd) +/* close and possbily delete a PDL on the list */ +static void close_descriptor_area_list(pvfs_desc_list_t *pdl) +{ + int rc = 0; + + rc = glibc_ops.close(pdl->fd); + if (rc < 0) { - return NULL; + glibc_ops.perror("error closing a PDL\n"); + } + pdl->fd = -1; + rc = glibc_ops.munmap(pdl->ptr, pdl->size); + if (rc < 0) + { + glibc_ops.perror("error unmapping a PDL\n"); + } + pdl->size = 0; + pdl->ptr = NULL; + if (pdl->name) + { + free(pdl->name); + pdl->name = NULL; + } + pdl->name = NULL; + qlist_del(&pdl->link); + free(pdl); +} + +/* find a PDL on the list */ +static pvfs_desc_list_t *find_descriptor_area_list( + pvfs_descriptor_status *stat) +{ + pvfs_desc_list_t *pdl; + qlist_for_each_entry(pdl, &desc_list, link) + { + int64_t diff = PDLOFF(stat, pdl) - PDLOFF(pdl->ptr->status_pool, pdl); + if (diff >= 0 && diff < pdl->ptr->status_pool_size) + { + return pdl; + } + } + init_debug("Desc list item to find not found\n"); + return NULL; +} + +/* return self PDL */ +static pvfs_desc_list_t *first_descriptor_area_list(void) +{ + return qlist_entry(desc_list.next, pvfs_desc_list_t, link); +} + +/* This function is called when a process has just been fork()'d . + * It's job is to copy the parent's descriptor area and set it up. The + * actual kernel descriptor table is handled by the kernel of course. + * If the process calls exec() it will perform a similar copy but only + * of files that are supposed to remain open (not having the CLOEXEC + * flag). + */ +static void init_descriptor_area(void) +{ + int64_t parent_offset = 0; /* memory offset between parent and new desc */ + int d = 0; + int dtable_size = 0; /* number of slots in descriptor table */ + int dtable_count = 0; /* number of used slots in descriptor table */ + int parentobj; + pvfs_shmcontrol_t *parentctl; + int parentsize GCC_UNUSED; + pvfs_desc_list_t *pdl; + + init_debug("Forked, running init descriptor area\n"); + + /* we just forked and we are running this so by definition we should + * already have a descriptor table and we should have our parent's + * desciptor table mmaped. first verify this then move the existing + * one to the parent pointers + */ + + if (shmobj == -1 || shmctrl == NULL) + { + /* something is wrong */ + gossip_lerr("just forked but don't have a descriptor table\n"); + return; + } + + /* This pdl was our parent's - save pointers to it before we create + * our new one. + */ + pdl = first_descriptor_area_list(); + + parentctl = pdl->ptr; + parentsize = pdl->size; + + /* move parent pdl off of the magic fd */ + parentobj = glibc_ops.dup(pdl->fd); + glibc_ops.close(pdl->fd); + pdl->fd = parentobj; + + /* get ready to create new shm area */ + shmobj = -1; + shmctrl = NULL; + shmsize = 0; + memset(shmobjpath, 0, sizeof(shmobjpath)); + + /* Next we need to initialize the new shared memory space */ + init_descriptor_area_internal(); + + /* add new descriptor table to list of known desc tables */ + add_descriptor_area_list(shmobjpath, shmobj, shmsize, 0L,shmctrl); + + /* The indexes for dpath, desc, and status should already exist and + * all linux fds should aready be open so we should simply be able + * to copy the contents of the share memery area. The only real + * problem is that the internal pointers will need to change. + * We assume all live records in the tables are reachable via the + * main descriptor table and multiple copies of dup'd records is OK. + * ALso, open PVFS files point to a dup of the parent's shm object. + * These need to be closed and reopened on the new shm object via a + * call to dup2. + */ + /* Note: an alternative implementation would be to copy the whole + * shm area and then just update the pointers. Assuming most of the + * time there are a small number of open files, we can avoid a lot + * of that - but it may be more efficienet to do it all at once. + */ + + parent_offset = ((char *)shmctrl - (char *)parentctl); + /* copy the CWD */ + memcpy(shmctrl->shmctrl_cwd, parentctl->shmctrl_cwd, PVFS_PATH_MAX); + + /* set loop bounds */ + dtable_size = shmctrl->descriptor_table_size; + if (parentctl->descriptor_table_size < dtable_size) + { + dtable_size = parentctl->descriptor_table_size; + } + dtable_count = parentctl->descriptor_table_count; + + /* copy fd_table */ + memcpy(shmctrl->fd_table, + parentctl->fd_table, + parentctl->fd_table_count * sizeof(int)); + shmctrl->fd_table_count = parentctl->fd_table_count; + /* add parent to the fd_table */ + shmctrl->fd_table[shmctrl->fd_table_count++] = parentobj; + + /* Note that as this is a fork(), all of the pointers held by the + * parent should be valid. Only when we copy an object from the + * parent's table into our own will we have to adjust addresses + */ + /* now convert descriptors */ + for (d = 0; d < dtable_size && dtable_count; d++) + { + if (parentctl->descriptor_table[d]) + { + init_debug1("copying descriptor %d\n", d); + /* stop when we find all used slots */ + dtable_count--; + shmctrl->descriptor_table_count++; + /* adjust descriptor address */ + shmctrl->descriptor_table[d] = + P2L(parentctl->descriptor_table[d], pvfs_descriptor); + /* copy descriptor */ + memcpy(shmctrl->descriptor_table[d], + parentctl->descriptor_table[d], + sizeof(pvfs_descriptor)); + if (parentctl->descriptor_table[d]->s->fsops == &pvfs_ops) + { + /* we are going to share the status on this fd this fd + * may already be shared with and older process so we + * will have to find it in our list and indicate we are + * sharing one more fd with that processess. Any shares + * our parent was already sharing will count as well. + * We mark the fd as shared, we increment the number of + * shares on the status, and we increment the number of + * shares we have with this specific process + */ + init_debug1("sharing descriptor status %d\n", d); + /* set up a shared descriptor */ + shmctrl->descriptor_table[d]->shared_status = 1; + pdl = find_descriptor_area_list( + parentctl->descriptor_table[d]->s); + pdl->ptr->descriptor_table[d]->s->dup_cnt++; + /* If this was local to the parent and not an older + * process then we should free the space used by the + * status and potentially the dpath in our indices + */ + } + else + { + /* a glibc file so we can just copy the descriptor + * status because the actual sharing happens throught + * the kernel - adjust descriptor status address */ + shmctrl->descriptor_table[d]->s = + P2L(shmctrl->descriptor_table[d]->s, + pvfs_descriptor_status); + /* copy descriptor status */ + memcpy(shmctrl->descriptor_table[d]->s, + parentctl->descriptor_table[d]->s, + sizeof(pvfs_descriptor_status)); + if (shmctrl->descriptor_table[d]->s->dpath) + { + /* adjust directory path address */ + shmctrl->descriptor_table[d]->s->dpath = + P2L(shmctrl->descriptor_table[d]->s->dpath, char); + /* copy directory path */ + strncpy(shmctrl->descriptor_table[d]->s->dpath, + parentctl->descriptor_table[d]->s->dpath, + shmctrl->path_table_size - + (shmctrl->descriptor_table[d]->s->dpath - + shmctrl->path_table)); + } + } + } + } + + /* release the waiting parent */ + gen_mutex_lock(&parentctl->shmctrl_lock); + parentctl->shmctrl_copy = 0; + gen_cond_signal(&parentctl->shmctrl_cond); + gen_mutex_unlock(&parentctl->shmctrl_lock); + + /* and the new shm area should be good to go */ + init_debug("init descriptor area done\n"); +} + +/* This function creats and initializes a new shared memory descriptor + * area and sets up the various pointers in it. + */ +static void init_descriptor_area_internal(void) +{ + int rc = 0; + struct rlimit rl; + int table_size = 0; + int flags = 0; + + /* open the new program's shared memory object */ + /* we dup this FD to get FD's for pvfs files */ + flags = O_RDWR | O_CREAT | O_TRUNC; + snprintf(shmobjpath, + 50, + _PATH_DEV "shm/pvfs-%06d-%06d", + (int)getuid(), + (int)getpid()); + shmobj = glibc_ops.open(shmobjpath, flags, S_IRUSR | S_IWUSR); + if (shmobj < 0) + { + glibc_ops.perror("failed to open shared object in pvfs_sys_init"); + exit(-1); + } + + /* compute size of descriptor table */ + getrlimit(RLIMIT_NOFILE, &rl); + if (rl.rlim_max == RLIM_INFINITY) + { + table_size = PVFS_NOFILE_MAX; + } + else + { + table_size = rl.rlim_max; + } + if (table_size & 0x1) + { + table_size++; /* force table_size to an even number */ + } + shmsize = sizeof(pvfs_shmcontrol_t) + + (table_size * + (sizeof(pvfs_descriptor *) + + sizeof(pvfs_descriptor) + + sizeof(pvfs_descriptor_status))) + + PATH_TABLE_SIZE + + (FD_TABLE_SIZE * sizeof(int)); + + /* set the size of the shared object */ + glibc_ops.ftruncate(shmobj, (off_t)shmsize); + + /* set up shared memory area */ + shmctrl = (pvfs_shmcontrol_t *)glibc_ops.mmap(NULL, + shmsize, + PROT_READ | PROT_WRITE, + MAP_SHARED, + shmobj, + 0); + if (shmctrl == ((void *)-1)) + { + glibc_ops.perror("failed to malloc descriptor table"); + exit(-1); + } + /* move to magic fd */ + if (glibc_ops.dup2(shmobj, PVFS_SHMOBJ) == -1) + { + glibc_ops.perror("failed to move descriptor table to magic fd"); + exit(-1); + } + glibc_ops.close(shmobj); + shmobj = PVFS_SHMOBJ; + + /* unlink the /dev/shm entry - noone should need to open it again */ + glibc_ops.unlink(shmobjpath); + + /* clear shared memory */ + memset(shmctrl, 0, shmsize); + + /* set up descriptor table */ + descriptor_table = (pvfs_descriptor **)&shmctrl[1]; + + shmctrl->shm_magic = PVFS_SHM_MAGIC; + shmctrl->shmctrl = shmctrl; /* this is needed for reference mapping */ + + /* need to share this sync prm across processes */ + rc = gen_shared_mutex_init(&shmctrl->shmctrl_lock); + if (rc < 0) + { + init_perror("failed to init shared shmctrl mutex"); + } + + /* need to share this sync prm across processes */ + rc = gen_shared_cond_init(&shmctrl->shmctrl_cond); + if (rc < 0) + { + init_perror("failed to init shared condition var"); + } + + shmctrl->shmctrl_copy = 0; + memset(shmctrl->shmctrl_cwd, 0, PVFS_PATH_MAX); + + shmctrl->descriptor_table = descriptor_table; + shmctrl->descriptor_table_size = table_size; + shmctrl->descriptor_table_count = 0; + /* need to share this sync prm across processes */ + rc = gen_shared_mutex_init(&shmctrl->descriptor_table_lock); + if (rc < 0) + { + init_perror("failed to init shared table mutex"); + } + + shmctrl->descriptor_pool = (pvfs_descriptor *) + &shmctrl->descriptor_table[table_size]; + shmctrl->descriptor_pool_size = table_size; + + shmctrl->status_pool = (pvfs_descriptor_status *) + &shmctrl->descriptor_pool[table_size]; + shmctrl->status_pool_size = table_size; + + shmctrl->path_table = (char *)&shmctrl->status_pool[table_size]; + shmctrl->path_table_size = PATH_TABLE_SIZE; + + shmctrl->fd_table = (int *)&shmctrl->path_table[PATH_TABLE_SIZE]; + shmctrl->fd_table_size = FD_TABLE_SIZE; + shmctrl->fd_table_count = 0; +} + +/* + * Internal function used to adjust internal pointers in the descriptor + * table area after an exec call. The area was closed, unmapped, then + * reopened and remapped but probably at a different address so the + * pointers are off by a displacement. parentctl should hve been + * initialized to the original address and shmctrl is the new address. + * Other addresses may have moved such as glibc_ops and pvfs_ops. While + * we are scanning we look for files that were marked FD_CLOEXEC and + * close them and we dup the shmobj for each PVFS file as those would + * have been closed as well. Finally, since the indices have been + * wiped we rebuild them by adding records for all unused space in the + * corresponding pools. Part of usrlib initialization. + */ +static void rebuild_descriptor_table(pvfs_desc_list_t *shmpdl) +{ + int d = 0; + int dtable_size = 0; + int dtable_count = 0; + int flags = 0; + int last = 0; + pvfs_shmcontrol_t *scp; + + scp = shmpdl->ptr; + + init_debug("Rebuilding descriptor table\n"); + + /* old pointers in the shared memory space plus parent_offset + * gives the new pointer address. This could easily be zero if mmap + * maps to same spot but we also have other things to do in the + * comming loop so we will just go ahead and add zero the pointers + * which should be just fine. There probably aren't that many. We + * could bypass that inside the loop if we wanted to. + */ + init_debug1("rebuild_offset = %lld\n", shmpdl->offset); + + /* FIXME: stdout probably isn't set up yet - should be gossip anyway */ + /* printf("Called copy_parent_to_descriptor_table\n"); */ + + /* first get the control record adjusted */ + init_debug1("P descriptor_table = %p\n", scp->descriptor_table); + scp->descriptor_table = (pvfs_descriptor **)PDLOFF(scp->descriptor_table, + shmpdl); + init_debug1("S descriptor_table = %p\n", scp->descriptor_table); + + init_debug1("P descriptor_pool = %p\n", scp->descriptor_pool); + scp->descriptor_pool = (pvfs_descriptor *)PDLOFF(scp->descriptor_pool, + shmpdl); + init_debug1("S descriptor_pool = %p\n", scp->descriptor_pool); + + init_debug1("P status_pool = %p\n", scp->status_pool); + scp->status_pool = (pvfs_descriptor_status *)PDLOFF(scp->status_pool, + shmpdl); + init_debug1("S status_pool = %p\n", scp->status_pool); + + init_debug1("P path_table = %p\n", scp->path_table); + scp->path_table = (char *)PDLOFF(shmctrl->path_table, shmpdl); + init_debug1("S path_table = %p\n", scp->path_table); + + init_debug1("P fd_table = %p\n", scp->fd_table); + scp->fd_table = (int *)PDLOFF(scp->fd_table, shmpdl); + init_debug1("S fd_table = %p\n", scp->fd_table); + + /* There is an inherent assumption that all useful items in the + * tables can be reached via the main descriptor table. We do not + * scan the pools directly. Also desc stat records may be copied + * twice if they have been duped. Should not be a problem. + */ + + dtable_size = scp->descriptor_table_size; + dtable_count = scp->descriptor_table_count; + + for (d = 0; d < dtable_size && dtable_count; d++) + { + if (scp->descriptor_table[d]) + { + pvfs_descriptor_status *st; + + init_debug1("adjusting descriptor %d\n", d); + dtable_count--; + /* adjust descriptor address */ + scp->descriptor_table[d] = + (pvfs_descriptor *)PDLOFF(scp->descriptor_table[d], shmpdl); + /* adjust descriptor status address */ + st = scp->descriptor_table[d]->s; + if (scp->descriptor_table[d]->shared_status) + { + pvfs_desc_list_t *pdl; + pdl = find_descriptor_area_list(st); + scp->descriptor_table[d]->s = + (pvfs_descriptor_status *)PDLOFF(st, pdl); + /* we were already sharing this so don't increament the + * counters in the other table, but do increment in the + * pdl so we know how many references to this table we + * have + */ + pdl->shares++; + } + else + { + /* not shared, adjust as normal */ + scp->descriptor_table[d]->s = + (pvfs_descriptor_status *)PDLOFF(st, shmpdl); + } + /* recreate fsops pointer */ + if (scp->descriptor_table[d]->s->pvfs_ref.fs_id) + { + scp->descriptor_table[d]->s->fsops = &pvfs_ops; + } + else + { + scp->descriptor_table[d]->s->fsops = &glibc_ops; + } + if (scp->descriptor_table[d]->s->dpath) + { + /* adjust directory path address */ + scp->descriptor_table[d]->s->dpath = + (char *)PDLOFF(scp->descriptor_table[d]->s->dpath, shmpdl); + } + if ((scp->descriptor_table[d]->fdflags & FD_CLOEXEC)) + { + /* remove the entry */ + glibc_ops.close(scp->descriptor_table[d]->true_fd); + if (scp->descriptor_table[d]->s->dpath) + { + int len; + len = strlen(scp->descriptor_table[d]->s->dpath); + memset(scp->descriptor_table[d]->s->dpath, 0, len); + } + memset(scp->descriptor_table[d]->s, + 0, + sizeof(pvfs_descriptor_status)); + memset(scp->descriptor_table[d], + 0, + sizeof(pvfs_descriptor)); + scp->descriptor_table[d] = NULL; + scp->descriptor_table_count--; + } + else + { + if (scp->descriptor_table[d]->s->fsops == &pvfs_ops) + { + /* dup the shmobj for PVFS files */ + glibc_ops.dup2(shmpdl->fd, + scp->descriptor_table[d]->true_fd); + /* PVFS true_fd's are all CLOEXEC */ + flags = glibc_ops.fcntl( + scp->descriptor_table[d]->true_fd, + F_GETFD); + glibc_ops.fcntl(scp->descriptor_table[d]->true_fd, + F_SETFD, + flags | FD_CLOEXEC); + } + /* we assume glibc files are still open */ + } + if (scp->descriptor_table[d]->s->fent) + { + /* need to decide how to update this correctly */ + scp->descriptor_table[d]->s->fent = NULL; + } + } + } + + /* now we need to rebuild the indices for desc, status, and dpath */ +# define HIT 1 +# define MISS 0 + /* This looks for unused segments (MISSes) of the tables and adds + * records to the index representing contiguous runs of those unused + * segments. HITS are being used and we skip over them. + */ +# define BUILD_INDEX(_list, _type, _size_exp, _in_use_exp) \ + do { \ + int d = 0; \ + index_rec_t *rec; \ + last = HIT; \ + rec = (_type *)malloc(sizeof(_type)); \ + rec->first = 0; \ + rec->size = 0; \ + for (d = 0; d < (_size_exp); d++) \ + { \ + if (_in_use_exp) /* this is a HIT */ \ + { \ + if (last == HIT) \ + { \ + /* skip this one */ \ + } \ + else \ + { \ + /* add record to list */ \ + qlist_add_tail(&(rec->link), (_list)); \ + rec = (_type *)malloc(sizeof(_type)); \ + rec->first = 0; \ + rec->size = 0; \ + } \ + last = HIT; \ + } \ + else /* it was a MISS */ \ + { \ + if (last == HIT) \ + { \ + rec->first = d; \ + rec->size = 1; \ + } \ + else \ + { \ + rec->size++; \ + } \ + last = MISS; \ + } \ + } \ + d--; \ + if (!(_in_use_exp)) \ + { \ + qlist_add_tail(&(rec->link), (_list)); \ + } \ + } while (0) + + /* descriptor pool index */ + BUILD_INDEX(&desc_index, + index_rec_t, + shmctrl->descriptor_pool_size, + shmctrl->descriptor_pool[d].is_in_use); + + /* status pool index */ + BUILD_INDEX(&stat_index, + index_rec_t, + shmctrl->status_pool_size, + shmctrl->status_pool[d].fsops); + + /* dpath pool index */ + BUILD_INDEX(&path_index, + index_rec_t, + shmctrl->path_table_size, + (shmctrl->path_table[d] || + (d > 0 && !shmctrl->path_table[d] && + shmctrl->path_table[d - 1]))); + +# undef BUILD_INDEX +# undef MISS +# undef HIT + + descriptor_table = shmctrl->descriptor_table; + shmpdl->offset = 0L; + /* descriptor table should be ready to go */ + init_debug("Rebuilding done\n"); +} + +int pvfs_descriptor_table_size(void) +{ + return shmctrl->descriptor_table_size; +} + +int pvfs_descriptor_table_next(int start) +{ + int flags; + int i; + for (i = start; i < shmctrl->descriptor_table_size; i++) + { + if (!descriptor_table[i]) + { + flags = glibc_ops.fcntl(i, F_GETFL); + if (flags < 0) + { + return i; + } + } + } + return -1; +} + +/* allocate a pvfs_descriptor struct in the shared memory region + * the fd is just a hint that can be used in allocation or ignored + * This simply abstracts the management alorithm for this struct in the + * shared memory region. + */ +static pvfs_descriptor *get_descriptor(void) +{ + int desc; + pvfs_descriptor *pd; + + desc = pvfs_desc_alloc(&desc_index); + if (desc < 0 || desc >= shmctrl->descriptor_pool_size) + { + gossip_lerr("bad descriptor number allocated"); + return NULL; + } + pd = &shmctrl->descriptor_pool[desc]; + if (!pd) + { + gossip_lerr("bad descriptor struct allocated"); + return NULL; } memset(pd, 0, sizeof(pvfs_descriptor)); + return pd; +} + +/* unallocate a pvfs_descriptor struct in the shared memory region + * the fd is just a hint that can be used in unallocation or ignored + * This simply abstracts the management alorithm for this struct in the + * shared memory region. + */ +static void put_descriptor(pvfs_descriptor *pd) +{ + int desc; + desc = pd - shmctrl->descriptor_pool; + if (desc < 0 || desc >= shmctrl->descriptor_pool_size) + { + gossip_lerr(" bad fd in put_descriptor\n"); + return; + } + memset(pd, 0, sizeof(pvfs_descriptor)); + pvfs_desc_free(desc, &desc_index); +} + +/* allocate a pvfs_descriptor_status struct in the shared memory region + * the fd is just a hint that can be used in allocation or ignored + * This simply abstracts the management alorithm for this struct in the + * shared memory region. + */ +static pvfs_descriptor_status *get_status(void) +{ + int dstat; + pvfs_descriptor_status *pds; + + dstat = pvfs_desc_alloc(&stat_index); + if (dstat < 0 || dstat >= shmctrl->status_pool_size) + { + gossip_lerr("bad desc status number allocated"); + return NULL; + } + pds = &shmctrl->status_pool[dstat]; + if (!pds) + { + gossip_lerr("bad desc status struct allocated"); + return NULL; + } + memset(pds, 0, sizeof(pvfs_descriptor_status)); + return pds; +} + +/* unallocate a pvfs_descriptor_status struct in the shared memory region + * the fd is just a hint that can be used in unallocation or ignored + * This simply abstracts the management alorithm for this struct in the + * shared memory region. + */ +static void put_status(pvfs_descriptor_status *pds) +{ + int dstat; + dstat = pds - shmctrl->status_pool; + if (dstat < 0 || dstat >= shmctrl->status_pool_size) + { + gossip_lerr(" bad fds in put_status\n"); + return; + } + memset(pds, 0, sizeof(pvfs_descriptor_status)); + pvfs_desc_free(dstat, &stat_index); +} - gen_mutex_init(&pd->lock); +/* allocate the descriptor and descriptor_status for a given slot in the + * descriptor_table - use the given status if not NULL. Adjust counter + * and deal with locks to ensure thread safety, + */ +static pvfs_descriptor *get_desc_table_entry(int newfd, + pvfs_descriptor_status *ps) +{ + int rc; + pvfs_descriptor *pd = NULL; + + if (newfd < 0 || newfd >= shmctrl->descriptor_table_size) + { + gossip_lerr(" bad fd in get_desc_table_entry"); + return NULL; + } + gen_mutex_lock(&shmctrl->descriptor_table_lock); + if (descriptor_table[newfd] != NULL) + { + errno = EINVAL; + gen_mutex_unlock(&shmctrl->descriptor_table_lock); + return NULL; + } + + /* allocate new descriptor */ + pd = get_descriptor(); + if (!pd) + { + gen_mutex_unlock(&shmctrl->descriptor_table_lock); + return NULL; + } + rc = gen_shared_mutex_init(&pd->lock); + if (rc < 0) + { + init_perror("failed to init shared descriptor mutex"); + } gen_mutex_lock(&pd->lock); + descriptor_table[newfd] = pd; + shmctrl->descriptor_table_count++; - pd->s = (pvfs_descriptor_status *)malloc(sizeof(pvfs_descriptor_status)); - if (!pd->s) + if (ps) + { + pd->s = ps; + } + else { - free(pd); + pd->s = get_status(); + if (!pd->s) + { + gen_mutex_unlock(&pd->lock); + put_descriptor(pd); + pd = NULL; + descriptor_table[newfd] = NULL; + gen_mutex_unlock(&shmctrl->descriptor_table_lock); + return NULL; + } + gen_shared_mutex_init(&pd->s->lock); + if (rc < 0) + { + init_perror("failed to init shared desc status mutex"); + } + } + gen_mutex_lock(&pd->s->lock); + + gen_mutex_unlock(&shmctrl->descriptor_table_lock); + return pd; +} + +/** + * Allocate a new pvfs_descriptor, initialize fsops to the given set + * This is the routine called externally and deals with getting the + * structures ready for use. + * + * fsops: IN points to system call methods + * newfd: IN -1 to select a free fd, otherwise assume linux fd is open + * file_ref: IN for pvfs files the handle, etc. + * use_cache: IN flag indicates will use user level cache + * + * ON RETURN NEW PD AND STATUS ARE STILL LOCKED! + */ + pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, + int newfd, + PVFS_object_ref *file_ref, + int use_cache) + { + int dupfd = -1, flags = 0, rc = 0; + pvfs_descriptor *pd; + /* insure one thread at a time is in */ + /* fd setup section */ + + PVFS_INIT(pvfs_sys_init); + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_alloc_descriptor called with %d\n", newfd); + if (fsops == NULL) + { + errno = EINVAL; + return NULL; + } + if (newfd == -1) + { + /* PVFS file allocate a real descriptor for it */ + newfd = dupfd = glibc_ops.dup(shmobj); + if (newfd < 0) + { + gossip_lerr("dup failed in alloc_des\n"); + return NULL; + } + flags = glibc_ops.fcntl(newfd, F_GETFD); + if (flags < 0) + { + gossip_lerr("fcntl failed in alloc_des\n"); + return NULL; + } + rc = glibc_ops.fcntl(newfd, F_SETFD, flags | FD_CLOEXEC); + if (rc < 0) + { + gossip_lerr("fcntl failed in alloc_des\n"); + return NULL; + } + } + else + { + if (fsops == &glibc_ops) + { + /* previously opened by glibc, make sure this is a valid fd */ + flags = glibc_ops.fcntl(newfd, F_GETFL); + if (flags < 0) + { + gossip_lerr("fcntl failed in alloc_des\n"); + return NULL; + } + } + else + { + /* forcing a pvfs file to a specific fd, must be unused */ + flags = glibc_ops.fcntl(newfd, F_GETFL); + if (flags >= 0) + { + /* fd is in use - should not happend */ + gossip_lerr("called pvfs_alloc_descriptor with a forced " + "fd that is in use\n"); + return NULL; + } + newfd = dupfd = glibc_ops.dup2(shmobj, newfd); + if (newfd < 0) + { + gossip_lerr("dup2 failed in alloc_des\n"); + return NULL; + } + flags = glibc_ops.fcntl(newfd, F_GETFD); + if (flags < 0) + { + gossip_lerr("fcntl failed in alloc_des\n"); + return NULL; + } + rc = glibc_ops.fcntl(newfd, F_SETFD, flags | FD_CLOEXEC); + if (rc < 0) + { + gossip_lerr("fcntl failed in alloc_des\n"); + return NULL; + } + } + } + if (descriptor_table[newfd]) + { + gossip_lerr("Trying to allocate descriptor where one " + "appears to already exist\n"); return NULL; } - memset(pd->s, 0, sizeof(pvfs_descriptor_status)); - gen_mutex_init(&pd->s->lock); - gen_mutex_lock(&pd->s->lock); + pd = get_desc_table_entry(newfd, NULL); + if (pd == NULL) + { + if (dupfd > -1) + { + glibc_ops.close(dupfd); + } + return NULL; + } + descriptor_table[newfd] = pd; /* fill in descriptor */ pd->is_in_use = PVFS_FS; @@ -664,15 +2139,17 @@ int pvfs_descriptor_table_size(void) pd->s->pvfs_ref.handle = 0LL; } - pd->s->flags = flags; - pd->s->mode = 0; /* this should be filled in by caller */ pd->s->file_pointer = 0; pd->s->token = 0; + /* these should be filled in by caller as needed */ pd->s->dpath = NULL; pd->s->fent = NULL; /* not caching if left NULL */ + pd->s->flags = 0; + pd->s->mode = 0; + pd->s->mode_deferred = 0; #if PVFS_UCACHE_ENABLE - if (ucache_enabled /* && use_cache*/ ) + if (ucache_enabled && use_cache) { /* File reference won't always be passed in */ if(file_ref != NULL) @@ -688,92 +2165,151 @@ int pvfs_descriptor_table_size(void) } #endif /* PVFS_UCACHE_ENABLE */ - /* NEW PD IS STILL LOCKED */ + /* NEW PD AND STATUS ARE STILL LOCKED */ + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_alloc_descriptor returns with %d\n", pd->fd); return pd; } /* - * Function for duplicating a descriptor - used in dup and dup2 calls + * Function for duplicating a descriptor + * used in dup, dup2, dup3, and fcntl calls + * This is called externally to manage FDs for these calls */ -int pvfs_dup_descriptor(int oldfd, int newfd) +int pvfs_dup_descriptor(int oldfd, int newfd, int flags, int fcntl_dup) { int rc = 0; pvfs_descriptor *pd; - pvfs_sys_init(); - if (oldfd < 0 || oldfd >= descriptor_table_size) + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_dup_descriptor: called with %d\n", oldfd); + PVFS_INIT(pvfs_sys_init); + if (oldfd < 0 || oldfd >= shmctrl->descriptor_table_size || + !descriptor_table[oldfd] || + descriptor_table[oldfd]->is_in_use != PVFS_FS) { errno = EBADF; return -1; } + if (newfd < -1 || newfd >= shmctrl->descriptor_table_size) + { + errno = EINVAL; + return -1; + } if (newfd == -1) /* dup */ { - newfd = glibc_ops.dup(logfile); + newfd = glibc_ops.dup(shmobj); + flags = glibc_ops.fcntl(newfd, F_GETFD); + glibc_ops.fcntl(newfd, F_SETFD, flags | FD_CLOEXEC); if (newfd < 0) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\npvfs_dup_descriptor: returns with %d\n", newfd); return newfd; } } - else /* dup2 */ + else /* dup2, dup3, or fcntl */ { /* see if requested fd is in use */ - if (descriptor_table[newfd] != NULL) + if (descriptor_table[newfd] != NULL || + glibc_ops.fcntl(newfd, F_GETFL) != -1) { /* check for special case */ if (newfd == oldfd) { - return oldfd; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_dup_descriptor: returns with %d\n", oldfd); + return newfd; } - /* close old file in new slot */ - rc = pvfs_free_descriptor(newfd); - if (rc < 0) + if (fcntl_dup) /* this is fcntl */ { - return rc; + /* find smallest available fd >= newfd */ + newfd++; /* we know original newfd is in use */ + while (descriptor_table[newfd] || + glibc_ops.fcntl(newfd, F_GETFL) != -1) + { + newfd++; + if (newfd >= shmctrl->descriptor_table_size) + { + /* ran out of valid fds */ + errno = EMFILE; + return -1; + } + } + if (errno != EBADF) + { + gossip_err("error in pvfs_dup_descriptor\n"); + } + else + { + /* EBADF means an unused fd - not a real error */ + errno = 0; + } + } + else /* this is dup2 or dup3 */ + { + /* close old file in new slot */ + rc = pvfs_free_descriptor(newfd); + if (rc < 0) + { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_dup_descriptor: returns with %d\n", rc); + return rc; + } } } - /* continuing with dup2 */ - rc = glibc_ops.dup2(oldfd, newfd); + /* continuing with dup2, dup2, or fcntl */ + rc = glibc_ops.dup2(shmobj, newfd); + flags = glibc_ops.fcntl(newfd, F_GETFD); + glibc_ops.fcntl(newfd, F_SETFD, flags | FD_CLOEXEC); if (rc < 0) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_dup_descriptor: returns with %d\n", rc); return rc; } } - /* new set up new pvfs_descfriptor */ - descriptor_table_count++; - pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); - if (!pd) + + /* set up new pvfs_descriptor */ + pd = get_desc_table_entry(newfd, descriptor_table[oldfd]->s); + if (pd == NULL) { + glibc_ops.close(newfd); return -1; } - memset(pd, 0, sizeof(pvfs_descriptor)); - gen_mutex_init(&pd->lock); - gen_mutex_lock(&pd->lock); descriptor_table[newfd] = pd; pd->is_in_use = PVFS_FS; pd->fd = newfd; pd->true_fd = newfd; - pd->fdflags = 0; - /* share the pvfs_desdriptor_status info */ - pd->s = descriptor_table[oldfd]->s; - gen_mutex_lock(&pd->s->lock); + pd->fdflags = flags; pd->s->dup_cnt++; + if (descriptor_table[oldfd]->shared_status) + { + pd->shared_status = 1; + shmctrl->shmctrl_shared++; + } + gen_mutex_unlock(&pd->s->lock); gen_mutex_unlock(&pd->lock); - return 0; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_dup_descriptor: returns with %d\n", newfd); + return newfd; } /* * Return a pointer to the pvfs_descriptor for the file descriptor or null * if there is no entry for the given file descriptor * should probably be inline if we can get at static table that way + * This is the external lookup routine for FDs used in interfaces */ pvfs_descriptor *pvfs_find_descriptor(int fd) { pvfs_descriptor *pd = NULL; + struct stat sbuf; - pvfs_sys_init(); - if (fd < 0 || fd >= descriptor_table_size) + PVFS_INIT(pvfs_sys_init); + if (fd < 0 || fd >= shmctrl->descriptor_table_size) { errno = EBADF; return NULL; @@ -782,50 +2318,71 @@ pvfs_descriptor *pvfs_find_descriptor(int fd) if (!pd) { int flags = 0; + int fdflags = 0; /* see if glibc opened this file without our knowing */ flags = glibc_ops.fcntl(fd, F_GETFL); if (flags == -1) { - /* apparently not */ + /* apparently not - use errno set by fcntl */ return NULL; } - /* allocate a descriptor */ - descriptor_table_count++; - pd = (pvfs_descriptor *)malloc(sizeof(pvfs_descriptor)); + /* we will need the fdflags as well */ + fdflags = glibc_ops.fcntl(fd, F_GETFD); + + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_find_descriptor: implicit alloc of descriptor %d\n", fd); + + /* this returns pd with a new pd->s both locked */ + pd = get_desc_table_entry(fd, NULL); if (!pd) { return NULL; } - memset(pd, 0, sizeof(pvfs_descriptor)); - gen_mutex_init(&pd->lock); - gen_mutex_lock(&pd->lock); descriptor_table[fd] = pd; - - pd->s = - (pvfs_descriptor_status *)malloc(sizeof(pvfs_descriptor_status)); - if (!pd->s) - { - free(pd); - return NULL; - } - memset(pd->s, 0, sizeof(pvfs_descriptor_status)); - gen_mutex_init(&pd->s->lock); /* fill in descriptor */ pd->is_in_use = PVFS_FS; pd->fd = fd; pd->true_fd = fd; - pd->fdflags = 0; + pd->fdflags = fdflags; pd->s->dup_cnt = 1; pd->s->fsops = &glibc_ops; pd->s->pvfs_ref.fs_id = 0; pd->s->pvfs_ref.handle = 0LL; pd->s->flags = flags; - pd->s->mode = 0; + pd->s->dpath = NULL; + glibc_ops.fstat(fd, &sbuf); + pd->s->mode = sbuf.st_mode; + if (S_ISDIR(sbuf.st_mode)) + { + /* need to get path for this fd from /proc */ + /* we will use glibc to open /proc/self/# which */ + /* is a symbolic link, and then read the link */ + /* to get the path */ + char procpath[50]; + char dirpath[PVFS_PATH_MAX]; + int len; + + memset(procpath, 0, 50); + memset(dirpath, 0, PVFS_PATH_MAX); + sprintf(procpath, "/proc/self/fd/%d", fd); + len = glibc_ops.readlink(procpath, dirpath, PVFS_PATH_MAX); + if (len < 0) + { + /* error reading link */ + /* silent for now */ + /* we just won't have the path for this dir */ + } + else + { + /* stash the path */ + pd->s->dpath = pvfs_dpath_insert(dirpath); + } + } pd->s->file_pointer = 0; pd->s->token = 0; - pd->s->dpath = NULL; pd->s->fent = NULL; /* not caching if left NULL */ + gen_mutex_unlock(&pd->s->lock); } else { @@ -843,322 +2400,135 @@ pvfs_descriptor *pvfs_find_descriptor(int fd) return pd; } +/* + * External call for interfaces to unallocate FDs + */ int pvfs_free_descriptor(int fd) { int dup_cnt; pvfs_descriptor *pd = NULL; - debug("pvfs_free_descriptor called with %d\n", fd); + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_free_descriptor called with %d\n", fd); - pd = pvfs_find_descriptor(fd); + pd = descriptor_table[fd]; if (pd == NULL) { - return -1; + int rc; + /* may have gotten a close on previously unknown glibc fd */ + rc = glibc_ops.close(fd); + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_free_descriptor returns %d\n", rc); + return rc; } + gen_mutex_lock(&pd->lock); /* clear out table entry */ + gen_mutex_lock(&shmctrl->descriptor_table_lock); descriptor_table[fd] = NULL; - glibc_ops.close(fd); + glibc_ops.close(pd->true_fd); /* keep up with used descriptors */ - descriptor_table_count--; + --(shmctrl->descriptor_table_count); - /* check if last copy */ + gen_mutex_unlock(&shmctrl->descriptor_table_lock); gen_mutex_lock(&pd->s->lock); + + /* descrement dup count */ dup_cnt = --(pd->s->dup_cnt); - gen_mutex_unlock(&pd->s->lock); - if (dup_cnt <= 0) + + /* if not sharing, see if last dup */ + if (dup_cnt <= 0 && !pd->shared_status) { + /* not shared and last dup */ + if (pd->s->mode & pd->s->mode_deferred) + { + PVFS_sys_attr attr; + /* there were deferred mode bits */ + iocommon_getattr(pd->s->pvfs_ref, &attr, PVFS_ATTR_DEFAULT_MASK); + attr.perms &= ~(pd->s->mode_deferred); + attr.mask = PVFS_ATTR_SYS_PERM; + iocommon_setattr(pd->s->pvfs_ref, &attr); + } + /* free up dpsth space */ if (pd->s->dpath) { - free(pd->s->dpath); + pvfs_dpath_remove(pd->s->dpath); } #if PVFS_UCACHE_ENABLE + /* What about caching of shared files? */ + /* Should we not clear the cache in the shared case too? */ if (pd->s->fent) { int rc = 0; rc = ucache_close_file(pd->s->fent); if(rc == -1) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_free_descriptor returns %d\n", rc); return rc; } } #endif /* PVFS_UCACHE_ENABLE */ - /* free descriptor status - wipe memory first */ - memset(pd->s, 0, sizeof(pvfs_descriptor_status)); - - /* first 3 descriptors not malloc'd */ - if (fd > 2) - { - free(pd->s); - } - } - /* free descriptor - wipe memory first */ - memset(pd, 0, sizeof(pvfs_descriptor)); - /* first 3 descriptors not malloc'd */ - if (fd > 2) - { - free(pd); - } - - debug("pvfs_free_descriptor returns %d\n", 0); - return 0; -} - -/* - * takes a path that is relative to the working dir and - * expands it all the way to the root - */ -char *pvfs_qualify_path(const char *path) -{ - int cdsz, psz, msz; - char *rc; - char *newpath = NULL; - char curdir[PVFS_PATH_MAX]; - - if(path[0] != '/') - { - memset(curdir, 0, PVFS_PATH_MAX); - rc = getcwd(curdir, PVFS_PATH_MAX); - if (curdir == NULL) - { - /* ERANGE if need a larger buffer */ - /* error, bail out */ - return NULL; - } - cdsz = strlen(curdir); - psz = strlen(path); - msz = cdsz + psz + 2; - if (msz < 2) - { - errno = EINVAL; - return NULL; - } - /* allocate buffer for whole path and copy */ - newpath = (char *)malloc(msz); - if (!newpath) - { - return NULL; - } - memset(newpath, 0, msz); - if (cdsz >= 0) /* zero size copy is bad */ - { - strncpy(newpath, curdir, cdsz); - } - /* free(curdir); */ - strncat(newpath, "/", 1); - if (psz >= 0) /* zero size copy is bad */ - { - strncat(newpath, path, psz); - } + gen_mutex_unlock(&pd->s->lock); + /* status gets returned to pool here */ + put_status(pd->s); + pd->s = NULL; } else { - newpath = (char *)path; - } - return newpath; -} - -/** - * Determines if a path is part of a PVFS Filesystem - * - * returns 1 if PVFS 0 otherwise - */ - -int is_pvfs_path(const char *path) -{ - int rc = 0; - char *newpath = NULL ; -#if PVFS_USRINT_KMOUNT - int npsize; - struct stat sbuf; - struct statfs fsbuf; -#else - PVFS_fs_id fs_id; - char pvfs_path[PVFS_PATH_MAX]; -#endif - - if(pvfs_sys_init()) - { - return 0; - } - - if (!path) - { - errno = EINVAL; - return 0; /* let glibc sort out the error */ - } -#if PVFS_USRINT_KMOUNT - memset(&sbuf, 0, sizeof(sbuf)); - memset(&fsbuf, 0, sizeof(fsbuf)); - npsize = strnlen(path, PVFS_PATH_MAX) + 1; - newpath = (char *)malloc(npsize); - if (!newpath) - { - return 0; /* let glibc sort out the error */ - } - strncpy(newpath, path, npsize); - - /* first try to stat the path */ - /* this must call standard glibc stat */ - rc = glibc_ops.stat(newpath, &sbuf); - if (rc < 0) - { - int count; - /* path doesn't exist, try removing last segment */ - for(count = strlen(newpath) - 2; count > 0; count--) + int closed = 0; + /* check for shared status */ + if (pd->shared_status) { - if(newpath[count] == '/') + /* this descriptor is shared with another process */ + pvfs_desc_list_t *pdl; + pdl = find_descriptor_area_list(pd->s); + if (--(pdl->shares)) { - newpath[count] = '\0'; - break; + closed = 1; + gen_mutex_unlock(&pd->s->lock); + close_descriptor_area_list(pdl); } + /* cannot release the status because another process owns the + * indices for it + */ } - /* this must call standard glibc stat */ - rc = glibc_ops.stat(newpath, &sbuf); - if (rc < 0) + if (!closed) { - /* can't find the path must be an error */ - free(newpath); - return 0; /* let glibc sort out the error */ + gen_mutex_unlock(&pd->s->lock); } } - /* this must call standard glibc statfs */ - rc = glibc_ops.statfs(newpath, &fsbuf); - free(newpath); - if(fsbuf.f_type == PVFS_FS) - { - return 1; /* PVFS */ - } - else - { - return 0; /* not PVFS assume the kernel can handle it */ - } -/***************************************************************/ -#else /* PVFS_USRINT_KMOUNT */ -/***************************************************************/ - /* we might not be able to stat the file direcly - * so we will use our resolver to look up the path - * prefix in the mount tab files - */ - memset(pvfs_path, 0 , PVFS_PATH_MAX); - newpath = pvfs_qualify_path(path); - rc = PVFS_util_resolve(newpath, &fs_id, pvfs_path, PVFS_PATH_MAX); - if (newpath != path) - { - free(newpath); - } - if (rc < 0) - { - if (rc == -PVFS_ENOENT) - { - return 0; /* not a PVFS path */ - } - errno = rc; - return 0; /* an error returned - let glibc deal with it */ - // return -1; /* an error returned */ - } - return 1; /* a PVFS path */ -#endif /* PVFS_USRINT_KMOUNT */ + gen_mutex_unlock(&pd->lock); + put_descriptor(pd); + + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_free_descriptor returns %d\n", 0); + return 0; } -/** - * Split a pathname into a directory and a filename. - * If non-null is passed as the directory or filename, - * the field will be allocated and filled with the correct value - * - * A slash at the end of the path is interpreted as no filename - * and is an error. To parse the last dir in a path, remove this - * trailing slash. No filename with no directory is OK. - */ -int split_pathname( const char *path, - int dirflag, - char **directory, - char **filename) +int pvfs_put_cwd(char *buf, int size) { - int i, fnlen, slashes = 0; - int length = strlen("pvfs2"); + memset(shmctrl->shmctrl_cwd, 0, PVFS_PATH_MAX); + memcpy(shmctrl->shmctrl_cwd, buf, size); + return 0; +} - if (!path || !directory || !filename) - { - errno = EINVAL; - return -1; - } - /* chop off pvfs2 prefix */ - if (strncmp(path, "pvfs2:", length) == 0) - { - path = &path[length]; - } - /* Split path into a directory and filename */ - length = strnlen(path, PVFS_PATH_MAX); - if (length == PVFS_PATH_MAX) - { - errno = ENAMETOOLONG; - return -1; - } - i = length - 1; - if (dirflag) - { - /* skip any trailing slashes */ - for(; i >= 0 && path[i] == '/'; i--) - { - slashes++; - } - } - for (; i >= 0; i--) - { - if (path[i] == '/') - { - /* parse the directory */ - *directory = malloc(i + 1); - if (!*directory) - { - return -1; - } - strncpy(*directory, path, i); - (*directory)[i] = '\0'; - break; - } - } - if (i == -1) - { - /* found no '/' path is all filename */ - *directory = NULL; - } - i++; - /* copy the filename */ - fnlen = length - i - slashes; - if (fnlen == 0) - { - filename = NULL; - if (!directory) - { - errno = EISDIR; - } - else - { - errno = ENOENT; - } - return -1; - } - /* check flag to see if there are slashes to skip */ - *filename = malloc(fnlen + 1); - if (!*filename) - { - if (*directory) - { - free(*directory); - } - *directory = NULL; - *filename = NULL; - return -1; - } - strncpy(*filename, path + i, length - i); - (*filename)[length - i] = '\0'; +int pvfs_len_cwd(void) +{ + return strnlen(shmctrl->shmctrl_cwd, PVFS_PATH_MAX); +} + +int pvfs_get_cwd(char *buf, int size) +{ + memcpy(buf, shmctrl->shmctrl_cwd, size); return 0; } +/* + * These are used by some interfaces to generate randome values using an + * independent stream saved in the global array rstate. + */ void PINT_initrand(void) { static int init_called = 0; diff --git a/src/client/usrint/openfile-util.h b/src/client/usrint/openfile-util.h index b3c8a05..56c88f3 100644 --- a/src/client/usrint/openfile-util.h +++ b/src/client/usrint/openfile-util.h @@ -4,8 +4,6 @@ * See COPYING in top-level directory. */ -#include "posix-ops.h" - /** \file * \ingroup usrint * @@ -14,27 +12,34 @@ #ifndef OPENFILE_UTIL_H #define OPENFILE_UTIL_H 1 -//Define success and error return values +#include "pvfs2-internal.h" +#include "posix-ops.h" + +/* used in stio.c and openfile-util.c */ +#define _P_IO_MAGIC 0xF0BD0000 + +/* Define success and error return values */ #define PVFS_FD_SUCCESS 0 #define PVFS_FD_FAILURE -1 -extern int split_pathname(const char *path, - int dirflag, - char **directory, - char **filename); +/* Default attribute mask */ +#define PVFS_ATTR_DEFAULT_MASK \ + (PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_SIZE |\ + PVFS_ATTR_SYS_BLKSIZE | PVFS_ATTR_SYS_LNK_TARGET |\ + PVFS_ATTR_SYS_DIRENT_COUNT) int pvfs_ucache_enabled(void); -extern int pvfs_sys_init(void); - -extern char *pvfs_qualify_path(const char *path); - -extern int is_pvfs_path(const char *path); +extern int pvfs_sys_init(void); extern void pvfs_debug(char *fmt, ...); extern void load_glibc(void); +extern char *pvfs_dpath_insert(const char *p); + +extern void pvfs_dpath_remove(char *p); + extern int pvfs_lookup_dir(const char *directory, PVFS_object_ref *ref, int *fs_id); @@ -52,12 +57,20 @@ extern pvfs_descriptor *pvfs_alloc_descriptor(posix_ops *fsops, extern pvfs_descriptor *pvfs_find_descriptor(int fd); -extern int pvfs_dup_descriptor(int oldfd, int newfd); +extern int pvfs_dup_descriptor(int oldfd, int newfd, int flags, int fcntl_dup); extern int pvfs_free_descriptor(int fd); extern int pvfs_descriptor_table_size(void); +extern int pvfs_descriptor_table_next(int start); + +extern int pvfs_put_cwd(char *buf, int size); + +extern int pvfs_len_cwd(void); + +extern int pvfs_get_cwd(char *buf, int size); + extern int pvfs_create_file(const char *filename, mode_t mode, PVFS_object_ref parent_ref, @@ -66,4 +79,5 @@ extern int pvfs_create_file(const char *filename, extern void PINT_initrand(void); extern long int PINT_random(void); + #endif diff --git a/src/client/usrint/posix-ops.h b/src/client/usrint/posix-ops.h index bb6f8b5..5fe37d7 100644 --- a/src/client/usrint/posix-ops.h +++ b/src/client/usrint/posix-ops.h @@ -18,12 +18,19 @@ /** struct of pointers to methods for posix system calls */ typedef struct posix_ops_s { + /* this is not posix but is useful for debugging */ + int (*snprintf)(char *str, int size, const char *format, ...); + /* begin posix system calls */ int (*open)(const char *path, int flags, ...); int (*open64)(const char *path, int flags, ...); int (*openat)(int dirfd, const char *path, int flags, ...); int (*openat64)(int dirfd, const char *path, int flags, ...); +#if 0 int (*creat)(const char *path, mode_t mode, ...); int (*creat64)(const char *path, mode_t mode, ...); +#endif + int (*creat)(const char *path, mode_t mode); + int (*creat64)(const char *path, mode_t mode); int (*unlink)(const char *path); int (*unlinkat)(int dirfd, const char *path, int flags); int (*rename)(const char *oldpath, const char *newpath); @@ -39,6 +46,7 @@ typedef struct posix_ops_s ssize_t (*pwrite64)( int fd, const void *buf, size_t count, off64_t offset); off_t (*lseek)(int fd, off_t offset, int whence); off64_t (*lseek64)(int fd, off64_t offset, int whence); + void (*perror)(const char *s); int (*truncate)(const char *path, off_t length); int (*truncate64)(const char *path, off64_t length); int (*ftruncate)(int fd, off_t length); @@ -59,6 +67,7 @@ typedef struct posix_ops_s int (*futimes)(int fd, const struct timeval times[2]); int (*dup)(int oldfd); int (*dup2)(int oldfd, int newfd); + int (*dup3)(int oldfd, int newfd, int flags); int (*chown)(const char *path, uid_t owner, gid_t group); int (*fchown)(int fd, uid_t owner, gid_t group); int (*fchownat)(int fd, const char *path, uid_t owner, gid_t group, int flag); @@ -147,14 +156,6 @@ typedef struct posix_ops_s int (*recvfrom)(int sockfd, void *buf, size_t len, int flags, struct sockaddr *addr, socklen_t *alen); int (*recvmsg)(int sockfd, struct msghdr *msg, int flags); - /* int (*select)(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, - struct timeval *timeout); */ - /* void (*FD_CLR)(int fd, fd_set *set); */ - /* void (*FD_ISSET)(int fd, fd_set *set); */ - /* void (*FD_SET)(int fd, fd_set *set); */ - /* void (*FD_ZERO)(fd_set *set); */ - /* int (*pselect)(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, - const struct timeval *timeout, const sigset_t *sigmask); */ int (*send)(int sockfd, const void *buf, size_t len, int flags); int (*sendto)(int sockfd, const void *buf, size_t len, int flags, const struct sockaddr *addr, socklen_t alen); @@ -162,6 +163,16 @@ typedef struct posix_ops_s int (*shutdown)(int sockfd, int how); int (*socketpair)(int d, int type, int prtocol, int sv[2]); int (*pipe)(int filedes[2]); + + /* selinux operations */ + int (*getfscreatecon)(security_context_t *con); + int (*getfilecon)(const char *path, security_context_t *con); + int (*lgetfilecon)(const char *path, security_context_t *con); + int (*fgetfilecon)(int fd, security_context_t *con); + int (*setfscreatecon)(security_context_t con); + int (*setfilecon)(const char *path, security_context_t con); + int (*lsetfilecon)(const char *path, security_context_t con); + int (*fsetfilecon)(int fd, security_context_t con); } posix_ops; #ifdef BITDEFS @@ -193,15 +204,16 @@ typedef struct pvfs_mmap_s typedef struct pvfs_descriptor_status_s { gen_mutex_t lock; /**< protect struct from mult threads */ - int dup_cnt; /**< number of table slots with this des */ + int dup_cnt; /**< number of desc using this stat */ posix_ops *fsops; /**< syscalls to use for this file */ PVFS_object_ref pvfs_ref; /**< PVFS fs_id and handle for PVFS file */ int flags; /**< the open flags used for this file */ int mode; /**< stat mode of the file - may be volatile */ + int mode_deferred; /**< mode bits requested but not set yet */ off64_t file_pointer; /**< offset from the beginning of the file */ PVFS_ds_position token; /**< used db Trove to iterate dirents */ char *dpath; /**< path of an open directory for fchdir */ - struct file_ent_s *fent; /**< reference to cached objects */ + struct file_ent_s *fent; /**< reference to cached objects */ /**< set to NULL if not caching this file */ } pvfs_descriptor_status; @@ -213,6 +225,7 @@ typedef struct pvfs_descriptor_s int fd; /**< file number in PVFS descriptor_table */ int true_fd; /**< the true file number depending on FS */ int fdflags; /**< POSIX file descriptor flags */ + int shared_status; /**< status shared with another desc or process */ pvfs_descriptor_status *s; } pvfs_descriptor; diff --git a/src/client/usrint/posix-pvfs.c b/src/client/usrint/posix-pvfs.c index 2d68311..6115d20 100644 --- a/src/client/usrint/posix-pvfs.c +++ b/src/client/usrint/posix-pvfs.c @@ -11,16 +11,16 @@ */ #define USRINT_SOURCE 1 #include "usrint.h" +#include #include "posix-ops.h" #include "posix-pvfs.h" #include "openfile-util.h" #include "iocommon.h" - -#define PVFS_ATTR_DEFAULT_MASK \ -(PVFS_ATTR_SYS_COMMON_ALL | PVFS_ATTR_SYS_SIZE | PVFS_ATTR_SYS_BLKSIZE) +#include "pvfs-path.h" static mode_t mask_val = 0022; /* implements umask for pvfs library */ -static char pvfs_cwd[PVFS_PATH_MAX]; +/* static char pvfs_cwd[PVFS_PATH_MAX]; + */ /* actual implementation of read and write are in these static funcs */ @@ -35,6 +35,13 @@ static ssize_t pvfs_rdwrv(int fd, size_t count, int which); +#if 0 +static int my_glibc_getcwd(char *buf, unsigned long size) +{ + return syscall(SYS_getcwd, buf, size); +} +#endif + /** * pvfs_open */ @@ -45,11 +52,12 @@ int pvfs_open(const char *path, int flags, ...) PVFS_hint hints; char *newpath; pvfs_descriptor *pd; - debug("pvfs_open: called with %s\n", path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_open: called with %s\n", path); if (!path) { errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_open: return with %d\n", -1); return -1; } va_start(ap, flags); @@ -64,22 +72,27 @@ int pvfs_open(const char *path, int flags, ...) va_end(ap); /* fully qualify pathname */ - newpath = pvfs_qualify_path(path); + newpath = PVFS_qualify_path(path); if (!newpath) { + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_open: return with %d\n", -1); return -1; } pd = iocommon_open(newpath, flags, hints, mode, NULL); if (newpath != path) { - free(newpath); + /* this should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } if (!pd) { + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_open: return with %d\n", -1); return -1; } else { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_open: return with %d\n", pd->fd); return pd->fd; } } @@ -91,11 +104,14 @@ int pvfs_open64(const char *path, int flags, ...) { va_list ap; int mode; - PVFS_hint hints; + PVFS_hint hints GCC_UNUSED; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_open64: called with %s\n", path); if (!path) { errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_open64: return with %d\n", -1); return -1; } va_start(ap, flags); @@ -130,9 +146,12 @@ int pvfs_openat(int dirfd, const char *path, int flags, ...) PVFS_hint hints; pvfs_descriptor *dpd, *fpd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_openat: called with %s\n", path); if (!path) { errno = EINVAL; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_openat: return with %d\n", -1); return -1; } va_start(ap, flags); @@ -162,16 +181,22 @@ int pvfs_openat(int dirfd, const char *path, int flags, ...) if (dirfd < 0) { errno = EBADF; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_openat: return with %d\n", -1); return -1; } dpd = pvfs_find_descriptor(dirfd); if (!dpd) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_openat: return with %d\n", -1); return -1; } fpd = iocommon_open(path, flags, hints, mode, dpd); if (!fpd) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_openat: return with %d\n", -1); return -1; } return fpd->fd; @@ -185,11 +210,14 @@ int pvfs_openat64(int dirfd, const char *path, int flags, ...) { va_list ap; int mode; - PVFS_hint hints; + PVFS_hint hints GCC_UNUSED; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_openat64: called with %s\n", path); if (dirfd < 0) { errno = EBADF; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_openat64: return with %d\n", -1); return -1; } va_start(ap, flags); @@ -217,16 +245,18 @@ int pvfs_openat64(int dirfd, const char *path, int flags, ...) /** * pvfs_creat wrapper */ -int pvfs_creat(const char *path, mode_t mode, ...) +int pvfs_creat(const char *path, mode_t mode) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_creat: called with %s\n", path); return pvfs_open(path, O_RDWR | O_CREAT | O_EXCL, mode); } /** * pvfs_creat64 wrapper */ -int pvfs_creat64(const char *path, mode_t mode, ...) +int pvfs_creat64(const char *path, mode_t mode) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_creat64: called with %s\n", path); return pvfs_open64(path, O_RDWR | O_CREAT | O_EXCL, mode); } @@ -238,16 +268,21 @@ int pvfs_unlink(const char *path) int rc = 0; char *newpath; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_unlink: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_unlink: return with %d\n", -1); return -1; } rc = iocommon_unlink(path, NULL); if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_unlink: return with %d\n", rc); return rc; } @@ -259,9 +294,17 @@ int pvfs_unlinkat(int dirfd, const char *path, int flags) int rc; pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_unlinkat: called with %s\n", path); if (path[0] == '/' || dirfd == AT_FDCWD) { - rc = iocommon_unlink(path, NULL); + if (flags & AT_REMOVEDIR) + { + rc = iocommon_rmdir(path, NULL); + } + else + { + rc = iocommon_unlink(path, NULL); + } } else { @@ -285,6 +328,7 @@ int pvfs_unlinkat(int dirfd, const char *path, int flags) rc = iocommon_unlink(path, &pd->s->pvfs_ref); } } + gossip_debug(GOSSIP_USRINT_DEBUG, "\tpvfs_unlinkat: return with %d\n", rc); return rc; } @@ -296,25 +340,29 @@ int pvfs_rename(const char *oldpath, const char *newpath) int rc; char *absoldpath, *absnewpath; - absoldpath = pvfs_qualify_path(oldpath); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_rename: called with %s\n", oldpath); + absoldpath = PVFS_qualify_path(oldpath); if (!absoldpath) { return -1; } - absnewpath = pvfs_qualify_path(newpath); - if (!absnewpath) + absnewpath = PVFS_qualify_path(newpath); + if (!absnewpath && (oldpath != absoldpath)) { - free(absoldpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(absoldpath); return -1; } rc = iocommon_rename(NULL, absoldpath, NULL, absnewpath); if (oldpath != absoldpath) { - free(absoldpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(absoldpath); } if (newpath != absnewpath) { - free(absnewpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(absnewpath); } return rc; } @@ -330,6 +378,8 @@ int pvfs_renameat(int olddirfd, const char *oldpath, PVFS_object_ref *olddirref, *newdirref; char *absoldpath, *absnewpath; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_renameat: called with %s\n", oldpath); if (!oldpath || !newpath) { errno = EINVAL; @@ -338,7 +388,7 @@ int pvfs_renameat(int olddirfd, const char *oldpath, if (oldpath[0] == '/' || olddirfd == AT_FDCWD) { olddirref = NULL; - absoldpath = pvfs_qualify_path(oldpath); + absoldpath = PVFS_qualify_path(oldpath); if (!absoldpath) { return -1; @@ -363,7 +413,7 @@ int pvfs_renameat(int olddirfd, const char *oldpath, if (oldpath[0] == '/' || newdirfd == AT_FDCWD) { newdirref = NULL; - absnewpath = pvfs_qualify_path(newpath); + absnewpath = PVFS_qualify_path(newpath); if (!absnewpath) { return -1; @@ -388,11 +438,13 @@ int pvfs_renameat(int olddirfd, const char *oldpath, rc = iocommon_rename(olddirref, absoldpath, newdirref, absnewpath); if (oldpath != absoldpath) { - free(absoldpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(absoldpath); } if (newpath != absnewpath) { - free(absnewpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(absnewpath); } return rc; } @@ -404,6 +456,7 @@ ssize_t pvfs_read(int fd, void *buf, size_t count) { int rc; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_read: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -430,6 +483,7 @@ ssize_t pvfs_read(int fd, void *buf, size_t count) */ ssize_t pvfs_pread(int fd, void *buf, size_t count, off_t offset) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_pread: called with %d\n", fd); return pvfs_prdwr64(fd, buf, count, (off64_t) offset, PVFS_IO_READ); } @@ -438,6 +492,7 @@ ssize_t pvfs_pread(int fd, void *buf, size_t count, off_t offset) */ ssize_t pvfs_readv(int fd, const struct iovec *vector, int count) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_readv: called with %d\n", fd); return pvfs_rdwrv(fd, vector, count, PVFS_IO_READ); } @@ -446,6 +501,7 @@ ssize_t pvfs_readv(int fd, const struct iovec *vector, int count) */ ssize_t pvfs_pread64( int fd, void *buf, size_t count, off64_t offset ) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_pread64: called with %d\n", fd); return pvfs_prdwr64(fd, buf, count, offset, PVFS_IO_READ); } @@ -457,6 +513,7 @@ ssize_t pvfs_write(int fd, const void *buf, size_t count) int rc; off64_t offset; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_write: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -494,6 +551,7 @@ ssize_t pvfs_write(int fd, const void *buf, size_t count) */ ssize_t pvfs_pwrite(int fd, const void *buf, size_t count, off_t offset) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_pwrite: called with %d\n", fd); return pvfs_prdwr64(fd, (void *)buf, count, (off64_t)offset, PVFS_IO_WRITE); } @@ -502,6 +560,7 @@ ssize_t pvfs_pwrite(int fd, const void *buf, size_t count, off_t offset) */ ssize_t pvfs_writev(int fd, const struct iovec *vector, int count) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_writev: called with %d\n", fd); return pvfs_rdwrv(fd, vector, count, PVFS_IO_WRITE); } @@ -510,6 +569,7 @@ ssize_t pvfs_writev(int fd, const struct iovec *vector, int count) */ ssize_t pvfs_pwrite64(int fd, const void *buf, size_t count, off64_t offset) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_pwrite64: called with %d\n", fd); return pvfs_prdwr64(fd, (void *)buf, count, offset, PVFS_IO_WRITE); } @@ -600,6 +660,7 @@ static ssize_t pvfs_rdwrv(int fd, */ off_t pvfs_lseek(int fd, off_t offset, int whence) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lseek: called with %d\n", fd); return (off_t) pvfs_lseek64(fd, (off64_t)offset, whence); } @@ -610,6 +671,7 @@ off64_t pvfs_lseek64(int fd, off64_t offset, int whence) { pvfs_descriptor* pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lseek64: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -633,6 +695,7 @@ off64_t pvfs_lseek64(int fd, off64_t offset, int whence) */ int pvfs_truncate(const char *path, off_t length) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_truncate: called with %s\n", path); return pvfs_truncate64(path, (off64_t) length); } @@ -642,20 +705,40 @@ int pvfs_truncate(const char *path, off_t length) int pvfs_truncate64(const char *path, off64_t length) { int rc; + char *newpath; pvfs_descriptor *pd; - if (!path) + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_truncate64: called with %s\n", path); + newpath = PVFS_qualify_path(path); + if (!newpath) { errno = EINVAL; return -1; } - pd = iocommon_open(path, O_WRONLY, PVFS_HINT_NULL, 0 , NULL); - if (!pd) + pd = iocommon_open(newpath, O_WRONLY, PVFS_HINT_NULL, 0 , NULL); + if (!pd || (pd->s->fsops == &glibc_ops)) { - return -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.ftruncate(pd->true_fd, length); + pvfs_free_descriptor(pd->fd); + goto errorout; } - rc = iocommon_truncate(pd->s->pvfs_ref, length); + rc = iocommon_truncate(pd, length); pvfs_close(pd->fd); + +errorout: + if (newpath != path) + { + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); + } return rc; } @@ -663,8 +746,8 @@ int pvfs_truncate64(const char *path, off64_t length) * pvfs_allocate wrapper * * This isn't right but we dont' have a syscall to match this. - * Best effort is to tuncate to thex size, which should guarantee - * spaceis available starting at beginning (let alone offset) + * Best effort is to tuncate to the size, which should guarantee + * space is available starting at beginning (let alone offset) * extending to offset+length. * * Our truncate doesn't always allocate blocks either, since @@ -672,6 +755,7 @@ int pvfs_truncate64(const char *path, off64_t length) */ int pvfs_fallocate(int fd, off_t offset, off_t length) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fallocate: called with %d\n", fd); if (offset < 0 || length < 0) { errno = EINVAL; @@ -688,6 +772,7 @@ int pvfs_fallocate(int fd, off_t offset, off_t length) */ int pvfs_ftruncate(int fd, off_t length) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_ftruncate: called with %d\n", fd); return pvfs_ftruncate64(fd, (off64_t) length); } @@ -696,6 +781,7 @@ int pvfs_ftruncate(int fd, off_t length) */ int pvfs_ftruncate64(int fd, off64_t length) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_ftruncate64: called with %d\n", fd); pvfs_descriptor *pd; if (fd < 0) @@ -708,7 +794,7 @@ int pvfs_ftruncate64(int fd, off64_t length) { return -1; } - return iocommon_truncate(pd->s->pvfs_ref, length); + return iocommon_truncate(pd, length); } /** @@ -722,7 +808,7 @@ int pvfs_close(int fd) { int rc = 0; pvfs_descriptor* pd; - debug("pvfs_close: called with %d\n", fd); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_close: called with %d\n", fd); if (fd < 0) { @@ -732,19 +818,36 @@ int pvfs_close(int fd) pd = pvfs_find_descriptor(fd); if (!pd) { - errno = EBADF; - return PVFS_FD_FAILURE; + /* make sure this fd is really closed - errno set in here */ + rc = pvfs_free_descriptor(fd); + return rc; } - - /* flush buffers */ - if (S_ISREG(pd->s->mode)) +/* it is not clear why this was added. closing does not imply sync'ing + * in any semantics I am aware of. at best this should only happen if + * O_SYNC is set - but one would suspect it would be redundant even in + * that case. + * currently this is kicking an unexpected error in some circumstances + * that must be fixed, or at least handled more cleanly but for the + * immediate moment I'm removing it pending a final deletion. WBL + */ +#if 0 + /* This was supposed to be a PVFS file + * if it isn't - we didn't write to it + * so don't try to sync it + */ + if (!(pd->s->fsops == &glibc_ops)) { - rc = iocommon_fsync(pd); - if (rc < 0) + /* flush buffers */ + if (S_ISREG(pd->s->mode)) { - return -1; + rc = iocommon_fsync(pd); + if (rc < 0) + { + return -1; + } } } +#endif /* free descriptor */ rc = pvfs_free_descriptor(pd->fd); @@ -753,7 +856,7 @@ int pvfs_close(int fd) return -1; } - debug("pvfs_close: returns %d\n", rc); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_close: returns %d\n", rc); return rc; } @@ -763,6 +866,7 @@ int pvfs_close(int fd) */ int pvfs_stat(const char *path, struct stat *buf) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_stat: called with %s\n", path); return pvfs_stat_mask(path, buf, PVFS_ATTR_DEFAULT_MASK); } @@ -772,15 +876,24 @@ int pvfs_stat_mask(const char *path, struct stat *buf, uint32_t mask) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_stat_mask: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } mask &= PVFS_ATTR_DEFAULT_MASK; @@ -790,7 +903,8 @@ int pvfs_stat_mask(const char *path, struct stat *buf, uint32_t mask) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -804,15 +918,24 @@ int pvfs_stat64(const char *path, struct stat64 *buf) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_stat64: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat64(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_stat64(pd, buf, PVFS_ATTR_DEFAULT_MASK); @@ -821,7 +944,8 @@ int pvfs_stat64(const char *path, struct stat64 *buf) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -831,11 +955,13 @@ errorout: */ int pvfs_fstat(int fd, struct stat *buf) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstat: called with %d\n", fd); return pvfs_fstat_mask(fd, buf, PVFS_ATTR_DEFAULT_MASK); } int pvfs_fstat_mask(int fd, struct stat *buf, uint32_t mask) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstat_mask: called with %d\n", fd); pvfs_descriptor *pd; if (fd < 0) @@ -858,6 +984,7 @@ int pvfs_fstat_mask(int fd, struct stat *buf, uint32_t mask) */ int pvfs_fstat64(int fd, struct stat64 *buf) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstat64: called with %d\n", fd); pvfs_descriptor *pd; if (fd < 0) @@ -882,6 +1009,7 @@ int pvfs_fstatat(int fd, const char *path, struct stat *buf, int flag) int rc; pvfs_descriptor *pd, *pd2; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstatat: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -911,9 +1039,17 @@ int pvfs_fstatat(int fd, const char *path, struct stat *buf, int flag) return -1; } pd2 = iocommon_open(path, flags, PVFS_HINT_NULL, 0, pd); - if (!pd2) + if (!pd2 || (pd2->s->fsops == &glibc_ops)) { - return -1; + if (!pd2) + { + /* this is an error on open */ + return -1; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat(pd2->true_fd, buf); + pvfs_close(pd2->fd); + return rc; } rc = iocommon_stat(pd2, buf, PVFS_ATTR_DEFAULT_MASK); pvfs_close(pd2->fd); @@ -929,6 +1065,7 @@ int pvfs_fstatat64(int fd, const char *path, struct stat64 *buf, int flag) int rc; pvfs_descriptor *pd, *pd2; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstatat64: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -959,9 +1096,17 @@ int pvfs_fstatat64(int fd, const char *path, struct stat64 *buf, int flag) return -1; } pd2 = iocommon_open(path, flags, PVFS_HINT_NULL, 0, pd); - if (!pd2) + if (!pd2 || (pd2->s->fsops == &glibc_ops)) { - return -1; + if (!pd2) + { + /* this is an error on open */ + return -1; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat64(pd2->true_fd, buf); + pvfs_close(pd2->fd); + return rc; } rc = iocommon_stat64(pd2, buf, PVFS_ATTR_DEFAULT_MASK); pvfs_close(pd2->fd); @@ -974,6 +1119,7 @@ int pvfs_fstatat64(int fd, const char *path, struct stat64 *buf, int flag) */ int pvfs_lstat(const char *path, struct stat *buf) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lstat: called with %s\n", path); return pvfs_lstat_mask(path, buf, PVFS_ATTR_DEFAULT_MASK); } @@ -983,15 +1129,25 @@ int pvfs_lstat_mask(const char *path, struct stat *buf, uint32_t mask) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_lstat_mask: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY|O_NOFOLLOW, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } mask &= PVFS_ATTR_DEFAULT_MASK; @@ -1001,7 +1157,8 @@ int pvfs_lstat_mask(const char *path, struct stat *buf, uint32_t mask) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1015,15 +1172,24 @@ int pvfs_lstat64(const char *path, struct stat64 *buf) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lstat64: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY|O_NOFOLLOW, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstat64(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_stat64(pd, buf, PVFS_ATTR_DEFAULT_MASK); @@ -1032,11 +1198,55 @@ int pvfs_lstat64(const char *path, struct stat64 *buf) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } +#ifdef __USE_GLIBC__ +/** + * pvfs_utimesat + * + * Currently PVFS does not use nanosecond times or even microseconds times + * so just drop the sub-seconds + * + * TODO - need to add support for nofollow flag and special time values. + */ +int pvfs_utimensat(int dirfd, + const char *path, + const struct timespec times[2], + int flags) +{ + struct timeval times2[2]; + + times2[0].tv_sec = times[0].tv_sec; + times2[0].tv_usec = 0; + times2[1].tv_sec = times[1].tv_sec; + times2[1].tv_usec = 0; + + return pvfs_futimesat(dirfd, path, times2); +} + +/** + * pvfs_futimens + * + * Currently PVFS does not use nanosecond times so just convert to the + * old microsecond times + */ +int pvfs_futimens(int fd, const struct timespec times[2]) +{ + struct timeval times2[2]; + + times2[0].tv_sec = times[0].tv_sec; + times2[0].tv_usec = 0; + times2[1].tv_sec = times[1].tv_sec; + times2[1].tv_usec = 0; + + return pvfs_futimes(fd, times2); +} +#endif + /** * pvfs_futimesat */ @@ -1048,15 +1258,23 @@ int pvfs_futimesat(int dirfd, pvfs_descriptor *pd=NULL, *pd2=NULL; PVFS_sys_attr attr; - if (dirfd < 0) + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_futimesat: called with %s\n", path); + if (path[0] == '/' || dirfd == AT_FDCWD) { - errno = EBADF; - return -1; + pd = NULL; } - pd = pvfs_find_descriptor(dirfd); - if (!pd) + else { - return -1; + if (dirfd < 0) + { + errno = EBADF; + return -1; + } + pd = pvfs_find_descriptor(dirfd); + if (!pd) + { + return -1; + } } if (path) { @@ -1064,11 +1282,20 @@ int pvfs_futimesat(int dirfd, } else { + errno = EINVAL; pd2 = pd; /* allow null path to work */ } - if (!pd2) + if (!pd2 || (pd2->s->fsops == &glibc_ops)) { - return -1; + if (!pd2) + { + /* this is an error on open */ + return -1; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.futimes(pd->true_fd, times); + pvfs_close(pd->fd); + return rc; } memset(&attr, 0, sizeof(attr)); if (!times) @@ -1094,12 +1321,14 @@ int pvfs_futimesat(int dirfd, int pvfs_utimes(const char *path, const struct timeval times[2]) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_utimes: called with %s\n", path); return pvfs_futimesat(AT_FDCWD, path, times); } int pvfs_utime(const char *path, const struct utimbuf *buf) { struct timeval times[2]; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_utime: called with %s\n", path); times[0].tv_sec = buf->actime; times[0].tv_usec = 0; times[1].tv_sec = buf->modtime; @@ -1113,6 +1342,7 @@ int pvfs_futimes(int fd, const struct timeval times[2]) pvfs_descriptor *pd=NULL; PVFS_sys_attr attr; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_futimes: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1147,7 +1377,8 @@ int pvfs_futimes(int fd, const struct timeval times[2]) */ int pvfs_dup(int oldfd) { - return pvfs_dup_descriptor(oldfd, -1); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_dup: called with %d\n", oldfd); + return pvfs_dup_descriptor(oldfd, -1, 0, 0); } /** @@ -1155,7 +1386,17 @@ int pvfs_dup(int oldfd) */ int pvfs_dup2(int oldfd, int newfd) { - return pvfs_dup_descriptor(oldfd, newfd); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_dup2: called with %d\n", oldfd); + return pvfs_dup_descriptor(oldfd, newfd, 0, 0); +} + +/** + * pvfs_dup3 + */ +int pvfs_dup3(int oldfd, int newfd, int flags) +{ + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_dup2: called with %d\n", oldfd); + return pvfs_dup_descriptor(oldfd, newfd, flags, 0); } /** @@ -1167,15 +1408,24 @@ int pvfs_chown(const char *path, uid_t owner, gid_t group) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_chown: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fchown(pd->true_fd, owner, group); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_chown(pd, owner, group); @@ -1184,7 +1434,8 @@ int pvfs_chown(const char *path, uid_t owner, gid_t group) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1196,6 +1447,7 @@ int pvfs_fchown(int fd, uid_t owner, gid_t group) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fchown: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1218,6 +1470,7 @@ int pvfs_fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag) int rc; pvfs_descriptor *pd, *pd2; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_chown: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { if (flag & AT_SYMLINK_NOFOLLOW) @@ -1247,9 +1500,17 @@ int pvfs_fchownat(int fd, const char *path, uid_t owner, gid_t group, int flag) return -1; } pd2 = iocommon_open(path, flags, PVFS_HINT_NULL, 0, pd); - if (!pd) + if (!pd2 || (pd2->s->fsops == &glibc_ops)) { - return -1; + if (!pd2) + { + /* this is an error on open */ + return -1; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fchown(pd2->true_fd, owner, group); + pvfs_close(pd2->fd); + return rc; } rc = iocommon_chown(pd2, owner, group); pvfs_close(pd2->fd); @@ -1266,15 +1527,24 @@ int pvfs_lchown(const char *path, uid_t owner, gid_t group) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lchown: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY|O_NOFOLLOW, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fchown(pd->true_fd, owner, group); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_chown(pd, owner, group); @@ -1283,7 +1553,8 @@ int pvfs_lchown(const char *path, uid_t owner, gid_t group) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1297,15 +1568,24 @@ int pvfs_chmod(const char *path, mode_t mode) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_chmod: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fchmod(pd->true_fd, mode); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_chmod(pd, mode); @@ -1314,7 +1594,8 @@ int pvfs_chmod(const char *path, mode_t mode) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1326,6 +1607,7 @@ int pvfs_fchmod(int fd, mode_t mode) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fchmod: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1348,6 +1630,7 @@ int pvfs_fchmodat(int fd, const char *path, mode_t mode, int flag) int rc; pvfs_descriptor *pd, *pd2; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fchmodat: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { rc = pvfs_chmod(path, mode); @@ -1366,6 +1649,18 @@ int pvfs_fchmodat(int fd, const char *path, mode_t mode, int flag) return -1; } pd2 = iocommon_open(path, flags, PVFS_HINT_NULL, 0, pd); + if (!pd2 || (pd2->s->fsops == &glibc_ops)) + { + if (!pd2) + { + /* this is an error on open */ + return -1; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fchmod(pd2->true_fd, mode); + pvfs_close(pd2->fd); + return rc; + } if (!pd2) { return -1; @@ -1384,7 +1679,8 @@ int pvfs_mkdir(const char *path, mode_t mode) int rc; char *newpath; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_mkdir: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; @@ -1392,7 +1688,8 @@ int pvfs_mkdir(const char *path, mode_t mode) rc = iocommon_make_directory(newpath, (mode & ~mask_val & 0777), NULL); if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1405,6 +1702,7 @@ int pvfs_mkdirat(int dirfd, const char *path, mode_t mode) int rc; pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_mkdirat: called with %s\n", path); if (path[0] == '/' || dirfd == AT_FDCWD) { rc = pvfs_mkdir(path, mode); @@ -1437,7 +1735,8 @@ int pvfs_rmdir(const char *path) int rc; char *newpath; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_rmdir: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; @@ -1445,7 +1744,8 @@ int pvfs_rmdir(const char *path) rc = iocommon_rmdir(newpath, NULL); if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1460,18 +1760,28 @@ ssize_t pvfs_readlink(const char *path, char *buf, size_t bufsiz) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_readlink: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY | O_NOFOLLOW, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.readlink(newpath, buf, bufsiz); + pvfs_free_descriptor(pd->fd); goto errorout; } - debug("pvfs_readlink mode is %o\n", pd->s->mode); + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_readlink mode is %o\n", pd->s->mode); /* this checks that it is a valid symlink and sets errno if not */ rc = iocommon_readlink(pd, buf, bufsiz); /* need to close if readlink succeeds or not */ @@ -1480,7 +1790,8 @@ ssize_t pvfs_readlink(const char *path, char *buf, size_t bufsiz) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1490,6 +1801,8 @@ ssize_t pvfs_readlinkat(int fd, const char *path, char *buf, size_t bufsiz) int rc; pvfs_descriptor *pd, *pd2; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_readlinkat: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { rc = pvfs_readlink(path, buf, bufsiz); @@ -1522,7 +1835,10 @@ int pvfs_symlink(const char *oldpath, const char *newpath) { int rc = 0; char *abspath; - abspath = pvfs_qualify_path(newpath); + + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_symlink: called with %s\n", oldpath); + abspath = PVFS_qualify_path(newpath); if (!abspath) { return -1; @@ -1530,7 +1846,8 @@ int pvfs_symlink(const char *oldpath, const char *newpath) rc = iocommon_symlink(abspath, oldpath, NULL); if (abspath != newpath) { - free(abspath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(abspath); } return rc; } @@ -1539,6 +1856,8 @@ int pvfs_symlinkat(const char *oldpath, int newdirfd, const char *newpath) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_symlinkat: called with %s\n", oldpath); if (newpath[0] == '/' || newdirfd == AT_FDCWD) { return pvfs_symlink(oldpath, newpath); @@ -1586,7 +1905,8 @@ int pvfs_linkat(int olddirfd, const char *oldpath, */ int pvfs_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) { - return pvfs_getdents(fd, dirp, 1); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_readdir: called with %d\n", fd); + return pvfs_getdents(fd, dirp, sizeof(struct dirent)); } /** @@ -1598,6 +1918,7 @@ int pvfs_getdents(unsigned int fd, struct dirent *dirp, unsigned int size) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_getdents: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1616,6 +1937,7 @@ int pvfs_getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int size) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_getdents64: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1634,7 +1956,9 @@ int pvfs_access(const char *path, int mode) { int rc = 0; char *newpath; - newpath = pvfs_qualify_path(path); + + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_access: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; @@ -1642,7 +1966,8 @@ int pvfs_access(const char *path, int mode) rc = iocommon_access(path, mode, 0, NULL); if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1651,6 +1976,7 @@ int pvfs_faccessat(int fd, const char *path, int mode, int flags) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_faccessat: called with %s\n", path); if (path[0] == '/' || fd == AT_FDCWD) { return pvfs_access(path, mode); @@ -1683,10 +2009,11 @@ int pvfs_fcntl(int fd, int cmd, ...) { int rc = 0; va_list ap; - /* long arg; */ - struct flock *lock; pvfs_descriptor *pd; + struct flock *lock GCC_UNUSED; + long larg GCC_UNUSED; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fcntl: called with %d\n", fd); pd = pvfs_find_descriptor(fd); if (!pd) { @@ -1698,29 +2025,56 @@ int pvfs_fcntl(int fd, int cmd, ...) switch (cmd) { case F_DUPFD : + larg = va_arg(ap, long); + rc = pvfs_dup_descriptor(fd, larg, 0, 1); + break; case F_GETFD : rc = pd->fdflags; break; + /* only flag is FD_CLOEXEC */ + /* silently accepts undefined flags */ case F_SETFD : pd->fdflags = va_arg(ap, int); break; case F_GETFL : rc = pd->s->flags; break; + /* silently accepts unsupoprted flags */ case F_SETFL : pd->s->flags = va_arg(ap, int); break; + /* locks not implemented yet */ case F_GETLK : + lock = va_arg(ap, struct flock *); + break; case F_SETLK : + lock = va_arg(ap, struct flock *); + break; case F_SETLKW : lock = va_arg(ap, struct flock *); + break; + /* ASYNC only applies to sockets and terminals so no PVFS support + * lease and notify apply to normal files/dirs but involve signaling + * which is not currently possible with PVFS + */ case F_GETOWN : + break; case F_SETOWN : + larg = va_arg(ap, long); + break; case F_GETSIG : + break; case F_SETSIG : + larg = va_arg(ap, long); + break; case F_GETLEASE : + break; case F_SETLEASE : + larg = va_arg(ap, long); + break; case F_NOTIFY : + larg = va_arg(ap, long); + break; default : errno = ENOSYS; fprintf(stderr, "pvfs_fcntl command not implemented\n"); @@ -1749,7 +2103,7 @@ int pvfs_fsync(int fd) int rc = 0; pvfs_descriptor* pd; - debug("pvfs_fsync: called with %d\n", fd); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fsync: called with %d\n", fd); if (fd < 0) { @@ -1763,10 +2117,18 @@ int pvfs_fsync(int fd) errno = EBADF; return -1; } + if (pd->s->fsops == &glibc_ops) + { + /* this was supposed to be PVFS but isn't */ + /* just skip the sync because we almost */ + /* certainly didn't write to it */ + return rc; + } + /* tell the server to flush data to disk */ rc = iocommon_fsync(pd); - debug("pvfs_fsync: returns %d\n", rc); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fsync: returns %d\n", rc); return rc; } @@ -1775,6 +2137,7 @@ int pvfs_fdatasync(int fd) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fdatasync: called with %d\n", fd); rc = pvfs_fsync(fd); /* as close as we have for now */ return rc; } @@ -1790,6 +2153,7 @@ int pvfs_fadvise(int fd, off_t offset, off_t len, int advice) */ int pvfs_fadvise64(int fd, off64_t offset, off64_t len, int advice) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fadvise64: called with %d\n", fd); switch (advice) { case POSIX_FADV_NORMAL: @@ -1812,15 +2176,24 @@ int pvfs_statfs(const char *path, struct statfs *buf) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_statfs: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstatfs(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_statfs(pd, buf); @@ -1829,7 +2202,8 @@ int pvfs_statfs(const char *path, struct statfs *buf) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1840,15 +2214,24 @@ int pvfs_statfs64(const char *path, struct statfs64 *buf) char *newpath; pvfs_descriptor *pd; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_statfs64: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstatfs64(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_statfs64(pd, buf); @@ -1857,7 +2240,8 @@ int pvfs_statfs64(const char *path, struct statfs64 *buf) errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1866,6 +2250,7 @@ int pvfs_fstatfs(int fd, struct statfs *buf) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstatfs: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1884,6 +2269,7 @@ int pvfs_fstatfs64(int fd, struct statfs64 *buf) { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstatfs64: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1905,15 +2291,24 @@ int pvfs_statvfs(const char *path, struct statvfs *buf) struct statfs buf2; char *newpath; - newpath = pvfs_qualify_path(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_statvfs: called with %s\n", path); + newpath = PVFS_qualify_path(path); if (!newpath) { return -1; } pd = iocommon_open(newpath, O_RDONLY, PVFS_HINT_NULL, 0, NULL); - if (!pd) + if (!pd || (pd->s->fsops == &glibc_ops)) { - rc = -1; + if (!pd) + { + /* this is an error on open */ + rc = -1; + goto errorout; + } + /* else this was symlink pointing from PVFS to non PVFS */ + rc = glibc_ops.fstatvfs(pd->true_fd, buf); + pvfs_free_descriptor(pd->fd); goto errorout; } rc = iocommon_statfs(pd, &buf2); @@ -1923,21 +2318,22 @@ int pvfs_statvfs(const char *path, struct statvfs *buf) goto errorout; } buf->f_bsize = buf2.f_bsize; - /* buf->f_rsize */ + buf->f_frsize = 1024; buf->f_blocks = buf2.f_blocks; buf->f_bfree = buf2.f_bfree; buf->f_bavail = buf2.f_bavail; buf->f_files = buf2.f_files; buf->f_ffree = buf2.f_ffree; - /* buf->f_favail */ + buf->f_favail = buf2.f_ffree; buf->f_fsid = (unsigned long)buf2.f_fsid.__val[0]; - /* buf->f_flag */ + buf->f_flag = 0; buf->f_namemax = buf2.f_namelen; errorout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -1948,6 +2344,7 @@ int pvfs_fstatvfs(int fd, struct statvfs *buf) pvfs_descriptor *pd; struct statfs buf2; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fstatvfs: called with %d\n", fd); if (fd < 0) { errno = EBADF; @@ -1980,6 +2377,7 @@ int pvfs_fstatvfs(int fd, struct statvfs *buf) int pvfs_mknod(const char *path, mode_t mode, dev_t dev) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_mknod: called with %s\n", path); return pvfs_mknodat(AT_FDCWD, path, mode, dev); } @@ -1988,6 +2386,7 @@ int pvfs_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) int fd; /* int s_type = mode & S_IFMT; */ + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_mknod: called with %s\n", path); switch (dev) { case S_IFREG: @@ -2011,6 +2410,7 @@ int pvfs_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) ssize_t pvfs_sendfile(int outfd, int infd, off_t *offset, size_t count) { + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_sendfile: called with %d\n", outfd); return pvfs_sendfile64(outfd, infd, (off64_t *)offset, count); } @@ -2018,6 +2418,8 @@ ssize_t pvfs_sendfile64(int outfd, int infd, off64_t *offset, size_t count) { pvfs_descriptor *inpd, *outpd; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_sendfile64: called with %d\n", outfd); inpd = pvfs_find_descriptor(infd); outpd = pvfs_find_descriptor(outfd); /* this should be a socket */ if (!inpd || !outpd) @@ -2036,6 +2438,7 @@ int pvfs_setxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_setxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR); if (fd < 0) { @@ -2054,6 +2457,7 @@ int pvfs_lsetxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lsetxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR | O_NOFOLLOW); if (fd < 0) { @@ -2073,6 +2477,7 @@ int pvfs_fsetxattr(int fd, int rc = 0; pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fsetxattr: called with %d\n", fd); pd = pvfs_find_descriptor(fd); if (!pd) { @@ -2090,6 +2495,7 @@ ssize_t pvfs_getxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_getxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR); if (fd < 0) { @@ -2107,6 +2513,7 @@ ssize_t pvfs_lgetxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_lgetxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR | O_NOFOLLOW); if (fd < 0) { @@ -2124,6 +2531,7 @@ ssize_t pvfs_fgetxattr(int fd, { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fgetxattr: called with %d\n", fd); pd = pvfs_find_descriptor(fd); if (!pd) { @@ -2139,6 +2547,7 @@ ssize_t pvfs_listxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_listxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR); if (fd < 0) { @@ -2155,6 +2564,8 @@ ssize_t pvfs_llistxattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_llistxattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR | O_NOFOLLOW); if (fd < 0) { @@ -2172,6 +2583,7 @@ ssize_t pvfs_flistxattr(int fd, int retsize, rc = 0; pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_flistxattr: called with %d\n", fd); pd = pvfs_find_descriptor(fd); if (!pd) { @@ -2191,6 +2603,8 @@ int pvfs_removexattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_removexattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR); if (fd < 0) { @@ -2206,6 +2620,8 @@ int pvfs_lremovexattr(const char *path, { int fd, rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_lremovexattr: called with %s\n", path); fd = pvfs_open(path, O_RDWR | O_NOFOLLOW); if (fd < 0) { @@ -2221,6 +2637,8 @@ int pvfs_fremovexattr(int fd, { pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, + "pvfs_fremovexattr: called with %d\n", fd); pd = pvfs_find_descriptor(fd); if (!pd) { @@ -2234,17 +2652,63 @@ int pvfs_fremovexattr(int fd, * working directory given than the kernel may not * be aware of PVFS virtual mounts */ -int pvfs_cwd_init(const char *buf, size_t size) +#if 0 +int pvfs_cwd_init(int expand) { - char *rv; + int rc = 0; + int plen = 0; + char *rv, buf[PVFS_PATH_MAX]; + memset(buf, 0, PVFS_PATH_MAX); memset(pvfs_cwd, 0, PVFS_PATH_MAX); - rv = strncpy(pvfs_cwd, buf, PVFS_util_min(size, PVFS_PATH_MAX)); + /* use env to start path - only thing we can depend on + * if the kernel is not aware of PVFS paths + */ + rv = getenv("PWD"); if (!rv) { - return -1; + /* fall back to the kernel if env has no PWD */ + rc = my_glibc_getcwd(buf, PVFS_PATH_MAX); + if (rc < 0) + { + glibc_ops.perror("failed to get CWD from kernel"); + exit(-1); + } } - return 0; + else + { + rv = strncpy(buf, rv, PVFS_PATH_MAX); + if (!rv) + { + glibc_ops.perror("string copy failed"); + exit(-1); + } + } + if (expand) + { + /* shells might not resolve symlinks */ + /* but PVFS must be up for this to work */ + rv = PVFS_expand_path(buf, 0); + } + else + { + /* need something to return before PVFS gets up */ + rv = PVFS_qualify_path(buf); + } + /* basic path length check */ + plen = strnlen(rv, PVFS_PATH_MAX); + if (plen >= PVFS_PATH_MAX) + { + errno = ENAMETOOLONG; + rc = -1; + } + else + { + strncpy(pvfs_cwd, rv, PVFS_PATH_MAX); + } + PVFS_free_expanded(rv); + return rc; } +#endif /** * pvfs chdir @@ -2255,20 +2719,22 @@ int pvfs_chdir(const char *path) struct stat sbuf; char *newpath = NULL; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_chdir: called with %s\n", path); if (!path) { errno = EINVAL; return -1; } /* we really need to resolve this to a cannonical path */ - newpath = pvfs_qualify_path(path); + /* jump to expand path right away */ + newpath = PVFS_expand_path(path, 0); if (!newpath) { return -1; } /* basic path length check */ - plen = strlen(newpath); - if (plen > PVFS_PATH_MAX) + plen = strnlen(newpath, PVFS_PATH_MAX); + if (plen >= PVFS_PATH_MAX) { errno = ENAMETOOLONG; rc = -1; @@ -2289,13 +2755,16 @@ int pvfs_chdir(const char *path) goto errout; } /* we will keep a copy and keep one in the environment */ - strncpy(pvfs_cwd, newpath, PVFS_PATH_MAX); - setenv("PWD", newpath, 1); + pvfs_put_cwd(newpath, PVFS_PATH_MAX); + /* strncpy(pvfs_cwd, newpath, PVFS_PATH_MAX); + * setenv("PWD", newpath, 1); + */ errout: if (newpath != path) { - free(newpath); + /* This should only happen if path was not a PVFS_path */ + PVFS_free_expanded(newpath); } return rc; } @@ -2305,6 +2774,7 @@ int pvfs_fchdir(int fd) int plen; pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "pvfs_fchdir: called with %d\n", fd); /* path is already opened, make sure it is a dir */ pd = pvfs_find_descriptor(fd); if (!pd || !S_ISDIR(pd->s->mode) || !pd->s->dpath) @@ -2319,16 +2789,23 @@ int pvfs_fchdir(int fd) errno = ENAMETOOLONG; return -1; } + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tpvfs_fchdir: changes CWD to %s\n", pd->s->dpath); /* we will keep a copy and keep one in the environment */ - strncpy(pvfs_cwd, pd->s->dpath, PVFS_PATH_MAX); - setenv("PWD", pd->s->dpath, 1); + /* memset(pvfs_cwd, 0, sizeof(pvfs_cwd)); */ + pvfs_put_cwd(pd->s->dpath, plen + 1); + /* strncpy(pvfs_cwd, pd->s->dpath, plen + 1); + * setenv("PWD", pd->s->dpath, 1); + */ return 0; } char *pvfs_getcwd(char *buf, size_t size) { int plen; - plen = strnlen(pvfs_cwd, PVFS_PATH_MAX); + plen = pvfs_len_cwd(); + /* plen = strnlen(pvfs_cwd, PVFS_PATH_MAX); + */ /* implement Linux variation */ if (!buf) { @@ -2338,13 +2815,14 @@ char *pvfs_getcwd(char *buf, size_t size) errno = ERANGE; return NULL; } - /* malloc space */ - buf = (char *)malloc(bsize); + /* malloc space - this is freed by the user */ + buf = (char *)clean_malloc(bsize); if (!buf) { errno = ENOMEM; return NULL; } + memset(buf, 0, bsize); } else { @@ -2358,8 +2836,11 @@ char *pvfs_getcwd(char *buf, size_t size) errno = ERANGE; return NULL; } + memset(buf, 0, size); } - strcpy(buf, pvfs_cwd); + pvfs_get_cwd(buf, plen + 1); + /* strncpy(buf, pvfs_cwd, plen + 1); + */ return buf; } @@ -2367,14 +2848,19 @@ char *pvfs_get_current_dir_name(void) { int plen; char *buf; - plen = strnlen(pvfs_cwd, PVFS_PATH_MAX); - buf = (char *)malloc(plen + 1); + plen = pvfs_len_cwd(); + /* plen = strnlen(pvfs_cwd, PVFS_PATH_MAX); + */ + /* user frees this memory */ + buf = (char *)clean_malloc(plen + 1); if (!buf) { errno = ENOMEM; return NULL; } - strcpy(buf, pvfs_cwd); + pvfs_get_cwd(buf, plen + 1); + /* strcpy(buf, pvfs_cwd); + */ return buf; } /* @@ -2388,7 +2874,9 @@ char *pvfs_getwd(char *buf) errno = EINVAL; return NULL; } - strncpy(buf, pvfs_cwd, PVFS_PATH_MAX); + pvfs_get_cwd(buf, PVFS_PATH_MAX); + /* strncpy(buf, pvfs_cwd, PVFS_PATH_MAX); + */ return buf; } @@ -2417,6 +2905,59 @@ int pvfs_getdtablesize(void) return pvfs_descriptor_table_size(); } +/** + * THese are stubs for libselinux that return the proper error to + * indicate it is not implemented + */ + +int pvfs_getfscreatecon(security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_getfilecon(const char *path, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_lgetfilecon(const char *path, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_fgetfilecon(int fd, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_setfscreatecon(security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_setfilecon(const char *path, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_lsetfilecon(const char *path, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int pvfs_fsetfilecon(int fd, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + /* * Table of PVFS system call versions for use by posix.c */ @@ -2517,16 +3058,24 @@ posix_ops pvfs_ops = .getumask = pvfs_getumask, .mmap = pvfs_mmap, .munmap = pvfs_munmap, - .msync = pvfs_msync, + .msync = pvfs_msync /* these are defined in acl.c and do not really need */ /* a PVFS specific implementation */ #if 0 - .acl_delete_def_file = pvfs_acl_delete_def_file, - .acl_get_fd = pvfs_acl_get_fd, - .acl_get_file = pvfs_acl_get_file, - .acl_set_fd = pvfs_acl_set_fd, - .acl_set_file = pvfs_acl_set_file, + , .acl_delete_def_file = pvfs_acl_delete_def_file + , .acl_get_fd = pvfs_acl_get_fd + , .acl_get_file = pvfs_acl_get_file + , .acl_set_fd = pvfs_acl_set_fd + , .acl_set_file = pvfs_acl_set_file #endif + , .getfscreatecon = pvfs_getfscreatecon + , .getfilecon = pvfs_getfilecon + , .lgetfilecon = pvfs_lgetfilecon + , .fgetfilecon = pvfs_fgetfilecon + , .setfscreatecon = pvfs_setfscreatecon + , .setfilecon = pvfs_setfilecon + , .lsetfilecon = pvfs_lsetfilecon + , .fsetfilecon = pvfs_fsetfilecon }; /* diff --git a/src/client/usrint/posix-pvfs.h b/src/client/usrint/posix-pvfs.h index b33e4d1..dbaa1ff 100644 --- a/src/client/usrint/posix-pvfs.h +++ b/src/client/usrint/posix-pvfs.h @@ -28,9 +28,9 @@ extern int pvfs_openat(int dirfd, const char *path, int flags, ...); /* pvfs_openat64 */ extern int pvfs_openat64(int dirfd, const char *path, int flags, ...); -extern int pvfs_creat(const char *path, mode_t mode, ...); +extern int pvfs_creat(const char *path, mode_t mode); -extern int pvfs_creat64(const char *path, mode_t mode, ...); +extern int pvfs_creat64(const char *path, mode_t mode); /* pvfs_unlink */ extern int pvfs_unlink (const char *path); @@ -108,6 +108,15 @@ extern int pvfs_lstat64(const char *path, struct stat64 *buf); extern int pvfs_lstat_mask(const char *path, struct stat *buf, uint32_t mask); +#ifdef __USE_GLIBC__ +extern int pvfs_utimensat(int dirfd, + const char *path, + const struct timespec times[2], + int flags); + +extern int pvfs_futimens(int fd, const struct timespec times[2]); +#endif + extern int pvfs_futimesat(int dirfd, const char *path, const struct timeval times[2]); extern int pvfs_utimes(const char *path, const struct timeval times[2]); @@ -120,6 +129,8 @@ extern int pvfs_dup(int oldfd); extern int pvfs_dup2(int oldfd, int newfd); +extern int pvfs_dup3(int oldfd, int newfd, int flags); + extern int pvfs_chown (const char *path, uid_t owner, gid_t group); extern int pvfs_fchown (int fd, uid_t owner, gid_t group); @@ -238,7 +249,7 @@ extern int pvfs_chdir(const char *path); extern int pvfs_fchdir(int fd); -extern int pvfs_cwd_init(const char *buf, size_t size); +extern int pvfs_cwd_init(int expand); extern char *pvfs_getcwd(char *buf, size_t size); @@ -273,6 +284,22 @@ extern int pvfs_acl_set_fd(int fd, acl_t acl); extern int pvfs_acl_set_file(const char *path_p, acl_type_t type, acl_t acl); #endif +int pvfs_getfscreatecon(security_context_t *con); + +int pvfs_getfilecon(const char *path, security_context_t *con); + +int pvfs_lgetfilecon(const char *path, security_context_t *con); + +int pvfs_fgetfilecon(int fd, security_context_t *con); + +int pvfs_setfscreatecon(security_context_t con); + +int pvfs_setfilecon(const char *path, security_context_t con); + +int pvfs_lsetfilecon(const char *path, security_context_t con); + +int pvfs_fsetfilecon(int fd, security_context_t con); + #endif diff --git a/src/client/usrint/posix.c b/src/client/usrint/posix.c index 418c8bd..167970e 100644 --- a/src/client/usrint/posix.c +++ b/src/client/usrint/posix.c @@ -17,6 +17,7 @@ #include "posix-ops.h" #include "posix-pvfs.h" #include "openfile-util.h" +#include "pvfs-path.h" /** * function prototypes not defined in libc, though it is a linux @@ -37,11 +38,13 @@ int fadvise64(int, off64_t, off64_t, int); */ int open(const char *path, int flags, ...) { + int rc = 0; va_list ap; mode_t mode = 0; PVFS_hint hints; /* need to figure out how to set default */ pvfs_descriptor *pd; + gossip_debug(GOSSIP_USRINT_DEBUG, "posix.c open: called with %s\n", path); va_start(ap, flags); if (flags & O_CREAT) mode = va_arg(ap, mode_t); @@ -57,38 +60,52 @@ int open(const char *path, int flags, ...) if (!path) { errno = EFAULT; + gossip_debug(GOSSIP_USRINT_DEBUG, + "\tposix.c open: returns with %d\n", -1); return -1; } - if (is_pvfs_path(path)) + if (is_pvfs_path(&path, 0)) { /* this handles setup of the descriptor */ - flags |= O_NOTPVFS; /* try to open non-pvfs files too */ - return pvfs_open(path, flags, mode, hints); + rc = pvfs_open(path, flags, mode, hints); } else { - int rc; struct stat sbuf; /* path unknown to FS so open with glibc */ rc = glibc_ops.open(path, flags & 01777777, mode); if (rc < 0) { - return rc; + goto errorout; } /* set up the descriptor manually */ + gossip_debug(GOSSIP_USRINT_DEBUG, + "posix.c open calls pvfs_alloc_descriptor %d\n", rc); pd = pvfs_alloc_descriptor(&glibc_ops, rc, NULL, 0); if (!pd) { - return -1; + goto errorout; } pd->is_in_use = PVFS_FS; pd->s->flags = flags; glibc_ops.fstat(rc, &sbuf); pd->s->mode = sbuf.st_mode; + if (S_ISDIR(sbuf.st_mode)) + { + /* we assume path was qualified by is_pvfs_path() */ + pd->s->dpath = pvfs_dpath_insert(path); + } gen_mutex_unlock(&pd->s->lock); gen_mutex_unlock(&pd->lock); - return pd->fd; - } + rc = pd->fd; + } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + gossip_debug(GOSSIP_USRINT_DEBUG, "\tposix.c open: returns with %d\n", rc); + return rc; } /* @@ -133,7 +150,7 @@ int openat(int dirfd, const char *path, int flags, ...) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { fd = pd->s->fsops->openat(pd->true_fd, path, flags, mode); } @@ -182,20 +199,23 @@ int creat64(const char *path, mode_t mode) * unlink wrapper */ int unlink(const char *path) -{ +{ + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if (is_pvfs_path(path)) + if (is_pvfs_path(&path, 0)) { - return pvfs_ops.unlink(path); + rc = pvfs_ops.unlink(path); } else { - return glibc_ops.unlink(path); + rc = glibc_ops.unlink(path); } + PVFS_free_expanded(path); + return rc; } int unlinkat(int dirfd, const char *path, int flag) @@ -210,7 +230,15 @@ int unlinkat(int dirfd, const char *path, int flag) } if (dirfd == AT_FDCWD || (path && path[0] == '/')) { - unlink(path); + if (is_pvfs_path(&path,0)) + { + rc = pvfs_ops.unlinkat(AT_FDCWD, path, flag); + } + else + { + rc = glibc_ops.unlinkat(AT_FDCWD, path, flag); + } + PVFS_free_expanded(path); } else { @@ -233,27 +261,35 @@ int unlinkat(int dirfd, const char *path, int flag) */ int rename (const char *old, const char *new) { + int rc = 0; int oldp, newp; if (!old || !new) { errno = EFAULT; return -1; } - oldp = is_pvfs_path(old); - newp = is_pvfs_path(new); + oldp = is_pvfs_path(&old,0); + newp = is_pvfs_path(&new,0); if(oldp && newp) { - return pvfs_rename(old, new); + rc = pvfs_rename(old, new); } else if (!oldp && !newp) { - return glibc_ops.rename(old, new); + rc = glibc_ops.rename(old, new); } else { errno = EXDEV; - return -1; - } + goto errorout; + } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(old); + PVFS_free_expanded(new); + return rc; } int renameat (int oldfd, const char *old, int newfd, const char *new) @@ -293,7 +329,7 @@ ssize_t read(int fd, void *buf, size_t count) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->read(pd->true_fd, buf, count); } @@ -314,7 +350,7 @@ ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->pread(pd->true_fd, (void *)buf, nbytes, offset); } @@ -335,7 +371,7 @@ ssize_t readv(int fd, const struct iovec *iov, int iovcnt) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->readv(pd->true_fd, iov, iovcnt); } @@ -356,7 +392,7 @@ ssize_t pread64(int fd, void *buf, size_t nbytes, off64_t offset) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->pread64(pd->true_fd, (void *)buf, nbytes, offset); } @@ -377,7 +413,7 @@ ssize_t write(int fd, const void *buf, size_t count) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->write(pd->true_fd, (void *)buf, count); } @@ -398,7 +434,7 @@ ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->pwrite(pd->true_fd, buf, nbytes, offset); } @@ -419,7 +455,7 @@ ssize_t writev(int fd, const struct iovec *iov, int iovcnt) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->writev(fd, iov, iovcnt); if (rc > 0) @@ -446,7 +482,7 @@ ssize_t pwrite64(int fd, const void *buf, size_t nbytes, off64_t offset) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->pwrite64(pd->true_fd, buf, nbytes, offset); } @@ -483,7 +519,7 @@ off64_t lseek64(int fd, off64_t offset, int whence) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->lseek64(pd->true_fd, offset, whence); } @@ -497,36 +533,42 @@ off64_t lseek64(int fd, off64_t offset, int whence) int truncate(const char *path, off_t length) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_truncate(path, length); + rc = pvfs_truncate(path, length); } else { - return glibc_ops.truncate(path, length); + rc = glibc_ops.truncate(path, length); } + PVFS_free_expanded(path); + return rc; } int truncate64(const char *path, off64_t length) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_truncate64(path, length); + rc = pvfs_truncate64(path, length); } else { - return glibc_ops.truncate64(path, length); + rc = glibc_ops.truncate64(path, length); } + PVFS_free_expanded(path); + return rc; } int ftruncate(int fd, off_t length) @@ -535,7 +577,7 @@ int ftruncate(int fd, off_t length) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->ftruncate(pd->true_fd, length); } @@ -553,7 +595,7 @@ int ftruncate64(int fd, off64_t length) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->ftruncate64(pd->true_fd, length); } @@ -572,7 +614,7 @@ int posix_fallocate(int fd, off_t offset, off_t length) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fallocate(pd->true_fd, offset, length); } @@ -591,8 +633,10 @@ int posix_fallocate(int fd, off_t offset, off_t length) int close(int fd) { int rc = 0; + gossip_debug(GOSSIP_USRINT_DEBUG, "posix.c close: called with %d\n", fd); rc = pvfs_free_descriptor(fd); + gossip_debug(GOSSIP_USRINT_DEBUG, "\tposix.c close: returns %d\n", rc); return rc; } @@ -619,19 +663,22 @@ int flush(int fd) /* various flavors of stat */ int stat(const char *path, struct stat *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_stat(path, buf); + rc = pvfs_stat(path, buf); } else { - return glibc_ops.stat(path, buf); + rc = glibc_ops.stat(path, buf); } + PVFS_free_expanded(path); + return rc; } int __xstat(int ver, const char *path, struct stat *buf) @@ -641,19 +688,22 @@ int __xstat(int ver, const char *path, struct stat *buf) int stat64(const char *path, struct stat64 *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_stat64(path, buf); + rc = pvfs_stat64(path, buf); } else { - return glibc_ops.stat64(path, buf); + rc = glibc_ops.stat64(path, buf); } + PVFS_free_expanded(path); + return rc; } int __xstat64(int ver, const char *path, struct stat64 *buf) @@ -667,7 +717,7 @@ int fstat(int fd, struct stat *buf) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstat(pd->true_fd, buf); } @@ -690,7 +740,7 @@ int fstat64(int fd, struct stat64 *buf) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstat64(pd->true_fd, buf); } @@ -716,17 +766,17 @@ int fstatat(int fd, const char *path, struct stat *buf, int flag) { if (flag & AT_SYMLINK_NOFOLLOW) { - rc = pvfs_lstat(path, buf); + rc = lstat(path, buf); } else { - rc = pvfs_stat(path, buf); + rc = stat(path, buf); } } else { pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstatat(pd->true_fd, path, buf, flag); } @@ -753,17 +803,17 @@ int fstatat64(int fd, const char *path, struct stat64 *buf, int flag) { if (flag & AT_SYMLINK_NOFOLLOW) { - rc = pvfs_lstat64(path, buf); + rc = lstat64(path, buf); } else { - rc = pvfs_stat64(path, buf); + rc = stat64(path, buf); } } else { pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstatat64(pd->true_fd, path, buf, flag); } @@ -783,19 +833,22 @@ int __fxstatat64(int ver, int fd, const char *path, struct stat64 *buf, int flag int lstat(const char *path, struct stat *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lstat(path, buf); + rc = pvfs_lstat(path, buf); } else { - return glibc_ops.lstat(path, buf); + rc = glibc_ops.lstat(path, buf); } + PVFS_free_expanded(path); + return rc; } int __lxstat(int ver, const char *path, struct stat *buf) @@ -805,19 +858,22 @@ int __lxstat(int ver, const char *path, struct stat *buf) int lstat64(const char *path, struct stat64 *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lstat64(path, buf); + rc = pvfs_lstat64(path, buf); } else { - return glibc_ops.lstat64(path, buf); + rc = glibc_ops.lstat64(path, buf); } + PVFS_free_expanded(path); + return rc; } int __lxstat64(int ver, const char *path, struct stat64 *buf) @@ -837,7 +893,7 @@ int futimesat(int dirfd, const char *path, const struct timeval times[2]) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->futimesat(pd->true_fd, path, times); } @@ -852,36 +908,42 @@ int futimesat(int dirfd, const char *path, const struct timeval times[2]) int utimes(const char *path, const struct timeval times[2]) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_utimes(path, times); + rc = pvfs_utimes(path, times); } else { - return glibc_ops.utimes(path, times); + rc = glibc_ops.utimes(path, times); } + PVFS_free_expanded(path); + return rc; } int utime(const char *path, const struct utimbuf *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_utime(path, buf); + rc = pvfs_utime(path, buf); } else { - return glibc_ops.utime(path, buf); + rc = glibc_ops.utime(path, buf); } + PVFS_free_expanded(path); + return rc; } int futimes(int fd, const struct timeval times[2]) @@ -890,7 +952,7 @@ int futimes(int fd, const struct timeval times[2]) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->futimes(pd->true_fd, times); } @@ -908,7 +970,7 @@ int dup(int oldfd) pvfs_descriptor *pd; pd = pvfs_find_descriptor(oldfd); - if (pd) + if (pd && pd->is_in_use && oldfd == pd->fd) { rc = pd->s->fsops->dup(pd->true_fd); } @@ -926,7 +988,7 @@ int dup2(int oldfd, int newfd) pvfs_descriptor *pd; pd = pvfs_find_descriptor(oldfd); - if (pd) + if (pd && pd->is_in_use && oldfd == pd->fd) { rc = pd->s->fsops->dup2(pd->true_fd, newfd); } @@ -938,21 +1000,42 @@ int dup2(int oldfd, int newfd) return rc; } +int dup3(int oldfd, int newfd, int flags) +{ + int rc = 0; + pvfs_descriptor *pd; + + pd = pvfs_find_descriptor(oldfd); + if (pd && pd->is_in_use && oldfd == pd->fd) + { + rc = pd->s->fsops->dup3(pd->true_fd, newfd, flags); + } + else + { + errno = EBADF; + rc = -1; + } + return rc; +} + int chown(const char *path, uid_t owner, gid_t group) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_chown(path, owner, group); + rc = pvfs_chown(path, owner, group); } else { - return glibc_ops.chown(path, owner, group); + rc = glibc_ops.chown(path, owner, group); } + PVFS_free_expanded(path); + return rc; } int fchown(int fd, uid_t owner, gid_t group) @@ -961,7 +1044,7 @@ int fchown(int fd, uid_t owner, gid_t group) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fchown(pd->true_fd, owner, group); } @@ -985,7 +1068,7 @@ int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flag) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->fchownat(pd->true_fd, path, owner, group, flag); } @@ -1000,36 +1083,42 @@ int fchownat(int dirfd, const char *path, uid_t owner, gid_t group, int flag) int lchown(const char *path, uid_t owner, gid_t group) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lchown(path, owner, group); + rc = pvfs_lchown(path, owner, group); } else { - return glibc_ops.lchown(path, owner, group); + rc = glibc_ops.lchown(path, owner, group); } + PVFS_free_expanded(path); + return rc; } int chmod(const char *path, mode_t mode) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_chmod(path, mode); + rc = pvfs_chmod(path, mode); } else { - return glibc_ops.chmod(path, mode); + rc = glibc_ops.chmod(path, mode); } + PVFS_free_expanded(path); + return rc; } int fchmod(int fd, mode_t mode) @@ -1038,7 +1127,7 @@ int fchmod(int fd, mode_t mode) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fchmod(pd->true_fd, mode); } @@ -1067,7 +1156,7 @@ int fchmodat(int dirfd, const char *path, mode_t mode, int flag) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->fchmodat(pd->true_fd, path, mode, flag); } @@ -1082,19 +1171,22 @@ int fchmodat(int dirfd, const char *path, mode_t mode, int flag) int mkdir(const char *path, mode_t mode) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_mkdir(path, mode); + rc = pvfs_mkdir(path, mode); } else { - return glibc_ops.mkdir(path, mode); + rc = glibc_ops.mkdir(path, mode); } + PVFS_free_expanded(path); + return rc; } int mkdirat(int dirfd, const char *path, mode_t mode) @@ -1114,7 +1206,7 @@ int mkdirat(int dirfd, const char *path, mode_t mode) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->mkdirat(pd->true_fd, path, mode); } @@ -1129,19 +1221,22 @@ int mkdirat(int dirfd, const char *path, mode_t mode) int rmdir(const char *path) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_rmdir(path); + rc = pvfs_rmdir(path); } else { - return glibc_ops.rmdir(path); + rc = glibc_ops.rmdir(path); } + PVFS_free_expanded(path); + return rc; } #if __GLIBC_PREREQ (2,5) @@ -1150,19 +1245,22 @@ ssize_t readlink(const char *path, char *buf, size_t bufsiz) int readlink(const char *path, char *buf, size_t bufsiz) #endif { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_readlink(path, buf, bufsiz); + rc = pvfs_readlink(path, buf, bufsiz); } else { - return glibc_ops.readlink(path, buf, bufsiz); + rc = glibc_ops.readlink(path, buf, bufsiz); } + PVFS_free_expanded(path); + return rc; } ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) @@ -1182,7 +1280,7 @@ ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->readlinkat(pd->true_fd, path, buf, bufsiz); } @@ -1197,19 +1295,22 @@ ssize_t readlinkat(int dirfd, const char *path, char *buf, size_t bufsiz) int symlink(const char *oldpath, const char *newpath) { + int rc = 0; if (!oldpath || !newpath) { errno = EFAULT; return -1; } - if(is_pvfs_path(newpath)) + if(is_pvfs_path(&newpath,0)) { - return pvfs_symlink(oldpath, newpath); + rc = pvfs_symlink(oldpath, newpath); } else { - return glibc_ops.symlink(oldpath, newpath); + rc = glibc_ops.symlink(oldpath, newpath); } + PVFS_free_expanded(newpath); + return rc; } int symlinkat(const char *oldpath, int newdirfd, const char *newpath) @@ -1229,7 +1330,7 @@ int symlinkat(const char *oldpath, int newdirfd, const char *newpath) else { pd = pvfs_find_descriptor(newdirfd); - if (pd) + if (pd && pd->is_in_use && newdirfd == pd->fd) { rc = pd->s->fsops->symlinkat(oldpath, pd->true_fd, newpath); } @@ -1244,20 +1345,22 @@ int symlinkat(const char *oldpath, int newdirfd, const char *newpath) int link(const char *oldpath, const char *newpath) { + int rc = 0; if (!oldpath || !newpath) { errno = EFAULT; return -1; } - if(is_pvfs_path(oldpath)) + if(is_pvfs_path(&oldpath,0)) { - return pvfs_link(oldpath, newpath); + rc = pvfs_link(oldpath, newpath); } else { - return glibc_ops.link(oldpath, newpath); + rc = glibc_ops.link(oldpath, newpath); } - return -1; + PVFS_free_expanded(oldpath); + return rc; } int linkat(int olddirfd, const char *old, @@ -1271,7 +1374,8 @@ int linkat(int olddirfd, const char *old, errno = EFAULT; return -1; } - if (!oldpd || !newpd) + if ((!oldpd) || (!oldpd->is_in_use) || (olddirfd != oldpd->fd) || + (!newpd) || (!newpd->is_in_use) || (newdirfd != newpd->fd)) { errno = EBADF; return -1; @@ -1293,7 +1397,7 @@ int linkat(int olddirfd, const char *old, */ int posix_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) { - int rc; + int rc = 0; pvfs_descriptor *pd; if (!dirp) @@ -1302,7 +1406,7 @@ int posix_readdir(unsigned int fd, struct dirent *dirp, unsigned int count) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->readdir(pd->true_fd, dirp, count); } @@ -1331,7 +1435,7 @@ int getdents(unsigned int fd, struct dirent *dirp, unsigned int size) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->getdents(pd->true_fd, dirp, size); } @@ -1354,7 +1458,7 @@ int getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int size) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->getdents64(pd->true_fd, dirp, size); } @@ -1373,19 +1477,22 @@ int getdents64(unsigned int fd, struct dirent64 *dirp, unsigned int size) int access(const char *path, int mode) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_access(path, mode); + rc = pvfs_access(path, mode); } else { - return glibc_ops.access(path, mode); + rc = glibc_ops.access(path, mode); } + PVFS_free_expanded(path); + return rc; } int faccessat(int dirfd, const char *path, int mode, int flags) @@ -1405,7 +1512,7 @@ int faccessat(int dirfd, const char *path, int mode, int flags) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->faccessat(pd->true_fd, path, mode, flags); } @@ -1425,7 +1532,7 @@ int flock(int fd, int op) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->flock(pd->true_fd, op); } @@ -1447,7 +1554,7 @@ int fcntl(int fd, int cmd, ...) va_start(ap, cmd); pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { switch (cmd) { @@ -1484,7 +1591,7 @@ int fsync(int fd) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fsync(pd->true_fd); } @@ -1502,7 +1609,7 @@ int fdatasync(int fd) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fdatasync(pd->true_fd); } @@ -1520,7 +1627,7 @@ int posix_fadvise(int fd, off_t offset, off_t length, int advice) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fadvise(pd->true_fd, offset, length, advice); } @@ -1545,7 +1652,7 @@ int fadvise(int fd, off_t offset, off_t len, int advice) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd & pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fadvise(pd->true_fd, offset, len, advice); } @@ -1564,7 +1671,7 @@ int fadvise64(int fd, off64_t offset, off64_t len, int advice) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fadvise64(pd->true_fd, offset, len, advice); } @@ -1578,36 +1685,42 @@ int fadvise64(int fd, off64_t offset, off64_t len, int advice) int statfs(const char *path, struct statfs *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_statfs(path, buf); + rc = pvfs_statfs(path, buf); } else { - return glibc_ops.statfs(path, buf); + rc = glibc_ops.statfs(path, buf); } + PVFS_free_expanded(path); + return rc; } int statfs64(const char *path, struct statfs64 *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_statfs64(path, buf); + rc = pvfs_statfs64(path, buf); } else { - return glibc_ops.statfs64(path, buf); + rc = glibc_ops.statfs64(path, buf); } + PVFS_free_expanded(path); + return rc; } int fstatfs(int fd, struct statfs *buf) @@ -1621,7 +1734,7 @@ int fstatfs(int fd, struct statfs *buf) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstatfs(pd->true_fd, buf); } @@ -1644,7 +1757,7 @@ int fstatfs64(int fd, struct statfs64 *buf) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstatfs64(pd->true_fd, buf); } @@ -1658,19 +1771,22 @@ int fstatfs64(int fd, struct statfs64 *buf) int statvfs(const char *path, struct statvfs *buf) { + int rc = 0; if (!path || !buf) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_statvfs(path, buf); + rc = pvfs_statvfs(path, buf); } else { - return glibc_ops.statvfs(path, buf); + rc = glibc_ops.statvfs(path, buf); } + PVFS_free_expanded(path); + return rc; } int fstatvfs(int fd, struct statvfs *buf) @@ -1684,7 +1800,7 @@ int fstatvfs(int fd, struct statvfs *buf) return -1; } pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { rc = pd->s->fsops->fstatvfs(pd->true_fd, buf); } @@ -1698,19 +1814,22 @@ int fstatvfs(int fd, struct statvfs *buf) int mknod(const char *path, mode_t mode, dev_t dev) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_mknod(path, mode, dev); + rc = pvfs_mknod(path, mode, dev); } else { - return glibc_ops.mknod(path, mode, dev); + rc = glibc_ops.mknod(path, mode, dev); } + PVFS_free_expanded(path); + return rc; } int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) @@ -1730,7 +1849,7 @@ int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) else { pd = pvfs_find_descriptor(dirfd); - if (pd) + if (pd && pd->is_in_use && dirfd == pd->fd) { rc = pd->s->fsops->mknodat(pd->true_fd, path, mode, dev); } @@ -1755,7 +1874,8 @@ ssize_t sendfile64(int outfd, int infd, off64_t *offset, size_t count) inpd = pvfs_find_descriptor(infd); outpd = pvfs_find_descriptor(outfd); - if (inpd && outpd) + if (inpd && inpd->is_in_use && infd == inpd->fd && + outpd && outpd->is_in_use && outfd == outpd->fd) { rc = inpd->s->fsops->sendfile64(outpd->true_fd, inpd->true_fd, offset, count); @@ -1771,53 +1891,67 @@ ssize_t sendfile64(int outfd, int infd, off64_t *offset, size_t count) int setxattr(const char *path, const char *name, const void *value, size_t size, int flags) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_setxattr(path, name, value, size, flags); + rc = pvfs_setxattr(path, name, value, size, flags); } else { if (glibc_ops.setxattr) { - return glibc_ops.setxattr(path, name, value, size, flags); + rc = glibc_ops.setxattr(path, name, value, size, flags); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } int lsetxattr(const char *path, const char *name, const void *value, size_t size, int flags) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lsetxattr(path, name, value, size, flags); + rc = pvfs_lsetxattr(path, name, value, size, flags); } else { if (glibc_ops.lsetxattr) { - return glibc_ops.lsetxattr(path, name, value, size, flags); + rc = glibc_ops.lsetxattr(path, name, value, size, flags); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } int fsetxattr(int fd, const char *name, @@ -1827,7 +1961,7 @@ int fsetxattr(int fd, const char *name, pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { if (pd->s->fsops->fsetxattr) { @@ -1835,7 +1969,7 @@ int fsetxattr(int fd, const char *name, } else { - errno = ENOPKG; + errno = ENOTSUP; rc = -1; } } @@ -1850,53 +1984,67 @@ int fsetxattr(int fd, const char *name, ssize_t getxattr(const char *path, const char *name, void *value, size_t size) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if (is_pvfs_path(path)) + if (is_pvfs_path(&path,0)) { - return pvfs_getxattr(path, name, value, size); + rc = pvfs_getxattr(path, name, value, size); } else { if (glibc_ops.getxattr) { - return glibc_ops.getxattr(path, name, value, size); + rc = glibc_ops.getxattr(path, name, value, size); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } ssize_t lgetxattr(const char *path, const char *name, void *value, size_t size) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lgetxattr(path, name, value, size); + rc = pvfs_lgetxattr(path, name, value, size); } else { if (glibc_ops.lgetxattr) { - return glibc_ops.lgetxattr(path, name, value, size); + rc = glibc_ops.lgetxattr(path, name, value, size); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } ssize_t fgetxattr(int fd, const char *name, void *value, @@ -1906,7 +2054,7 @@ ssize_t fgetxattr(int fd, const char *name, void *value, pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { if (pd->s->fsops->fgetxattr) { @@ -1914,7 +2062,7 @@ ssize_t fgetxattr(int fd, const char *name, void *value, } else { - errno = ENOPKG; + errno = ENOTSUP; rc = -1; } } @@ -1928,52 +2076,66 @@ ssize_t fgetxattr(int fd, const char *name, void *value, ssize_t listxattr(const char *path, char *list, size_t size) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_listxattr(path, list, size); + rc = pvfs_listxattr(path, list, size); } else { if (glibc_ops.listxattr) { - return glibc_ops.listxattr(path, list, size); + rc = glibc_ops.listxattr(path, list, size); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } ssize_t llistxattr(const char *path, char *list, size_t size) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_llistxattr(path, list, size); + rc = pvfs_llistxattr(path, list, size); } else { if (glibc_ops.llistxattr) { - return glibc_ops.llistxattr(path, list, size); + rc = glibc_ops.llistxattr(path, list, size); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } ssize_t flistxattr(int fd, char *list, size_t size) @@ -1982,7 +2144,7 @@ ssize_t flistxattr(int fd, char *list, size_t size) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { if (pd->s->fsops->flistxattr) { @@ -1990,7 +2152,7 @@ ssize_t flistxattr(int fd, char *list, size_t size) } else { - errno = ENOPKG; + errno = ENOTSUP; rc = -1; } } @@ -2004,52 +2166,66 @@ ssize_t flistxattr(int fd, char *list, size_t size) int removexattr(const char *path, const char *name) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,0)) { - return pvfs_removexattr(path, name); + rc = pvfs_removexattr(path, name); } else { if (glibc_ops.removexattr) { - return glibc_ops.removexattr(path, name); + rc = glibc_ops.removexattr(path, name); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } int lremovexattr(const char *path, const char *name) { + int rc = 0; if (!path) { errno = EFAULT; return -1; } - if(is_pvfs_path(path)) + if(is_pvfs_path(&path,1)) { - return pvfs_lremovexattr(path, name); + rc = pvfs_lremovexattr(path, name); } else { if (glibc_ops.lremovexattr) { - return glibc_ops.lremovexattr(path, name); + rc = glibc_ops.lremovexattr(path, name); } else { - errno = ENOPKG; - return -1; + errno = ENOTSUP; + goto errorout; } } + goto cleanup; +errorout: + rc = -1; +cleanup: + PVFS_free_expanded(path); + return rc; } int fremovexattr(int fd, const char *name) @@ -2058,7 +2234,7 @@ int fremovexattr(int fd, const char *name) pvfs_descriptor *pd; pd = pvfs_find_descriptor(fd); - if (pd) + if (pd && pd->is_in_use && fd == pd->fd) { if (pd->s->fsops->fremovexattr) { @@ -2066,7 +2242,7 @@ int fremovexattr(int fd, const char *name) } else { - errno = ENOPKG; + errno = ENOTSUP; rc = -1; } } @@ -2131,6 +2307,148 @@ int getdtablesize(void) #endif /* PVFS_USRINT_CWD */ +/* add a configure option to enable this */ +#if 0 +struct posix_ops_s ofs_sys_ops = +{ + .snprintf = NULL, + .open = open, + .open64 = open64, + .openat = openat, + .openat64 = openat64, + .creat = creat, + .creat64 = creat64, + .unlink = unlink, + .unlinkat = unlinkat, + .rename = rename, + .renameat = renameat, + .read = read, + .pread = pread, + .readv = readv, + .pread64 = pread64, + .write = write, + .pwrite = pwrite, + .writev = writev, + .pwrite64 = pwrite64, + .lseek = lseek, + .lseek64 = lseek64, + .perror = perror, + .truncate = truncate, + .truncate64 = truncate64, + .ftruncate = ftruncate, + .ftruncate64 = ftruncate64, + .fallocate = posix_fallocate, + .close = close, + .stat = stat, + .stat64 = stat64, + .fstat = fstat, + .fstat64 = fstat64, + .fstatat = fstatat, + .fstatat64 = fstatat64, + .lstat = lstat, + .lstat64 = lstat64, + .futimesat = futimesat, + .utimes = utimes, + .utime = utime, + .futimes = futimes, + .dup = dup, + .dup2 = dup2, + .dup3 = dup3, + .chown = chown, + .fchown = fchown, + .fchownat = fchownat, + .lchown = lchown, + .chmod = chmod, + .fchmod = fchmod, + .fchmodat = fchmodat, + .mkdir = mkdir, + .mkdirat = mkdirat, + .rmdir = rmdir, + .readlink = readlink, + .readlinkat = readlinkat, + .symlink = symlink, + .symlinkat = symlinkat, + .link = link, + .linkat = linkat, + .readdir = posix_readdir, + .getdents = getdents, + .getdents64 = getdents64, + .access = access, + .faccessat = faccessat, + .flock = flock, + .fcntl = fcntl, + .sync = sync, + .fsync = fsync, + .fdatasync = fdatasync, + .fadvise = posix_fadvise, + .fadvise64 = fadvise64, + .statfs = statfs, + .statfs64 = statfs64, + .fstatfs = fstatfs, + .fstatfs64 = fstatfs64, + .statvfs = statvfs, + .fstatvfs = fstatvfs, + .mknod = mknod, + .mknodat = mknodat, + .sendfile = sendfile, + .sendfile64 = sendfile64, +#ifdef HAVE_ATTR_XATTR_H + .setxattr = setxattr, + .lsetxattr = lsetxattr, + .fsetxattr = fsetxattr, + .getxattr = getxattr, + .lgetxattr = lgetxattr, + .fgetxattr = fgetxattr, + .listxattr = listxattr, + .llistxattr = llistxattr, + .flistxattr = flistxattr, + .removexattr = removexattr, + .lremovexattr = lremovexattr, + .fremovexattr = fremovexattr, +#endif + .socket = NULL, + .accept = NULL, + .bind = NULL, + .connect = NULL, + .getpeername = NULL, + .getsockname = NULL, + .getsockopt = NULL, + .setsockopt = NULL, + .ioctl = NULL, + .listen = NULL, + .recv = NULL, + .recvfrom = NULL, + .recvmsg = NULL, + .send = NULL, + .sendto = NULL, + .sendmsg = NULL, + .shutdown = NULL, + .socketpair = NULL, + .pipe = NULL, + .umask = umask, + .getumask = getumask, + .getdtablesize = getdtablesize, + .mmap = mmap, + .munmap = munmap, + .msync = msync +#if 0 + , .acl_delete_def_file = acl_delete_def_file + , .acl_get_fd = acl_get_fd + , .acl_get_file = acl_get_file + , .acl_set_fd = acl_set_fd + , .acl_set_file = acl_set_file +#endif + , .getfscreatecon = getfscreatecon + , .getfilecon = getfilecon + , .lgetfilecon = lgetfilecon + , .fgetfilecon = fgetfilecon + , .setfscreatecon = setfscreatecon + , .setfilecon = setfilecon + , .lsetfilecon = lsetfilecon + , .fsetfilecon = fsetfilecon +}; +#endif + /* * Local variables: * c-indent-level: 4 diff --git a/src/client/usrint/pvfs-path.c b/src/client/usrint/pvfs-path.c new file mode 100644 index 0000000..f2cac3c --- /dev/null +++ b/src/client/usrint/pvfs-path.c @@ -0,0 +1,665 @@ +/* + * (C) 2011 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/** \file + * \ingroup usrint + * + * PVFS2 user interface routines - routines to manage open files + */ +#define USRINT_SOURCE 1 +#include "usrint.h" +#include +#ifndef SYS_readdir +#define SYS_readdir 89 +#endif +//#include "posix-ops.h" +#include "openfile-util.h" +#include "iocommon.h" +//#include "posix-pvfs.h" +#include "pvfs-path.h" +//#ifdef PVFS_AIO_ENABLE +//#include "aiocommon.h" +//#endif + +//#if PVFS_UCACHE_ENABLE +//#include "ucache.h" +//#endif + +/** + * Just like pvfs_qualify path, except it also expands + * symbolic links which requires looking up each + * segment one at a time so we only do this if we feel + * we might have a sym link. + * + * Values set on a pvfs_path + * PATH_LOOKEDUP - the path points to an existing fs object + * PATH_RESOLVED - the path points into a PVFS volume + * PATH_MNTPOINT - the mount point of the PVFS volume + * PATH_ERROR - an error occured in the process + * PATH_EXPANDED - indicates this routine was run successfully + * + * Paths can be looked up and not resolved (a non-pvfs object) + * or resolved and not looked up (a pvfs path but object not found) + * or neither (not an existing path at all) or both (a pvfs object). + * mntpoint only valid if resolved. error contains the errno value. + * + * NOTE: if you make changes to this function after + * 08/08/2012, remember to make changes to PVFS_qualify_path() + * in pvfs-qualify-path.c + */ +char *PVFS_expand_path(const char *path, int skip_last_lookup) +{ + int ret = 0; + int is_a_link = 0; + int readlinks = 0; + int n = 0; + char *opath = NULL; + char *npath = NULL; + char *buf = NULL; + char *obuf = NULL; + char link_path[PVFS_PATH_MAX + 1]; + PVFS_path_t *Ppath; + PVFS_object_ref obj_ref; + + if (!path) + { + return NULL; + } + /* see if this is a PVFS path if not make one */ + Ppath = PVFS_path_from_expanded((char *)path); + if (!VALID_PATH_MAGIC(Ppath)) + { + Ppath = PVFS_new_path(path); + } + opath = Ppath->orig_path; + npath = Ppath->expanded_path; + + /* if we need to start over at expand, clear flags first */ + /* OK to expand a qualified path */ + if (PATH_EXPANDED(Ppath)) + { + return Ppath->expanded_path; + } + + /* reset things to initial conditions */ + CLEAR_ERROR(Ppath); + CLEAR_MNTPOINT(Ppath); + CLEAR_RESOLVED(Ppath); + CLEAR_LOOKEDUP(Ppath); + Ppath->pvfs_path = NULL; + Ppath->filename = NULL; + Ppath->fs_id = PVFS_FS_ID_NULL; + Ppath->handle = 0; + memset(link_path, 0, PVFS_PATH_MAX + 1); + /* as we expand the path we will be resolving and looking up + * each segment, each segment is considered qualified as we + * go so we set the qualified flag + */ + SET_QUALIFIED(Ppath); + /* now expand the path */ + memset(npath, 0, PVFS_PATH_MAX + 1); + if(*opath != '/') + { + if (!getcwd(Ppath->expanded_path, PVFS_PATH_MAX - 2)) + { + return NULL; + } + npath += strnlen(npath, PVFS_PATH_MAX); + /* we need to know if we can already resolve this */ + PVFS_util_resolve_absolute(Ppath->expanded_path); + if (npath[-1] != '/') + *npath++ = '/'; + } + else + { + *npath++ = '/'; + opath++; + } + /* Expand each slash-separated pathname component. */ + while (*opath != '\0') + { + /* ignore stray '/' */ + if (*opath == '/') + { + opath++; + continue; + } + if (*opath == '.' && (opath[1] == '\0' || opath[1] == '/')) + { + /* Ignore "." */ + opath++; + continue; + } + if (*opath == '.' && opath[1] == '.' && + (opath[2] == '\0' || opath[2] == '/')) + { + /* Backup for ".." */ + opath += 2; + while (npath > Ppath->expanded_path + 1 && (--npath)[-1] != '/') + ; + /* clear these, we will regenerate them if needed */ + CLEAR_RESOLVED(Ppath); + CLEAR_LOOKEDUP(Ppath); + Ppath->pvfs_path = NULL; + Ppath->filename = NULL; + Ppath->fs_id = PVFS_FS_ID_NULL; + Ppath->handle = 0; + continue; + } + /* Safely copy the next pathname component. */ + while (*opath != '\0' && *opath != '/') + { + if (npath - Ppath->expanded_path > PVFS_PATH_MAX - 2) + { + ret = -PVFS_ENAMETOOLONG; + goto err; + } + *npath++ = *opath++; + } + + /* Protect against infinite loops. */ +#define MAX_READLINKS 16 + if (readlinks++ > MAX_READLINKS) + { + ret = -PVFS_ELOOP; + goto err; + } + + /* See if last pathname component is a symlink. */ + *npath = '\0'; + is_a_link = 0; + + /* this must assume clean path */ + /* this will set RESOLVED and MNTPOINT flags */ + ret = PVFS_util_resolve_absolute(Ppath->expanded_path); + /* if this is a no-follow situation then we skip */ + /* resolving the last segment, so see if this is */ + /* the last segment */ + if (skip_last_lookup) + { + char *p; + p = opath; + while(*p) + { + if (*p== '/') + { + p += 1; + continue; + } + if (*p == '.' && *(p+1) == '0') + { + p += 1; + continue; + } + if (*p == '.' && *(p+1) == '/') + { + p += 2; + continue; + } + break; + } + if (!*p) + { + continue; /* returns to main loop */ + } + } + if (!ret) + { + /* this is for PVFS space lookups */ + PVFS_sys_attr attr; + + /* this must assume clean path */ + ret = iocommon_lookup_absolute(Ppath->expanded_path, + PVFS2_LOOKUP_LINK_NO_FOLLOW, + &obj_ref, + NULL, + 0); + Ppath->rc = ret; /* save this return code */ + if (ret == 0) + { + /* get the attributes to see if it is a link */ + Ppath->rc = iocommon_getattr(obj_ref, &attr, + PVFS_ATTR_SYS_TYPE | + PVFS_ATTR_SYS_LNK_TARGET); + if (attr.objtype == PVFS_TYPE_SYMLINK) + { + /* get the link contents */ + strncpy(link_path, attr.link_target, PVFS_PATH_MAX); + n = strlen(link_path); + is_a_link = 1; + /* even though we were success looking this up + * it is a symbolic link and we are going to expand + * it so we don't want to update the fs_id and + * handle just leave the last one in place + */ + } + else + { + /* This successfully looked up so we have a valid + * object up to the current spot in the list + * If the next lookup works we will overwrite + * so we leave the object of the last sucessful + * lookup + */ + Ppath->fs_id = obj_ref.fs_id; + Ppath->handle = obj_ref.handle; + Ppath->filename = npath; + SET_LOOKEDUP(Ppath); + } + } + else + { + /* Failed to look this up so this is either an + * erroneous path or it is a path to an object + * we are creating. + */ + *npath++ = '/'; + break; /* out of while (*opath != '\0') */ + } + } + else + { + /* this is for non PVFS space */ + n = syscall(SYS_readlink, + Ppath->expanded_path, + link_path, + PVFS_PATH_MAX); + if (n < 0) + { + struct stat sbuf; + if (errno != EINVAL) + { + /* an error so we bail out */ + Ppath->rc = -errno; + goto err; + } + /* else not a sym link + * check to see if it is a valid object + */ + n = syscall(SYS_stat, + Ppath->expanded_path, + &sbuf); + if (n < 0) + { + /* Failed to look this up so this is either an + * erroneous path or it is a path to an object + * we are creating. + */ + *npath++ = '/'; + break; /* out of while (*opath != '\0') */ + } + /* mark path up to here as existing - though not PVFS */ + SET_LOOKEDUP(Ppath); + /* Ppath->filename = npath; */ + /* cover the error code */ + errno = 0; + } + else + { + /* is a sym link */ + is_a_link = (n > 0); + if (is_a_link) + { + /* Note: readlink doesn't add the null byte. */ + link_path[n] = '\0'; + } + /* n == 0 is a link with no path ??? */ + } + } + /* expand symlink */ + if (is_a_link) + { + int m; + + if (*link_path == '/') + { + /* Start over for an absolute symlink. */ + npath = Ppath->expanded_path; + /* since we are starting from the root */ + /* we can nolonger be resolved or looked up */ + CLEAR_MNTPOINT(Ppath); + CLEAR_RESOLVED(Ppath); + CLEAR_LOOKEDUP(Ppath); + Ppath->pvfs_path = NULL; + Ppath->filename = NULL; + Ppath->fs_id = PVFS_FS_ID_NULL; + Ppath->handle = 0; + } + else + { + /* Otherwise back up over this component. */ + while (*(--npath) != '/') + ; + } + + /* Insert symlink contents into path. */ + m = strlen(opath); + if (buf) + { + /* want to free buf but a previous symlink */ + /* may have set opath pointing into buf */ + /* and we reference opath below so we */ + /* delay the free */ + obuf = buf; + buf = NULL; + } + buf = malloc(m + n + 1); + if(!buf) + { + ret = -PVFS_ENOMEM; + goto err; + } + memcpy(buf, link_path, n); + memcpy(buf + n, opath, m + 1); + opath = buf; + if (obuf) + { + free(obuf); + obuf = NULL; + } + } + *npath++ = '/'; + } + /* Delete trailing slash but don't whomp a lone slash. */ + if (npath != Ppath->expanded_path + 1 && npath[-1] == '/') + { + npath--; + } + /* Make sure it's null terminated. */ + *npath = '\0'; + + if (buf) + { + free(buf); + } + + SET_EXPANDED(Ppath); + if (!PATH_RESOLVED(Ppath)) + { + /* final check to see if the path resolves */ + PVFS_util_resolve_absolute(Ppath->expanded_path); + } + if (PATH_RESOLVED(Ppath) && !PATH_LOOKEDUP(Ppath)) + { + /* final attempt to look up the path */ + ret = iocommon_lookup_absolute(Ppath->expanded_path, + PVFS2_LOOKUP_LINK_NO_FOLLOW, + &obj_ref, + NULL, + 0); + Ppath->rc = ret; /* save this return code */ + if (ret == 0) + { + Ppath->fs_id = obj_ref.fs_id; + Ppath->handle = obj_ref.handle; + Ppath->filename = npath; + SET_LOOKEDUP(Ppath); + } + } + /* if this was already a PVFS_path then this is + * the same path that was passed in + */ + return Ppath->expanded_path; + +err: + if (Ppath->rc != 0) + { + SET_ERROR(Ppath); + } + if (obuf) + { + free(obuf); + } + if (buf) + { + free(buf); + } + return NULL; +} + +/** + * Determines if a path is part of a PVFS Filesystem + * + * returns 1 if PVFS 0 otherwise + */ + +int is_pvfs_path(const char **path, int skip_last_lookup) +{ + int rc = 0; + char *newpath = NULL ; +#if PVFS_USRINT_KMOUNT + int npsize; + struct stat sbuf; + struct statfs fsbuf; +#else + PVFS_path_t *Ppath; +#endif + + if(pvfs_sys_init()) + { + return 0; /* assume non-PVFS because we haven't initialized yet */ + /* see comments in openfile-util.c */ + } + + if (!path || !*path) + { + errno = EINVAL; + return 0; /* let glibc sort out the error */ + } +#if PVFS_USRINT_KMOUNT + memset(&sbuf, 0, sizeof(sbuf)); + memset(&fsbuf, 0, sizeof(fsbuf)); + npsize = strnlen(*path, PVFS_PATH_MAX) + 1; + newpath = (char *)malloc(npsize); + if (!newpath) + { + return 0; /* let glibc sort out the error */ + } + strncpy(newpath, *path, npsize); + + /* first try to stat the path */ + /* this must call standard glibc stat */ + rc = glibc_ops.stat(newpath, &sbuf); + if (rc < 0) + { + int count; + /* path doesn't exist, try removing last segment */ + for(count = strlen(newpath) - 2; count > 0; count--) + { + if(newpath[count] == '/') + { + newpath[count] = '\0'; + break; + } + } + /* this must call standard glibc stat */ + rc = glibc_ops.stat(newpath, &sbuf); + if (rc < 0) + { + /* can't find the path must be an error */ + free(newpath); + return 0; /* let glibc sort out the error */ + } + } + /* this must call standard glibc statfs */ + rc = glibc_ops.statfs(newpath, &fsbuf); + free(newpath); + if(fsbuf.f_type == PVFS_FS) + { + return 1; /* PVFS */ + } + else + { + return 0; /* not PVFS assume the kernel can handle it */ + } +/***************************************************************/ +#else /* PVFS_USRINT_KMOUNT */ +/***************************************************************/ + /* we might not be able to stat the file direcly + * so we will use our resolver to look up the path + * prefix in the mount tab files + */ + /* this allocates a PVFS_path_s which is freed below */ + Ppath = PVFS_new_path(*path); + if (!Ppath) + { + return 0; /* let glibc sort out the error */ + } + *path = Ppath->expanded_path; + /* we are passing in a PVFS_path_t so this won't make another */ + newpath = PVFS_qualify_path(*path); + /* *path == extended_path this func returns extended_path so */ + /* now newpath == *path */ + rc = PVFS_util_resolve_absolute(newpath); + if (rc < 0) + { + if (rc == -PVFS_ENOENT) + { + /* This is our first opportunity to fully expand the path by + * calling expand_path. In the ideal. if this succeeds we + * won't have to do much later, just use the results. + * Newpath doesn't actually change. + */ + newpath = PVFS_expand_path(*path, skip_last_lookup); + if (!newpath) + { + return 0; /* an error returned - let glibc deal with it */ + } + if (!PATH_RESOLVED(Ppath)) + { + /* if path was not resolved, not PVFS */ + return 0; + } + else + { + /* path resolved - expanded path is PVFS */ + return 1; + } + } + errno = rc; + return 0; /* an error returned - let glibc deal with it */ + } + return 1; /* a PVFS path */ +#endif /* PVFS_USRINT_KMOUNT */ +} + +/** + * Split a pathname into a directory and a filename. + * If non-null is passed as the directory or filename, + * the field will be allocated and filled with the correct value + * + * A slash at the end of the path is interpreted as no filename + * and is an error. To parse the last dir in a path, remove this + * trailing slash. No filename with no directory is OK. + * + * WBL - New design we should never have trailing or extra slashes + * dots or double dots so no special code to deal with them. + */ +int split_pathname( const char *path, + char **directory, + char **filename) +{ + int i = 0; + int fnlen = 0; + int length = 0; + + if (!path || !directory || !filename) + { + errno = EINVAL; + return -1; + } + /* Split path into a directory and filename */ + length = strnlen(path, PVFS_PATH_MAX); + if (length == PVFS_PATH_MAX) + { + errno = ENAMETOOLONG; + return -1; + } + i = length - 1; + for (; i >= 0; i--) + { + if (path[i] == '/') + { + /* parse the directory */ + *directory = (char *)malloc(i + 1); + if (!*directory) + { + return -1; + } + memset(*directory, 0, (i + 1)); + strncpy(*directory, path, i); + (*directory)[i] = 0; + break; + } + } + if (i == -1) + { + /* found no '/' path is all filename */ + *directory = NULL; + } + else if (i == 0) + { + /* special case, this is an item in the true root dir */ + /* the true root cannot be a PVFS mount point and we */ + /* would not be here if this hadn't resolved at some */ + /* point so it must be a dir, the PVFS mount point */ + /* easiest thing is put it all in the dir output and */ + /* set the EISDIR so iocommon_open will know it is */ + /* everything */ + free(*directory); + *directory = (char *)malloc(length + 1); + if (!*directory) + { + return -1; + } + memset(*directory, 0, (length + 1)); + strncpy(*directory, path, length); + (*directory)[length] = 0; + *filename = NULL; + errno = EISDIR; + return -1; + } + /* copy the filename */ + i++; + fnlen = length - i /* - slashes*/; + if (fnlen == 0) + { + filename = NULL; + if (*directory) + { + errno = EISDIR; + } + else + { + errno = ENOENT; + } + return -1; + } + *filename = (char *)malloc(fnlen + 1); + if (!*filename) + { + if (*directory) + { + free(*directory); + } + *directory = NULL; + *filename = NULL; + return -1; + } + memset(*filename, 0, (fnlen + 1)); + strncpy(*filename, path + i, fnlen); + (*filename)[fnlen] = 0; + return 0; +} + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=4 sts=4 sw=4 expandtab + */ diff --git a/src/client/usrint/pvfs-path.h b/src/client/usrint/pvfs-path.h new file mode 100644 index 0000000..ce58eee --- /dev/null +++ b/src/client/usrint/pvfs-path.h @@ -0,0 +1,159 @@ +/* + * (C) 2011 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/** \file + * \ingroup usrint + * + * PVFS2 user interface routines + */ +#ifndef PATH_H +#define PATH_H 1 + +#include + +#include "pvfs2.h" + +#ifdef WIN32 +#include "wincommon.h" +#endif + +#define PVFS_PATH_MAGIC (0xfafbfcfdfefff000) +#define PVFS_PATH_QUALIFIED (0x001) +#define PVFS_PATH_EXPANDED (0x002) +#define PVFS_PATH_RESOLVED (0x004) +#define PVFS_PATH_MNTPOINT (0x008) +#define PVFS_PATH_LOOKEDUP (0x010) +#define PVFS_PATH_FOLLOWSYM (0x020) +#define PVFS_PATH_ERROR (0x800) + +#define VALID_PATH_MAGIC(p) \ + (((p)->magic & 0xffffffffffffff00) == PVFS_PATH_MAGIC) + +#define PATH_QUALIFIED(p) ((p)->magic & PVFS_PATH_QUALIFIED) +#define SET_QUALIFIED(p) do{(p)->magic |= PVFS_PATH_QUALIFIED;}while(0) +#define CLEAR_QUALIFIED(p) do{(p)->magic &= ~PVFS_PATH_QUALIFIED;}while(0) + +#define PATH_EXPANDED(p) ((p)->magic & PVFS_PATH_EXPANDED) +#define SET_EXPANDED(p) do{(p)->magic |= PVFS_PATH_EXPANDED;}while(0) +#define CLEAR_EXPANDED(p) do{(p)->magic &= ~PVFS_PATH_EXPANDED;}while(0) + +#define PATH_RESOLVED(p) ((p)->magic & PVFS_PATH_RESOLVED) +#define SET_RESOLVED(p) do{(p)->magic |= PVFS_PATH_RESOLVED;}while(0) +#define CLEAR_RESOLVED(p) do{(p)->magic &= ~PVFS_PATH_RESOLVED;}while(0) + +#define PATH_MNTPOINT(p) ((p)->magic & PVFS_PATH_MNTPOINT) +#define SET_MNTPOINT(p) do{(p)->magic |= PVFS_PATH_MNTPOINT;}while(0) +#define CLEAR_MNTPOINT(p) do{(p)->magic &= ~PVFS_PATH_MNTPOINT;}while(0) + +#define PATH_LOOKEDUP(p) ((p)->magic & PVFS_PATH_LOOKEDUP) +#define SET_LOOKEDUP(p) do{(p)->magic |= PVFS_PATH_LOOKEDUP;}while(0) +#define CLEAR_LOOKEDUP(p) do{(p)->magic &= ~PVFS_PATH_LOOKEDUP;}while(0) + +#define PATH_FOLLOWSYM(p) ((p)->magic & PVFS_PATH_FOLLOWSYM) +#define SET_FOLLOWSYM(p) do{(p)->magic |= PVFS_PATH_FOLLOWSYM;}while(0) +#define CLEAR_FOLLOWSYM(p) do{(p)->magic &= ~PVFS_PATH_FOLLOWSYM;}while(0) + +#define PATH_ERROR(p) ((p)->magic & PVFS_PATH_ERROR) +#define SET_ERROR(p) do{(p)->magic |= PVFS_PATH_ERROR;}while(0) +#define CLEAR_ERROR(p) do{(p)->magic &= ~PVFS_PATH_ERROR;}while(0) + +/** + * A PVFS_path keeps up with an path we are trying to access and the + * the results of processing that path. If the path is qualified and/or + * expanded then the path starts at the root and has had all . and / + * elements removed (except a single / between segments). Qualified + * paths have not had any segment verified or resolved. Later a resolved + * path has the pvfs_path pointer pointing to the portion of the path + * just past the mount point and has the fs_id filled in. In most cases + * we co do a lookup from there. If the path fails to resolve or lookup + * correctly we will fully expand the path resolving symbolic links. + * During this process each segment is resolved and then looked up to see + * if it is a symlink, and if so the link is read and the path futher + * expanded. If a segment fails to look up the process stops. In this + * case the last successful lookup in pvfs space will have its object + * handle recorded and the filename poitner will point to the remaining + * segments. In the case where we are creating an object this might be a + * signle segment. If it is multiple segments it may be an error. + * + * the structure uspassed around using the address if the expanded path + * buffer so that it appears to be a simple char path. Functions compute + * the address of the structure and check for the magic number to verify + * they have a PVFS_path and not single char array. This is used because + * some of the interfaces can either be called by a higher layer + * interface that has already done some processing, or directly by a + * program which has not. + */ + +typedef struct PVFS_path_s +{ + int rc; /* return code of internal functions */ + char *orig_path; /* this is the original unmodified path */ + char *pvfs_path; /* if we resove, this points to the pvfs portion */ + PVFS_fs_id fs_id; /* if we resolve this is the fs_id */ + PVFS_handle handle;/* if we look up a pvfs object, this is the last one */ + char *filename; /* this is the path left after the object */ + uint64_t magic; /* contains a magic to id the struct a flags */ + char expanded_path[PVFS_PATH_MAX + 1]; /* modified path is here */ +} PVFS_path_t; + +static __inline__ PVFS_path_t *PVFS_new_path(const char *orig_path) +{ + PVFS_path_t *newp; + newp = (PVFS_path_t *)malloc(sizeof(PVFS_path_t)); + memset(newp, 0, sizeof(PVFS_path_t)); + newp->magic = PVFS_PATH_MAGIC; + newp->orig_path = (char *)orig_path; + newp->pvfs_path = NULL; + newp->fs_id = 0; + newp->handle = 0; + newp->filename = NULL; + return newp; +} + +static __inline__ PVFS_path_t *PVFS_path_from_expanded(const char *expanded_path) +{ + return ((PVFS_path_t *)((char *)expanded_path - + (unsigned long)((char *)(&((PVFS_path_t *)0)->expanded_path)))); +} + +static __inline__ void PVFS_free_path(PVFS_path_t *path) +{ + memset(path, 0, sizeof(PVFS_path_t)); + free(path); +} + +static __inline__ void PVFS_free_expanded(const char *path) +{ + if (path) + { + PVFS_path_t *Ppath = PVFS_path_from_expanded((char *)path); + if (VALID_PATH_MAGIC(Ppath)) + { + PVFS_free_path(Ppath); + } + } +} + +char *PVFS_qualify_path(const char *path); + +char *PVFS_expand_path(const char *path, int skip_last_lookup); + +int is_pvfs_path(const char **path, int skip_last_lookup); + +int split_pathname( const char *path, + char **directory, + char **filename); + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ + +#endif diff --git a/src/client/usrint/pvfs-qualify-path.c b/src/client/usrint/pvfs-qualify-path.c new file mode 100644 index 0000000..6acc86e --- /dev/null +++ b/src/client/usrint/pvfs-qualify-path.c @@ -0,0 +1,144 @@ +/* + * (C) 2011 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/** \file + * \ingroup usrint + * + * PVFS2 user interface routines - routines to manage open files + */ +#include +#include +#include + +#include "pvfs2-internal.h" +#include "pvfs-path.h" + + +/* + * Takes a path that may be relative to the working dir and + * expands it all the way to the root, removes extra + * slashes, single dots and double dots. Assumes there + * are no symbolic links. If there are we assume this + * will fail lookup later and we will have to run + * pvfs_expand_path to work out the symbolic links. + * + * Sets PATH_QUALIFIED to indicate a successful run of this routine + * Clears all other flags. + * + * code taken from realpath + * + * NOTE: if you modify this function (after 08/08/2012), + * remember to make the same modifications to PVFS_expand_path() + * in pvfs-path.c + * + * NOTE: this function was removed from pvfs-path.c and put + * into its own file, so it can be called from other functions + * when --disable-usrint is specified at configure time. + */ +char *PVFS_qualify_path(const char *path) +{ + int ret __attribute__((unused)) = 0; + char *opath = NULL; + char *npath = NULL; + PVFS_path_t *Ppath; + + if (!path) + { + return NULL; + } + /* see if this is a PVFS path if not make one */ + Ppath = PVFS_path_from_expanded((char *)path); + if (!VALID_PATH_MAGIC(Ppath)) + { + Ppath = PVFS_new_path(path); + } + opath = Ppath->orig_path; + npath = Ppath->expanded_path; + + /* if we need to start over at qualify clear flags first */ + if (PATH_QUALIFIED(Ppath) || PATH_EXPANDED(Ppath)) + { + return Ppath->expanded_path; + } + + CLEAR_ERROR(Ppath); + CLEAR_MNTPOINT(Ppath); + CLEAR_RESOLVED(Ppath); + CLEAR_EXPANDED(Ppath); + CLEAR_LOOKEDUP(Ppath); + Ppath->pvfs_path = NULL; + Ppath->filename = NULL; + Ppath->fs_id = 0; + Ppath->handle = 0; + /* now qualify the path */ + memset(npath, 0, PVFS_PATH_MAX + 1); + if(*opath != '/') + { + if (!getcwd(Ppath->expanded_path, PVFS_PATH_MAX - 2)) + { + return NULL; + } + npath += strnlen(npath, PVFS_PATH_MAX); + if (npath[-1] != '/') + *npath++ = '/'; + } + else + { + *npath++ = '/'; + opath++; + } + /* Expand each slash-separated pathname component. */ + while (*opath != '\0') + { + /* ignore stray '/' */ + if (*opath == '/') + { + opath++; + continue; + } + if (*opath == '.' && (opath[1] == '\0' || opath[1] == '/')) + { + /* Ignore "." */ + opath++; + continue; + } + if (*opath == '.' && opath[1] == '.' && + (opath[2] == '\0' || opath[2] == '/')) + { + /* Backup for ".." */ + opath += 2; + while (npath > Ppath->expanded_path + 1 && (--npath)[-1] != '/') + ; + continue; + } + /* Safely copy the next pathname component. */ + while (*opath != '\0' && *opath != '/') + { + if (npath - Ppath->expanded_path > PVFS_PATH_MAX - 2) + { + ret = -PVFS_ENAMETOOLONG; + goto err; + } + *npath++ = *opath++; + } + /* cap off this segment */ + *npath++ = '/'; + } + /* Delete trailing slash but don't whomp a lone slash. */ + if (npath != Ppath->expanded_path + 1 && npath[-1] == '/') + npath--; + /* Make sure it's null terminated. */ + *npath = '\0'; + + SET_QUALIFIED(Ppath); + /* if this was already a PVFS_path then this is + * the same path that was passed in + */ + return Ppath->expanded_path; + +err: + return NULL; +}/*end PVFS_quality_path*/ diff --git a/src/client/usrint/selinux.c b/src/client/usrint/selinux.c new file mode 100644 index 0000000..45cad5b --- /dev/null +++ b/src/client/usrint/selinux.c @@ -0,0 +1,114 @@ +/* + * (C) 2011 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + +/** \file + * \ingroup usrint + * + * PVFS2 user interface routines - implementation of stdio for pvfs + */ +/* this prevents headers from using inlines for 64 bit calls */ + +#define USRINT_SOURCE 1 +#include "usrint.h" + +/* if no header file we assume no selinux */ +#ifdef HAVE_SELINUX_H + +#ifdef getfscreatecon +#undef getfscreatecon +#endif + +#ifdef getfilecon +#undef getfilecon +#endif + +#ifdef lgetfilecon +#undef lgetfilecon +#endif + +#ifdef fgetfilecon +#undef fgetfilecon +#endif + +#ifdef setfscreatecon +#undef setfscreatecon +#endif + +#ifdef setfilecon +#undef setfilecon +#endif + +#ifdef lsetfilecon +#undef lsetfilecon +#endif + +#ifdef fsetfilecon +#undef fsetfilecon +#endif + +/* for the moment these are not supported but eventually we need to + * decide if this is PVFS or not and either return not supported or call + * the real version of this for regular files + */ + +int getfscreatecon(security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int getfilecon(const char *path, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int lgetfilecon(const char *path, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int fgetfilecon(int fd, security_context_t *con) +{ + errno = ENOTSUP; + return -1; +} + +int setfscreatecon(security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int setfilecon(const char *path, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int lsetfilecon(const char *path, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +int fsetfilecon(int fd, security_context_t con) +{ + errno = ENOTSUP; + return -1; +} + +#endif /* HAVE_SELINUX_H */ + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/client/usrint/stdio-ops.h b/src/client/usrint/stdio-ops.h index 30f4407..60845d8 100644 --- a/src/client/usrint/stdio-ops.h +++ b/src/client/usrint/stdio-ops.h @@ -86,14 +86,32 @@ struct stdio_ops_s void (*seekdir)(DIR *dir, off_t offset); off_t (*telldir)(DIR *dir); int (*closedir)(DIR *dir); +#ifdef PVFS_SCANDIR_VOID int (*scandir)(const char *dir, - struct dirent ***namelist, - int(*filter)(const struct dirent *), - int(*compar)(const void *, const void *)); - int (*scandir64 )(const char *dir, - struct dirent64 ***namelist, - int(*filter)(const struct dirent64 *), - int(*compar)(const void *, const void *)); + struct dirent ***namelist, + int(*filter)(const struct dirent *), + int(*compar)(const void *, + const void *)); + int (*scandir64)(const char *dir, + struct dirent64 ***namelist, + int(*filter)(const struct dirent64 *), + int(*compar)(const void *, + const void *)); +#else + int (*scandir)(const char *dir, + struct dirent ***namelist, + int(*filter)(const struct dirent *), + int(*compar)(const struct dirent **, + const struct dirent **)); + int (*scandir64)(const char *dir, + struct dirent64 ***namelist, + int(*filter)(const struct dirent64 *), + int(*compar)(const struct dirent64 **, + const struct dirent64 **)); +#endif + void (*flockfile)(FILE *stream); + int (*ftrylockfile)(FILE *stream); + void (*funlockfile)(FILE *stream); }; #endif diff --git a/src/client/usrint/stdio-pvfs.h b/src/client/usrint/stdio-pvfs.h index da650e4..e69de29 100644 --- a/src/client/usrint/stdio-pvfs.h +++ b/src/client/usrint/stdio-pvfs.h @@ -1,26 +0,0 @@ - -#ifdef REDEF_STD_STREAMS -#ifdef stdin -#undef stdin -#endif - -#define stdin (&pvfs_stdin) /* this is wrong!!! */ - -#ifdef stdout -#undef stdout -#endif - -#define stdout (&pvfs_stdout) /* this is wrong!!! */ - -#ifdef stderr -#undef stderr -#endif - -#define stderr (&pvfs_stderr) /* this is wrong!!! */ -#endif - -#ifdef FILE -#undef FILE -#endif - -#define FILE pvfs_descriptor diff --git a/src/client/usrint/stdio.c b/src/client/usrint/stdio.c index 55419eb..e09a920 100644 --- a/src/client/usrint/stdio.c +++ b/src/client/usrint/stdio.c @@ -11,9 +11,19 @@ */ /* this prevents headers from using inlines for 64 bit calls */ #define USRINT_SOURCE 1 + #include "usrint.h" #include "openfile-util.h" #include "stdio-ops.h" +#include "locks.h" + +#if defined _G_IO_IO_FILE_VERSION && _G_IO_IO_FILE_VERSION == 0x20001 +# define USE_OFFSET 1 +#else +# define USE_OFFSET 0 +#endif +#define _IO_pos_BAD -1 +#define _IO_wide_NOT -1 /* fdopendir not present until glibc2.5 */ #if __GLIBC_PREREQ (2,5) @@ -21,29 +31,32 @@ extern DIR *fdopendir (int __fd); #endif +static inline void init_stdio(void); /* wrapper to check if init is done before + * calling the real init function - + * allows us to inline + */ +static void cleanup_stdio_internal(void) GCC_DESTRUCTOR(CLEANUP_PRIORITY_STDIO); +static void init_stdio_internal(void) GCC_CONSTRUCTOR(INIT_PRIORITY_STDIO); +static int init_flag = 0; +struct stdio_ops_s stdio_ops; +static FILE open_files = {._chain = NULL}; -#ifdef gossip_debug -#undef gossip_debug -#endif - -#ifdef GOSSIP_USRINT_DEBUG -#undef GOSSIP_USRINT_DEBUG -#endif - -#ifdef USRINT_DEBUG -#define GOSSIP_USRINT_DEBUG stderr -#define gossip_debug fprintf -#else -#define gossip_debug(__m, __f, ...) -#endif /* USRINT_DEBUG */ - -#define PVFS_STDIO_DEBUG 0 +int __fprintf_chk (FILE *stream, int flag, const char *format, ...); +int __printf_chk (int flag, const char *format, ...); +int __vfprintf_chk (FILE *stream, int flag, const char *format, va_list ap); +int __vprintf_chk (int flag, const char *format, va_list ap); +int __dprintf_chk (int fd, int flag, const char *fmt, ...); +int __vdprintf_chk (int fd, int flag, const char *fmt, va_list ap); +char *__gets_chk (char *str, size_t n); +char *__fgets_chk (char *s, size_t size, int n, FILE *stream); +size_t __fread_chk (void *ptr, size_t size, size_t nmemb, FILE *stream); +char *__fgets_unlocked_chk (char *s, size_t size, int n, FILE *stream); +size_t __fread_unlocked_chk (void *ptr, size_t size, size_t nmemb, FILE *stream); -static void init_stdio(void); -static struct stdio_ops_s stdio_ops; -static FILE open_files = {._chain = NULL}; +/* this is defined in openfile-util.g because it is used openfile-util.c + * _P_IO_MAGIC 0xF0BD0000 + */ -#define _P_IO_MAGIC 0xF0BD0000 #define SETMAGIC(s,m) do{(s)->_flags = (m) & _IO_MAGIC_MASK;}while(0) #define ISMAGICSET(s,m) (((s)->_flags & _IO_MAGIC_MASK) == (m)) #define SETFLAG(s,f) do{(s)->_flags |= ((f) & ~_IO_MAGIC_MASK);}while(0) @@ -79,6 +92,143 @@ struct __dirstream { #define ASIZE 256 #define MAXTRIES 16 /* arbitrary - how many tries to get a unique file name */ +/* turning off REDEFSTREAM forces stdin, stdout, stderr to use glibc */ +#if PVFS_STDIO_REDEFSTREAM +#define PVFS_STDIO_ON_LIBC_STREAMS 0 +/* forces all stdio to use ofs routines */ +#if PVFS_STDIO_ON_LIBC_STREAMS +/* use libc defined stdin stdout and stderr but ofs calls */ +# define pvfs_stdin_stream (*stdin) +# define pvfs_stdout_stream (*stdout) +# define pvfs_stderr_stream (*stderr) +#else +/* use ofs defined stdin stdout and stderr and ofs calls */ +static _PVFS_lock_t pvfs_stdin_lock = _PVFS_lock_initializer; +//static struct _IO_wide_data pvfs_stdin_wide; +static char pvfs_stdin_buffer[PVFS_BUFSIZE]; +static FILE pvfs_stdin_stream = +{ + ._flags = _P_IO_MAGIC | _IO_NO_WRITES | _IO_USER_BUF, + ._IO_read_ptr = pvfs_stdin_buffer, + ._IO_read_end = pvfs_stdin_buffer, + ._IO_read_base = pvfs_stdin_buffer, + ._IO_write_ptr = pvfs_stdin_buffer, + ._IO_write_end = pvfs_stdin_buffer + PVFS_BUFSIZE, + ._IO_write_base = pvfs_stdin_buffer, + ._IO_buf_base = pvfs_stdin_buffer, + ._IO_buf_end = pvfs_stdin_buffer + PVFS_BUFSIZE, + ._IO_save_base = NULL, + ._IO_backup_base = NULL, + ._IO_save_end = NULL, + ._markers = NULL, + ._chain = NULL, + ._fileno = STDIN_FILENO, + ._flags2 = 0, + ._old_offset = 0, +#ifdef __HAVE_COLUMN + ._cur_column = 0, +#endif + ._vtable_offset = 0, + ._shortbuf = {0} /* comma is on the next line */ + , ._lock = (void *)&pvfs_stdin_lock +#if USE_OFFSET + , .__pad2 = NULL //(void *)&pvfs_stdin_wide + , ._offset = _IO_pos_BAD + , ._mode = _IO_wide_NOT +#endif +}; +FILE *stdin = &pvfs_stdin_stream; + +static _PVFS_lock_t pvfs_stdout_lock = _PVFS_lock_initializer; +//static struct _IO_wide_data pvfs_stdout_wide; +static char pvfs_stdout_buffer[PVFS_BUFSIZE]; +static FILE pvfs_stdout_stream = +{ + ._flags = _P_IO_MAGIC | _IO_NO_READS | + _IO_CURRENTLY_PUTTING | _IO_LINE_BUF | _IO_USER_BUF, + ._IO_read_ptr = pvfs_stdout_buffer, + ._IO_read_end = pvfs_stdout_buffer, + ._IO_read_base = pvfs_stdout_buffer, + ._IO_write_ptr = pvfs_stdout_buffer, + ._IO_write_end = pvfs_stdout_buffer + PVFS_BUFSIZE, + ._IO_write_base = pvfs_stdout_buffer, + ._IO_buf_base = pvfs_stdout_buffer, + ._IO_buf_end = pvfs_stdout_buffer + PVFS_BUFSIZE, + ._IO_save_base = NULL, + ._IO_backup_base = NULL, + ._IO_save_end = NULL, + ._markers = NULL, + ._chain = NULL, + ._fileno = STDOUT_FILENO, + ._flags2 = 0, + ._old_offset = 0, +#ifdef __HAVE_COLUMN + ._cur_column = 0, +#endif + ._vtable_offset = 0, + ._shortbuf = {0} /* comma is on the next line */ + , ._lock = (void *)&pvfs_stdout_lock +#if USE_OFFSET + , .__pad2 = NULL //(void *)&pvfs_stdout_wide + , ._offset = _IO_pos_BAD + , ._mode = _IO_wide_NOT +#endif +}; +FILE *stdout = &pvfs_stdout_stream; + +static _PVFS_lock_t pvfs_stderr_lock = _PVFS_lock_initializer; +//static struct _IO_wide_data pvfs_stderr_wide; +static char pvfs_stderr_buffer[PVFS_BUFSIZE]; +static FILE pvfs_stderr_stream = +{ + ._flags = _P_IO_MAGIC | _IO_NO_READS | + _IO_CURRENTLY_PUTTING | _IO_UNBUFFERED | _IO_USER_BUF, + ._IO_read_ptr = pvfs_stderr_buffer, + ._IO_read_end = pvfs_stderr_buffer, + ._IO_read_base = pvfs_stderr_buffer, + ._IO_write_ptr = pvfs_stderr_buffer, + ._IO_write_end = pvfs_stderr_buffer + PVFS_BUFSIZE, + ._IO_write_base = pvfs_stderr_buffer, + ._IO_buf_base = pvfs_stderr_buffer, + ._IO_buf_end = pvfs_stderr_buffer + PVFS_BUFSIZE, + ._IO_save_base = NULL, + ._IO_backup_base = NULL, + ._IO_save_end = NULL, + ._markers = NULL, + ._chain = NULL, + ._fileno = STDERR_FILENO, + ._flags2 = 0, + ._old_offset = 0, +#ifdef __HAVE_COLUMN + ._cur_column = 0, +#endif + ._vtable_offset = 0, + ._shortbuf = {0} /* comma is on the next line */ + , ._lock = (void *)&pvfs_stderr_lock +#if USE_OFFSET + , .__pad2 = NULL //(void *)&pvfs_stderr_wide + , ._offset = _IO_pos_BAD + , ._mode = _IO_wide_NOT +#endif +}; +FILE *stderr = &pvfs_stderr_stream; +#endif +#endif + +/* this gets called all over the place to make sure initialization is + * done so we made is small and inlined it - if init not done call the + * real init function - which in theory was done before main + */ +static inline void init_stdio(void) +{ + /* if we've already done this bail right away */ + if (init_flag) + { + return; + } + init_stdio_internal(); +} + /** These functions lock and unlock the stream structure * * These are only called within our library, so we assume that the @@ -88,54 +238,55 @@ struct __dirstream { static inline void lock_init_stream(FILE *stream) { -#ifdef _IO_MTSAFE_IO - if (ISFLAGSET(stream, _IO_USER_LOCK)) + if (!stream->_lock) { - _IO_lock_init(stream->_lock); + stream->_lock = (_PVFS_lock_t *)malloc(sizeof(_PVFS_lock_t)); + ZEROMEM(stream->_lock, sizeof(_PVFS_lock_t)); + } + if (!ISFLAGSET(stream, _IO_USER_LOCK)) + { + _PVFS_lock_init(stream); } -#endif } static inline void lock_stream(FILE *stream) { -#ifdef _IO_MTSAFE_IO - if (ISFLAGSET(stream, _IO_USER_LOCK)) + if (!ISFLAGSET(stream, _IO_USER_LOCK)) { - _IO_lock_lock(stream->_lock); + _PVFS_lock_lock(stream); } -#endif } static inline int trylock_stream(FILE *stream) { -#ifdef _IO_MTSAFE_IO - if (ISFLAGSET(stream, _IO_USER_LOCK)) + if (!ISFLAGSET(stream, _IO_USER_LOCK)) { - return _IO_lock_try(stream->_lock); + return _PVFS_lock_trylock(stream); } -#else return 0; -#endif } static inline void unlock_stream(FILE *stream) { -#ifdef _IO_MTSAFE_IO - if (ISFLAGSET(stream, _IO_USER_LOCK)) + if (!ISFLAGSET(stream, _IO_USER_LOCK)) { - _IO_lock_unlock(stream->_lock); + _PVFS_lock_unlock(stream); } -#endif } static inline void lock_fini_stream(FILE *stream) { -#ifdef _IO_MTSAFE_IO - if (ISFLAGSET(stream, _IO_USER_LOCK)) + if (!ISFLAGSET(stream, _IO_USER_LOCK)) { - _IO_lock_fini(stream->_lock); + _PVFS_lock_fini(stream); + if (stream != &pvfs_stdin_stream && + stream != &pvfs_stdout_stream && + stream != &pvfs_stderr_stream) + { + ZEROFREE(stream->_lock, sizeof(_PVFS_lock_t)); + free(stream->_lock); + } } -#endif } /** POSIX interface for user level locking of streams *. @@ -204,7 +355,8 @@ static int mode2flags(const char *mode) } break; case 'b': /* this is ignored in POSIX */ - case 'c': /* used in glibc ignored here */ + case 't': /* text mode - ignored */ + case 'c': /* used in glibc ignored here */ case 'e': /* used in glibc ignored here */ case 'm': /* used in glibc ignored here */ break; @@ -295,29 +447,63 @@ FILE *fopen64(const char *path, const char *modes) } /** this function sets up a new stream's buffer area - * + * called in different situations - therefore ... + * Does not zero out the structure + * Assumes that the fd is set externally + * Assumes the lock is initialized externally + * Flags are usually set externally but it will set read or write, + * otherwise doesn't change existing flags */ static int init_stream (FILE *stream, int flags, int bufsize) { + /* make sure stdio is initialized so we can insert on chain */ + PVFS_INIT(init_stdio); /* set up stream here */ - SETMAGIC(stream, _P_IO_MAGIC); - if (!(flags & O_WRONLY)) - SETFLAG(stream, _IO_NO_READS); - if (!(flags & O_RDONLY)) - SETFLAG(stream, _IO_NO_WRITES); + //if (flags) + { + SETMAGIC(stream, _P_IO_MAGIC); + if (!(flags & O_WRONLY)) + { + SETFLAG(stream, _IO_NO_READS); + } + if (!(flags & O_RDONLY)) + { + SETFLAG(stream, _IO_NO_WRITES); + } + } /* set up default buffering here */ - stream->_IO_buf_base = (char *)malloc(bufsize); if (!stream->_IO_buf_base) { - return -1; + stream->_IO_buf_base = (char *)malloc(bufsize); + if (!stream->_IO_buf_base) + { + return -1; + } } - stream->_IO_buf_end = stream->_IO_buf_base + bufsize; - stream->_IO_read_base = stream->_IO_buf_base; - stream->_IO_read_ptr = stream->_IO_buf_base; - stream->_IO_read_end = stream->_IO_buf_base; - stream->_IO_write_base = stream->_IO_buf_base; - stream->_IO_write_ptr = stream->_IO_buf_base; - stream->_IO_write_end = stream->_IO_buf_end; + stream->_IO_buf_end = stream->_IO_buf_base + bufsize; + stream->_IO_read_base = stream->_IO_buf_base; + stream->_IO_read_ptr = stream->_IO_buf_base; + stream->_IO_read_end = stream->_IO_buf_base; + stream->_IO_write_base = stream->_IO_buf_base; + stream->_IO_write_ptr = stream->_IO_buf_base; + stream->_IO_write_end = stream->_IO_buf_end; +#if 1 + stream->_IO_save_base = NULL; + stream->_IO_backup_base = NULL; + stream->_IO_save_end = NULL; + stream->_markers = NULL; + stream->_flags2 = 0; + stream->_old_offset = 0; +#ifdef __HAVE_COLUMN + stream->_cur_column = 0; +#endif + stream->_vtable_offset = 0; + stream->_shortbuf[0] = 0; +#endif +#if USE_OFFSET + stream->_offset = _IO_pos_BAD; + stream->_mode = _IO_wide_NOT; +#endif lock_stream(&open_files); stream->_chain = open_files._chain; open_files._chain = stream; @@ -345,10 +531,10 @@ FILE *fdopen(int fd, const char *mode) errno = ENOMEM; return NULL; } - memset(newfile, 0, sizeof(FILE)); + /* memset(newfile, 0, sizeof(FILE)); - handled by PINT_malloc */ /* initize lock for this stream */ - SETFLAG(newfile, _IO_USER_LOCK); + /* SETFLAG(newfile, _IO_USER_LOCK); */ lock_init_stream(newfile); newfile->_fileno = fd; @@ -369,21 +555,63 @@ FILE *freopen(const char *path, const char *mode, FILE *stream) int fd = 0; int flags = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "freopen %s %s %p\n", path, mode, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.freopen(path, mode, stream); } #endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { +#if !PVFS_STDIO_ON_LIBC_STREAMS if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); +#if 0 +/* This is experimental code to convert libc allocated streams into PVFS + * managed streams. I'm not at all sure this is a good idea because it + * is possible that whiever allocated still has a pointer to it and it + * will appear to be invalid after conversion. Anyway, before we give + * up on it I thought I'd leave it here for future contemplation. + */ + if (is_pvfs_file(path)) + { + /* convert libc stream to libofs stream */ + /* flush buffers */ + stdio_ops.fflush(stream); + /* close old file descriptor - set to -1 */ + if (stream->_fileno > -1) + { + close(stream->_fileno); + if (rc == -1) + { + return NULL; + } + stream->_fileno = -1; + } + /* free buffer - set base to NULL */ + /* not sure if buffer is malloc'd or static - don't free */ + if (stream->_IO_buf_base && !ISFLAGSET(stream, _IO_USER_BUF)) + { + my_glibc_free(stream->_IO_buf_base); + stream->_IO_buf_base = NULL; + } + /* if on a chain, remove it - TBD */ + } + else + { + /* call libc freopen */ + } +#endif /* removed code */ + /* this is a libc allocated stream so assume libc will + * reopen it using the standard call. This could be a + * problem if it is reopened as a PVFS file - giving rise + * the above experimental code. + */ return stdio_ops.freopen(path, mode, stream); } +#endif /* if not PVFS_STDIO_ON_LIBC_STREAMS */ errno = EINVAL; return NULL; } @@ -392,6 +620,7 @@ FILE *freopen(const char *path, const char *mode, FILE *stream) if (stream->_fileno > -1) { int rc; + fflush_unlocked(stream); rc = close(stream->_fileno); if (rc == -1) { @@ -413,8 +642,11 @@ FILE *freopen(const char *path, const char *mode, FILE *stream) stream->_fileno = fd; /* reset buffering here */ - if (stream->_IO_buf_base) - free (stream->_IO_buf_base); + if (stream->_IO_buf_base && !ISFLAGSET(stream, _IO_USER_BUF)) + { + free(stream->_IO_buf_base); + stream->_IO_buf_base = NULL; + } init_stream(stream, flags, PVFS_BUFSIZE); unlock_stream(stream); @@ -456,23 +688,24 @@ size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); /* causing loops */ /* gossip_debug(GOSSIP_USRINT_DEBUG, "fwrite %p %d %d %p\n", ptr, size, nmemb, stream); */ -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fwrite(ptr, size, nmemb, stream); } #endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { +#if !PVFS_STDIO_ON_LIBC_STREAMS if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fwrite(ptr, size, nmemb, stream); } +#endif errno = EINVAL; return 0; } @@ -485,25 +718,27 @@ size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) { off64_t rsz, rsz_buf, rsz_extra; + int eol_seen = 0; int rc; + PVFS_INIT(init_stdio); /* causing loops */ /* gossip_debug(GOSSIP_USRINT_DEBUG, "fwrite_unlocked %p %d %d %p\n", ptr, size, nmemb, stream); */ -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fwrite_unlocked(ptr, size, nmemb, stream); } #endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { +#if !PVFS_STDIO_ON_LIBC_STREAMS if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fwrite_unlocked(ptr, size, nmemb, stream); } +#endif errno = EINVAL; return 0; } @@ -513,6 +748,63 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) return 0; } + if (ISFLAGSET(stream, _IO_UNBUFFERED)) + { + rc = write(stream->_fileno, ptr, nmemb * size); + if (rc >= 0) + { +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += rc; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error we will leave it in errno */ + } +#endif + return rc / size; + } + else + { + SETFLAG(stream, _IO_ERR_SEEN); + return 0; + } + } + + if (ISFLAGSET(stream, _IO_LINE_BUF)) + { + int c; + for (c = 0; c < nmemb * size; c++) + { + if (((char *)ptr)[c] == '\n') + { + /* we will flush after buffering */ + eol_seen = 1; + break; + } + } + } + +#if !PVFS_STDIO_ON_LIBC_STREAMS + if (stream->_IO_buf_base == NULL) + { + /* this is a glibc stream never used so just convert it to ofs */ + init_stream(stream, 0, PVFS_BUFSIZE); + } +#endif + /* Check to see if switching from read to write */ if (!ISFLAGSET(stream, _IO_CURRENTLY_PUTTING)) { @@ -554,6 +846,27 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) SETFLAG(stream, _IO_ERR_SEEN); return 0; } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += rc; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error we will leave it in errno */ + } +#endif /* TODO: check for a short write */ /* reset buffer */ stream->_IO_write_ptr = stream->_IO_write_base; @@ -581,9 +894,21 @@ size_t fwrite_unlocked(const void *ptr, size_t size, size_t nmemb, FILE *stream) } } + if (ISFLAGSET(stream, _IO_LINE_BUF) && eol_seen) + { + fflush(stream); + } return rsz / size; /* num items written */ } +/** + * __fread_chk + */ +size_t __fread_chk (void *ptr, size_t size, size_t nmemb, FILE *stream) +{ + return fread(ptr, size, nmemb, stream); +} + /* * fread implements the same buffer scheme as in fwrite */ @@ -591,12 +916,12 @@ size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fread %p %d %d %p\n", - ptr, size, nmemb, stream); -#ifndef PVFS_STDIO_REDEFSTREAM + ptr, (int)size, (int)nmemb, stream); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fread(ptr, size, nmemb, stream); } #endif @@ -604,7 +929,6 @@ size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fread(ptr, size, nmemb, stream); } errno = EINVAL; @@ -616,18 +940,26 @@ size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream) return rc; } +/** + * __fread_unlocked_chk + */ +size_t __fread_unlocked_chk (void *ptr, size_t size, size_t nmemb, FILE *stream) +{ + return fread_unlocked(ptr, size, nmemb, stream); +} + size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { int rsz, rsz_buf, rsz_extra; int bytes_read; int rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fread_unlocked %p %d %d %p\n", - ptr, size, nmemb, stream); -#ifndef PVFS_STDIO_REDEFSTREAM + ptr, (int)size, (int)nmemb, stream); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fread_unlocked(ptr, size, nmemb, stream); } #endif @@ -635,7 +967,6 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fread_unlocked(ptr, size, nmemb, stream); } errno = EINVAL; @@ -656,8 +987,9 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif - rc = write(stream->_fileno, stream->_IO_write_base, - stream->_IO_write_ptr - stream->_IO_write_base); + rc = write(stream->_fileno, + stream->_IO_write_base, + stream->_IO_write_ptr - stream->_IO_write_base); if (rc == -1) { SETFLAG(stream, _IO_ERR_SEEN); @@ -668,6 +1000,27 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) /* short write but no error ??? */ SETFLAG(stream, _IO_ERR_SEEN); } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += rc; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error we will leave it in errno */ + } +#endif /* reset write pointer */ stream->_IO_write_ptr = stream->_IO_write_base; /* clear flag */ @@ -693,6 +1046,29 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { SETFLAG(stream, _IO_EOF_SEEN); } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += bytes_read; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error + * we will leave it in errno + */ + } +#endif /* indicate end of read area */ stream->_IO_read_end = stream->_IO_read_base + bytes_read; /* reset read pointer */ @@ -726,7 +1102,9 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) if (rsz_extra > (stream->_IO_buf_end - stream->_IO_buf_base)) { /* read directly from file for remainder of request */ - bytes_read = read(stream->_fileno, (char *)ptr+rsz_buf, rsz_extra); + bytes_read = read(stream->_fileno, + (char *)ptr+rsz_buf, + rsz_extra); if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); @@ -736,11 +1114,35 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { SETFLAG(stream, _IO_EOF_SEEN); } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += bytes_read; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error + * we will leave it in errno + */ + } +#endif if (bytes_read == rsz_extra) { /* then read next buffer */ - bytes_read = read(stream->_fileno, stream->_IO_buf_base, - stream->_IO_buf_end - stream->_IO_buf_base); + bytes_read = read(stream->_fileno, + stream->_IO_buf_base, + stream->_IO_buf_end - stream->_IO_buf_base); if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); @@ -750,6 +1152,29 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { SETFLAG(stream, _IO_EOF_SEEN); } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += bytes_read; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error + * we will leave it in errno + */ + } +#endif stream->_IO_read_end = stream->_IO_read_base + bytes_read; stream->_IO_read_ptr = stream->_IO_read_base; return rsz / size; /* num items read */ @@ -759,8 +1184,9 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) return (rsz_buf + bytes_read) / size; /* num items read */ } /* rest of request fits in a buffer - read next buffer */ - bytes_read = read(stream->_fileno, stream->_IO_buf_base, - stream->_IO_buf_end - stream->_IO_buf_base); + bytes_read = read(stream->_fileno, + stream->_IO_buf_base, + stream->_IO_buf_end - stream->_IO_buf_base); if (bytes_read == -1) { SETFLAG(stream, _IO_ERR_SEEN); @@ -770,6 +1196,29 @@ size_t fread_unlocked(void *ptr, size_t size, size_t nmemb, FILE *stream) { SETFLAG(stream, _IO_EOF_SEEN); } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += bytes_read; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error + * we will leave it in errno + */ + } +#endif stream->_IO_read_end = stream->_IO_read_base + bytes_read; stream->_IO_read_ptr = stream->_IO_read_base; /* transfer remainder */ @@ -806,10 +1255,16 @@ int fcloseall(void) int rc = 0; gossip_debug(GOSSIP_USRINT_DEBUG, "fcloseall\n"); + /* these are not on the chain */ + fclose(stdin); + fclose(stdout); + fclose(stderr); + lock_stream(&open_files); while (open_files._chain) { rc = fclose(open_files._chain); } + unlock_stream(&open_files); return rc; } @@ -820,12 +1275,14 @@ int fclose(FILE *stream) { int rc = 0; FILE *f; + struct _IO_marker *mark; + /* make sure stdio is initialized */ + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fclose %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fclose(stream); } #endif @@ -833,7 +1290,7 @@ int fclose(FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); + /* this catches streams somehow opened without this lib */ return stdio_ops.fclose(stream); } errno = EINVAL; @@ -859,15 +1316,18 @@ int fclose(FILE *stream) } } } - if (!ISFLAGSET(stream, _IO_USER_BUF)) - { - /* free the buffer */ - free(stream->_IO_buf_base); - } if (!ISFLAGSET(stream, _IO_DELETE_DONT_CLOSE)) { rc = close(stream->_fileno); } + if (stream->_IO_save_base) + { + free(stream->_IO_save_base); + } + for (mark = stream->_markers; mark; mark=mark->_next) + { + mark->_sbuf = NULL; + } /* remove from chain */ lock_stream(&open_files); if (open_files._chain == stream) @@ -876,18 +1336,35 @@ int fclose(FILE *stream) } else { - for (f = open_files._chain; f && f->_chain != stream; f = f->_chain) - if (f && f->_chain) + /* if stream is not in chain we will run this loop and drop out + * without doing anything. some streams may no be in the chain + */ + for (f = open_files._chain; f; f = f->_chain) { - f->_chain = f->_chain->_chain; + if (f->_chain == stream) + { + assert(stream != NULL); + f->_chain = f->_chain->_chain; + break; + } } - /* was not on chain */ + } + if (stream->_IO_buf_base && !ISFLAGSET(stream, _IO_USER_BUF)) + { + /* free the buffer */ + free(stream->_IO_buf_base); } unlock_stream(&open_files); - stream->_flags = 0; /* can stream be locked here ? */ lock_fini_stream(stream); - free(stream); + stream->_flags = 0; + /* clear the contents of the stream before we free */ + /* memset(stream, 0, sizeof(FILE)); -- covered by PINT_free */ + if (stream != &pvfs_stdin_stream && stream != &pvfs_stdout_stream && + stream != &pvfs_stderr_stream) + { + free(stream); + } return rc; } @@ -919,12 +1396,12 @@ int fseek64(FILE *stream, const off64_t offset, int whence) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fseek64 %p %llx %d\n", - stream, offset, whence); -#ifndef PVFS_STDIO_REDEFSTREAM + stream, llu(offset), whence); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fseek64(stream, offset, whence); } #endif @@ -932,7 +1409,6 @@ int fseek64(FILE *stream, const off64_t offset, int whence) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fseek64(stream, offset, whence); } errno = EINVAL; @@ -1021,7 +1497,8 @@ int fseek64(FILE *stream, const off64_t offset, int whence) (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif - rc = write(stream->_fileno, stream->_IO_write_base, + rc = write(stream->_fileno, + stream->_IO_write_base, stream->_IO_write_ptr - stream->_IO_write_base); if (rc < 0) { @@ -1039,22 +1516,27 @@ int fseek64(FILE *stream, const off64_t offset, int whence) stream->_IO_read_end = stream->_IO_read_base; stream->_IO_read_ptr = stream->_IO_read_end; } - rc = lseek64(stream->_fileno, offset, whence); + filepos = lseek64(stream->_fileno, offset, whence); #if PVFS_STDIO_DEBUG fprintf(stderr,"fseek seeks to offset %d\n", (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif - if (rc < 0) + if (filepos == -1) { SETFLAG(stream, _IO_ERR_SEEN); rc = -1; +#if USE_OFFSET + stream->_offset = _IO_pos_BAD; +#endif goto exitout; } +#if USE_OFFSET + stream->_offset = filepos; +#endif /* fseek returns 0 on success */ rc = 0; } exitout: - /* successful call */ unlock_stream(stream); CLEARFLAG(stream, _IO_EOF_SEEN); return rc; @@ -1104,13 +1586,13 @@ off64_t ftello64(FILE *stream) off64_t ftell64(FILE* stream) { - int64_t filepos; + int64_t filepos GCC_UNUSED; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "ftell64 %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.ftell64(stream); } #endif @@ -1118,13 +1600,21 @@ off64_t ftell64(FILE* stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.ftell64(stream); } errno = EINVAL; return -1; } - filepos = lseek64(stream->_fileno, 0, SEEK_CUR); +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + filepos = stream->_offset; + } + else +#endif + { + filepos = lseek64(stream->_fileno, 0, SEEK_CUR); + } if (ISFLAGSET(stream, _IO_CURRENTLY_PUTTING)) { return filepos + (stream->_IO_write_ptr - stream->_IO_write_base); @@ -1160,20 +1650,21 @@ int fflush(FILE *stream) { int rc = 0; -#ifndef PVFS_STDIO_REDEFSTREAM + PVFS_INIT(init_stdio); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fflush(stream); } #endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { +#if !PVFS_STDIO_ON_LIBC_STREAMS if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fflush(stream); } +#endif errno = EINVAL; return -1; } @@ -1187,21 +1678,22 @@ int fflush_unlocked(FILE *stream) { int rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fflush_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fflush_unlocked(stream); } #endif if (!stream || !ISMAGICSET(stream, _P_IO_MAGIC)) { +#if !PVFS_STDIO_ON_LIBC_STREAMS if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fflush_unlocked(stream); } +#endif errno = EINVAL; return -1; } @@ -1215,13 +1707,37 @@ int fflush_unlocked(FILE *stream) (int)(stream->_IO_write_ptr - stream->_IO_write_base), (int)lseek(stream->_fileno, 0, SEEK_CUR)); #endif - rc = write(stream->_fileno, stream->_IO_write_base, - stream->_IO_write_ptr - stream->_IO_write_base); + rc = write(stream->_fileno, + stream->_IO_write_base, + stream->_IO_write_ptr - stream->_IO_write_base); if (rc < 0) { SETFLAG(stream, _IO_ERR_SEEN); return rc; } +#if USE_OFFSET + if (stream->_offset != _IO_pos_BAD) + { + stream->_offset += rc; + } + else + { + int orig_errno = errno; + errno = 0; + + stream->_offset = lseek64(stream->_fileno, 0, SEEK_CUR); + if (errno == ESPIPE) + { + /* This stream cannot seek, leave offset BAD and + * reset errno, we do not consider this an error + */ + errno = orig_errno; + } + /* if there was a real error + * we will leave it in errno + */ + } +#endif /* reset write pointer */ stream->_IO_write_ptr = stream->_IO_write_base; } @@ -1235,11 +1751,11 @@ int fputc(int c, FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fputc %c %p\n", c, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fputc(c, stream); } #endif @@ -1247,7 +1763,6 @@ int fputc(int c, FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fputc(c, stream); } errno = EINVAL; @@ -1261,13 +1776,13 @@ int fputc(int c, FILE *stream) int fputc_unlocked(int c, FILE *stream) { - int rc; + int rc GCC_UNUSED; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fputc_unlocked %c %p\n", c, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fputc_unlocked(c, stream); } #endif @@ -1286,11 +1801,11 @@ int fputs(const char *s, FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fputs %s %p\n", s, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fputs(s, stream); } #endif @@ -1298,7 +1813,6 @@ int fputs(const char *s, FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fputs(s, stream); } errno = EINVAL; @@ -1315,11 +1829,11 @@ int fputs_unlocked(const char *s, FILE *stream) size_t len; int rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fputs_unlocked %s %p\n", s, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fputs_unlocked(s, stream); } #endif @@ -1370,9 +1884,9 @@ int puts(const char *s) { int rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "puts %s\n", s); -#ifndef PVFS_STDIO_REDEFSTREAM - init_stdio(); +#if !PVFS_STDIO_REDEFSTREAM rc = stdio_ops.puts(s); return rc; #else @@ -1392,11 +1906,11 @@ int putw(int wd, FILE *stream) { int rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "putw %d %p\n", wd, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.putw(wd, stream); } #endif @@ -1408,6 +1922,14 @@ int putw(int wd, FILE *stream) return rc; } +/** + * __fgets_chk + */ +char *__fgets_chk(char *s, size_t size, int n, FILE *stream) +{ + return fgets(s, size, stream); +} + /** * fgets reads up to size or a newline */ @@ -1415,11 +1937,11 @@ char *fgets(char *s, int size, FILE *stream) { char *rc = NULL; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets %p %d %p\n", s, size, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.fgets(s, size, stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns %s\n", s); return rc; @@ -1429,7 +1951,6 @@ char *fgets(char *s, int size, FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fgets(s, size, stream); } errno = EINVAL; @@ -1438,21 +1959,30 @@ char *fgets(char *s, int size, FILE *stream) } lock_stream(stream); rc = fgets_unlocked(s, size, stream); - unlock_stream(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns %s\n", rc); + unlock_stream(stream); + gossip_debug(GOSSIP_USRINT_DEBUG, "fgets returns %s\n", rc); return rc; } +/** + * __fgets_unlocked_chk + */ +char *__fgets_unlocked_chk(char *s, size_t size, int n, FILE *stream) +{ + return fgets_unlocked(s, size, stream); +} + char *fgets_unlocked(char *s, int size, FILE *stream) { char c, *p; int feo, fer; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked %p %d %p\n", s, size, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); s = stdio_ops.fgets_unlocked(s, size, stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgets_unlocked returns %s\n", s); return s; @@ -1493,14 +2023,14 @@ char *fgets_unlocked(char *s, int size, FILE *stream) */ int fgetc(FILE *stream) { - int rc; + int rc GCC_UNUSED; unsigned char ch; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.fgetc(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc returns %d(%c)\n", rc, (char)rc); @@ -1519,14 +2049,14 @@ int fgetc(FILE *stream) int fgetc_unlocked(FILE *stream) { - int rc; + int rc GCC_UNUSED; char ch; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.fgetc_unlocked(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "fgetc_unlocked returns %d(%c)\n", rc, (char)rc); @@ -1576,13 +2106,13 @@ int getchar_unlocked(void) */ int getw(FILE *stream) { - int rc, wd; + int rc GCC_UNUSED, wd; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "getw %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.getw(stream); } #endif @@ -1594,18 +2124,27 @@ int getw(FILE *stream) return wd; } +#ifndef GETS_IS_GONE +/** + * __gets_check + */ +char *__gets_chk(char *s, size_t n) +{ + return gets(s); +} + /** * gets */ -char *gets(char * s) +char *gets(char *s) { -#ifdef PVFS_STDIO_REDEFSTREAM +#if PVFS_STDIO_REDEFSTREAM char c, *p; #endif + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "gets %p\n", s); -#ifndef PVFS_STDIO_REDEFSTREAM - init_stdio(); +#if !PVFS_STDIO_REDEFSTREAM return stdio_ops.gets(s); #else if (!s) @@ -1623,14 +2162,20 @@ char *gets(char * s) } if (!feof(stdin)) { - *(p-1) = 0; /* replace terminating char with null */ + *(p - 1) = 0; /* replace terminating char with null */ } return s; #endif } +#endif /* GETS_IS_GONE */ /** * getline + * + * WARNING!!! These potentially allocate memory which is freed by the + * user. This is a potential source of problems when programs redefine + * malloc and free. Note PVFS defines its own versions of these as + * well, and this must be carefully handled. */ ssize_t getline(char **lnptr, size_t *n, FILE *stream) { @@ -1647,12 +2192,12 @@ ssize_t __getdelim(char **lnptr, size_t *n, int delim, FILE *stream) int i = 0; char c, *p; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "getdelim %p, %d, %d, %p\n", - lnptr, *n, delim, stream); -#ifndef PVFS_STDIO_REDEFSTREAM + lnptr, (int)*n, delim, stream); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.getdelim(lnptr, n, delim, stream); } #endif @@ -1664,7 +2209,7 @@ ssize_t __getdelim(char **lnptr, size_t *n, int delim, FILE *stream) if (!*lnptr) { *n = 256; - *lnptr = (char *)malloc(*n); + *lnptr = (char *)clean_malloc(*n); /* returned by user */ if (!*lnptr) { return -1; @@ -1704,12 +2249,13 @@ int ungetc(int c, FILE *stream) { int64_t rc; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "ungetc %d, %p\n", c, stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); + PVFS_INIT(init_stdio); return stdio_ops.ungetc(c, stream); } #endif @@ -1727,9 +2273,24 @@ int ungetc(int c, FILE *stream) */ #if 0 sprintf, snprintf, vsprintf, vsnprintf, asprintf, vasprintfm -sscanf, vsscanf +sscanf, vsscanf, asprintf, vasprintf #endif + +/** + * __dprintf_chk wrapper + */ +int __dprintf_chk(int fd, int flag, const char *format, ...) +{ + size_t len; + va_list ap; + + va_start(ap, format); + len = vdprintf(fd, format, ap); + va_end(ap); + return len; +} + /** * dprintf wrapper */ @@ -1744,6 +2305,14 @@ int dprintf(int fd, const char *format, ...) return len; } +/** + * __vdprintf_chk wrapper + */ +int __vdprintf_chk(int fd, int flag, const char *format, va_list ap) +{ + return vdprintf(fd, format, ap); /* this is in libc */ +} + /** * vdprintf */ @@ -1752,7 +2321,7 @@ int vdprintf(int fd, const char *format, va_list ap) char *buf; int len, rc = 0; - len = vasprintf(&buf, format, ap); + len = vasprintf(&buf, format, ap); /* this is in libc */ if (len < 0) { return len; @@ -1763,7 +2332,7 @@ int vdprintf(int fd, const char *format, va_list ap) } if (buf) { - free(buf); + clean_free(buf); /* allocated by libc in vasprintf */ } return rc; } @@ -1776,14 +2345,14 @@ int vfprintf(FILE *stream, const char *format, va_list ap) char *buf; int len, rc = 0; -#ifndef PVFS_STDIO_REDEFSTREAM + PVFS_INIT(init_stdio); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.vfprintf(stream, format, ap); } #endif - len = vasprintf(&buf, format, ap); + len = vasprintf(&buf, format, ap); /* this is in libc */ if (len < 0) { return len; @@ -1794,13 +2363,48 @@ int vfprintf(FILE *stream, const char *format, va_list ap) } if (buf) { - free(buf); + clean_free(buf); /* allocated by libc in vasprintf */ } return rc; } +/** These functions are wrappers in case glibc's headers have rewritten + * the calls + */ +int __fprintf_chk (FILE *stream, int flag, const char *format, ...) +{ + size_t len; + va_list ap; + + va_start(ap, format); + len = vfprintf(stream, format, ap); + va_end(ap); + return len; +} + +int __printf_chk (int flag, const char *format, ...) +{ + size_t len; + va_list ap; + + va_start(ap, format); + len = vfprintf(stdout, format, ap); + va_end(ap); + return len; +} + +int __vfprintf_chk (FILE *stream, int flag, const char *format, va_list ap) +{ + return vfprintf(stream, format, ap); +} + +int __vprintf_chk (int flag, const char *format, va_list ap) +{ + return vfprintf(stdout, format, ap); +} + /** - * fprintf wrapper + * vfprintf wrapper */ int vprintf(const char *format, va_list ap) { @@ -1840,8 +2444,8 @@ int printf(const char *format, ...) */ void perror(const char *s) { -#ifndef PVFS_STDIO_REDEFSTREAM - init_stdio(); + PVFS_INIT(init_stdio); +#if !PVFS_STDIO_REDEFSTREAM stdio_ops.perror(s); return; #else @@ -1878,11 +2482,11 @@ vfscanf() */ void clearerr (FILE *stream) { + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "clearerr %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.clearerr(stream); } #endif @@ -1890,7 +2494,6 @@ void clearerr (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); stdio_ops.clearerr(stream); return; } @@ -1904,11 +2507,11 @@ void clearerr (FILE *stream) void clearerr_unlocked (FILE *stream) { + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "clearerr_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.clearerr_unlocked(stream); } #endif @@ -1916,7 +2519,6 @@ void clearerr_unlocked (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); stdio_ops.clearerr_unlocked(stream); return; } @@ -1933,11 +2535,11 @@ int feof (FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "feof %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.feof(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "feof returns %d\n", rc); return rc; @@ -1947,7 +2549,6 @@ int feof (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.feof(stream); } errno = EINVAL; @@ -1965,11 +2566,11 @@ int feof_unlocked (FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.feof_unlocked(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "feof_unlocked returns %d\n", rc); return rc; @@ -1979,7 +2580,6 @@ int feof_unlocked (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.feof_unlocked(stream); } errno = EBADF; @@ -1998,11 +2598,11 @@ int ferror (FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "ferror %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); rc = stdio_ops.ferror(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "ferror returns %d\n", rc); return rc; @@ -2012,7 +2612,6 @@ int ferror (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.ferror(stream); } errno = EINVAL; @@ -2028,13 +2627,15 @@ int ferror (FILE *stream) int ferror_unlocked (FILE *stream) { +#if !PVFS_STDIO_REDEFSTREAM int rc = 0; +#endif + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); - rc =stdio_ops.ferror_unlocked(stream); + rc = stdio_ops.ferror_unlocked(stream); gossip_debug(GOSSIP_USRINT_DEBUG, "ferror_unlocked returns %d\n", rc); return rc; } @@ -2043,7 +2644,7 @@ int ferror_unlocked (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); + PVFS_INIT(init_stdio); return stdio_ops.ferror_unlocked(stream); } errno = EBADF; @@ -2061,11 +2662,11 @@ int fileno (FILE *stream) { int rc = 0; + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fileno %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fileno(stream); } #endif @@ -2073,7 +2674,6 @@ int fileno (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fileno(stream); } errno = EINVAL; @@ -2087,11 +2687,11 @@ int fileno (FILE *stream) int fileno_unlocked (FILE *stream) { + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "fileno_unlocked %p\n", stream); -#ifndef PVFS_STDIO_REDEFSTREAM +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.fileno_unlocked(stream); } #endif @@ -2099,7 +2699,6 @@ int fileno_unlocked (FILE *stream) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.fileno_unlocked(stream); } errno = EBADF; @@ -2113,7 +2712,7 @@ int fileno_unlocked (FILE *stream) */ int remove (const char *path) { - int rc; + int rc GCC_UNUSED; struct stat buf; gossip_debug(GOSSIP_USRINT_DEBUG, "remove %s\n", path); @@ -2154,12 +2753,12 @@ void setlinebuf (FILE *stream) */ int setvbuf (FILE *stream, char *buf, int mode, size_t size) { + PVFS_INIT(init_stdio); gossip_debug(GOSSIP_USRINT_DEBUG, "setvbuf %p %p %d %d\n", - stream, buf, mode, size); -#ifndef PVFS_STDIO_REDEFSTREAM + stream, buf, mode, (int)size); +#if !PVFS_STDIO_REDEFSTREAM if (stream == stdin || stream == stdout || stream == stderr) { - init_stdio(); return stdio_ops.setvbuf(stream, buf, mode, size); } #endif @@ -2167,7 +2766,6 @@ int setvbuf (FILE *stream, char *buf, int mode, size_t size) { if (stream && ISMAGICSET(stream, _IO_MAGIC)) { - init_stdio(); return stdio_ops.setvbuf(stream, buf, mode, size); } errno = EINVAL; @@ -2199,8 +2797,11 @@ int setvbuf (FILE *stream, char *buf, int mode, size_t size) } if (buf && size > 0) { + if (stream->_IO_buf_base && !ISFLAGSET(stream, _IO_USER_BUF)) + { + free(stream->_IO_buf_base); + } SETFLAG(stream, _IO_USER_BUF); - free(stream->_IO_buf_base); stream->_IO_buf_base = buf; stream->_IO_buf_end = stream->_IO_buf_base + size; stream->_IO_read_base = stream->_IO_buf_base; @@ -2210,6 +2811,9 @@ int setvbuf (FILE *stream, char *buf, int mode, size_t size) stream->_IO_write_ptr = stream->_IO_buf_base; stream->_IO_write_end = stream->_IO_buf_end; } + /* Add logic here: if !buf size>0 malloc new buffer + * if size=0 restore to default condition + */ unlock_stream(stream); return 0; } @@ -2334,6 +2938,9 @@ DIR *fdopendir (int fd) DIR *dstr; gossip_debug(GOSSIP_USRINT_DEBUG, "fdopendir %d\n", fd); + /* TODO: need to check validity of fd, requires call to + * pvfs_find_descriptor + */ dstr = (DIR *)malloc(sizeof(DIR)); if (dstr == NULL) { @@ -2427,8 +3034,9 @@ struct dirent64 *readdir64 (DIR *dir) { int bytes_read; /* read a block of dirent64s into the buffer */ - bytes_read = getdents64(dir->fileno, (struct dirent64 *)dir->buf_base, - (dir->buf_end - dir->buf_base)); + bytes_read = getdents64(dir->fileno, + (struct dirent64 *)dir->buf_base, + (dir->buf_end - dir->buf_base)); if (bytes_read <= 0) { return NULL; /* EOF if errno == 0 */ @@ -2450,25 +3058,15 @@ struct dirent64 *readdir64 (DIR *dir) */ void rewinddir (DIR *dir) { - off64_t filepos; - gossip_debug(GOSSIP_USRINT_DEBUG, "rewinddir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; return; } - filepos = lseek64(dir->fileno, 0, SEEK_CUR); - if ((filepos - (dir->buf_act - dir->buf_base)) == 0) - { - dir->buf_ptr = dir->buf_base; - } - else - { - dir->buf_act = dir->buf_base; - dir->buf_ptr = dir->buf_base; - lseek64(dir->fileno, 0, SEEK_SET); - } + lseek64(dir->fileno, 0, SEEK_SET); + dir->buf_act = dir->buf_base; + dir->buf_ptr = dir->buf_base; } /** @@ -2495,11 +3093,12 @@ void seekdir (DIR *dir, off_t offset) dir->buf_act = dir->buf_base; dir->buf_ptr = dir->buf_base; lseek64(dir->fileno, offset, SEEK_SET); + /* should we add an offset here */ } } /** - * returns current position in a direcotry stream + * returns current position in a directory stream */ off_t telldir (DIR *dir) { @@ -2520,20 +3119,22 @@ off_t telldir (DIR *dir) } /** - * closes a direcotry stream + * closes a directory stream */ int closedir (DIR *dir) { + int rc; gossip_debug(GOSSIP_USRINT_DEBUG, "closedir %p\n", dir); if (!dir || !ISMAGICSET(dir, DIRSTREAM_MAGIC)) { errno = EBADF; return -1; } + rc = close(dir->fileno); free(dir->buf_base); dir->_flags = 0; free(dir); - return 0; + return rc; } #ifdef PVFS_SCANDIR_VOID @@ -2558,8 +3159,8 @@ int scandir (const char *dir, gossip_debug(GOSSIP_USRINT_DEBUG, "scandir %p\n", dir); /* open directory */ dp = opendir(dir); - /* allocate namelist */ - *namelist = (struct dirent **)malloc(asz * sizeof(struct dirent *)); + /* allocate namelist - user frees memory */ + *namelist = (struct dirent **)clean_malloc(asz * sizeof(struct dirent *)); if (!*namelist) { return -1; @@ -2590,8 +3191,8 @@ int scandir (const char *dir, /* find the size of this entry */ len = strnlen((*namelist)[i]->d_name, NAME_MAX + 1) + sizeof(struct dirent); - /* add to namelist */ - *namelist[i] = (struct dirent *)malloc(len); + /* add to namelist - user frees memory */ + *namelist[i] = (struct dirent *)clean_malloc(len); memcpy((*namelist)[i], de, len); } } @@ -2634,8 +3235,9 @@ int scandir64 (const char *dir, gossip_debug(GOSSIP_USRINT_DEBUG, "scandir64 %p\n", dir); /* open directory */ dp = opendir(dir); - /* allocate namelist */ - *namelist = (struct dirent64 **)malloc(asz * sizeof(struct dirent64 *)); + /* allocate namelist - user frees memory */ + *namelist = (struct dirent64 **)clean_malloc(asz * + sizeof(struct dirent64 *)); if (!*namelist) { return -1; @@ -2666,8 +3268,8 @@ int scandir64 (const char *dir, /* find the size of this entry */ len = strnlen((*namelist)[i]->d_name, NAME_MAX + 1) + sizeof(struct dirent64); - /* add to namelist */ - (*namelist)[i] = (struct dirent64 *)malloc(len); + /* add to namelist - user frees memory */ + (*namelist)[i] = (struct dirent64 *)clean_malloc(len); memcpy((*namelist)[i], de, len); } } @@ -2681,24 +3283,28 @@ int scandir64 (const char *dir, return i; } -static void init_stdio(void) +static void cleanup_stdio_internal(void) { - static int init_flag = 0; - static gen_mutex_t initlock = GEN_MUTEX_INITIALIZER; - /* if we've already done this bail right away */ - if (init_flag) - { - return; - } - gen_mutex_lock(&initlock); + fcloseall(); +} + +static void init_stdio_internal(void) +{ + static int recurse_flag = 0; + static gen_mutex_t initlock = GEN_RECURSIVE_MUTEX_INITIALIZER_NP; /* don't let more than one thread initialize */ - if (init_flag) + gen_mutex_lock(&initlock); + if (init_flag || recurse_flag) { gen_mutex_unlock(&initlock); return; } - /* init open file chain */ + /* init stdio is running */ + recurse_flag = 1; + + /* init open file chain - must do before setting up stdin etc */ lock_init_stream(&open_files); + /* init pointers to glibc stdio calls */ stdio_ops.fopen = dlsym(RTLD_NEXT, "fopen" ); stdio_ops.fdopen = dlsym(RTLD_NEXT, "fdopen" ); @@ -2728,7 +3334,9 @@ static void init_stdio(void) stdio_ops.puts = dlsym(RTLD_NEXT, "puts" ); stdio_ops.putw = dlsym(RTLD_NEXT, "putw" ); stdio_ops.fgets = dlsym(RTLD_NEXT, "fgets" ); + stdio_ops.fgets_unlocked = dlsym(RTLD_NEXT, "fgets_unlocked" ); stdio_ops.fgetc = dlsym(RTLD_NEXT, "fgetc" ); + stdio_ops.fgetc_unlocked = dlsym(RTLD_NEXT, "fgetc_unlocked" ); stdio_ops.getc = dlsym(RTLD_NEXT, "getc" ); stdio_ops.getc_unlocked = dlsym(RTLD_NEXT, "getc_unlocked" ); stdio_ops.getchar = dlsym(RTLD_NEXT, "getchar" ); @@ -2771,12 +3379,109 @@ static void init_stdio(void) stdio_ops.closedir = dlsym(RTLD_NEXT, "closedir" ); stdio_ops.scandir = dlsym(RTLD_NEXT, "scandir" ); stdio_ops.scandir64 = dlsym(RTLD_NEXT, "scandir64" ); + stdio_ops.flockfile = dlsym(RTLD_NEXT, "flockfile" ); + stdio_ops.ftrylockfile = dlsym(RTLD_NEXT, "ftrylockfile" ); + stdio_ops.funlockfile = dlsym(RTLD_NEXT, "funlockfile" ); + /* can't do this here - we need to run before the pvfs2 init so that + * debug prints can be made there if needed, but this init is + * needed to do that, which means the file descriptors are not yet + * set up. For now just commenting this out. + */ + + /* this must go after all of the above to work in all configs */ + /* gossip_debug(GOSSIP_USRINT_DEBUG, "init_stdio running\n"); */ + /* Finish */ init_flag = 1; + recurse_flag = 0; gen_mutex_unlock(&initlock); }; +/* add a configure option to enable this */ +#if 0 +/* This struct is for external code to force a call to this library */ +struct stdio_ops_s ofs_std_ops = +{ + .fopen = fopen, + .fdopen = fdopen, + .freopen = freopen, + .fwrite = fwrite, + .fwrite_unlocked = fwrite_unlocked, + .fread = fread, + .fread_unlocked = fread_unlocked, + .fclose = fclose, + .fseek = fseek, + .fseek64 = fseek64, + .fsetpos = fsetpos, + .rewind = rewind, + .ftell = ftell, + .ftell64 = ftell64, + .fgetpos = fgetpos, + .fflush = fflush, + .fflush_unlocked = fflush_unlocked, + .fputc = fputc, + .fputc_unlocked = fputc_unlocked, + .fputs = fputs, + .fputs_unlocked = fputs_unlocked, + .putc = putc, + .putc_unlocked = putc_unlocked, + .putchar = putchar, + .putchar_unlocked = putchar_unlocked, + .puts = puts, + .putw = putw, + .fgets = fgets, + .fgets_unlocked = fgets_unlocked, + .fgetc = fgetc, + .fgetc_unlocked = fgetc_unlocked, + .getc = getc, + .getc_unlocked = getc_unlocked, + .getchar = getchar, + .getchar_unlocked = getchar_unlocked, + .getw = getw, + .gets = gets, + .getdelim = getdelim, + .ungetc = ungetc, + .vfprintf = vfprintf, + .vprintf = vprintf, + .fprintf = fprintf, + .printf = printf, + .perror = perror, + .fscanf = fscanf, + .scanf = scanf, + .clearerr = clearerr, + .clearerr_unlocked = clearerr_unlocked, + .feof = feof, + .feof_unlocked = feof_unlocked, + .ferror = ferror, + .ferror_unlocked = ferror_unlocked, + .fileno = fileno, + .fileno_unlocked = fileno_unlocked, + .remove = remove, + .setbuf = setbuf, + .setbuffer = setbuffer, + .setlinebuf = setlinebuf, + .setvbuf = setvbuf, + .mkdtemp = mkdtemp, + .mkstemp = mkstemp, + .tmpfile = tmpfile, + .opendir = opendir, + .fdopendir = fdopendir, + .dirfd = dirfd, + .readdir = readdir, + .readdir64 = readdir64, + .rewinddir = rewinddir, + .seekdir = seekdir, + .telldir = telldir, + .closedir = closedir, + .scandir = scandir, + .scandir64 = scandir64, + .flockfile = flockfile, + .ftrylockfile = ftrylockfile, + .funlockfile = funlockfile +}; +#endif + /* * Local variables: * c-indent-level: 4 diff --git a/src/client/usrint/ucache.c b/src/client/usrint/ucache.c index ccb861b..a2b4abe 100644 --- a/src/client/usrint/ucache.c +++ b/src/client/usrint/ucache.c @@ -11,13 +11,15 @@ * Experimental cache for user data. * */ +#include +#include +#include #include "usrint.h" #include "posix-ops.h" #include "openfile-util.h" #include "iocommon.h" #if PVFS_UCACHE_ENABLE #include "ucache.h" -#include /* Global Variables */ FILE *out; /* For Logging Purposes */ @@ -25,7 +27,7 @@ FILE *out; /* For Logging Purposes */ /* static uint32_t ucache_blk_cnt = 0; */ /* Global pointers to data in shared mem. Pointers set in ucache_initialize */ -union user_cache_u *ucache = 0; +union ucache_u *ucache = 0; struct ucache_aux_s *ucache_aux = 0; /* All locks and stats stored here */ /* ucache_aux is a pointer to the actual data summarized by the following @@ -47,7 +49,7 @@ char ftblInitialized = 0; /* Initialization */ static void add_mtbls(uint16_t blk); static void init_memory_table(struct mem_table_s *mtbl); -static inline int init_memory_entry(struct mem_table_s *mtbl, int16_t index); +static inline void init_memory_entry(struct mem_table_s *mtbl, int16_t index); /* Gets */ static uint16_t get_next_free_mtbl(uint16_t *free_mtbl_blk, uint16_t *free_mtbl_ent); @@ -177,7 +179,7 @@ int ucache_initialize(void) // "ucache_initialize - ucache shmget: errno = %d\n", errno); return -1; } - ucache = (union user_cache_u *)shmat(ucache_shmid, NULL, 0); + ucache = (union ucache_u *)shmat(ucache_shmid, NULL, 0); if((long int)ucache == -1) { //gossip_debug(GOSSIP_UCACHE_DEBUG, @@ -197,7 +199,7 @@ int ucache_initialize(void) * Returns a pointer to the mtbl corresponding to the blk & ent. * Input must be reliable otherwise invalid mtbl could be returned. */ -inline struct mem_table_s *get_mtbl(uint16_t mtbl_blk, uint16_t mtbl_ent) +inline struct mem_table_s *ucache_get_mtbl(uint16_t mtbl_blk, uint16_t mtbl_ent) { if( mtbl_blk < BLOCKS_IN_CACHE && mtbl_ent < MEM_TABLE_ENTRY_COUNT) @@ -260,6 +262,7 @@ int ucache_init_file_table(char forceCreation) ucache->ftbl.file[i].tag_id = NIL32; ucache->ftbl.file[i].mtbl_blk = NIL16; ucache->ftbl.file[i].mtbl_ent = NIL16; + ucache->ftbl.file[i].size = NIL64; ucache->ftbl.file[i].next = NIL16; } @@ -315,7 +318,7 @@ int ucache_open_file(PVFS_fs_id *fs_id, goto done; } - mtbl = get_mtbl((*fent)->mtbl_blk, (*fent)->mtbl_ent); + mtbl = ucache_get_mtbl((*fent)->mtbl_blk, (*fent)->mtbl_ent); if(mtbl == (struct mem_table_s *)NILP) { /* Error - Could not insert */ @@ -326,6 +329,7 @@ int ucache_open_file(PVFS_fs_id *fs_id, { /* File Inserted */ mtbl->ref_cnt = 1; + ucache_stats->file_count++; rc = 0; goto done; } @@ -349,11 +353,15 @@ done: inline void *ucache_lookup(struct file_ent_s *fent, uint64_t offset, uint16_t *block_ndx) { + if(DBG) + { + printf("offset = %lu\n", offset); + } void *retVal = (void *) NIL; if(fent) { lock_lock(ucache_lock); - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); retVal = lookup_mem(mtbl, offset, block_ndx, @@ -431,7 +439,7 @@ done: /** * Externally visible wrapper of the internal flush file function. - * This is intended to allow and external flush file call which locks the + * This is intended to allow an external flush file call which locks the * global lock, flushes the file, then releases the global lock. * To prevent deadlock, do not call this in any function that aquires the * global lock. @@ -453,8 +461,8 @@ int ucache_flush_file(struct file_ent_s *fent) int flush_file(struct file_ent_s *fent) { int rc = 0; - - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + PVFS_object_ref ref = {fent->tag_handle, fent->tag_id, 0}; uint16_t i; uint16_t temp_next = NIL16; @@ -473,16 +481,25 @@ int flush_file(struct file_ent_s *fent) temp_next = mtbl->mem[i].dirty_next; mtbl->mem[i].dirty_next = NIL16; - /*#ifdef FILE_SYSTEM_ENABLED*/ - PVFS_object_ref ref = {fent->tag_handle, fent->tag_id, 0}; - struct iovec vector = {&(ucache->b[ment->item].mblk[0]), CACHE_BLOCK_SIZE_K * 1024}; + struct iovec vector = + { + &(ucache->b[ment->item].mblk[0]), + 0 + }; + + /** Check the file size , so that we know how much to write to disk. + */ + /* Determine how much data is left to flush based on file size */ + if((fent->size - ment->tag) < (CACHE_BLOCK_SIZE_K * 1024)) + { + vector.iov_len = fent->size - ment->tag; + } + else + { + vector.iov_len = CACHE_BLOCK_SIZE_K * 1024; + } + rc = iocommon_vreadorwrite(2, &ref, ment->tag, 1, &vector); - /* - #endif - #ifndef FILE_SYSTEM_ENABLED - rc = 0; - #endif - */ lock_unlock(blk_lock); if(rc == -1) @@ -490,10 +507,8 @@ int flush_file(struct file_ent_s *fent) goto done; } } - mtbl->dirty_list = NIL16; rc = 0; - done: return rc; } @@ -527,13 +542,13 @@ int wipe_ucache(void) int ucache_shmid = shmget(key, 0, shmflg); if(ucache_shmid == -1) { - perror("wipe_ucache - ucache shmget"); + glibc_ops.perror("wipe_ucache - ucache shmget"); return -1; } - ucache = (union user_cache_u *)shmat(ucache_shmid, NULL, 0); + ucache = (union ucache_u *)shmat(ucache_shmid, NULL, 0); if((long int)ucache == -1) { - perror("wipe ucache - ucache shmat"); + glibc_ops.perror("wipe ucache - ucache shmat"); return -1; } @@ -555,6 +570,10 @@ int ucache_close_file(struct file_ent_s *fent) int rc = 0; rc = lock_lock(ucache_lock); rc = remove_file(fent); + if(rc == 0) + { + ucache_stats->file_count--; + } lock_unlock(ucache_lock); return rc; } @@ -628,7 +647,7 @@ int ucache_info(FILE *out, char *flags) unsigned char show_free = 0; int char_ndx; - for (char_ndx=0; char_ndxhits, (long long unsigned int) ucache_stats->misses, - percentage * 100, + (percentage * 100), (long long unsigned int) ucache_stats->pseudo_misses, ucache_stats->block_count, ucache_stats->file_count @@ -790,8 +809,9 @@ int ucache_info(FILE *out, char *flags) fprintf(out, "mtbl_ent = %hu\n", fent->mtbl_ent); fprintf(out, "next = %hu\n", fent->next); fprintf(out, "index = %hu\n", fent->index); + fprintf(out, "size = %lu\n", fent->size); - struct mem_table_s * mtbl = get_mtbl(fent->mtbl_blk, + struct mem_table_s * mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); fprintf(out, "\tMTBL LRU List ****************\n"); @@ -1111,19 +1131,15 @@ static void add_mtbls(uint16_t blk) /** * Initializes a memory entry. */ -static inline int init_memory_entry(struct mem_table_s *mtbl, int16_t index) +static inline void init_memory_entry(struct mem_table_s *mtbl, int16_t index) { - if(index > MEM_TABLE_ENTRY_COUNT) - { - return -1; - } + assert(index < MEM_TABLE_ENTRY_COUNT); mtbl->mem[index].tag = NIL64; mtbl->mem[index].item = NIL16; mtbl->mem[index].next = NIL16; mtbl->mem[index].dirty_next = NIL16; mtbl->mem[index].lru_prev = NIL16; mtbl->mem[index].lru_next = NIL16; - return 0; } /** @@ -1134,7 +1150,6 @@ static inline int init_memory_entry(struct mem_table_s *mtbl, int16_t index) static void init_memory_table(struct mem_table_s *mtbl) { uint16_t i; - int rc = -1; mtbl->num_blocks = 0; mtbl->free_list_blk = NIL16; mtbl->lru_first = NIL16; @@ -1152,12 +1167,12 @@ static void init_memory_table(struct mem_table_s *mtbl) mtbl->free_list = 0; for(i = 0; i < (MEM_TABLE_ENTRY_COUNT - 1); i++) { - rc = init_memory_entry(mtbl, i); + init_memory_entry(mtbl, i); mtbl->mem[i].next = i + 1; } /* NIL Terminate the last entries next index */ - rc = init_memory_entry(mtbl, MEM_TABLE_ENTRY_COUNT - 1); + init_memory_entry(mtbl, MEM_TABLE_ENTRY_COUNT - 1); mtbl->mem[MEM_TABLE_ENTRY_COUNT - 1].next = NIL16; } @@ -1224,6 +1239,7 @@ static void put_free_fent(struct file_ent_s *fent) struct file_table_s *ftbl = &(ucache->ftbl); fent->tag_handle = NIL64; fent->tag_id = NIL32; + fent->size = NIL64; if(fent->index < FILE_TABLE_HASH_MAX) { fent->next = NIL16; @@ -1457,9 +1473,16 @@ uint16_t insert_file( /* Evict a block from mtbl with most mem entries */ struct file_ent_s *max_fent = 0; struct mem_table_s *max_mtbl; - locate_max_fent(&max_fent); - max_mtbl = get_mtbl(max_fent->mtbl_blk, max_fent->mtbl_ent); - evict_LRU(max_fent); + uint16_t ment_count = 0; + ment_count = locate_max_fent(&max_fent); + max_mtbl = ucache_get_mtbl(max_fent->mtbl_blk, max_fent->mtbl_ent); + if(ment_count == 0 || max_mtbl->lru_last == NIL16) + { + } + else + { + evict_LRU(max_fent); + } } /* TODO: other policy? */ if(ucache->ftbl.free_blk == NIL16) @@ -1519,8 +1542,9 @@ uint16_t insert_file( /* Update fent with it's new mtbl: blk and ent */ current->mtbl_blk = free_mtbl_blk; current->mtbl_ent = free_mtbl_ent; + current->size = 0; /* Initialize Memory Table */ - init_memory_table(get_mtbl(free_mtbl_blk, free_mtbl_ent)); + init_memory_table(ucache_get_mtbl(free_mtbl_blk, free_mtbl_ent)); return current->index; } @@ -1532,7 +1556,7 @@ uint16_t insert_file( static int remove_file(struct file_ent_s *fent) { int rc = 0; - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); if(mtbl == (struct mem_table_s *)NILP) @@ -1545,7 +1569,7 @@ static int remove_file(struct file_ent_s *fent) if(mtbl->ref_cnt > 0) { - return 0; + return (int) mtbl->ref_cnt; } /* Flush dirty blocks before file removal from cache */ @@ -1733,8 +1757,6 @@ static inline void update_LRU(struct mem_table_s *mtbl, uint16_t index) static uint16_t locate_max_fent(struct file_ent_s **fent) { struct file_table_s *ftbl = &(ucache->ftbl); - uint16_t index_of_max_blk = NIL16; - uint16_t index_of_max_ent = NIL16; uint16_t value_of_max = 0; /* Iterate over file hash table indices */ uint16_t i; @@ -1758,14 +1780,13 @@ static uint16_t locate_max_fent(struct file_ent_s **fent) /* Examine the mtbl's value of num_blocks to see if it's the * greatest. */ - struct mem_table_s *current_mtbl = get_mtbl(current_fent->mtbl_blk, - current_fent->mtbl_ent); + struct mem_table_s *current_mtbl = ucache_get_mtbl( + current_fent->mtbl_blk, + current_fent->mtbl_ent); if(current_mtbl->num_blocks >= value_of_max) { *fent = current_fent; /* Set the parameter to this mtbl */ - index_of_max_blk = current_fent->mtbl_blk; - index_of_max_ent = current_fent->mtbl_ent; value_of_max = current_mtbl->num_blocks; } } @@ -1782,24 +1803,20 @@ static uint16_t locate_max_fent(struct file_ent_s **fent) */ static int evict_LRU(struct file_ent_s *fent) { - int rc = -1; + int rc = 0; - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); if(mtbl->num_blocks != 0 && mtbl->lru_last != NIL16) { //printf("evicting: %hu\n", mtbl->lru_last); rc = remove_mem(fent, mtbl->mem[mtbl->lru_last].tag); - if(rc != 1) + if(rc == 1) { - return 0; + return 1; } - return 1; - } - else - { - return 0; } + return 0; } @@ -1817,7 +1834,7 @@ static inline void *set_item(struct file_ent_s *fent, { uint16_t free_blk = get_free_blk(); - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); /* No Free Blocks Available */ if(free_blk == NIL16) @@ -1833,9 +1850,9 @@ static inline void *set_item(struct file_ent_s *fent, { struct file_ent_s *max_fent = 0; struct mem_table_s *max_mtbl; - int ment_count = 0; + uint16_t ment_count = 0; ment_count = locate_max_fent(&max_fent); - max_mtbl = get_mtbl(max_fent->mtbl_blk, max_fent->mtbl_ent); + max_mtbl = ucache_get_mtbl(max_fent->mtbl_blk, max_fent->mtbl_ent); if(ment_count == 0 || max_mtbl->lru_last == NIL16) { goto errout; @@ -1873,7 +1890,7 @@ static inline void *insert_mem(struct file_ent_s *fent, uint64_t offset, uint16_t *block_ndx) { void* rc = 0; - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); /* Lookup first */ void *returnValue = lookup_mem(mtbl, offset, block_ndx, NULL, NULL); @@ -1892,7 +1909,10 @@ static inline void *insert_mem(struct file_ent_s *fent, uint64_t offset, if(mentIndex == NIL16) { /* No free ment available, so attempt eviction, and try again */ evict_rc = evict_LRU(fent); - mentIndex = get_free_ment(mtbl); + if(evict_rc == 1) + { + mentIndex = get_free_ment(mtbl); + } } /* Eviction Failed */ @@ -1933,7 +1953,7 @@ static inline void *insert_mem(struct file_ent_s *fent, uint64_t offset, */ static int remove_mem(struct file_ent_s *fent, uint64_t offset) { - struct mem_table_s *mtbl = get_mtbl(fent->mtbl_blk, fent->mtbl_ent); + struct mem_table_s *mtbl = ucache_get_mtbl(fent->mtbl_blk, fent->mtbl_ent); /* Some Indices */ uint16_t item_index = NIL16; /* index of cached block */ diff --git a/src/client/usrint/ucache.h b/src/client/usrint/ucache.h index 597b4ad..8337ef4 100644 --- a/src/client/usrint/ucache.h +++ b/src/client/usrint/ucache.h @@ -17,7 +17,7 @@ #include #define MEM_TABLE_ENTRY_COUNT 679 -#define FILE_TABLE_ENTRY_COUNT 682 +#define FILE_TABLE_ENTRY_COUNT 512 #define CACHE_BLOCK_SIZE_K 256 #define CACHE_BLOCK_SIZE (CACHE_BLOCK_SIZE_K * 1024) #define MEM_TABLE_HASH_MAX 31 @@ -27,7 +27,7 @@ #define SHM_ID1 'l' #define SHM_ID2 'm' #ifndef BLOCKS_IN_CACHE -#define BLOCKS_IN_CACHE 1024 +# define BLOCKS_IN_CACHE 1024 #endif #define CACHE_SIZE (CACHE_BLOCK_SIZE * BLOCKS_IN_CACHE) #define AT_FLAGS 0 @@ -35,9 +35,13 @@ #define CACHE_FLAGS (SVSHM_MODE) #define NIL (-1) +#ifndef UCACHE_MAX_BLK_REQ +# define UCACHE_MAX_BLK_REQ MEM_TABLE_ENTRY_COUNT +#endif + #ifndef UCACHE_MAX_REQ -#define UCACHE_MAX_REQ (CACHE_BLOCK_SIZE * MEM_TABLE_ENTRY_COUNT) -#endif +# define UCACHE_MAX_REQ (CACHE_BLOCK_SIZE * UCACHE_MAX_BLK_REQ) +#endif /* Define multiple NILS to there's no need to cast for different types */ #define NIL8 0XFF @@ -45,14 +49,14 @@ #define NIL32 0XFFFFFFFF #define NIL64 0XFFFFFFFFFFFFFFFF #if (PVFS2_SIZEOF_VOIDP == 32) -#define NILP NIL32 +# define NILP NIL32 #elif (PVFS2_SIZEOF_VOIDP == 64) -#define NILP NIL64 +# define NILP NIL64 #endif #ifndef DBG -#define DBG 0 +#define DBG 0 #endif #ifndef UCACHE_LOG_FILE @@ -86,13 +90,13 @@ #define UCACHE_STATS_64 3 #define UCACHE_STATS_16 2 /* This is the size of the ucache_aux auxilliary shared mem segment */ -#define UCACHE_AUX_SIZE ( LOCKS_SIZE + (UCACHE_STATS_64 * 64) + \ - (UCACHE_STATS_16 * 16)) +#define UCACHE_AUX_SIZE ( LOCKS_SIZE + (UCACHE_STATS_64 * 8) + \ + (UCACHE_STATS_16 * 2)) /* Globals */ extern FILE * out; extern int ucache_enabled; -extern union user_cache_u *ucache; +extern union ucache_u *ucache; extern struct ucache_aux_s *ucache_aux; extern ucache_lock_t *ucache_locks; extern ucache_lock_t *ucache_lock; @@ -167,7 +171,7 @@ union cache_block_u /** A link for one file in the top level hash table * */ -/* 24 bytes */ +/* 32 bytes */ struct file_ent_s { uint64_t tag_handle; /* PVFS_handle */ @@ -176,6 +180,7 @@ struct file_ent_s uint16_t mtbl_ent; /* entry index of this mtbl */ uint16_t next; /* next fent in chain */ uint16_t index; /* fent index in ftbl */ + uint64_t size; /* cache maintenance of file size */ char pad[4]; }; @@ -196,7 +201,7 @@ struct file_table_s /** The whole system wide cache * */ -union user_cache_u +union ucache_u { struct file_table_s ftbl; union cache_block_u b[0]; /* actual size of this varies */ @@ -204,18 +209,18 @@ union user_cache_u struct ucache_ref_s { - union user_cache_u *ucache; /* pointer to ucache shmem */ + union ucache_u *ucache; /* pointer to ucache shmem */ ucache_lock_t *ucache_locks; /* pointer to ucache locks */ }; /* externally visible API */ -union user_cache_u *get_ucache(void); +union ucache_u *get_ucache(void); int ucache_initialize(void); int ucache_open_file(PVFS_fs_id *fs_id, PVFS_handle *handle, struct file_ent_s **fent); int ucache_close_file(struct file_ent_s *fent); -inline struct mem_table_s *get_mtbl(uint16_t mtbl_blk, uint16_t mtbl_ent); +inline struct mem_table_s *ucache_get_mtbl(uint16_t mtbl_blk, uint16_t mtbl_ent); inline void *ucache_lookup(struct file_ent_s *fent, uint64_t offset, uint16_t *block_ndx); inline void *ucache_insert(struct file_ent_s *fent, uint64_t offset, diff --git a/src/client/usrint/usrint.h b/src/client/usrint/usrint.h index 4a27794..a59c0fc 100644 --- a/src/client/usrint/usrint.h +++ b/src/client/usrint/usrint.h @@ -9,20 +9,34 @@ * * PVFS2 user interface routines */ + +#include "pvfs2-config.h" + #ifndef USRINT_H #define USRINT_H 1 #ifndef _GNU_SOURCE -#define _GNU_SOURCE 1 +# define _GNU_SOURCE 1 #endif + #ifndef _ATFILE_SOURCE -#define _ATFILE_SOURCE 1 +# define _ATFILE_SOURCE 1 #endif + #ifndef _LARGEFILE_SOURCE -#define _LARGEFILE_SOURCE 1 +# define _LARGEFILE_SOURCE 1 #endif + #ifndef _LARGEFILE64_SOURCE -#define _LARGEFILE64_SOURCE 1 +# define _LARGEFILE64_SOURCE 1 +#endif + +#ifndef _REENTRANT +# define _REENTRANT 1 +#endif + +#ifndef _THREAD_SAFE +# define _THREAD_SAFE 1 #endif /* @@ -30,25 +44,36 @@ * We want to avoid this in our source */ #ifdef USRINT_SOURCE -#ifdef _FILE_OFFSET_BITS -#undef _FILE_OFFSET_BITS + +#ifdef _FORTIFY_SOURCE +# undef _FORTIFY_SOURCE +# define _FORTIFY_SOURCE 0 #endif + +# ifdef _FILE_OFFSET_BITS +# undef _FILE_OFFSET_BITS +# endif + #else -#ifndef _FILE_OFFSET_BITS -#define _FILE_OFFSET_BITS 64 -#endif -#ifdef __OPTIMIZE__ -#undef __OPTIMIZE__ -#endif -#define __NO_INLINE__ 1 -#endif + +# ifndef _FILE_OFFSET_BITS +# define _FILE_OFFSET_BITS 64 +# endif + +# ifdef __OPTIMIZE__ +# undef __OPTIMIZE__ +# endif + +# define __NO_INLINE__ 1 + +#endif /* USRINT_SOURCE */ /* * this defines __USE_LARGEFILE, __USE_LARGEFILE64, and * __USE_FILE_OFFSET64 which control many of the other includes */ #ifdef HAVE_FEATURES_H -#include +# include #endif /* @@ -63,86 +88,164 @@ * optimization in the first place. WBL */ #ifdef USRINT_SOURCE -#ifdef __USE_FILE_OFFSET64 -#undef __USE_FILE_OFFSET64 -#endif + +# ifdef __USE_FILE_OFFSET64 +# undef __USE_FILE_OFFSET64 +# endif + /* This seems to reappear on some systems, so whack it again */ -#ifdef __OPTIMIZE__ -#undef __OPTIMIZE__ -#endif -#ifdef __REDIRECT -#undef __REDIRECT -#endif -#ifdef __USE_EXTERN_INLINES -#undef __USE_EXTERN_INLINES -#endif -#ifdef __USE_FORTIFY_LEVEL -#undef __FORTIFY_LEVEL -#define __USE_FORTIFY_LEVEL 0 +# ifdef __OPTIMIZE__ +# undef __OPTIMIZE__ +# endif + +# ifdef __REDIRECT +# undef __REDIRECT +# endif + +# ifdef __USE_EXTERN_INLINES +# undef __USE_EXTERN_INLINES +# endif + +# ifdef __USE_FORTIFY_LEVEL +# undef __USE_FORTIFY_LEVEL +# define __USE_FORTIFY_LEVEL 0 +# endif + +#endif /* USRINT SOURCE */ + +#if 0 +#ifdef _IO_MTSAFE_IO +#pragma message "MTSAFE is defined" +#else +#pragma message "MTSAFE is NOT defined" #endif #endif -#include -#include +/* locking - should activate glibc pthreads locks - if not already on */ +/* need a config option here to turn off thread safety - otherwise + * assume it should be on. This only controls locking on stdio layer. + * Presumably much of it could be turned off for efficiency sake - maybe + * a runtime option rather than library build time option. + */ +#if 0 + +# ifdef _IO_MTSAFE_IO +# undef _IO_MTSAFE_IO +# endif + +# define _IO_MTSAFE_IO 1 + +#endif /* 1 */ + +#include "pvfs2-internal.h" +#include "gossip.h" #include #include +//#define _GLIBCPP_USE_WCHAR_T 1 +//#include +//#undef _GLIBCPP_USE_WCHAR_T #include #include + #ifdef HAVE_UNISTD_H -#include +# include #endif + #ifdef HAVE_STDLIB_H -#include +# include +#endif + +#ifdef HAVE_STDARG_H +# include +#endif + +#ifdef HAVE_STDARG_H +# include +#endif + +#ifdef HAVE_STDARG_H +# include #endif -#include -#include -#include -#include + #ifdef HAVE_STDARG_H -#include +# include #endif -#include + +#ifdef HAVE_STDARG_H +# include +#endif + +#ifdef HAVE_MEMORY_H +# include +#endif + #include + #ifdef HAVE_SYS_TYPES_H -#include +# include #endif + #include + #ifdef HAVE_SYS_SOCKET_H -#include +# include #endif + #include + #ifdef HAVE_SYS_SENDFILE_H -#include +# include #endif + /* #include */ /* struct statfs on OS X */ #ifdef HAVE_SYS_VFS_H -#include /* struct statfs on Linux */ +# include /* struct statfs on Linux */ #endif + #ifdef HAVE_SYS_STAT_H -#include +# include #endif -#include -#include + +#ifdef HAVE_SYS_STATVFS_H +# include +#endif + +#ifdef HAVE_SYS_UIO_H +# include +#endif + #ifdef PVFS_HAVE_ACL_INCLUDES -#include -#include +# include +# include +#endif + +#ifdef HAVE_SYS_MMAN_H +# include +#endif + +#ifdef HAVE_SYS_TIME_H +# include #endif -#include -#include #ifdef HAVE_LINUX_TYPES_H -#include +# include #endif -#ifdef HAVE_ATTR_XATTR_H -#include +#ifdef HAVE_SELINUX_H +# include #else -#ifdef HAVE_SYS_ATTR_H -#include + typedef void *security_context_t; +#endif + +#ifdef HAVE_ATTR_XATTR_H +# include #else -#define XATTR_CREATE 0x1 -#define XATTR_REPLACE 0x2 +# ifdef HAVE_SYS_ATTR_H +# include +# else +# define XATTR_CREATE 0x1 +# define XATTR_REPLACE 0x2 extern int setxattr(const char *path, const char *name, const void *value, size_t size, int flags); extern int lsetxattr(const char *path, const char *name, @@ -160,8 +263,8 @@ extern ssize_t flistxattr(int fd, char *list, size_t size); extern int removexattr(const char *path, const char *name); extern int lremovexattr(const char *path, const char *name); extern int fremovexattr(int fd, const char *name); -#endif -#endif +# endif /* HAVE_SYS_ATTR_H */ +#endif /* HAVE_ATTR_XATTR_H */ /* #include diff source need diff versions */ #include @@ -170,12 +273,17 @@ extern int fremovexattr(int fd, const char *name); //#include /* PVFS specific includes */ -#include -#include -#include -#include -#include -#include +#include "pvfs2.h" +#include "pvfs2-hint.h" +#include "pvfs2-debug.h" +#include "pvfs2-types.h" +#include "pvfs2-req-proto.h" +#include "gen-locks.h" + +/* Just in case this is not defined - sizeof blocks reported in stat */ +#ifndef S_BLKSIZE +# define S_BLKSIZE 512 +#endif /* magic numbers for PVFS filesystem */ #define PVFS_FS 537068840 @@ -186,7 +294,7 @@ extern int fremovexattr(int fd, const char *name); /* Defines GNU's O_NOFOLLOW flag to be false if its not set */ #ifndef O_NOFOLLOW -#define O_NOFOLLOW 0 +# define O_NOFOLLOW 0 #endif /* Define AT_FDCWD and related flags on older systems */ @@ -195,16 +303,20 @@ extern int fremovexattr(int fd, const char *name); the *at functions should use the current working directory. */ #endif + #ifndef AT_SYMLINK_NOFOLLOW # define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */ #endif + #ifndef AT_REMOVDIR # define AT_REMOVEDIR 0x200 /* Remove directory instead of unlinking file. */ #endif + #ifndef AT_SYMLINK_FOLLOW # define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */ #endif + #ifndef AT_EACCESS # define AT_EACCESS 0x200 /* Test access permitted for effective IDs, not real IDs. */ @@ -213,11 +325,16 @@ extern int fremovexattr(int fd, const char *name); #define true 1 #define false 0 #define O_HINTS 02000000 /* PVFS hints are present */ -#define O_NOTPVFS 04000000 /* Open non-PVFS files if possible */ +#define O_NOTPVFS 04000000 /* Turn off sym links from PVFS to non-PVFS */ /* constants for this library */ /* size of stdio default buffer - starting at 1Meg */ #define PVFS_BUFSIZE (1024*1024) +#define PVFS_SHM_MAGIC (0xfffefdfcfbfa9081) +#define PVFS_NOFILE_MAX (1024) +#define PATH_TABLE_SIZE (1024*1024) +#define FD_TABLE_SIZE (64) +#define PVFS_SHMOBJ (PVFS_NOFILE_MAX -1) /* extra function prototypes */ @@ -233,6 +350,11 @@ extern int pvfs_convert_iovec(const struct iovec *vector, PVFS_Request *req, void **buf); +#if !defined(__linux__) || !defined(__GLIBC__) || \ + !(__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9)) +extern int dup3(int oldfd, int newfd, int flags); +#endif + /* MPI functions */ //int MPI_File_open(MPI_Comm comm, char *filename, // int amode, MPI_Info info, MPI_File *mpi_fh); @@ -242,40 +364,62 @@ extern int pvfs_convert_iovec(const struct iovec *vector, /* Macros */ /* debugging */ +#ifdef gossip_debug +# undef gossip_debug +#endif -//#define USRINT_DEBUG -#ifdef PVFS_USRINT_DEBUG -#define debug(s,v) fprintf(stderr,s,v) -#else -#define debug(s,v) +#ifdef GOSSIP_USRINT_DEBUG +# undef GOSSIP_USRINT_DEBUG #endif +/* locally control gossip_debug calls */ +#define USRINT_DEBUG 0 + +#if USRINT_DEBUG +# define GOSSIP_USRINT_DEBUG stderr +# define gossip_debug fprintf +#else +# define gossip_debug(__m, __f, ...) +#endif /* USRINT_DEBUG */ + +#define PVFS_STDIO_DEBUG 0 + /* USRINT Configuration Defines - Defaults */ /* These should be defined in pvfs2-config.h */ #ifndef PVFS_USRINT_BUILD -#define PVFS_USRINT_BUILD 1 +# define PVFS_USRINT_BUILD 1 #endif #ifndef PVFS_USRINT_CWD -#define PVFS_USRINT_CWD 1 +# define PVFS_USRINT_CWD 1 #endif #ifndef PVFS_USRINT_KMOUNT -#define PVFS_USRINT_KMOUNT 0 +# define PVFS_USRINT_KMOUNT 0 #endif #ifndef PVFS_UCACHE_ENABLE -#define PVFS_UCACHE_ENABLE 1 +# define PVFS_UCACHE_ENABLE 1 +#endif + +/* force redef to be the default - mostly for debugging */ +#if 1 +# ifdef PVFS_STDIO_REDEFSTREAM +# undef PVFS_STDIO_REDEFSTREAM +# endif #endif +#ifndef PVFS_STDIO_REDEFSTREAM +# define PVFS_STDIO_REDEFSTREAM 1 +#endif /* FD sets */ #if 0 -#ifdef FD_SET -#undef FD_SET -#endif -#define FD_SET(d,fdset) \ +# ifdef FD_SET +# undef FD_SET +# endif +# define FD_SET(d,fdset) \ do { \ pvfs_descriptor *pd; \ pd = pvfs_find_descriptor(d); \ @@ -285,10 +429,10 @@ do { \ } \ } while(0) -#ifdef FD_CLR -#undef FD_CLR -#endif -#define FD_CLR(d,fdset) \ +# ifdef FD_CLR +# undef FD_CLR +# endif +# define FD_CLR(d,fdset) \ do { \ pvfs_descriptor *pd; \ pd = pvfs_find_descriptor(d); \ @@ -298,10 +442,10 @@ do { \ } \ } while(0) -#ifdef FD_ISSET -#undef FD_ISSET -#endif -#define FD_ISSET(d,fdset) \ +# ifdef FD_ISSET +# undef FD_ISSET +# endif +# define FD_ISSET(d,fdset) \ do { \ pvfs_descriptor *pd; \ pd = pvfs_find_descriptor(d); \ @@ -310,7 +454,7 @@ do { \ __FD_ISSET(pd->true_fd,(fdset));\ } \ } while(0) -#endif +#endif /* 0 */ #endif /* USRINT_H */ diff --git a/src/client/windows/client-gui/dirListener.cpp b/src/client/windows/client-gui/dirListener.cpp new file mode 100644 index 0000000..c240324 --- /dev/null +++ b/src/client/windows/client-gui/dirListener.cpp @@ -0,0 +1,325 @@ +#include "main-app.h" + +extern MainApp *MAIN_APP; +extern MainFrame *MAIN_FRAME; + +DWORD WINAPI monitorDirChanges(void *thisPointer); /* the worker thread that monitors dirs */ + +DirHandler::DirHandler() : dirWatcher( NULL ) { } + +DirHandler::~DirHandler() +{ + unwatchDir(); + delete dirWatcher; +} + +bool DirHandler::unwatchDir() +{ + // if ( dirWatcher ) + // return dirWatcher->unwatchDir( this ); + return true; +} + +void DirHandler::onFileAdded(const char *fileName) +{ + OrangeFS_handle newFile = NULL; + OrangeFS_size bytesWritten = 0; + char *serverPath = (char *) malloc( MAX_PATH ); + char *localPath = (char *) malloc( MAX_PATH ); + + memset(serverPath, 0, MAX_PATH); + memset(localPath, 0, MAX_PATH); + + strcpy(localPath, MAIN_APP->getLocalSyncPath().c_str()); + strcat(localPath, "\\"); + strcat(localPath, fileName); + localPath[ strlen(localPath) ] = '\0'; + /* opening file so we can get handle, then file size */ + FILE *tempHandle = fopen(localPath, "r"); + + fseek(tempHandle, 0, SEEK_END); + long fileSize = ftell(tempHandle); + fseek(tempHandle, 0, SEEK_SET); + + wxString nameCol = "File Name"; + wxString sizeCol = "File Size"; + wxString nameVal = fileName; + OrangeFS_attr attrVal; + OrangeFS_time currTime = (OrangeFS_time) time( NULL ); + attrVal.atime = currTime; + attrVal.ctime = currTime; + attrVal.mtime = currTime; + attrVal.objtype = OrangeFS_TYPE_NONE; + attrVal.owner = 0; + attrVal.perms = (OrangeFS_permissions) 0775; + attrVal.size = (OrangeFS_size) fileSize; + + /* we add the new file to the metadataHandler, then add it to the list handler */ + MAIN_APP->addMetadata(nameVal, &attrVal); + MAIN_FRAME->getListHandler()->addListData(nameCol, nameVal); + + + orangefs_debug_print("FILE SIZE TO COPY TO SERVER : %ld bytes\n", fileSize); + orangefs_debug_print("LOCAL FILE PATH : %s\n", localPath); + + /* put the new file at the root dir (for now, later we'll set the server sync path in the local config) */ + serverPath[0] = '/'; + strcat(serverPath, fileName); + serverPath[ strlen(serverPath) ] = '\0'; + + int ret = orangefs_create( &MAIN_APP->getMntentAt(0)->fs_id, MAIN_APP->getCred(), serverPath, 0x644, &newFile ); + + /* we've created the file, now copy over the local contents into it */ + long bytesCopied = 0; + char *buffer; /* 256 KB buffer */ + OrangeFS_size buffSize = 262144; + bool copy = true; + + buffer = (char *) malloc(262144); + memset(buffer, 0, buffSize); + + while (copy) + { + /* remaining file data to read is less than buffer size, adjust read_size accordingly */ + if ((fileSize - bytesCopied) < buffSize) + { + buffSize = (fileSize - bytesCopied); + fread(buffer, sizeof(char), buffSize, tempHandle); + buffer[ strlen(buffer) ] = '\0'; + + /* can't print out the buffer here because the internal gossip_debug_print() has a maximum internal buffer size of 1024 */ + // orangefs_debug_print("SMALL BUFFER of size : %d\nCONTENTS : %s\n", buffSize, buffer); + orangefs_debug_print("SMALL BUFFER.\n"); + + /* stop copying after this iteration */ + copy = !copy; + } + else + { + fread(buffer, sizeof(char), buffSize, tempHandle); + orangefs_debug_print("BIG BUFFER\n."); + } + + /* now copy the buffer to the server file */ + orangefs_write( &MAIN_APP->getMntentAt(0)->fs_id, MAIN_APP->getCred(), serverPath, buffer, buffSize, bytesCopied, &bytesWritten ); + bytesCopied += buffSize; + + orangefs_debug_print("WROTE : %d bytes for file : %s\n", bytesWritten, fileName); + + /* reset buffer */ + memset(buffer, 0, buffSize); + } + + if ( tempHandle ) + fclose(tempHandle); + if ( serverPath ) + free(serverPath); + if ( localPath ) + free(localPath); + if ( buffer ) + free(buffer); +} + +void DirHandler::onFileRemoved(const char *fileName) +{ + char *serverPath = (char *) malloc( MAX_PATH ); + + memset(serverPath, 0, MAX_PATH); + + serverPath[0] = '/'; + strcat(serverPath, fileName); + serverPath[ strlen(fileName)+1 ] = '\0'; + + orangefs_debug_print("DirHandler removing file : %s at server path : %s\n", fileName, serverPath); + + orangefs_remove( &MAIN_APP->getMntentAt(0)->fs_id, MAIN_APP->getCred(), serverPath ); + + orangefs_debug_print("REMOVED FILE : %s\n", serverPath); + + // free(serverPath); +} + +void DirHandler::onFileNameChanged(const char *fileName) +{ + orangefs_debug_print("---- File name was changed : %s\n", fileName); +} + +void DirHandler::onFileModified(const char *fileName) +{ + /* TODO */ +} + +DirWatcher::DirWatcher() { } + +DWORD DirWatcher::watchDirectory(const wxString &dirToWatch, DWORD changesToWatchFor, DirHandler *changeHandler, bool watchSubDirs) +{ +#ifdef WIN32 + // assert( changesToWatchFor != 0 ); + + if( dirToWatch.IsEmpty() || changesToWatchFor == 0 || changeHandler == NULL ) + { + return ERROR_INVALID_PARAMETER; + } + + dirInfo = (DirInfo *) malloc(sizeof(DirInfo)); + + init_dirInfo(dirInfo); + + dirInfo->completionKey = (ULONG_PTR) &completionKey; + dirInfo->handler = changeHandler; + runThread = true; + MAIN_APP->setThreadFlag(runThread); + + orangefs_debug_print("Registering watch on directory : %s\n", dirToWatch.c_str()); + + /* open the directory and let the OS know we're listening for i/o changes asynchronously with the overlapped flag */ + dirInfo->dirPort = CreateFile(dirToWatch.c_str(), + FILE_LIST_DIRECTORY, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OVERLAPPED, + NULL); + + if ( !dirInfo->dirPort ) + { + orangefs_debug_print("ERROR : invalid handle returned from CreateFile.\n"); + return 0; + } + + /* this creates the completion port, we then associate this handle with the completion port listening on the directory */ + dirInfo->dirIoPort = CreateIoCompletionPort(INVALID_HANDLE_VALUE, + 0, /* no existing port */ + 0, /* ignored */ + 1); + + if ( !dirInfo->dirIoPort ) + { + orangefs_debug_print("ERROR : creating the completion port failed.\n"); + return 0; + } + + HANDLE tempHandle = CreateIoCompletionPort( dirInfo->dirPort, + dirInfo->dirIoPort, /* handle to the completion port we already created */ + (ULONG_PTR) dirInfo->completionKey, + 0); /* this parameter is ignored since we already declared the number of threads in creating the port */ + + if ( !tempHandle ) + { + orangefs_debug_print("ERROR : invalid handle returned from CreateIoCompletionPort.\n"); + MAIN_APP->printLastWinError(); + return 0; + } + + /* spawn a new thread to handle the syncing; if the user closes the app while it's still syncing, the app window will become invisible, but the sync thread will still be running */ + threadHandle = CreateThread(NULL, 0, monitorDirChanges, dirInfo, 0, NULL); +#endif + + return 0; +} + +DWORD WINAPI monitorDirChanges(void *parms) +{ + DWORD error = 0; + DWORD numRetBytesQ = 0; + DWORD numRetBytesR = 0; + BOOL retStatusR = FALSE; + BOOL retStatusQ = FALSE; + FILE_NOTIFY_INFORMATION *fileInfo = NULL; + DirInfo *dirInfo = (DirInfo *) parms; + + /* ensure the handles created before this thread was created are still valid */ + if ( !dirInfo->dirIoPort || !dirInfo->dirPort ) + { + orangefs_debug_print("ERROR : invalid handle at start of monitorDirChanges thread.\n"); + return 0; + } + + while ( MAIN_APP->getThreadFlag() ) + { + assert( MAIN_APP->getThreadFlag() == true ); + retStatusR = ReadDirectoryChangesW( dirInfo->dirPort, + (void *) dirInfo->buffer, + BUFFSIZE, + FALSE, + FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | + FILE_NOTIFY_CHANGE_ATTRIBUTES | FILE_NOTIFY_CHANGE_SIZE | + FILE_NOTIFY_CHANGE_LAST_WRITE | FILE_NOTIFY_CHANGE_LAST_ACCESS | + FILE_NOTIFY_CHANGE_CREATION | FILE_NOTIFY_CHANGE_SECURITY, + &numRetBytesR, + &dirInfo->over->overlapped, + NULL); + + assert( MAIN_APP->getThreadFlag() == true ); + retStatusQ = GetQueuedCompletionStatus( dirInfo->dirIoPort, + &numRetBytesQ, + &(dirInfo->completionKey), + (LPOVERLAPPED *) (dirInfo->over), + INFINITE); /* wait time milliseconds */ + + /* ReadDirectoryChangesW seems to return TRUE always, however, + * GetQueuedCompletionStatus only is TRUE when there's data in + * the buffer from ReadDirectoryChangesW */ + if ( retStatusR && retStatusQ ) + { + char fileName[MAX_PATH]; + + /* convert the buffer */ + fileInfo = (FILE_NOTIFY_INFORMATION *) dirInfo->buffer; + + /* convert the file name from wide char to regular char */ + int count = WideCharToMultiByte(CP_ACP, + 0, + fileInfo->FileName, + fileInfo->FileNameLength / sizeof(wchar_t), + fileName, + MAX_PATH - 1, + NULL, + NULL); + /* MSDN says the filename is NOT null terminated, so add it here */ + fileName[count] = '\0'; + + orangefs_debug_print("---- FILENAME : %s ----\n", fileName); + + /* finally, handle the change notification */ + switch (fileInfo->Action) + { + case FILE_ACTION_ADDED: + dirInfo->handler->onFileAdded(fileName); + break; + case FILE_ACTION_REMOVED: + dirInfo->handler->onFileRemoved(fileName); + break; + case FILE_ACTION_MODIFIED: + dirInfo->handler->onFileModified(fileName); + break; + case FILE_ACTION_RENAMED_NEW_NAME: + dirInfo->handler->onFileNameChanged(fileName); + break; + case FILE_ACTION_RENAMED_OLD_NAME: + dirInfo->handler->onFileNameChanged(fileName); + break; + default: + orangefs_debug_print("---- ERROR : unhandled dir change notification.\nFile name : %s\nAction : %u\n", fileName, fileInfo->Action); + break; + } + + memset(fileName, 0, MAX_PATH); + memset(dirInfo->buffer, 0, BUFFSIZE); + } + else + { + error = GetLastError(); + + if ( error == WAIT_TIMEOUT ) + { + orangefs_debug_print("---- 1 second timeout exceeded waiting ----\n"); + } + else + { + // orangefs_debug_print("---- ERROR : GetQueuedCompletionStatus failed\nERROR CODE : %d\n", error); + } + } + } +} + diff --git a/src/client/windows/client-gui/dirListener.h b/src/client/windows/client-gui/dirListener.h new file mode 100644 index 0000000..deed9ae --- /dev/null +++ b/src/client/windows/client-gui/dirListener.h @@ -0,0 +1,110 @@ +#ifndef __DIRLISTENER +#define __DIRLISTENER + +#define BUFFSIZE (32 * 1024) /* 32KB buffer */ + +class DirHandler; + +/* this is the asynchronous structure windows uses for thread data */ +typedef struct +{ + OVERLAPPED overlapped; + wchar_t *buffer; +}Overlapped; + +typedef struct +{ + HANDLE dirPort; + HANDLE dirIoPort; + Overlapped *over; + int buffLen; + wchar_t *buffer; + unsigned char *dirName; + ULONG_PTR completionKey; + DirHandler *handler; +}DirInfo; + +/* + * I got a majority of the functionality and structure/implementation for this directory watcher + * from online. It has been tested and every case (delete, create, update, rename, etc) reports back asynchronously just fine. + */ +class DirWatcher +{ +public: + DirWatcher(); + + virtual ~DirWatcher() + { + free_dirInfo(dirInfo); + } + + void init_dirInfo(DirInfo *dirInfo) + { + completionKey = 1; + + dirInfo->buffer = (wchar_t *) malloc(BUFFSIZE * sizeof(wchar_t)); /* 32KB buffer */ + dirInfo->buffLen = BUFFSIZE; + dirInfo->over = (Overlapped *) calloc(1, sizeof(Overlapped)); + dirInfo->over->buffer = (wchar_t *) calloc(BUFFSIZE, sizeof(wchar_t)); + dirInfo->dirName = NULL; + dirInfo->handler = NULL; + + memset(dirInfo->over->buffer, 0, BUFFSIZE); + memset(dirInfo->over, 0, sizeof(OVERLAPPED)); + } + + void free_dirInfo(DirInfo *dirInfo) + { + /* close handles first */ + if ( dirInfo->dirIoPort ) + CloseHandle( dirInfo->dirIoPort ); + if ( dirInfo->dirPort ) + CloseHandle( dirInfo->dirPort ); + + if ( dirInfo->buffer ) + free(dirInfo->buffer); + if ( dirInfo->over->buffer ) + free(dirInfo->over->buffer); + if ( dirInfo->over ) + free(dirInfo->over); + if ( dirInfo ) + free(dirInfo); + } + + DWORD watchDirectory(const wxString &dirToWatch, DWORD changesToWatchFor, DirHandler *changeHandler, bool watchSubDirs = false); + bool unwatchDirectory(const wxString &dirName) const; + bool unwatchAllDirectories(); + + HANDLE getThreadHandle() const { return threadHandle; } +private: + friend class DirHandler; + DirInfo *dirInfo; + bool runThread; + int completionKey; + + HANDLE threadHandle; + bool unwatchDir(DirHandler *changeHandler); /* called in DirHandler destructor */ +}; + +class DirHandler +{ +public: + DirHandler(); + virtual ~DirHandler(); + + bool unwatchDir(); + const wxString& getChangedDirName() const { return changedDirName; } + + void onFileAdded(const char *fileName); + void onFileRemoved(const char *fileName); + void onFileNameChanged(const char *fileName); + void onFileModified(const char *fileName); + + void setChangedDirName(const wxString& dirName) { changedDirName = dirName; } + +private: + wxString changedDirName; + DirWatcher *dirWatcher; +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/filelisthandler.cpp b/src/client/windows/client-gui/filelisthandler.cpp new file mode 100644 index 0000000..85c4c12 --- /dev/null +++ b/src/client/windows/client-gui/filelisthandler.cpp @@ -0,0 +1,227 @@ + +#include "main-app.h" + +/* retrieve our global reference to the main window */ +extern MainFrame *MAIN_FRAME; +extern MainApp *MAIN_APP; + +Utils *utils = Utils::getInstance(); + +FileListHandler::FileListHandler(void) +{ + wxImage::AddHandler( new wxXPMHandler ); + wxValidator validator; + char *folderIconPath; + char *fileIconPath; + short int syncPanelWidth = (MAIN_FRAME->getWinSize().GetWidth()); + short int syncPanelHeight = (MAIN_FRAME->getWinSize().GetHeight() - 80); + short int syncPanelStartX = 0; + short int syncPanelStartY = 0; + + folderIconPath = (char *) malloc(MAX_PATH); + strcpy(folderIconPath, FOLDER_ICON_NAME); + MAIN_APP->getAbsoluteRunningPath( folderIconPath ); + + fileIconPath = (char *) malloc(MAX_PATH); + strcpy(fileIconPath, FILE_ICON_NAME); + MAIN_APP->getAbsoluteRunningPath( fileIconPath ); + + this->fileIndexCounter = 0; + + this->syncPane = new wxPanel(MAIN_FRAME); + this->syncPane->SetSize( wxSize(syncPanelWidth, syncPanelHeight) ); + this->syncPane->SetDoubleBuffered(false); /* make sure the pane is NOT double buffered or the pane will display nothing when adding new columns */ + this->syncPane->SetLabel("Local Files"); + this->syncPane->SetPosition( wxPoint(syncPanelStartX, syncPanelStartY) ); + + this->fileIcons = new wxImageList(16, 16, true); + this->fileIcons->Add( wxIcon(folderIconPath, wxBITMAP_TYPE_XPM), wxBITMAP_TYPE_XPM); + this->fileIcons->Add( wxIcon(fileIconPath, wxBITMAP_TYPE_XPM), wxBITMAP_TYPE_XPM); + + /* create a list box and populate it with the retrieved file listing */ + this->syncList = new wxListCtrl(this->syncPane, + LIST_CTRL_SYNC, /* window id */ + wxPoint(syncPanelStartX, syncPanelStartY), /* position */ + wxSize(syncPanelWidth - 10, syncPanelHeight), /* size */ + wxLC_REPORT | wxLC_VRULES , /* window style */ + validator, /* window validator */ + "Local Files"); /* list control name */ + + /* now that we have our list of images to populate the file and folder icons, register it with the list control as small icons */ + this->syncList->SetImageList(this->fileIcons, wxIMAGE_LIST_SMALL); + + free( fileIconPath ); + free( folderIconPath ); +} + +FileListHandler::~FileListHandler() +{ + delete this->syncList; + delete this->syncPane; + delete this->fileIcons; +} + +void FileListHandler::addColumn(const wxString &name) +{ + MetadataHandler *metadataHandler = MetadataHandler::getInstance(); + wxListItem col; /* column to create */ + + col.SetId(this->syncList->GetColumnCount()); + col.SetText(name); + col.SetMask( wxLIST_MASK_STATE | wxLIST_MASK_TEXT ); + col.SetStateMask( wxLIST_STATE_SELECTED ); + col.SetWidth(this->syncPane->GetSize().x / (this->syncList->GetColumnCount()+1)); + this->syncList->InsertColumn(this->syncList->GetColumnCount(), col); /* add it to the end of the current columns */ + + /* now add the column name and associated column ID to the map */ + this->syncColumnIDs[name] = this->syncList->GetColumnCount()-1; + + if ( !name.compare("File Size") ) + { + for (int i=0; i < metadataHandler->getNumFiles(); i++) + { + OrangeFS_size tempSize = metadataHandler->getFileSize(metadataHandler->getFileName(i)); + wxString data = utils->getPrefixString( tempSize ); + this->syncList->SetItem( i, this->syncColumnIDs[name], data ); + } + } + if ( !name.compare("Permissions") ) + { + for (int i=0; i < metadataHandler->getNumFiles(); i++) + { + OrangeFS_permissions tempPerms = metadataHandler->getFilePerms(metadataHandler->getFileName(i)); + wxString data = utils->getPermString(tempPerms, metadataHandler->isDir(metadataHandler->getFileName(i))); + this->syncList->SetItem( i, this->syncColumnIDs[name], data ); + } + } + if ( !name.compare("Last Modified") ) + { + for (int i=0; i < metadataHandler->getNumFiles(); i++) + { + OrangeFS_time tempTime = metadataHandler->getFileModTime(metadataHandler->getFileName(i)); + wxString data = utils->getTimeString(tempTime); + this->syncList->SetItem( i, this->syncColumnIDs[name], data ); + } + } + + /* new go through the other existing column(s) and resize accordingly */ + for (int i=0; i < this->syncList->GetColumnCount(); i++) + { + this->syncList->SetColumnWidth(i, this->syncPane->GetSize().x / this->syncList->GetColumnCount()); /* set to panel size / number of columns */ + } +} + +void FileListHandler::removeColumn(const wxString &name) +{ + int delID; /* column ID to be deleted */ + + /* get the unique ID of the column to be removed */ + delID = this->syncColumnIDs[name]; + + if (this->syncColumnIDs.find(name) == this->syncColumnIDs.end()) /* wasn't found in the map (sanity checking here) */ + { + orangefs_debug_print("ERROR: unable to remove column: %s\n", name); + return; + } + + if (this->syncList->DeleteColumn( delID )) /* sanity checking */ + { + this->syncColumnIDs.erase(name); /* also remove the column name and ID from the map */ + } + else /* wasn't removed successfully */ + { + orangefs_debug_print("ERROR: couldn't remove column: %s\n", name); + return; + } + + /* new go through the other existing column(s) and resize */ + for (int i=0; i < this->syncList->GetColumnCount(); i++) + { + this->syncList->SetColumnWidth(i, this->syncPane->GetSize().x / this->syncList->GetColumnCount()); + } + + /* update columnIDs explicitly after one was removed */ + if (this->syncColumnIDs.count("File Size") > 0) /* will be > 0 if the key exists in the map */ + { + if (delID < this->syncColumnIDs["File Size"]) /* the column being deleted was to the left of this column, decrement the columnID */ + { + this->syncColumnIDs["File Size"] -= 1; + } + } + if (this->syncColumnIDs.count("Permissions") > 0) + { + if (delID < this->syncColumnIDs["Permissions"]) + { + this->syncColumnIDs["Permissions"] -= 1; + } + } + if (this->syncColumnIDs.count("Last Modified") > 0) + { + if (delID < this->syncColumnIDs["Last Modified"]) + { + this->syncColumnIDs["Last Modified"] -= 1; + } + } +} + +void FileListHandler::updateList(wxString &name) +{ + /* iterate through each column and update the new information to be displayed */ + map::iterator columnIterator; + + /* after we sync each file, we will update each currently visible column here with their appropriate data for that file */ + for ( columnIterator=this->syncColumnIDs.begin(); columnIterator != this->syncColumnIDs.end(); columnIterator++ ) + { + this->addListData(const_cast((*columnIterator).first), name); + } +} + +void FileListHandler::addListData(wxString &colName, wxString &fileName) +{ + static long rowIndex; /* will be the unique application provided index for setting column data */ + MetadataHandler *metadataHandler = MetadataHandler::getInstance(); + + /* fill the columns with the appropriate data */ + if (!colName.compare("File Name")) + { + /* if it's a directory object, show the folder icon, otherwise, show the file icon */ + if (metadataHandler->isDir(fileName)) + { + rowIndex = this->syncList->InsertItem( this->fileIndexCounter++, fileName, 0); /* the 0 here specifies the directory icon */ + this->syncListIndexes[fileName] = rowIndex; /* store the unique row index by file name in our map for setting column data later */ + } + else + { + rowIndex = this->syncList->InsertItem( this->fileIndexCounter++, fileName, 1); /* the 1 here specifies the file icon */ + this->syncListIndexes[fileName] = rowIndex; + } + } + else if (!colName.compare("File Size")) + { + /* populate the file size column with the "size" file attributes */ + OrangeFS_size tempSize = metadataHandler->getFileSize(fileName); /* get size of file in bytes */ + wxString prefixString = utils->getPrefixString( tempSize ); /* get the prefix size (i.e. KB, MB, GB, etc.), and set tempSize to value less than 1000 */ + + //this->syncList->SetItem( this->syncListIndexes[fileName], this->syncColumnIDs["File Size"], prefixString); + this->syncList->InsertItem(this->fileIndexCounter++, fileName); + } + else if (!colName.compare("Permissions")) + { + /* populate the permissions column with the "OrangeFS_permissions attribute */ + wxString tempPerms = utils->getPermString(metadataHandler->getFilePerms(fileName), metadataHandler->isDir(fileName)); + + this->syncList->SetItem( MAIN_APP->getFileIndex(fileName), this->syncColumnIDs["Permissions"], tempPerms); + } + else if (!colName.compare("Last Modified")) + { + /* populate the permissions column wtih the "mtime" attribute */ + wxString tempTime = utils->getTimeString(metadataHandler->getFileModTime(fileName)); + + this->syncList->SetItem( MAIN_APP->getFileIndex(fileName), this->syncColumnIDs["Last Modified"], tempTime); + } +} + +void FileListHandler::removeListData(const wxString &filename) +{ + syncList->DeleteItem(syncListIndexes[filename]); +} \ No newline at end of file diff --git a/src/client/windows/client-gui/filelisthandler.h b/src/client/windows/client-gui/filelisthandler.h new file mode 100644 index 0000000..c870359 --- /dev/null +++ b/src/client/windows/client-gui/filelisthandler.h @@ -0,0 +1,46 @@ + +#ifndef __FILELISTHANDLER_H +#define __FILELISTHANDLER_H + +#include +using std::map; + +const wxWindowID LIST_CTRL_SYNC = 0x1; +const wxString FOLDER_ICON_NAME = "folder_icon.xpm"; +const wxString FILE_ICON_NAME = "file_icon.xpm"; + +/* + * This class contains all the necessary implementation for modifying and instantiating the list view which displays the file information for the applicaion + */ +class FileListHandler: public wxListCtrl +{ +public: + static FileListHandler* getInstance() { if (!instance) { instance = new FileListHandler; } return instance; } + + ~FileListHandler(); + + void addColumn(const wxString &name); + void removeColumn(const wxString &name); + + void displayFileStatus(wxCommandEvent &event); + void processListCtrlDoubleClick(wxCommandEvent &event); + + void updateList(wxString &name); + void addListData(wxString &colName, wxString &fileName); + void removeListData(const wxString &filename); + +private: + FileListHandler(); + FileListHandler(const FileListHandler &) { } /* copy constructor */ + FileListHandler& operator=(const FileListHandler &) { } /* overloaded assignment operator */ + + static FileListHandler *instance; /* singleton instance */ + wxListCtrl *syncList; + wxPanel *syncPane; + wxImageList *fileIcons; + map syncColumnIDs; + map syncListIndexes; + int fileIndexCounter; +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/localConfig.cpp b/src/client/windows/client-gui/localConfig.cpp new file mode 100644 index 0000000..521dbe8 --- /dev/null +++ b/src/client/windows/client-gui/localConfig.cpp @@ -0,0 +1,75 @@ +#include "main-app.h" + +extern MainApp *MAIN_APP; + + +/* will return false if there isn't already a sync configuration, true if one already exists */ +bool LocalConfig::load() +{ + char buff[256]; + + syncConfigPath = (char *) malloc(MAX_PATH); + strcpy(syncConfigPath, CONFIG_FILE_NAME ); + MAIN_APP->getAbsoluteRunningPath( syncConfigPath ); + + /* if it doesn't already exist, create it and return false because there's nothing to load */ +#ifndef WIN32 + if ( access(syncConfigPath, F_OK) == -1 ) +#else + if ( _access(syncConfigPath, 0) == -1 ) +#endif + { + this->configFile = fopen(syncConfigPath, "w"); + fclose(this->configFile); + return false; + } + /* it exists, open it up */ + this->configFile = fopen(syncConfigPath, "r"); + + if (fgets(buff, 256, this->configFile)) + { + /* didn't find the first config element */ + if (strncmp(buff, "FS = ", 1) != 0) + /* doesn't have any config data, do nothing and wait until a config is saved */ + return false; + else + { + this->fsSelection = buff; + this->fsSelection = this->fsSelection.substr(5); /* start at the value of the fs selection */ + } + } + + memset(buff, 0, 256); + + if (fgets(buff, 256, this->configFile)) /* will read up to a newline character */ + { + this->localSyncPath = buff; /* wxString assignment operator is overloaded to copy over instead of assign pointers */ + this->localSyncPath = this->localSyncPath.substr(13); /* start at the value of the local sync path */ + } + + fclose(this->configFile); + return true; +} + +bool LocalConfig::syncExists() { + if ( localSyncPath ) + return true; + else + return false; + return false; +} + +void LocalConfig::save() +{ + this->configFile = fopen(syncConfigPath, "w"); + + fprintf(this->configFile, "FS = %s\n", this->fsSelection); + fprintf(this->configFile, "LOCAL_PATH = %s\n", this->localSyncPath); + + fclose(this->configFile); +} + +LocalConfig::~LocalConfig(void) +{ + free(syncConfigPath); +} diff --git a/src/client/windows/client-gui/localConfig.h b/src/client/windows/client-gui/localConfig.h new file mode 100644 index 0000000..1f68d4e --- /dev/null +++ b/src/client/windows/client-gui/localConfig.h @@ -0,0 +1,40 @@ + +#ifndef __LOCALCONFIG_H +#define __LOCALCONFIG_H + +#ifdef WIN32 +const wxString CONFIG_FILE_NAME = "appConfig.txt"; +#else +const wxString CONFIG_FILE_NAME = ".appConfig"; +#endif + +/* this class is designed to be an array of LocalConfig's */ +/* you will have a local config for each file system the client is subscribed to */ +/* TODO : move this config to the registry on windows */ +class LocalConfig +{ +public: + LocalConfig() { + syncConfigPath = NULL; + configFile = NULL; + } + ~LocalConfig(void); + bool load(); + void save(); + + void setSyncPath(const wxString path) { this->localSyncPath = path; } + void setFsSelection(const wxString selection) { this->fsSelection = selection; } + + wxString getSyncPath() const { return this->localSyncPath; } + wxString getConfigPath() const { return syncConfigPath; } + bool syncExists(); + +private: + wxString fileSystemName; + char *syncConfigPath; + wxString fsSelection; + wxString localSyncPath; + FILE *configFile; +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/main-app.cpp b/src/client/windows/client-gui/main-app.cpp new file mode 100644 index 0000000..bc3cec6 --- /dev/null +++ b/src/client/windows/client-gui/main-app.cpp @@ -0,0 +1,789 @@ + +#include "main-app.h" + +#include + + +#ifndef WIN32 + #define __declspec(x) /* to null out the DLL export compiler operatives on non-windows machines */ +#endif + +#ifdef ORANGEFS_DEBUG + const char *debugLogFilename = "C:\\Users\\Trent\\My Documents\\Visual Studio 2012\\Projects\\test-orangefs-app\\debug\\debugLog.txt"; +#endif + +const int MAX_MNTENTS = 256; +const int DEFAULT_WIN_WIDTH = 1024; +const int DEFAULT_WIN_HEIGHT = 800; +const char *TABFILE = "\\orangefstab"; +const wxString APP_LOGO_NAME = "OrangeFS_LOGO.png"; + +MainApp *MAIN_APP; +MainFrame *MAIN_FRAME; +static char **mainFileListing; +vector deleteIndexes(0); +DirHandler *changeHandler; +DirWatcher *dirWatcher; + +/* to determine whether the sync is for a new or existing file/dir */ +static SYNC_TYPE SyncType; + +unsigned int __stdcall updateAll(void *parms); /* thread update routine */ +static void CALLBACK InterpretDirChanges(DWORD errorCode, DWORD bytes, LPOVERLAPPED over); /* callback for asynchronous directory changes */ + +/* give life to the singleton objects */ +FileListHandler *FileListHandler::instance = NULL; +MetadataHandler *MetadataHandler::instance = NULL; +Utils *Utils::instance = NULL; + +BEGIN_EVENT_TABLE(MainFrame, wxFrame) + EVT_MENU(ID_FILE_QUIT, MainFrame::onQuit) + EVT_MENU(ID_FILE_ABOUT, MainFrame::onAbout) + EVT_MENU(ID_VIEW_PERMISSIONS, MainFrame::showPermissions) + EVT_MENU(ID_VIEW_SIZE, MainFrame::showFileSize) + EVT_MENU(ID_VIEW_MODIFIED, MainFrame::showLastModified) + EVT_MENU(ID_SETTINGS_CONFIG, MainFrame::showConfigDialog) + EVT_MENU(ID_NEW_SYNC, MainFrame::showNewSyncDialog) +END_EVENT_TABLE() + +/* sets up the required "main" */ +IMPLEMENT_APP(MainApp) + +void MainApp::printLastWinError() +{ + DWORD errCode = GetLastError(); + char *winError; + void *msgBuffer; + + FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + errCode, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (char *) &msgBuffer, + 0, NULL); + + winError = (char *) malloc(25 + strlen((char *)msgBuffer)); + strcpy(winError, "---- WINDOWS ERROR : "); + strcat(winError, (char *) msgBuffer); + + OutputDebugString(winError); + + free(winError); +} + +void MainApp::cleanupApp() +{ + orangefs_cleanup_credentials(rootCred); + free(rootCred); + + for (int i=0; i < MAX_MNTENTS; i++) + { + free(mntents[i]); + + if (mainFileListing) + { + if (mainFileListing[i]) + { + free(mainFileListing[i]); + } + } + } + free(mntents); + + if (mainFileListing) + free(mainFileListing); + + free(rootSysAttr); + + deleteIndexes.clear(); + + + delete changeHandler; + delete dirWatcher; + delete localConfig; + delete MetadataHandler::getInstance(); +} + +void MainApp::initFileSystem() +{ + char error_msg[MAX_PATH]; + int ret = -1; + + if ((ret = orangefs_initialize(0, rootCred, mntents[0], error_msg, MAX_PATH, TABFILE, OrangeFS_DEBUG_FILE | OrangeFS_DEBUG_MVS, debugLogFilename)) == -1) + { + orangefs_debug_print("Failed to initialize file system\nMake sure the orangefs tabfile is in the proper directory"); + } + + orangefs_debug_print("---- Initialized connection to OrangeFS ----\n"); + + orangefs_load_tabfile(TABFILE, mntents, error_msg, MAX_PATH); /* currently unimplemented */ +} + +void MainApp::allocateMembers() +{ + /* need to allocate the credential before calling credential functions */ + rootCred = (OrangeFS_credential *) malloc(sizeof(OrangeFS_credential)); + + /* set up the root user credentials */ + orangefs_credential_init(rootCred); + orangefs_credential_set_user(rootCred, 0); + orangefs_credential_add_group(rootCred, 0); /* add root user to root group */ + orangefs_credential_set_timeout(rootCred, ORANGEFS_DEFAULT_CREDENTIAL_TIMEOUT); /* 1 hour */ + + /* this method of allocation might have to be changed with large numbers of files + * considering we can't put all this in memory at once on all systems */ + rootSysAttr = (OrangeFS_attr *)malloc(MAX_FILES * sizeof(OrangeFS_attr)); + memset(rootSysAttr, 0, MAX_FILES * sizeof(OrangeFS_attr)); + + mntents = (OrangeFS_mntent **)malloc(MAX_MNTENTS * sizeof(OrangeFS_mntent *)); + for (int i=0; i < MAX_MNTENTS; i++) + { + mntents[i] = (OrangeFS_mntent *)malloc(sizeof(OrangeFS_mntent)); + memset(mntents[i], 0, sizeof(OrangeFS_mntent)); + } +} + +bool MainApp::OnInit() +{ + synced = false; + num_files = 0; + screen_height = wxGetDisplaySize().GetHeight(); + screen_width = wxGetDisplaySize().GetWidth(); + endUpdating = false; + SyncType = SYNC_NEW; + + /* give global main app handle a pointer to the app */ + MAIN_APP = this; + + orangefs_enable_debug( OrangeFS_DEBUG_FILE | OrangeFS_DEBUG_MVS, debugLogFilename, OrangeFS_CLIENT_DEBUG | OrangeFS_GETATTR_DEBUG | OrangeFS_SETATTR_DEBUG); + + allocateMembers(); + + initFileSystem(); + + /* get all the file system names */ + for (int i=0; i < mntents[0]->num_orangefs_config_servers; i++) + { + fsNames.Add(mntents[i]->orangefs_fs_name); + } + + fsNames.Add("Other file system"); + + MAIN_FRAME = new MainFrame("OrangeFS File Browser", + wxPoint((screen_width/2) - (DEFAULT_WIN_WIDTH/2), /* middle of screen */ + (screen_height/2) - (DEFAULT_WIN_HEIGHT/2)), + wxSize(DEFAULT_WIN_WIDTH, DEFAULT_WIN_HEIGHT)); + + /* load up the local configurations */ + localConfig = new LocalConfig; + + /* parses the local metadata file and loads all runtime cache maps */ + metadataHandler = MetadataHandler::getInstance(); + + orangefs_debug_print("---- Parsed metadata file and loaded cache ----\n"); + + /* if there is an existing configuration */ + if( localConfig->load() ) + { + orangefs_debug_print("Using existing sync configuration from file : %s\n", localConfig->getConfigPath() ); + } + else + { + orangefs_debug_print("No existing sync config file found.\n"); + } + + /* now, just check for updates */ +#ifdef WIN32 + HANDLE threadHandle; + + /* spawn a new thread to handle the syncing; if the user closes the app while it's still syncing, the app window will become invisible, but the sync thread will still be running */ + threadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) updateAll, 0, 0, NULL); + + /* give the main app the handle so it can determine what it's finished */ + MAIN_APP->setThreadHandle(threadHandle); +#endif + + /* now that we've loaded (or not loaded) locally synced files, display the file browser */ + MAIN_FRAME->Show(true); + SetTopWindow(MAIN_FRAME); + + return true; +} + + +/* caller allocates input string */ +void MainApp::getAbsoluteRunningPath(char *fileName) /* local util to get absolute path to logo png file */ +{ +/* TODO + * add the same funtionality for linux */ + +#ifdef WIN32 + char exe_path[MAX_PATH]; + char *logoFile, *ptr; + int ret, malloc_flag; + + ret = GetModuleFileName(NULL, exe_path, MAX_PATH); + if (ret) + { + logoFile = (char *) malloc(MAX_PATH); + malloc_flag = TRUE; + + /* cut off the exe file name, just get up to last directory */ + ptr = strrchr(exe_path, '\\'); + if (ptr) + *ptr = '\0'; + + strcpy(logoFile, exe_path); + strcat(logoFile, "\\"); + strcat(logoFile, fileName); + + memset(fileName, 0, strlen(fileName)); + + strcpy(fileName, logoFile); + } + + if (malloc_flag) + free(logoFile); +#endif +} + +void MainApp::syncDir(const wxString &dir) +{ + wxString absolutePath = localConfig->getSyncPath(); + absolutePath += dir; + absolutePath += '\\'; + + /* first, create the directory if it doesn't exist */ +#ifndef WIN32 + if ( !wxDirExists(absolutePath) ) + { + mkdir(absolutePath.Trim(), 0700); + } +#else + if ( !wxDirExists(absolutePath.Trim()) ) + { + if ( !CreateDirectory(absolutePath.c_str(), NULL) ) + { + orangefs_debug_print("Failed to create directory : %s\n", absolutePath.c_str()); + MAIN_APP->printLastWinError(); + } + } +#endif + +} + +void MainApp::syncFile(const wxString &file, const OrangeFS_size &size) +{ + long bytesCopied = 0; + char buffer[262144]; /* 256 KB buffer */ + OrangeFS_size buffSize = 262144; + FILE *fileToSync; + bool copy = true; + wxString absolutePath = localConfig->getSyncPath(); + + if ( !file ) { + orangefs_debug_print("ERROR - no file string passed in to syncFile()\n"); + } + + absolutePath += file; + +#ifndef WIN32 + if ( access(absolutePath.c_str(), F_OK) == -1 ) +#else + if ( _access(absolutePath.c_str(), 0) == -1 ) +#endif + { + orangefs_debug_print("FILE : %s doesn't already exist. Creating it..\n", absolutePath.c_str()); + /* it doesn't exist, so create it and return for next time */ + fileToSync = fopen(absolutePath.c_str(), "w"); + fclose(fileToSync); + return; + } + orangefs_debug_print("OPENING FILE : %s\n", absolutePath.c_str()); + fileToSync = fopen(absolutePath.c_str(), "a"); + + if (SyncType == SYNC_NEW) + { + while (copy) + { + /* remaining file data to read is less than buffer size, adjust read_size accordingly */ + if ((size - bytesCopied) < buffSize) + { + buffSize = (size - bytesCopied); + orangefs_read(&mntents[0]->fs_id, rootCred, const_cast(file.c_str()), buffer, 262144, bytesCopied, &buffSize); + bytesCopied += buffSize; + + /* stop copying after this iteration */ + copy = !copy; + } + else + { + orangefs_read(&mntents[0]->fs_id, rootCred, const_cast(file.c_str()), buffer, 262144, bytesCopied, &buffSize); + bytesCopied += buffSize; + } + orangefs_debug_print("BUFFER : %s\n", buffer); + /* now copy the buffer to the local file */ + fprintf(fileToSync, "%s", buffer); + + /* reset buffer */ + memset(buffer, 0, 262144); + } + } + + if (SyncType == SYNC_EXISTING) + { + orangefs_debug_print("---- UPDATING EXISTING FILE : %s ----", file.c_str()); + + } + + fclose(fileToSync); +} + +MainFrame::MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size) + : wxFrame( NULL, -1, title, pos, size ) +{ + /* set the global window handle */ + MAIN_FRAME = this; + + windowSize = size; + + /* set up the singleton object */ + fileHandler = FileListHandler::getInstance(); + + wxImage::AddHandler( new wxPNGHandler ); + + char *logoPath = (char *) malloc( MAX_PATH ); + strcpy(logoPath, APP_LOGO_NAME); + MAIN_APP->getAbsoluteRunningPath( logoPath ); + + wxIcon mainIcon(logoPath, wxBITMAP_TYPE_PNG, 32, 32); + + this->SetIcon(mainIcon); + + free(logoPath); + + mainMenuBar = new wxMenuBar(); /* create the main menu bar */ + + file = new wxMenu; /* create the "File" dropdown menu tab */ + file->Append( ID_FILE_ABOUT, "&About.."); /* add "About to the "File" dropdown menu */ + file->AppendSeparator(); /* adds a line separator to the menu beneath "File" */ + file->Append( ID_FILE_QUIT, "E&xit"); + + view = new wxMenu; /* create the "View" dropdown menu tab */ + view->AppendCheckItem( ID_VIEW_PERMISSIONS, "Permissions" ); /* adds a "checkable" menu item to "View" called "Permissions" */ + view->AppendSeparator(); + view->AppendCheckItem( ID_VIEW_SIZE, "File Size" ); + view->AppendSeparator(); + view->AppendCheckItem( ID_VIEW_MODIFIED, "Last Modified" ); + + settings = new wxMenu; + settings->Append( ID_SETTINGS_CONFIG, "Configuration" ); + + newSync = new wxMenu; + newSync->Append( ID_NEW_SYNC, "Add Sync Folder" ); + + mainMenuBar->Append( file, "&File"); /* add the "File" dropdown tab to the main menu bar */ + mainMenuBar->Append( view, "&View"); + mainMenuBar->Append( settings, "&Settings"); + mainMenuBar->Append( newSync, "&New"); + + SetMenuBar( mainMenuBar ); /* set the main manu bar as the visible menu bar */ + + this->CreateStatusBar(); + this->SetStatusText("File Syncing Complete"); + + fileHandler->addColumn("File Name"); +} + +MainFrame::~MainFrame() +{ + if (this->IsVisible()) + { + Close(true); + MAIN_APP->stopUpdating(); + } + + MAIN_APP->cleanupApp(); + delete FileListHandler::getInstance(); +} + +void MainFrame::onQuit(wxCommandEvent &WXUNUSED(event)) +{ + Close(true); +} + +void MainFrame::onAbout(wxCommandEvent & WXUNUSED(event)) +{ + wxMessageBox( "Developed by: Trent Vigar\nClemson University and Omnibond LLC", + "OrangeFS File Browser v1.0", + wxOK | wxICON_INFORMATION, this); +} + +void MainFrame::showConfigDialog(wxCommandEvent & WXUNUSED(event)) +{ + /******************************************************************************/ + /* This configuration dialog will show all the current FS sync configurations */ + /* and will allow the user to either edit them or delete them */ + /******************************************************************************/ +} + +void MainFrame::showNewSyncDialog(wxCommandEvent & WXUNUSED(event)) +{ + int ret; + + newSyncDialog = new SyncDialog(NULL, /* parent window will be the application's top level window */ + ID_SYNC_DIALOG, /* dialog unique identifier */ + "Setup New File System Sync Folder", /* window title */ + wxDefaultPosition, /* position */ + wxSize(500, 270), /* dialog size */ + wxDEFAULT_DIALOG_STYLE +#ifdef __APPLE__ + | wxDIALOG_EX_METAL /* on Mac OS X, shows a metallic look */ +#endif + , MAIN_APP->getFileSysNames() /* array of file system names to be displayed in combo box */ + ); + + newSyncDialog->Show(TRUE); + this->Centre(wxBOTH); /* centers the dialog both horizontally and vertically on the parent window */ + + ret = newSyncDialog->ShowModal(); + + if (ret == wxID_CANCEL) /* the dialog was exited */ + { + /* save the new sync folder data to the local config object */ + MAIN_APP->saveConfig(); + + newSyncDialog->Close(TRUE); + delete newSyncDialog; + } + else /* unexpected return from file browser event handler */ + { + orangefs_debug_print("ERROR : unexpected return from file browser dialog\n"); + } +} + +void MainFrame::showPermissions(wxCommandEvent & WXUNUSED(event)) +{ + if ( view->IsChecked( ID_VIEW_PERMISSIONS ) ) /* if the "Permissions" view is now checked, add the column */ + { + fileHandler->addColumn("Permissions"); /* currently just adds to both, later add submenu inside the "View" menu to choose to check columns for each list */ + } + else /* otherwise, remove the column and resize the other column(s) */ + { + fileHandler->removeColumn("Permissions"); + } +} + +void MainFrame::showFileSize(wxCommandEvent & WXUNUSED(event)) +{ + if ( view->IsChecked( ID_VIEW_SIZE ) ) /* if the "File Size" view is now checked, add the column */ + { + fileHandler->addColumn("File Size"); + } + else /* otherwise, remove the column and resize the other column(s) */ + { + fileHandler->removeColumn("File Size"); + } +} + +void MainFrame::showLastModified(wxCommandEvent & WXUNUSED(event)) +{ + if ( view->IsChecked( ID_VIEW_MODIFIED ) ) /* if the "Last Modified" view is now checked, add the column */ + { + fileHandler->addColumn("Last Modified"); + } + else /* otherwise, remove the column and resize the other column(s) */ + { + fileHandler->removeColumn("Last Modified"); + } +} + +unsigned int __stdcall updateAll(void *parms) +{ + unsigned int ret = 0; + OrangeFS_size fileSize; + FileListHandler *syncList = FileListHandler::getInstance(); + MetadataHandler *metadataHandler = MetadataHandler::getInstance(); + wxString statusBarString = "Updated "; + int numRetrieved = 0; + int numCreated = 0; + int numDeleted = 0; + static int timesUpdated = 1; + OrangeFS_ds_position ds_token; + bool filesCreated = false; + bool filesDeleted = false; + bool syncFlag = false; + + mainFileListing = (char **) malloc(MAX_FILES * sizeof(char *)); + for (int i=0; i < MAX_FILES; i++) + { + mainFileListing[i] = (char *) malloc(MAX_PATH); + memset(mainFileListing[i], 0, MAX_PATH); + } + + /* if the sync configuration has not been set, we'll wait for it and stay in the thread */ + do + { + if ( MAIN_APP->syncExists() ) + { + syncFlag = true; + } + else + { + orangefs_debug_print("---- Unable to find sync configuration... Waiting 5 seconds ----\n"); +#ifdef WIN32 + Sleep(5000); +#else + sleep(5000); +#endif + continue; + } + } while ( !syncFlag ); + + /* register our local directory listener for changes to files locally */ + /* for now, we'll just monitor the root dir */ + MAIN_APP->setLocalSyncPath( MAIN_APP->getLocalSyncPath().substr(0, MAIN_APP->getLocalSyncPath().length()-1) ); /* set sync path without trailing '/' */ + + orangefs_debug_print("Local sync path : %s\n", MAIN_APP->getLocalSyncPath().c_str()); + + /* subscribe to changes on our local sync directory */ + changeHandler = new DirHandler(); + dirWatcher = new DirWatcher(); + dirWatcher->watchDirectory(MAIN_APP->getLocalSyncPath(), + FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_SIZE | FILE_NOTIFY_CHANGE_LAST_WRITE, + changeHandler, + false); + + /*****************************************/ + /* */ + /* MAIN SYNC UPDATE LOOP */ + /* */ + /*****************************************/ + do + { + ds_token = ORANGEFS_READDIR_START; + filesCreated, filesDeleted = false; + + /* get a listing of all the files currently on the orangefs server at the subscribed directory/directories (for now, it's the root directory until we add different sync paths to the local config) */ + orangefs_find_files(&MAIN_APP->getMntentAt(0)->fs_id, MAIN_APP->getCred(), "/", &ds_token, MAX_FILES, &numRetrieved, mainFileListing, MAIN_APP->getAttr()); + + /* set up the remote files runtime maps accessible by index or filename */ + for (int i=0; i < numRetrieved; i++) + { + wxString temp = mainFileListing[i]; + + metadataHandler->addRemoteToRuntime(temp, i); + } + + /* if the number of files changed, determine if file(s) was deleted or created */ + if (MAIN_APP->getNumFiles() != numRetrieved) + { + /* file(s) was deleted */ + if (numRetrieved < MAIN_APP->getNumFiles()) + { + /* set a flag so we know the list control needs to be updated */ + filesDeleted = true; + numDeleted = MAIN_APP->getNumFiles() - numRetrieved; + orangefs_debug_print("NUM LOCAL : %d - NUM RETRIEVED : %d = NUM DELETED : %d\n", MAIN_APP->getNumFiles(), numRetrieved, numDeleted); + } + + /* file(s) was created */ + if (numRetrieved > MAIN_APP->getNumFiles()) + { + filesCreated = true; + numCreated = numRetrieved - MAIN_APP->getNumFiles(); + orangefs_debug_print("NUM RETRIEVED: %d - NUM LOCAL : %d = NUM CREATED : %d\n", numRetrieved, MAIN_APP->getNumFiles(), numCreated); + } + } + + /**************************************************************************************/ + /* Here, we will check a few things to determine if things need to be updated locally */ + /* - compare the last modified times of the subscribed files on the server from */ + /* the last update to the current update, if they're different, something was */ + /* obviously changed and we'll do a low level scan and sync for the modified */ + /* binary data */ + /**************************************************************************************/ + for (int i=0; i < numRetrieved; i++) + { + /* go through all the files saved locally */ + for (int j=0; j < metadataHandler->getNumFiles(); j++) + { + if ( !metadataHandler->getFileName(j).compare( metadataHandler->getRemoteFileName(i) ) ) /* we have found a file that is both on the server and locally stored */ + { + if ( metadataHandler->getFileModTime( metadataHandler->getFileName(j) ) == MAIN_APP->getAttr()[i].mtime ) + { + /* the mod times match, keep going until we find non-matching times */ + continue; + } + else + { + /* modified times don't match, update the modified time locally, and do low-level data copy */ + /* updateFileMetadata() not only adds the metadata to the application's data file, but updates all the hash maps that store the metadata during runtime */ + metadataHandler->updateFileMetadata(metadataHandler->getFileName(j), &MAIN_APP->getAttr()[i]); + + /****************************************************************************/ + /* FILES TO SYNC : */ + /* local copy that needs updating : metadataHandler->getFileName(j) */ + /* remote copy to sync data from : mainFileListing[i] */ + /****************************************************************************/ + SyncType = SYNC_EXISTING; + + MAIN_APP->syncFile(metadataHandler->getFileName(j), MAIN_APP->getAttr()[i].size); /* passing in size of remote file to sync */ + syncList->updateList(MAIN_APP->getFileName(i)); + } + } + } + } + + /* find which files need to be created (if any) */ + if (filesCreated) + { + for (int i=0; i < numRetrieved; i++) + { + /* server file was not found locally, needs to be created/synced */ + if ( !metadataHandler->isServerOnLocal( metadataHandler->getRemoteFileName(i) ) ) + { + SyncType = SYNC_NEW; + + orangefs_debug_print("FILE NAME : %s\n", metadataHandler->getRemoteFileName(i).c_str()); + + /* sync the file/folder over, then add the file metadata to the data file and runtime maps */ + if ( MAIN_APP->getAttr()[i].objtype == OrangeFS_TYPE_DIRECTORY ) + { + MAIN_APP->syncDir(metadataHandler->getRemoteFileName(i)); + } + else + { + MAIN_APP->syncFile(metadataHandler->getRemoteFileName(i), MAIN_APP->getAttr()[i].size); + } + metadataHandler->addFileMetadata(metadataHandler->getRemoteFileName(i), &MAIN_APP->getAttr()[i]); + syncList->updateList(metadataHandler->getRemoteFileName(i)); + } + } + } + + deleteIndexes.reserve(MAIN_APP->getNumFiles()); /* if all the files on the server were deleted, getNumFiles() would appropriately hold index for all of them */ + if (filesDeleted) + { + for (int i=0; i < MAIN_APP->getNumFiles(); i++) + { + /* the local file wasn't found on the server, delete locally */ + if ( !metadataHandler->isLocalOnServer( metadataHandler->getFileName(i) ) ) + { + /* THIS ISN"T WORKING, GETS IN HERE EVERY TIME */ + + orangefs_debug_print("---- ADDDED index : %d\n", i); + deleteIndexes.push_back(i); + } + } + + orangefs_debug_print("NUM FILES FOR DELETE : %d\n", deleteIndexes.size()); + /* now we have the indexes of files stored locally to be deleted */ + for (int i=0; i < deleteIndexes.size(); i++) + { + /***********************************************************************************************/ + /* we will need to delete the actual file, and all of it's traces at the following locations : */ + /* */ + /* 1) the physical file on the local hard disk */ + /* 2) the metadata entry from the metadata file */ + /* 3) the list control entry for the file */ + /* 4) the runtime maps */ + /***********************************************************************************************/ + /* (1) */ + wxString fullPath = MAIN_APP->getLocalSyncPath(); + fullPath += metadataHandler->getFileName(i); +#ifdef WIN32 + DeleteFile(fullPath.c_str()); +#elif + remove(fullPath.c_str()); +#endif + /* (2) and (4) */ + metadataHandler->removeFile(metadataHandler->getFileName(i)); + + /* (3) */ + MAIN_FRAME->fileHandler->removeListData(metadataHandler->getFileName(i)); + } + } + +#ifdef WIN32 + Sleep(5000); /* Wait 5 seconds before checking for updates again */ +#elif + sleep(5000); /* maybe in the future have the user set this value in the app configuration */ +#endif + + stringstream ss; + ss << timesUpdated; + + /* clear and refresh the status text */ + statusBarString.clear(); + statusBarString = "Updated "; + + statusBarString += ss.str(); + statusBarString += " times"; + MAIN_FRAME->setStatusbarText(statusBarString); + timesUpdated++; + + }while(!MAIN_APP->stillUpdating()); /* keep checking for new files or existing file modifications on the subscribed dirs/files */ + + +done_syncing: + + /* let the app know we're finished syncing */ + MAIN_APP->finishedSyncing(true); + + orangefs_debug_print("---- Syncing Completed ----\n"); + + for (int i=0; i < MAX_FILES; i++) + { + free(mainFileListing[i]); + } + free(mainFileListing); + + deleteIndexes.clear(); + + LPDWORD exitCode; + GetExitCodeThread(dirWatcher->getThreadHandle(), exitCode); + TerminateThread(dirWatcher->getThreadHandle(), *exitCode); + + return ret; +} + +static void CALLBACK InterpretDirChanges(DWORD error, DWORD bytes, LPOVERLAPPED over) +{ + AsynchronousData *data = (AsynchronousData *) over; + FILE_NOTIFY_INFORMATION *changes = (FILE_NOTIFY_INFORMATION *) &data->buffer[0]; + char *localBuff = (char *) malloc(512); + + free(over); + + orangefs_debug_print("IN CALLBACK!\n"); + + wcstombs(localBuff, changes->FileName, changes->FileNameLength); + switch (changes->Action) + { + case FILE_ACTION_ADDED: + orangefs_debug_print("FILE ADDED : %s\n", localBuff); + break; + case FILE_ACTION_REMOVED : + orangefs_debug_print("FILE REMOVED : %s\n", localBuff); + break; + case FILE_ACTION_MODIFIED: + orangefs_debug_print("FILE UPDATED : %s\n", localBuff); + break; + case FILE_ACTION_RENAMED_OLD_NAME: + orangefs_debug_print("FILE RENAMED, OLD NAME : %s\n", localBuff); + break; + case FILE_ACTION_RENAMED_NEW_NAME: + orangefs_debug_print("FILE RENAMED, NEW NAME : %S\n", localBuff); + break; + default: + orangefs_debug_print("UNHANDLED DIRECTORY CHANGE : %s\n", localBuff); + break; + } + + free(localBuff); +} + + diff --git a/src/client/windows/client-gui/main-app.h b/src/client/windows/client-gui/main-app.h new file mode 100644 index 0000000..bb43001 --- /dev/null +++ b/src/client/windows/client-gui/main-app.h @@ -0,0 +1,198 @@ + +/* This program is currently using version 2.8.12 (Stable) of the wxWidgets API */ +/* This version was released in March 2011 */ +/* The "trunk" version has documentation updated in July 2012 */ +/* The version before trunk was 2.9.5 */ + +#ifndef __MAIN_APP_H +#define __MAIN_APP_H + +/*****************************/ +/* for memory leak detection */ +/*****************************/ +#include "memLeaks.h" +#include +/*****************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "filelisthandler.h" +#include "localConfig.h" +#include "syncDialog.h" +#include "metadata.h" +#include "dirListener.h" +#include "utils.h" + +#ifdef WIN32 + #include + #include +#endif + +#ifndef WIN32 + #include + #define MAX_PATH 255 +#endif + +using std::cout; +using std::endl; +using std::cerr; +using std::map; +using std::stringstream; +using std::vector; + +const OrangeFS_ds_position ORANGEFS_READDIR_START = INT32_MAX - 1; +const int MAX_FILES = 256; + +typedef struct +{ + OVERLAPPED overlapped; + wchar_t *buffer; +}AsynchronousData; + +enum SYNC_TYPE +{ + SYNC_NEW = 1, + SYNC_EXISTING = 2 +}; + +enum ID +{ + ID_FILE_QUIT = 1, + ID_FILE_ABOUT = 2, + ID_VIEW_PERMISSIONS = 3, + ID_VIEW_SIZE = 4, + ID_VIEW_MODIFIED = 5, + ID_SETTINGS_CONFIG = 6, + LIST_CTRL_REMOTE = 7, + ID_NEW_SYNC = 8, + ID_SYNC_DIALOG = 9, + ID_FS_SELECTOR = 10, + ID_BROWSE_BUTTON = 11, + ID_SYNC_ALL_BUTTON = 12, + ID_SELECT_SYNC_BUTTON = 13 +}; + +class MainApp: public wxApp +{ +public: + virtual bool OnInit(); + void initFileSystem(); + void allocateMembers(); + void cleanupApp(); + + void printLastWinError(); + + short int getNumFiles() const { return num_files; } + wxString getFileName(int index) const { return fileListing[index]; } + wxArrayString getFileSysNames() const { return fsNames; } + OrangeFS_attr getFileAttrs(int index) const { return rootSysAttr[index]; } + short int getScreenHeight() const { return screen_height; } + short int getScreenWidth() const { return screen_width; } + wxString getLocalSyncPath() const { return localConfig->getSyncPath(); } + HANDLE getThreadHandle() const { return syncThread; } + OrangeFS_mntent* getMntentAt(int index) { return mntents[0]; } + OrangeFS_credential* getCred() const { return rootCred; } + OrangeFS_attr* getAttr() const { return rootSysAttr; } + void finishedSyncing(bool done) { synced = done; } + bool getSyncStatus() const { return synced; } + int getFileIndex(const wxString &name) { return fileIndexes[name]; } + void getAbsoluteRunningPath(char *logoName); + bool stillUpdating() const { return endUpdating; } + + void setLocalSyncPath(const wxString path) { localConfig->setSyncPath(path); } + void setNumFiles(int num) { num_files = num; } + void setFsSelection(const wxString selection) { localConfig->setFsSelection(selection); } + void setThreadHandle(HANDLE thread) { syncThread = thread; } + void setThreadFlag(bool flag) { threadRun = flag; } + + bool getThreadFlag() const { return threadRun; } + + bool syncExists() + { + if ( localConfig->syncExists() ) + return true; + else + return false; + return false; + } + + void saveConfig() { localConfig->save(); } + void syncDir(const wxString &dir); + void syncFile(const wxString &file, const OrangeFS_size &size); + + void stopUpdating() { endUpdating = true; } + + void addFileToListing(char *file) { fileListing.Add(file, 1); } + void addFileIndex(wxString &name, int index) { fileIndexes.insert(std::make_pair(name, index)); } + void addMetadata(const wxString &filename, const OrangeFS_attr *fileAttr) { metadataHandler->addFileMetadata(filename, fileAttr); } + +private: + wxArrayString fileListing; + wxArrayString fsNames; + + bool threadRun; + + OrangeFS_credential *rootCred; + LocalConfig *localConfig; + OrangeFS_attr *rootSysAttr; + OrangeFS_mntent **mntents; + short int num_files; + short int screen_height; + short int screen_width; + bool synced; + bool endUpdating; + map fileIndexes; + MetadataHandler *metadataHandler; + +#ifdef WIN32 + HANDLE syncThread; + HANDLE updateThread; +#endif +}; + +class MainFrame: public wxFrame +{ +public: + MainFrame(const wxString &title, const wxPoint &pos, const wxSize &size); + MainFrame(const MainFrame& mf); + MainFrame& operator=(const MainFrame &mf); + ~MainFrame(); + + /* top menu bar */ + wxMenuBar *mainMenuBar; + wxMenu *file; + wxMenu *view; + wxMenu *settings; + wxMenu *newSync; + + wxSize windowSize; + FileListHandler *fileHandler; + SyncDialog *newSyncDialog; + + void onQuit(wxCommandEvent &event); + void onAbout(wxCommandEvent &event); + void showConfigDialog(wxCommandEvent &event); + void showNewSyncDialog(wxCommandEvent &event); + void showPermissions(wxCommandEvent &event); + void showFileSize(wxCommandEvent &event); + void showLastModified(wxCommandEvent &event); + wxSize getWinSize() const { return windowSize; } + void setStatusbarText(wxString &string) { this->SetStatusText(string); } + void onBrowseButtonClicked(wxCommandEvent &event); + void addLocalFileToSyncList(wxString &colName, wxString &name) { fileHandler->addListData(colName, name); } + void setWinFileAttrs(OrangeFS_attr attr, HANDLE handle) { newSyncDialog->setWinFileAttrs(attr, handle); } + + FileListHandler* getListHandler() { return fileHandler->getInstance(); } + + DECLARE_EVENT_TABLE() +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/memLeaks.h b/src/client/windows/client-gui/memLeaks.h new file mode 100644 index 0000000..f4c5083 --- /dev/null +++ b/src/client/windows/client-gui/memLeaks.h @@ -0,0 +1,8 @@ +#ifndef __MEMLEAKS_H +#define __MEMLEAKS_H + +#define _CRTDBG_MAP_ALLOC +#include +#include + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/metadata.cpp b/src/client/windows/client-gui/metadata.cpp new file mode 100644 index 0000000..4f899db --- /dev/null +++ b/src/client/windows/client-gui/metadata.cpp @@ -0,0 +1,330 @@ +#include "main-app.h" + +#define BUFFERSIZE 512 +#define COPYBUFFSIZE 1048576 /* 1 MB */ + +typedef struct +{ + char *fName; + OrangeFS_attr *attr; +}MetadataRecord; + +extern MainApp *MAIN_APP; + +void *memcat(void *parm1, size_t size1, void *parm2, size_t size2); + +MetadataHandler::MetadataHandler() : num_files(0), file_index(0) +{ + DATA_FILE_PATH = (char *) malloc(MAX_PATH); + strcpy(DATA_FILE_PATH, DATA_FILE_NAME); + MAIN_APP->getAbsoluteRunningPath( DATA_FILE_PATH ); + + parseDataFile(DATA_FILE_PATH); +} + +void MetadataHandler::parseDataFile(const wxString &path) +{ +#ifndef WIN32 + if ( access(DATA_FILE_PATH.c_str(), F_OK) == -1 ) +#else + if ( _access(DATA_FILE_PATH, 0) == -1 ) +#endif + { + /* it doesn't exist, so create it and return for next time */ + fileHandle = fopen(DATA_FILE_PATH, "wb"); + fclose(fileHandle); + + orangefs_debug_print("No existing metadata file. Creating one.\n"); + + /* if a sync configuration exists, we can populate the data file here, if not, we'll wait until one is created (this is done in the main update loop) */ + if ( MAIN_APP->syncExists() ) + { + HANDLE hDir = INVALID_HANDLE_VALUE; + WIN32_FIND_DATA fileData; + + hDir = FindFirstFile( MAIN_APP->getLocalSyncPath().c_str(), &fileData ); + if ( hDir == INVALID_HANDLE_VALUE ) + { + orangefs_debug_print("ERROR listing contents of directory : %s\n", MAIN_APP->getLocalSyncPath().c_str()); + MAIN_APP->printLastWinError(); + return; + } + + do + { + /* directory */ + if ( fileData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY ) + { + + } + else + { + wxString fileName = fileData.cFileName; + OrangeFS_attr attr; + LARGE_INTEGER fileSize; + Utils *utils = Utils::getInstance(); + + fileSize.LowPart = fileData.nFileSizeLow; + fileSize.HighPart = fileData.nFileSizeHigh; + + attr.atime = utils->winFiletimeToOrangeFS(fileData.ftLastAccessTime); + attr.mtime = utils->winFiletimeToOrangeFS(fileData.ftLastWriteTime); + attr.ctime = utils->winFiletimeToOrangeFS(fileData.ftCreationTime); + attr.objtype = OrangeFS_TYPE_NONE; + attr.size = fileSize.QuadPart; + attr.perms = (OrangeFS_permissions) 0775; + + MAIN_APP->addMetadata(fileName, &attr); + } + } while( FindNextFile(hDir, &fileData) != 0 ); + } + + return; + } + + char name_buffer[BUFFERSIZE]; + OrangeFS_attr *tempAttr = (OrangeFS_attr *) malloc(sizeof(OrangeFS_attr)); + + fileHandle = fopen(DATA_FILE_PATH, "rb"); + + orangefs_debug_print("Found existing metadata file.\n"); + + while (1) + { + if ( !fgets(name_buffer, BUFFERSIZE, fileHandle) ) + break; + + wxString tempName = name_buffer; + fread(tempAttr, sizeof(OrangeFS_attr), 1, fileHandle); + + fileNames.insert(std::make_pair(num_files, tempName)); + fileIndexes.insert(std::make_pair(tempName, num_files)); + + num_files++; + + fileTypes.insert(std::make_pair(name_buffer, tempAttr->objtype)); + fileSizes.insert(std::make_pair(name_buffer, tempAttr->size)); + filePerms.insert(std::make_pair(name_buffer, tempAttr->perms)); + fileModTimes.insert(std::make_pair(name_buffer, tempAttr->mtime)); + fileCreateTimes.insert(std::make_pair(name_buffer, tempAttr->ctime)); + fileAccessTimes.insert(std::make_pair(name_buffer, tempAttr->atime)); + + memset(tempAttr, 0, sizeof(OrangeFS_attr)); + } + free(tempAttr); + fclose(fileHandle); +} + +void MetadataHandler::addFileMetadata(const wxString &name, const OrangeFS_attr *attr) +{ + fileHandle = fopen(DATA_FILE_PATH, "ab"); + + fileIndexes.insert(std::make_pair(name, file_index)); + fileNames.insert(std::make_pair(file_index++, name)); + fileTypes.insert(std::make_pair(name, attr->objtype)); + fileSizes.insert(std::make_pair(name, attr->size)); + filePerms.insert(std::make_pair(name, attr->perms)); + fileModTimes.insert(std::make_pair(name, attr->mtime)); + fileCreateTimes.insert(std::make_pair(name, attr->ctime)); + fileAccessTimes.insert(std::make_pair(name, attr->atime)); + + wxString newlineName = name; + newlineName += '\n'; + fwrite(newlineName.c_str(), 1, (size_t) newlineName.length(), fileHandle); + fwrite(attr, sizeof(OrangeFS_attr), 1, fileHandle); + + fclose(fileHandle); +} + +void MetadataHandler::addRemoteToRuntime(wxString &name, int index) +{ + if ( !index ) /* we're adding a new set of remote files for a new update iteration, clear the maps */ + { + remoteFilesByIndex.clear(); + remoteFilesByName.clear(); + remoteFilesByIndex[index] = name; + remoteFilesByName[name] = index; + } + else + { + remoteFilesByIndex[index] = name; + remoteFilesByName[name] = index; + } +} + +/* returns true if the remote server file was found in the local sync path (useful in checking for files created on the server) */ +bool MetadataHandler::isServerOnLocal(const wxString &name) +{ + map::const_iterator it = fileSizes.find(name); + + /* the remote file was not found locally, the remote file will need to be created/synced locally */ + if (it == fileSizes.end()) + { + return false; + } + else + { + return true; + } + return false; +} + +/* returns true if the file synced locally is on the server (useful in checking for files deleted on the server) */ +bool MetadataHandler::isLocalOnServer(const wxString &name) +{ + map::const_iterator it = remoteFilesByName.find(name); + + /* the local file was not found on the server, the local file will need to be deleted */ + if (it == remoteFilesByName.end()) + { + orangefs_debug_print("Local file not found on server.\nDeleting : %s\n", name.c_str()); + return false; + } + else + { + orangefs_debug_print("Local file found on server.\nMoving on...\n"); + return true; + } + return false; +} + +/* the idea of this routine is to go through the metadata file until we find the filename + * pointed to by the "name" parameter, then copy over the "attr" parameter's data to the + * data immediately following the filename; we will also update the local maps */ +void MetadataHandler::updateFileMetadata(const wxString &name, const OrangeFS_attr *attr) +{ + void *buffer; + size_t bytesReturned = 0; + int count = 0; + + buffer = malloc(BUFFERSIZE); + + fileSizes[name] = attr->size; + filePerms[name] = attr->perms; + fileModTimes[name] = attr->mtime; + fileAccessTimes[name] = attr->atime; + + fileHandle = fopen(DATA_FILE_PATH, "r+b"); + + while ( (bytesReturned = fread(buffer, 1, strlen(fileNames[count++]), fileHandle)) ) + { + /* we have found the file name, now copy over the attr data */ + if ( !strncmp((char *) buffer, name, strlen(name)) ) + { + fwrite(attr, sizeof(OrangeFS_attr), 1, fileHandle); + goto cleanup; + } + else + { + /* skip through the file attributes (plus the newline char) to the next file name */ + fseek(fileHandle, sizeof(OrangeFS_attr)+1, SEEK_CUR); + } + } + +cleanup: + fclose(fileHandle); + free(buffer); +} + +void MetadataHandler::removeFile(const wxString &file) +{ + removeFileMetadata(file); + if ( fileSizes[file] ) + fileSizes.erase(file); + if ( fileNames[fileIndexes[file]] ) + // fileNames.erase(fileIndexes[file]); /* remove from here before fileIndexes while we can still access the index */ + if ( fileIndexes[file] ) + fileIndexes.erase(file); + if ( fileTypes[file] ) + fileTypes.erase(file); + if ( filePerms[file] ) + filePerms.erase(file); + if ( fileModTimes[file] ) + fileModTimes.erase(file); + if ( fileCreateTimes[file] ) + fileCreateTimes.erase(file); + if ( fileAccessTimes[file] ) + fileAccessTimes.erase(file); +} + +void MetadataHandler::removeFileMetadata(const wxString &file) +{ + void *copyBuffer, *buffer; + FILE *newFile; + fpos_t deletePos; + size_t bytesReturned = 1; + int count, numRecords = 0; + wxString newFileName = DATA_FILE_PATH; + MetadataRecord *tempRecord; + newFileName += ".save"; + + tempRecord = (MetadataRecord *) malloc(sizeof(MetadataRecord)); + tempRecord->fName = (char *) malloc(BUFFERSIZE); + tempRecord->attr = (OrangeFS_attr *) malloc(sizeof(OrangeFS_attr)); + copyBuffer = malloc(COPYBUFFSIZE); + buffer = malloc(BUFFERSIZE); + + fileHandle = fopen(DATA_FILE_PATH, "r+b"); + newFile = fopen(newFileName.c_str(), "wb"); + + while ( bytesReturned ) + { + memset(buffer, 0, BUFFERSIZE); + bytesReturned = fread(buffer, 1, strlen(fileNames[count]), fileHandle); + + /* we have found the file to remove */ + size_t checkSize = (strlen(fileNames[count]) > strlen(file)) ? strlen(fileNames[count]) : strlen(file); /* will scan through the larger filename to ensure uniqueness */ + if ( !strncmp((char *) buffer, file, checkSize) ) + { + /* now skip over copying it into the buffer */ + fseek(fileHandle, sizeof(OrangeFS_attr)+1, SEEK_CUR); + } + + /* keep building up the copy buffer and dump once at capacity (or eof) */ + if ( strlen((char *) copyBuffer) < COPYBUFFSIZE ) + { + memset(tempRecord, 0, sizeof(MetadataRecord)); + strcpy(tempRecord->fName, (char *) buffer); + + memset(buffer, 0, BUFFERSIZE); + fread(buffer, sizeof(OrangeFS_attr), 1, fileHandle); + memcpy(tempRecord->attr, buffer, sizeof(OrangeFS_attr)); + + /* then add the metadata record to the copyBuffer */ + memcat(copyBuffer, sizeof(MetadataRecord) * numRecords++, tempRecord, sizeof(MetadataRecord)); + } + else + { + /* dump the buffer and zero it out */ + fwrite(copyBuffer, 1, COPYBUFFSIZE, newFile); + memset(copyBuffer, 0, COPYBUFFSIZE); + numRecords = 0; + } + + ++count; + } + + /* now, delete the old data file and rename the new one */ +#ifdef WIN32 + DeleteFile(DATA_FILE_PATH); + MoveFile(newFileName.c_str(), DATA_FILE_PATH); +#elif + remove(DATA_FILE_PATH.c_str()); + rename(newFileName.c_str(), DATA_FILE_PATH.c_str()); +#endif + +cleanup: + free(copyBuffer); + free(buffer); + free(tempRecord->fName); + free(tempRecord->attr); + free(tempRecord); + fclose(fileHandle); + fclose(newFile); +} + +/* util routine for buffer concatenation */ +void *memcat(void *parm1, size_t size1, void *parm2, size_t size2) { + memcpy( (char*)parm1 + size1, parm2, size2); + return parm1; +} \ No newline at end of file diff --git a/src/client/windows/client-gui/metadata.h b/src/client/windows/client-gui/metadata.h new file mode 100644 index 0000000..2d6f499 --- /dev/null +++ b/src/client/windows/client-gui/metadata.h @@ -0,0 +1,64 @@ +#ifndef __METADATA_H +#define __METADATA_H + + +const wxString DATA_FILE_NAME = "METADATA.dat"; + +class MetadataHandler +{ +public: + static MetadataHandler* getInstance() { if (!instance) { instance = new MetadataHandler; } return instance; } + + ~MetadataHandler() { free( DATA_FILE_PATH ); } + + const int getNumFiles() const { return num_files; } + const int getFileIndex(const wxString& name) { return fileIndexes[name]; } + const wxString& getFileName(const int index) { return fileNames[index]; } + const OrangeFS_size& getFileSize(const wxString &name) { return fileSizes[name]; } + const OrangeFS_permissions& getFilePerms(const wxString &name) { return filePerms[name]; } + const OrangeFS_time& getFileModTime(const wxString &name) { return fileModTimes[name]; } + const OrangeFS_time& getFileCreateTime(const wxString &name) { return fileCreateTimes[name]; } + const OrangeFS_time& getFileAccessTime(const wxString &name) { return fileAccessTimes[name]; } + const OrangeFS_ds_type& getFileType(const wxString &name) { return fileTypes[name]; } + const map getFileNames() const { return fileNames; } + const map getFileSizes() const { return fileSizes; } + const wxString& getDataFilePath() const { return DATA_FILE_PATH; } + + void addRemoteToRuntime(wxString &name, int index); + int& getRemoteFileIndex(wxString &name) { return remoteFilesByName[name]; } + wxString& getRemoteFileName(int &index) { return remoteFilesByIndex[index]; } + + bool isLocalOnServer(const wxString &name); + bool isServerOnLocal(const wxString &name); + + bool isDir(const wxString &fileName) { return ( (fileTypes[fileName] == OrangeFS_TYPE_DIRECTORY) ? 1 : 0 ); } + + void addFileMetadata(const wxString &filename, const OrangeFS_attr *fileattr); + void updateFileMetadata(const wxString &name, const OrangeFS_attr *attr); + void parseDataFile(const wxString &path); + void removeFile(const wxString &file); + +private: + MetadataHandler(); + + void removeFileMetadata(const wxString &name); + + static MetadataHandler *instance; /* singleton instance */ + + char *DATA_FILE_PATH; + int num_files; + int file_index; + map fileIndexes; + map fileNames; + map remoteFilesByIndex; + map remoteFilesByName; + map fileTypes; + map fileSizes; + map filePerms; + map fileModTimes; + map fileCreateTimes; + map fileAccessTimes; + FILE *fileHandle; +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/syncDialog.cpp b/src/client/windows/client-gui/syncDialog.cpp new file mode 100644 index 0000000..231ea8f --- /dev/null +++ b/src/client/windows/client-gui/syncDialog.cpp @@ -0,0 +1,276 @@ +#include "main-app.h" + +extern MainApp *MAIN_APP; +extern MainFrame *MAIN_FRAME; +extern unsigned int __stdcall updateAll(void *parms); /* thread update routine */ + +/* sync thread callback routine */ +unsigned int __stdcall syncAll(void *parms); + +SyncDialog::SyncDialog(wxWindow *parent, wxWindowID ID, const wxString &title, const wxPoint &pos, const wxSize &size, long style, wxArrayString &fileSysNames) + : wxDialog(parent, ID, title, pos, size, style) +{ + const short int NUM_SIZERS = 3; + const short int VERTICAL_PADDING = 15; + const short int HORIZONTAL_PADDING = 20; + const short int SIZER_WIDTH = size.GetWidth() - (HORIZONTAL_PADDING * 2); /* 20 px padding on left and right sides */ + const short int SIZER_HEIGHT = (size.GetHeight() - ((NUM_SIZERS + 1) * VERTICAL_PADDING)) / NUM_SIZERS; /* equal height with 15 px padding between each */ + + this->listHandler = FileListHandler::getInstance(); + + this->fsSelection = new wxComboBox(this, /* parent window will be the dialog */ + ID_FS_SELECTOR, /* unique identifier */ + "", /* default selection */ + wxPoint(220, 35), + wxSize(150, 50), + fileSysNames, /* array of strings to populate the combo box wtih */ + wxCB_READONLY /* dropdown selector, but can't edit the fields */ + ); + + /* the main layout will contain all the static box sizers, putting one after the other from top to bottom */ + mainLayout = new wxBoxSizer(wxVERTICAL); + + /* set up the layout sizer for the combo box selector */ + /* the static box sizer is a box layout with a border around it */ + fsSelectSizer = new wxStaticBoxSizer(wxHORIZONTAL, this); + fsSelectSizer->SetDimension(10, /* x dimension */ + 10, /* y dimension */ + SIZER_WIDTH, /* width */ + SIZER_HEIGHT); /* height : the "3" here is the number of static boxes in the dialog */ + + /* add label next to the file system selection combo box */ + fsSelectSizer->Add(new wxStaticText(this, wxID_ANY, "Select a file system : ", wxPoint(80, 40), wxSize(100, 50), wxALIGN_LEFT), + 0, + wxEXPAND, /* the controls fill the space available */ + 0); + + + /* add combo box for selecting file system */ + fsSelectSizer->Add(this->fsSelection, + 0, + wxEXPAND, + 0); + + localPathSizer = new wxStaticBoxSizer(wxHORIZONTAL, this); + localPathSizer->SetDimension(10, + 80, + SIZER_WIDTH, + SIZER_HEIGHT); + + this->filePathBox = new wxTextCtrl(this, wxID_ANY, "", wxPoint(150, 105), wxSize(200, 20), wxTE_READONLY); + + localPathSizer->Add(new wxStaticText(this, wxID_ANY, "Local Store Path : ", wxPoint(40, 105), wxSize(100, 50), wxALIGN_LEFT), + 0, + wxEXPAND, + 0); + + localPathSizer->Add(this->filePathBox, + 0, + wxEXPAND, + 0); + + localPathSizer->Add(new wxButton(this, ID_BROWSE_BUTTON, "Browse:", wxPoint(360, 105), wxSize(90, 20), wxBU_EXACTFIT), + 0, + wxEXPAND, + 0); + + /* connect the browse button to the onBrowseButtonClicked() function when the button is pressed */ + Connect(ID_BROWSE_BUTTON, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncDialog::onBrowseButtonClicked)); + + syncButtons = new wxStaticBoxSizer(wxHORIZONTAL, this); + syncButtons->SetDimension(10, + 150, + SIZER_WIDTH, + SIZER_HEIGHT); + + syncButtons->Add(new wxButton(this, ID_SYNC_ALL_BUTTON, "Sync All Files/Folders", wxPoint(70, 168), wxSize(150, 30), wxBU_EXACTFIT), + 0, + wxEXPAND, + 0); + + syncButtons->Add(new wxButton(this, ID_SELECT_SYNC_BUTTON, "Select Files/Folders to Sync", wxPoint(250, 168), wxSize(150, 30), wxBU_EXACTFIT), + 0, + wxEXPAND, + 0); + + Connect(ID_SYNC_ALL_BUTTON, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncDialog::onSyncAllButtonClicked)); + Connect(ID_SELECT_SYNC_BUTTON, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(SyncDialog::onSelectSyncButtonClicked)); + + mainLayout->Add(fsSelectSizer, 0, wxEXPAND | wxSHAPED, 5); + mainLayout->Add(localPathSizer, 0, wxEXPAND | wxSHAPED, 5); + mainLayout->Add(syncButtons, 0, wxEXPAND | wxSHAPED, 5); +} + +SyncDialog::~SyncDialog() +{ + delete fsSelection; + delete filePathBox; + delete mainLayout; +} + +void SyncDialog::onBrowseButtonClicked(wxCommandEvent & WXUNUSED(event)) +{ + wxString pathToSet; + + /* creates a directory dialog browser with an "Add new folder" button */ + wxDirDialog fileBrowser(this, "Choose a location", "/", wxDD_NEW_DIR_BUTTON); + int ret = -1; + + /* show the dialog */ + ret = fileBrowser.ShowModal(); + + if (ret == wxID_OK) + { + pathToSet = fileBrowser.GetPath(); +#ifdef WIN32 + pathToSet += "\\OrangeFS\\"; +#else + pathToSet += "/OrangeFS/"; +#endif + + if ( !wxDirExists(pathToSet.c_str()) ) + { + orangefs_debug_print("Directory : %s does not exist, creating...\n", pathToSet.c_str()); + wxMkdir(pathToSet.c_str(), 0755); /* access mask parameter only works on Unix-based systems, for Windows, we'll use native API */ + } + + /* set the local sync path with the local config object */ + MAIN_APP->setLocalSyncPath(pathToSet); + + /* and set the text ctrl box with the path */ + this->filePathBox->SetLabel(pathToSet); + + fileBrowser.Close(true); + fileBrowser.Destroy(); + return; + } + if (ret == wxID_CANCEL) + { + fileBrowser.Close(true); + fileBrowser.Destroy(); + return; + } +} + +void SyncDialog::onSyncAllButtonClicked(wxCommandEvent & WXUNUSED(event)) +{ + MAIN_APP->setFsSelection(this->fsSelection->GetLabelText()); + +#ifdef WIN32 + HANDLE threadHandle; +#endif + /* spawn a new thread to handle the syncing; if the user closes the app while it's still syncing, the app window will become invisible, but the sync thread will still be running */ + threadHandle = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) updateAll, 0, 0, NULL); + + /* give the main app the handle so it can determine what it's finished */ + MAIN_APP->setThreadHandle(threadHandle); + + /* now close the dialog now that the sync thread has started */ + this->Close(true); +} + +void SyncDialog::onSelectSyncButtonClicked(wxCommandEvent & WXUNUSED(event)) +{ + orangefs_debug_print("==== SYNCING SELECTED FILES/FOLDERS ====\n"); +} + +// +//unsigned int __stdcall updateAll(void *parms) +//{ +// unsigned int ret = 0; +// OrangeFS_size fileSize; +// FileListHandler *syncList = FileListHandler::getInstance(); +// int numRetrieved = 0; +// OrangeFS_ds_position ds_token; +// char **tempFileListing; +// +// tempFileListing = (char **) malloc(MAX_FILES * sizeof(char *)); +// for (int i=0; i < MAX_FILES; i++) +// { +// tempFileListing[i] = (char *) malloc(MAX_PATH); +// memset(tempFileListing[i], 0, MAX_PATH); +// } +// +// ds_token = ORANGEFS_READDIR_START; +// +// /* get a listing of all the files currently on the orangefs server at the root directory */ +// orangefs_find_files(&MAIN_APP->getMntentAt(0)->fs_id, MAIN_APP->getCred(), "/", &ds_token, MAX_FILES, &numRetrieved, tempFileListing, MAIN_APP->getAttr()); +// +// if (numRetrieved > 0) +// { +// MAIN_APP->setNumFiles(numRetrieved); +// +// OrangeFS_attr tempAttr; +// HANDLE fileHandle; +// wxString absoluteFilePath; +// +// for (int i=0; i < numRetrieved; i++) +// { +// /* add the file name string to the array of strings that will populate the list control */ +// MAIN_APP->addFileToListing(tempFileListing[i]); +// MAIN_APP->addFileIndex(MAIN_APP->getFileName(i), i); +// +// absoluteFilePath = MAIN_APP->getLocalSyncPath(); +// absoluteFilePath += '/'; +// absoluteFilePath += tempFileListing[i]; +// +// tempAttr = MAIN_APP->getFileAttrs(i); +// +// /* make sure it's not a directory */ +// if (tempAttr.objtype != OrangeFS_TYPE_DIRECTORY) +// { +// /* create the file here so we can set the file attributes next */ +// fileHandle = CreateFile(absoluteFilePath, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL); +// +// /* now set all the associated windows file attributes for the local copy */ +// MAIN_FRAME->setWinFileAttrs(tempAttr, fileHandle); +// CloseHandle(fileHandle); +// } +// +// /* reset the absolute file path string */ +// absoluteFilePath.clear(); +// +// /* store some of the file meta-data into their respective hash maps via the file's name for easier access later */ +// fileSize = tempAttr.size; +// +// if (tempAttr.objtype == OrangeFS_TYPE_DIRECTORY) +// { +// MAIN_APP->syncDir(MAIN_APP->getFileName(i)); +// +// /* write the file metadata to the app XML file */ +// MAIN_APP->addMetadata(tempFileListing[i], &tempAttr); +// +// /* now we need to recursively look inside this directory on the server to determine which files/dirs we need to create inside of it */ +// /** TODO **/ +// /***********/ +// } +// else +// { +// MAIN_APP->syncFile(MAIN_APP->getFileName(i), fileSize); +// +// /* write the file metadata to the app XML file */ +// MAIN_APP->addMetadata(tempFileListing[i], &tempAttr); +// } +// +// /* manually tell the sync list to update after each added file/dir */ +// syncList->updateList(MAIN_APP->getFileName(i)); +// } +// } +// else +// { +// orangefs_debug_print("Failed to retrieve a file listing from the orangefs server.\nCheck orangefstab file and ensure settings are correct.\n"); +// } +// +// /* let the app know we're finished syncing */ +// MAIN_APP->finishedSyncing(true); +// +// for (int i=0; i < MAX_FILES; i++) +// { +// free(tempFileListing[i]); +// } +// free(tempFileListing); +// +// orangefs_debug_print("---- Syncing Completed ----\n"); +// +// return ret; +//} diff --git a/src/client/windows/client-gui/syncDialog.h b/src/client/windows/client-gui/syncDialog.h new file mode 100644 index 0000000..7438e86 --- /dev/null +++ b/src/client/windows/client-gui/syncDialog.h @@ -0,0 +1,28 @@ + +#ifndef __SYNCDIALOG_H +#define __SYNCDIALOG_H + + +class SyncDialog : public wxDialog +{ +public: + SyncDialog(wxWindow *, wxWindowID, const wxString &, const wxPoint &, const wxSize &, long, wxArrayString &); + ~SyncDialog(); + + void onBrowseButtonClicked(wxCommandEvent &event); + void onSyncAllButtonClicked(wxCommandEvent &event); + void onSelectSyncButtonClicked(wxCommandEvent &event); + + void setWinFileAttrs(OrangeFS_attr &attrs, HANDLE file); + +private: + wxTextCtrl *filePathBox; + wxComboBox *fsSelection; + wxBoxSizer *mainLayout; + wxStaticBoxSizer *fsSelectSizer; + wxStaticBoxSizer *syncButtons; + wxStaticBoxSizer *localPathSizer; + FileListHandler *listHandler; +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-gui/utils.cpp b/src/client/windows/client-gui/utils.cpp new file mode 100644 index 0000000..d512014 --- /dev/null +++ b/src/client/windows/client-gui/utils.cpp @@ -0,0 +1,135 @@ +#include "main-app.h" + + +extern MainApp *MAIN_APP; + +OrangeFS_time Utils::winFiletimeToOrangeFS(const FILETIME &ft) +{ + ULARGE_INTEGER lInt; + lInt.LowPart = ft.dwLowDateTime; + lInt.HighPart = ft.dwHighDateTime; + + return (OrangeFS_time) lInt.QuadPart / 10000000ULL - 11644473600ULL; +} + +/* function to take the file size in bytes and return + * a string containing the new file size > 1024 with + * the associated storage size */ +wxString Utils::getPrefixString(OrangeFS_size &size) +{ + const wxString prefixes[4] = { " KB" , " MB", " GB" , " TB" }; + wxString size_string = " bytes"; + wxString retString; + short int count = 0; + stringstream sizeStream; + float newSize = (float) size; + + while (1) + { + if ((newSize / 1024.0) > 1.0) + { + size_string = prefixes[count]; + count++; + newSize /= 1024; + } + else + { + break; + } + } + + sizeStream << newSize; + retString += sizeStream.str(); + retString += size_string; + + return retString; +} + +/* function to construct the Linux-style file permissions + * string given an OrangeFS_permissions value */ +wxString Utils::getPermString(const OrangeFS_permissions &perms, bool dir) +{ + OrangeFS_permissions tempPerms = perms; + wxString retString; + + /* first, set the first character with the file type */ + if (dir) + { + retString += 'd'; + } + else + { + retString += '-'; + } + + /* zero out the bits we're not interested in before each set */ + + /* owner perms */ + tempPerms &= 0x000001ff; + retString += (((tempPerms >> 6) & 4) == 4) ? 'r' : '-'; + retString += (((tempPerms >> 6) & 2) == 2) ? 'w' : '-'; + retString += (((tempPerms >> 6) & 1) == 1) ? 'x' : '-'; + + /* group tempPerms */ + tempPerms &= 0x0000003f; + retString += (((tempPerms >> 3) & 4) == 4) ? 'r' : '-'; + retString += (((tempPerms >> 3) & 2) == 2) ? 'w' : '-'; + retString += (((tempPerms >> 3) & 1) == 1) ? 'x' : '-'; + + /* other perms */ + tempPerms &= 0x00000007; + retString += ((tempPerms & 4) == 4) ? 'r' : '-'; + retString += ((tempPerms & 2) == 2) ? 'w' : '-'; + retString += ((tempPerms & 1) == 1) ? 'x' : '-'; + + return retString; +} + +wxString Utils::getTimeString(const OrangeFS_time &time) +{ + wxString retString; + time_t binTime = time; + + retString = ctime(&binTime); + return retString; +} + +void Utils::orangefsTimeToWindowsTime(OrangeFS_time t, LPFILETIME pft) + { + // Note that LONGLONG is a 64-bit value + LONGLONG ll; + + ll = Int32x32To64(t, 10000000) + 116444736000000000; + pft->dwLowDateTime = (DWORD)ll; + pft->dwHighDateTime = ll >> 32; +} + +void Utils::setWinFileAttrs(OrangeFS_attr &attrs, HANDLE file) +{ + FILETIME createTime = { 0 }; + FILETIME modifiedTime = { 0 }; + FILETIME accessedTime = { 0 }; + SYSTEMTIME accessTime = { 0 }; + FileListHandler *listHandler = FileListHandler::getInstance(); + + GetLocalTime(&accessTime); + SystemTimeToFileTime(&accessTime, &accessedTime); + + /* go through all the attributes from the server and set accordingly for the local windows copy */ + /* first, set the appropriate file times */ + /* we will copy over the creat time and modified time, but update the access time */ + orangefsTimeToWindowsTime(attrs.ctime, &createTime); + orangefsTimeToWindowsTime(attrs.mtime, &modifiedTime); + if ( !SetFileTime(file, &createTime, &accessedTime, &modifiedTime) ) + { + orangefs_debug_print("ERROR : call to SetFileTime failed...\n"); + MAIN_APP->printLastWinError(); + return; + } + + /* We aren't interested in copying over the permissions, but we are interested in comparing + * the credentials for the current user and the owner of the file so we can determine if + * the user can sync an updated copy back to the server if they have write permissions */ + // MetadataHandler *metadataHandler = MetadataHandler::getInstance(); + // wxString permString = listHandler->getPermString(metadataHandler->getFilePerms, metadataHandler->isDir(/* get file name from handle */)); +} \ No newline at end of file diff --git a/src/client/windows/client-gui/utils.h b/src/client/windows/client-gui/utils.h new file mode 100644 index 0000000..637a49e --- /dev/null +++ b/src/client/windows/client-gui/utils.h @@ -0,0 +1,28 @@ +#ifndef __UTILS_H +#define __UTILS_H + +/* util functions for the app */ +/* will be singleton class usable by the entire app */ + +#include "main-app.h" + +class Utils +{ +public: + static Utils* getInstance() { if (!instance) { instance = new Utils(); } return instance; } + + ~Utils() {} + + OrangeFS_time winFiletimeToOrangeFS(const FILETIME &ft); + void orangefsTimeToWindowsTime(OrangeFS_time t, LPFILETIME pft); + wxString getTimeString(const OrangeFS_time &time); + wxString getPermString(const OrangeFS_permissions &perms, bool dir); + wxString getPrefixString(OrangeFS_size &size); + void setWinFileAttrs(OrangeFS_attr &attrs, HANDLE file); +private: + Utils() {} + + static Utils *instance; /* singleton instance */ +}; + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/MSG00001.bin b/src/client/windows/client-service/MSG00001.bin new file mode 100644 index 0000000000000000000000000000000000000000..754f21467eec6a4fe0b55483b5de1303045f1e33 GIT binary patch literal 32 hcmZQ%U|?WmU^oE60zkF^kf+LE$e_o-%fJQX0{|+{0zd!& literal 0 HcmV?d00001 diff --git a/src/client/windows/client-service/cert.c b/src/client/windows/client-service/cert.c new file mode 100755 index 0000000..47dcdae --- /dev/null +++ b/src/client/windows/client-service/cert.c @@ -0,0 +1,497 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Certificate functions - credentials are loaded from a + * certificate in the user's profile directory or a configured + * directory. The (proxy) certificate contains the OrangeFS UID/GID + * in its policy data field. A CA certificate is used to verify + * the proxy certificate. + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "cert.h" +#include "user-cache.h" + +#define OPENSSL_CERT_ERROR 0xFFFF + +extern PORANGEFS_OPTIONS goptions; + +/* initialize OpenSSL */ +void openssl_init() +{ + SSL_library_init(); + SSL_load_error_strings(); + ERR_load_BIO_strings(); + OpenSSL_add_all_algorithms(); +} + +/* cleanup OpenSSL */ +void openssl_cleanup() +{ + CRYPTO_cleanup_all_ex_data(); + ERR_free_strings(); + ERR_remove_state(0); +} + +#define report_cert_error(msg) _report_cert_error(msg, __func__) + +/* certificate error reporting */ +static void _report_cert_error(char *message, char *fn_name) +{ + /* debug the message */ + DbgPrint(" %s: %s\n", fn_name, message); + + /* write to Event Log */ + report_error_event(message, FALSE); + +} + +/* load certificate from file (PEM format) */ +static unsigned long load_cert_from_file(char *path, + X509 **cert) +{ + FILE *f; + + if (path == NULL || cert == NULL) + return -1; + + f = fopen(path, "r"); + if (f == NULL) + return errno; + + *cert = PEM_read_X509(f, NULL, NULL, NULL); + if (*cert == NULL) + return OPENSSL_CERT_ERROR; + + fclose(f); + + return 0; +} + + +static int get_proxy_auth_ex_data_cred() +{ + static volatile int idx = -1; + if (idx < 0) + { + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); + if (idx < 0) + { + idx = X509_STORE_CTX_get_ex_new_index(0, "credentials", NULL, NULL, + NULL); + } + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); + } + + return idx; +} + +static int get_proxy_auth_ex_data_userid() +{ + static volatile int idx = -1; + if (idx < 0) + { + CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE); + if (idx < 0) + { + idx = X509_STORE_CTX_get_ex_new_index(0, "userid", + NULL, NULL, NULL); + } + CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE); + } + + return idx; +} + +/* parse the credential string uid/gid from credstr */ +static int parse_credentials(char *credstr, PVFS_uid *uid, PVFS_gid *gid) +{ + char *p, uidstr[16], gidstr[16]; + int i, ret = 0; + + uidstr[0] = gidstr[0] = '\0'; + i = 0; + p = credstr; + while (*p && *p != '/' && i < 15) + { + if (isdigit(*p)) + { + uidstr[i++] = *p++; + } + else + { + /* error */ + ret = 1; + break; + } + } + uidstr[i] = '\0'; + if (ret == 0) + { + if (*p == '/') + p++; + i = 0; + while(*p && i < 15) + { + if (isdigit(*p)) + { + gidstr[i++] = *p++; + } + else + { + ret = 1; + break; + } + } + gidstr[i] = '\0'; + } + + if (ret == 0) + { + *uid = atoi(uidstr); + *gid = atoi(gidstr); + } + + return ret; +} + +static int verify_callback(int ok, X509_STORE_CTX *ctx) +{ + char *userid; + X509 *xs; + PROXY_CERT_INFO_EXTENSION *pci; + char *credstr; + PVFS_credentials *credentials; + char error_msg[256]; + int ret; + + /* prior verifies have succeeded */ + if (ok == 1) + { + /* parse the credential string uid/gid from the policy */ + xs = ctx->current_cert; + if (xs->ex_flags & EXFLAG_PROXY) + { + /* get userid for error logging */ + userid = (char *) X509_STORE_CTX_get_ex_data(ctx, + get_proxy_auth_ex_data_userid()); + + /* get credentials in {UID}/{GID} form from cert policy */ + pci = (PROXY_CERT_INFO_EXTENSION *) + X509_get_ext_d2i(xs, NID_proxyCertInfo, NULL, NULL); + + if (pci->proxyPolicy->policy != NULL && pci->proxyPolicy->policy->length > 0) + { + credstr = (char *) pci->proxyPolicy->policy->data; + credentials = (PVFS_credentials *) X509_STORE_CTX_get_ex_data( + ctx, get_proxy_auth_ex_data_cred()); + ret = parse_credentials(credstr, &credentials->uid, + &credentials->gid); + if (ret != 0) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: proxy " + "certificate contains invalid credential policy", + userid); + report_cert_error(error_msg); + ok = 0; + } + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: proxy " + "certificate contains no credential policy", + userid); + report_cert_error(error_msg); + ok = 0; + } + + PROXY_CERT_INFO_EXTENSION_free(pci); + } + } + + return ok; +} + +/* verify certificate */ +static unsigned long verify_cert(char *userid, + X509 *cert, + X509 *ca_cert, + STACK_OF(X509) *chain, + PVFS_credentials *credentials) +{ + X509_STORE *trust_store; + X509_STORE_CTX *ctx; + int ret, verify_flag = 0; + int (*save_verify_cb)(int ok, X509_STORE_CTX *ctx); + char error_msg[256]; + + /* add CA cert to trusted store */ + trust_store = X509_STORE_new(); + if (trust_store == NULL) + { + ret = OPENSSL_CERT_ERROR; + goto verify_cert_exit; + } + + ret = X509_STORE_add_cert(trust_store, ca_cert); + if (!ret) + { + ret = OPENSSL_CERT_ERROR; + goto verify_cert_exit; + } + + /* setup the context with the certs */ + ctx = X509_STORE_CTX_new(); + if (ctx == NULL) + { + ret = OPENSSL_CERT_ERROR; + goto verify_cert_exit; + } + + ret = X509_STORE_CTX_init(ctx, trust_store, cert, chain); + if (!ret) + { + ret = OPENSSL_CERT_ERROR; + goto verify_cert_exit; + } + + /* set up verify callback */ + save_verify_cb = ctx->verify_cb; + X509_STORE_CTX_set_verify_cb(ctx, verify_callback); + X509_STORE_CTX_set_ex_data(ctx, get_proxy_auth_ex_data_cred(), credentials); + X509_STORE_CTX_set_ex_data(ctx, get_proxy_auth_ex_data_userid(), userid); + X509_STORE_CTX_set_flags(ctx, X509_V_FLAG_ALLOW_PROXY_CERTS); + + /* verify the cert */ + verify_flag = 1; + ret = (X509_verify_cert(ctx) == 1) ? 0 : OPENSSL_CERT_ERROR; + + X509_STORE_CTX_set_verify_cb(ctx, save_verify_cb); + +verify_cert_exit: + + /* print error... for non-verify errors, get_cert_credentials + will print errors */ + if (verify_flag && ret == OPENSSL_CERT_ERROR && ctx->error != 0) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: proxy certificate " + "verification error: %s", userid, + X509_verify_cert_error_string(ctx->error)); + report_cert_error(error_msg); + } + + if (ctx != NULL) + { + X509_STORE_CTX_cleanup(ctx); + X509_STORE_CTX_free(ctx); + } + + if (trust_store != NULL) + { + X509_STORE_free(trust_store); + } + + return ret; +} + +/* get user profile directory -- profile_dir should be MAX_PATH bytes */ +static unsigned int get_profile_dir(HANDLE huser, + char *profile_dir) +{ + DWORD profile_len = MAX_PATH; + + if (!GetUserProfileDirectory(huser, profile_dir, &profile_len)) + return GetLastError(); + + return 0; +} + +/* retrieve OrangeFS credentials from cert */ +int get_cert_credentials(HANDLE huser, + char *userid, + PVFS_credentials *credentials, + ASN1_UTCTIME **expires) +{ + char cert_dir[MAX_PATH], cert_path[MAX_PATH], + cert_pattern[MAX_PATH]; + HANDLE h_find; + WIN32_FIND_DATA find_data; + X509 *cert = NULL, *chain_cert = NULL, *ca_cert = NULL; + STACK_OF(X509) *chain = NULL; + int ret; + unsigned long err, err_flag = FALSE; + size_t err_size; + char error_msg[256], errstr[256]; + + DbgPrint(" get_cert_credentials: enter\n"); + + if (userid == NULL || credentials == NULL || expires == NULL) + { + DbgPrint(" get_cert_credentials: invalid parameter\n"); + return -1; + } + + /* locate the certificates and CA */ + if (strlen(goptions->cert_dir_prefix) > 0) + { + if ((strlen(goptions->cert_dir_prefix) + strlen(userid) + 8) > MAX_PATH) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: path to certificate " + "too long", userid); + report_cert_error(error_msg); + return -1; + } + + /* cert dir is cert_dir_prefix\userid */ + strcpy(cert_dir, goptions->cert_dir_prefix); + strcat(cert_dir, userid); + strcat(cert_dir, "\\"); + } + else + { + /* get profile directory */ + ret = get_profile_dir(huser, cert_dir); + if (ret == 0) + { + if (strlen(cert_dir) > 0 && cert_dir[strlen(cert_dir)-1] != '\\') + strcat(cert_dir, "\\"); + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: could not locate " + "profile directory: %d", userid, ret); + report_cert_error(error_msg); + return ret; + } + + if (strlen(cert_dir) + 7 > MAX_PATH) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: profile directory too " + "long", userid); + report_cert_error(error_msg); + return -1; + } + } + + /* load certs */ + chain = sk_X509_new_null(); + + strcpy(cert_pattern, cert_dir); + strcat(cert_pattern, "cert.*"); + h_find = FindFirstFile(cert_pattern, &find_data); + if (h_find == INVALID_HANDLE_VALUE) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: no certificates in %s", + userid, cert_dir); + report_cert_error(error_msg); + ret = -1; + goto get_cert_credentials_exit; + } + + do + { + strcpy(cert_path, cert_dir); + strcat(cert_path, find_data.cFileName); + /* load proxy cert */ + if (!stricmp(find_data.cFileName, "cert.0")) + { + ret = load_cert_from_file(cert_path, &cert); + } + else + { + /* load intermediate certs (including user cert) */ + ret = load_cert_from_file(cert_path, &chain_cert); + if (ret == 0) + sk_X509_push(chain, chain_cert); + } + if (ret != 0) + { + _snprintf(error_msg, sizeof(error_msg), "Error loading cert %s. See " + "subsequent log messages for details", cert_path); + report_cert_error(error_msg); + } + } while (ret == 0 && FindNextFile(h_find, &find_data)); + + FindClose(h_find); + + /* no proxy cert */ + if (cert == NULL) + { + _snprintf(error_msg, sizeof(error_msg), "Missing or invalid %scert.0. See " + "subsequent log messages for details", cert_dir); + report_cert_error(error_msg); + ret = OPENSSL_CERT_ERROR; + } + + if (ret != 0) + goto get_cert_credentials_exit; + + /* load CA cert */ + ret = load_cert_from_file(goptions->ca_path, &ca_cert); + if (ret != 0) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: error loading CA " + "certificate %s. See subsequent log messages for details", + userid, goptions->ca_path); + report_cert_error(error_msg); + goto get_cert_credentials_exit; + } + + /* read and cache credentials from certificate */ + ret = verify_cert(userid, cert, ca_cert, chain, credentials); + + if (ret == 0) + { + *expires = M_ASN1_UTCTIME_dup(X509_get_notAfter(cert)); + } + +get_cert_credentials_exit: + + /* error handling */ + if (ret == OPENSSL_CERT_ERROR) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: certificate " + "errors:\n", userid); + err_size = 255 - strlen(error_msg); + /* use err_size for remaining buffer size */ + while ((err = ERR_get_error()) != 0 && err_size > 0) + { + err_flag = TRUE; + ERR_error_string_n(err, errstr, 256); + strncat(error_msg, errstr, err_size); + err_size = 255 - strlen(error_msg); + strncat(error_msg, "\n", err_size); + err_size = 255 - strlen(error_msg); + } + if (err_flag) + report_cert_error(error_msg); + } + + /* free chain */ + if (chain != NULL) + sk_X509_pop_free(chain, X509_free); + + if (cert != NULL) + X509_free(cert); + if (ca_cert != NULL) + X509_free(ca_cert); + + DbgPrint(" get_cert_credentials: exit\n"); + + return ret; +} diff --git a/src/client/windows/client-service/cert.h b/src/client/windows/client-service/cert.h new file mode 100755 index 0000000..b38d8c9 --- /dev/null +++ b/src/client/windows/client-service/cert.h @@ -0,0 +1,28 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Certificate support declarations + */ + +#ifndef __CERT_H +#define __CERT_H + +#include + +#include "pvfs2.h" +#include "client-service.h" + +void openssl_init(); + +void openssl_cleanup(); + +int get_cert_credentials(HANDLE huser, + char *userid, + PVFS_credentials *credentials, + ASN1_UTCTIME **expires); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/client-service.h b/src/client/windows/client-service/client-service.h new file mode 100755 index 0000000..2456930 --- /dev/null +++ b/src/client/windows/client-service/client-service.h @@ -0,0 +1,57 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Client service declarations + */ + +#ifndef __CLIENT_SERVICE_H +#define __CLIENT_SERVICE_H + +#include "quicklist.h" + +#define USER_MODE_NONE 0 +#define USER_MODE_LIST 1 +#define USER_MODE_CERT 2 +#define USER_MODE_LDAP 3 + +typedef struct +{ + char host[256]; + int port; + int secure; + char bind_dn[256]; + char bind_password[32]; + char search_root[256]; + int search_scope; + char search_class[32]; + char naming_attr[32]; + char uid_attr[32]; + char gid_attr[32]; +} LDAP_OPTIONS, *PLDAP_OPTIONS; + +typedef struct +{ + char mount_point[MAX_PATH]; + char cert_dir_prefix[MAX_PATH]; + char ca_path[MAX_PATH]; + int threads; + unsigned int new_file_perms, + new_dir_perms; + int debug; + int debug_stderr; + char debug_mask[256]; + char debug_file[MAX_PATH]; + int user_mode; + LDAP_OPTIONS ldap; +} ORANGEFS_OPTIONS, *PORANGEFS_OPTIONS; + +void DbgPrint(char *format, ...); + +BOOL report_error_event(char *message, + BOOL startup); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/config.c b/src/client/windows/client-service/config.c new file mode 100755 index 0000000..fa4dcb2 --- /dev/null +++ b/src/client/windows/client-service/config.c @@ -0,0 +1,663 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Configuration file functions + */ + +#include +#include +#include +#include +#include + +#include "client-service.h" +#include "config.h" +#include "user-cache.h" + +extern struct qhash_table user_cache; + +#define LDAP_SCOPE_ONELEVEL 0x01 +#define LDAP_SCOPE_SUBTREE 0x02 + +#define EAT_WS(str) while (*str && (*str == ' ' || \ + *str == '\t')) \ + str++ + +/* get the directory where exe resides + module_dir should be MAX_PATH */ +static DWORD get_module_dir(char *module_dir) +{ + char *p; + + /* get exe path */ + if (!GetModuleFileName(NULL, module_dir, MAX_PATH)) + return GetLastError(); + + /* remove exe file name */ + p = strrchr(module_dir, '\\'); + if (p) + *p = '\0'; + + return 0; +} + +static FILE *open_config_file(char *error_msg, + unsigned int error_msg_len) +{ + FILE *f = NULL; + char *file_name = NULL, module_dir[MAX_PATH]; + DWORD ret = 0, malloc_flag = FALSE; + + /* environment variable overrides */ + file_name = getenv("ORANGEFS_CONFIG_FILE"); + if (file_name == NULL) + file_name = getenv("PVFS2_CONFIG_FILE"); + if (file_name == NULL) + { + /* look for file in exe directory */ + ret = get_module_dir(module_dir); + if (ret == 0) + { + file_name = (char *) malloc(MAX_PATH); + malloc_flag = TRUE; + strncpy(file_name, module_dir, MAX_PATH-14); + strcat(file_name, "\\orangefs.cfg"); + } + else + { + _snprintf(error_msg, error_msg_len, "GetModuleFileName failed: %u\n", ret); + return NULL; + } + } + + /* open config file */ + f = fopen(file_name, "r"); + if (f == NULL) + _snprintf(error_msg, error_msg_len, "Fatal: could not open configuration file %s\n", + file_name == NULL ? "(null)" : file_name); + + if (malloc_flag) + free(file_name); + + return f; +} + +static void close_config_file(FILE *f) +{ + fclose(f); +} + +/* parse line in format: <[domain\]user name> : */ +static int parse_user() +{ + char *token, *p; + char user_name[256]; + char uid[16], gid[16]; + int i, ret = 0; + PVFS_credentials credentials; + + /* assume current string being parsed */ + token = strtok(NULL, " \t"); + + if (token) + { + /* copy user name */ + strncpy(user_name, token, 256); + + token = strtok(NULL, " \t"); + if (token) + { + uid[0] = gid[0] = '\0'; + i = 0; + p = token; + while (*p && *p != ':' && i < 15) + { + if (isdigit(*p)) + { + uid[i++] = *p++; + } + else + { + ret = -1; + break; + } + } + uid[i] = '\0'; + if (ret == 0) + { + if (*p == ':') + p++; + i = 0; + while(*p && i < 15) + { + if (isdigit(*p)) + { + gid[i++] = *p++; + } + else + { + ret = -1; + break; + } + } + gid[i] = '\0'; + } + } + else + { + ret = -1; + } + } + else + { + ret = -1; + } + + if (ret == 0) + ret = !(strlen(uid) > 0 && strlen(gid) > 0); + + if (ret == 0) + { + /* add user to cache with no expiration */ + credentials.uid = atoi(uid); + credentials.gid = atoi(gid); + + add_user(user_name, &credentials, NULL); + } + + return ret; +} + +static int parse_ldap_option(PORANGEFS_OPTIONS options, + char *line, + char *option, + char *error_msg, + unsigned int error_msg_len) +{ + char *p, temp[256], *token; + int ret = -1; + + error_msg[0] = '\0'; + + if (options->user_mode != USER_MODE_LDAP) + { + strncpy(error_msg, "Configuration file (fatal): " + "Specify \"user-mode ldap\" before other ldap options", + error_msg_len); + goto parse_ldap_option_exit; + } + + if (!stricmp(option, "ldap-host")) + { + /* parse string of form ldap[s]://host[:port] */ + p = line + strlen(option); + EAT_WS(p); + + strncpy(temp, p, 256); + token = strtok(temp, ":/"); + if (token != NULL) + if (!stricmp(token, "ldap")) + options->ldap.secure = 0; + else if (!stricmp(token, "ldaps")) + options->ldap.secure = 1; + else + goto parse_ldap_option_exit; + else + goto parse_ldap_option_exit; + + token = strtok(NULL, ":/"); + if (token != NULL && strlen(token) > 0) + strcpy(options->ldap.host, token); + else + goto parse_ldap_option_exit; + + token = strtok(NULL, ":"); + if (token != NULL && strlen(token) > 0) + options->ldap.port = atoi(token); + + ret = 0; + } + else if (!stricmp(option, "ldap-bind-dn")) + { + /* the dn of the user used to bind to the ldap host */ + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.bind_dn, p, 256); + options->ldap.bind_dn[255] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-bind-password")) + { + /* the password of the binding user */ + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.bind_password, p, 32); + options->ldap.bind_password[31] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-search-root")) + { + /* dn of the object from which to start the search */ + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.search_root, p, 256); + options->ldap.search_root[255] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-search-scope")) + { + /* scope of search: onelevel or subtree */ + p = line + strlen(option); + EAT_WS(p); + + strncpy(temp, p, 32); + temp[31] = '\0'; + + if (!stricmp(temp, "onelevel")) + options->ldap.search_scope = LDAP_SCOPE_ONELEVEL; + else if (!stricmp(temp, "subtree")) + options->ldap.search_scope = LDAP_SCOPE_SUBTREE; + else + { + strncpy(error_msg, "Configuration file (fatal): " + "ldap-search-scope must be onelevel or subtree", error_msg_len); + goto parse_ldap_option_exit; + } + + ret = 0; + } + else if (!stricmp(option, "ldap-search-class")) + { + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.search_class, p, 32); + options->ldap.search_class[31] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-naming-attr")) + { + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.naming_attr, p, 32); + options->ldap.naming_attr[31] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-uid-attr")) + { + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.uid_attr, p, 32); + options->ldap.uid_attr[31] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else if (!stricmp(option, "ldap-gid-attr")) + { + p = line + strlen(option); + EAT_WS(p); + + strncpy(options->ldap.gid_attr, p, 32); + options->ldap.gid_attr[31] = '\0'; + + ret = strlen(p) > 0 ? 0 : -1; + } + else + { + _snprintf(error_msg, error_msg_len, "Configuration file (fatal): " + "Unknown option %s", option); + } + +parse_ldap_option_exit: + + if (ret != 0 && strlen(error_msg) == 0) + _snprintf(error_msg, error_msg_len, "Configuration file (fatal): " + "Could not parse option %s", option); + + return ret; +} + +/* pick the first available drive, starting with E: + drive must be able to store two chars (e.g. "F:") */ +char *get_default_mount_point(char *mount_point) +{ + DWORD mask, drive_bit; + char drive_char; + + mount_point[0] = '\0'; + mask = GetLogicalDrives(); + if (mask != 0) + { + /* scan for an available drive (0 bit) */ + drive_bit = 1 << 4; /* E: */ + drive_char = 'E'; + while (drive_char <= 'Z' && + (mask & drive_bit)) + { + drive_bit <<= 1; + drive_char++; + } + if (drive_char <= 'Z') + { + mount_point[0] = drive_char; + mount_point[1] = ':'; + mount_point[2] = '\0'; + } + } + + /* will return empty string on error/no available drives + the program will either set a user-specified drive or + abort later */ + + return mount_point; +} + +void set_defaults(PORANGEFS_OPTIONS options) +{ + char module_dir[MAX_PATH], mount_point[16]; + + + /* default CA and debug file paths */ + if (get_module_dir(module_dir) == 0) + { + strcpy(options->ca_path, module_dir); + strcat(options->ca_path, "\\CA\\cacert.pem"); + + strcpy(options->debug_file, module_dir); + strcat(options->debug_file, "\\orangefs.log"); + } + + /* new file/dir permissions + * 0755 = rwxr-xr-x + */ + options->new_file_perms = options->new_dir_perms = 0755; + + /* default LDAP options */ + options->ldap.search_scope = LDAP_SCOPE_ONELEVEL; + strcpy(options->ldap.search_class, "user"); + strcpy(options->ldap.naming_attr, "sAMAccountName"); + strcpy(options->ldap.uid_attr, "uidNumber"); + strcpy(options->ldap.gid_attr, "gidNumber"); + + /* default mount point */ + strcpy(options->mount_point, get_default_mount_point(mount_point)); + +} + +int get_config(PORANGEFS_OPTIONS options, + char *error_msg, + unsigned int error_msg_len) +{ + FILE *config_file; + char line[256], copy[256], *token, *p, *endptr; + int ret = 0, debug_file_flag = FALSE; + long mask; + + config_file = open_config_file(error_msg, error_msg_len); + if (config_file == NULL) + /* config file is required */ + return -1; + + set_defaults(options); + + /* parse options from the file */ + while (!feof(config_file)) + { + line[0] = '\0'; + fgets(line, 256, config_file); + + /* remove \n */ + if (strlen(line) > 0 && line[strlen(line)-1] == '\n') + line[strlen(line)-1] = '\0'; + + /* check line -- # used for comments */ + if (strlen(line) > 0 && line[0] != '#') + { + /* make a copy */ + strncpy(copy, line, 256); + /* parse line */ + token = strtok(copy, " \t"); + if (token == NULL) + continue; + + if (!stricmp(token, "mount")) + { + /* copy the remaining portion of the line + as the mount point */ + token = strtok(NULL, " \t"); + strncpy(options->mount_point, token, MAX_PATH); + } + else if (!stricmp(token, "threads")) + { + token = strtok(NULL, " \t"); + options->threads = atoi(token); + } + else if (!stricmp(token, "user-mode")) + { + token = strtok(NULL, " \t"); + if (token == NULL) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "user-mode option must be list, certificate, " + "or ldap"); + ret = -1; + goto get_config_exit; + } + if (!stricmp(token, "list")) + { + options->user_mode = USER_MODE_LIST; + } + else if (!stricmp(token, "certificate")) + { + options->user_mode = USER_MODE_CERT; + } + else if (!stricmp(token, "ldap")) + { + options->user_mode = USER_MODE_LDAP; + } + else + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "user-mode option must be list, certificate, " + "or ldap"); + ret = -1; + goto get_config_exit; + } + } + else if (!stricmp(token, "user")) + { + if (options->user_mode == USER_MODE_NONE) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "user option: specify 'user-mode list' above user " + "option"); + ret = -1; + goto get_config_exit; + } + else if (options->user_mode != USER_MODE_LIST) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "user option: not legal with current user mode"); + ret = -1; + goto get_config_exit; + } + + if (parse_user() != 0) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "user option: parse error"); + ret = -1; + goto get_config_exit; + } + } + else if (!stricmp(token, "cert-dir-prefix")) + { + p = line + strlen(token); + EAT_WS(p); + if (strlen(p) > 0) + { + strncpy(options->cert_dir_prefix, p, MAX_PATH-2); + options->cert_dir_prefix[MAX_PATH-2] = '\0'; + if (options->cert_dir_prefix[strlen(options->cert_dir_prefix)-1] != '\\') + strcat(options->cert_dir_prefix, "\\"); + } + else + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "cert-dir-prefix option: parse error"); + ret = -1; + goto get_config_exit; + } + } + else if (!stricmp(token, "ca-path")) + { + p = line + strlen(token); + EAT_WS(p); + if (strlen(p) > 0) + { + strncpy(options->ca_path, p, MAX_PATH-2); + options->ca_path[MAX_PATH-2] = '\0'; + } + else + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "ca-path option: parse error\n"); + ret = -1; + goto get_config_exit; + } + } + else if (!stricmp(token, "new-file-perms") || + !stricmp(token, "new-dir-perms")) + { + p = line + strlen(token); + EAT_WS(p); + /* get mask in octal format */ + mask = strtol(p, &endptr, 8); + if (!mask || *endptr != '\0') + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "%s option: parse error - value must be " + "nonzero octal integer\n", token); + ret = -1; + goto get_config_exit; + } + if (!stricmp(token, "new-file-perms")) + { + options->new_file_perms = (unsigned int) mask; + } + else + { + options->new_dir_perms = (unsigned int) mask; + } + } + else if (!stricmp(token, "debug")) + { + options->debug = TRUE; + /* rest of line gives optional debug mask */ + p = line + strlen(token); + EAT_WS(p); + if (strlen(p) > 0) + { + strncpy(options->debug_mask, p, 256); + options->debug_mask[255] = '\0'; + } + else + { + /* just debug Windows client */ + strcpy(options->debug_mask, "win_client"); + } + } + else if (!stricmp(token, "debug-stderr")) + { + options->debug_stderr = options->debug = TRUE; + } + else if (!stricmp(token, "debug-file")) + { + debug_file_flag = TRUE; + /* path to debug file */ + p = line + strlen(token); + EAT_WS(p); + if (strlen(p) > 0) + { + strncpy(options->debug_file, p, MAX_PATH-2); + options->debug_file[MAX_PATH-2] = '\0'; + } + } + else if (!strnicmp(token, "ldap", 4)) + { + ret = parse_ldap_option(options, line, token, error_msg, + error_msg_len); + if (ret != 0) + goto get_config_exit; + } + else + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "Unknown option %s", token); + ret = -1; + goto get_config_exit; + } + } + } + + if (options->user_mode == USER_MODE_NONE) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "Must specify user-mode (list, certificate or ldap)"); + ret = -1; + goto get_config_exit; + } + + if (options->user_mode == USER_MODE_LDAP && + (strlen(options->ldap.host) == 0 || + strlen(options->ldap.search_root) == 0)) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "Missing ldap option: ldap-host, or ldap-search-root"); + ret = -1; + } + + /* gossip can only print to either a file or stderr */ + if (options->debug_stderr && debug_file_flag) + { + _snprintf(error_msg, error_msg_len, + "Configuration file (fatal): " + "Cannot specify both debug-stderr and debug-file"); + ret = -1; + } + + if (options->user_mode == USER_MODE_LDAP && + options->ldap.port == 0) + options->ldap.port = options->ldap.secure ? 636 : 389; + +get_config_exit: + + close_config_file(config_file); + + return ret; +} diff --git a/src/client/windows/client-service/config.h b/src/client/windows/client-service/config.h new file mode 100755 index 0000000..8aee76d --- /dev/null +++ b/src/client/windows/client-service/config.h @@ -0,0 +1,20 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Configuration file function declarations + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include "client-service.h" + +int get_config(PORANGEFS_OPTIONS options, + char *error_msg, + unsigned int error_msg_len); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/dokan-interface.c b/src/client/windows/client-service/dokan-interface.c new file mode 100755 index 0000000..dd0c565 --- /dev/null +++ b/src/client/windows/client-service/dokan-interface.c @@ -0,0 +1,2366 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Dokan is a user-mode file system API like FUSE: http://dokan-dev.net/en/. + * Most of the following functions are callbacks. dokan_loop starts the + * Dokan thread. Functions are called as needed by Dokan (responding to + * file system requests). + */ + +#include +#include +#include +#include +#include +#include + +#include "dokan.h" + +#include "pvfs2.h" +#include "gossip.h" +#include "gen-locks.h" +#include "str-utils.h" + +#include "client-service.h" +#include "fs.h" +#include "cert.h" +#include "user-cache.h" +#include "ldap-support.h" + +BOOL g_UseStdErr; +BOOL g_DebugMode; + +extern struct qlist_head user_list; + +struct context_entry +{ + struct qhash_head hash_link; + ULONG64 context; + PVFS_credentials credentials; +}; + +struct qhash_table *context_cache; +gen_mutex_t context_cache_mutex; +extern struct qhash_table *user_cache; +extern PORANGEFS_OPTIONS goptions; + +#define DEBUG_FLAG(val, flag) if (val&flag) { DbgPrint(" "#flag"\n"); } + +#define MALLOC_CHECK(ptr) if (ptr == NULL) \ + return -ERROR_NOT_ENOUGH_MEMORY +#define MALLOC_CHECK_N(ptr) if (ptr == NULL) \ + return NULL + +#define CRED_CHECK(func, err) do { \ + if (err != 0) { \ + DbgPrint("%s: bad credentials (%d)\n", func, err); \ + return err; \ + } \ + } while (0) + +#define DEBUG_PATH(path) DbgPrint(" resolved path: %s\n", path) + +#if 0 +/* we now debug through gossip */ +void DbgInit() +{ + char exe_path[MAX_PATH], *p; + int ret; + + if (g_DebugMode) + { + /* create log file in exe directory */ + ret = GetModuleFileName(NULL, exe_path, MAX_PATH); + if (ret != 0) + { + /* get directory */ + p = strrchr(exe_path, '\\'); + if (p) + *p = '\0'; + + strcat(exe_path, "\\orangefs.log"); + + g_DebugFile = fopen(exe_path, "a"); + } + } +} +#endif + +#define DEBUG_BUF_SIZE 8192 +void DbgPrint(char *format, ...) +{ + if (g_DebugMode) + { + char buffer[DEBUG_BUF_SIZE]; + /* SYSTEMTIME sys_time; */ + va_list argp; + + va_start(argp, format); + vsnprintf_s(buffer, sizeof(buffer), _TRUNCATE, format, argp); + buffer[DEBUG_BUF_SIZE-1] = '\0'; + va_end(argp); + +#ifdef _DEBUG + /* debug to debugger window */ + OutputDebugString(buffer); +#endif + /* + GetLocalTime(&sys_time); + fprintf(g_DebugFile, "[%d-%02d-%02d %02d:%02d:%02d.%03d] (%4u) %s", + sys_time.wYear, sys_time.wMonth, sys_time.wDay, + sys_time.wHour, sys_time.wMinute, sys_time.wSecond, sys_time.wMilliseconds, + GetThreadId(GetCurrentThread()), + buffer); + fflush(g_DebugFile); + */ + + /* use gossip to debug to file or stderr (set in config file) */ + gossip_debug(GOSSIP_WIN_CLIENT_DEBUG, "%s", buffer); + } +} + +#if 0 +void DbgClose() +{ + if (g_DebugFile != NULL) { + fprintf(g_DebugFile, "\n"); + fclose(g_DebugFile); + } +} +#endif + +/* map a file system error code to a Dokan/Windows code + -1 is used as a default error */ +static int error_map(int fs_err) +{ + switch (fs_err) + { + case 0: + return ERROR_SUCCESS; /* 0 */ + case -PVFS_EPERM: /* Operation not permitted */ + case -PVFS_EACCES: /* Access not allowed */ + return -ERROR_ACCESS_DENIED; /* 5 */ + case -PVFS_ENOENT: /* No such file or directory */ + return -ERROR_FILE_NOT_FOUND; /* 2 */ + case -PVFS_EINTR: /* Interrupted system call */ + return -1; + case -PVFS_EIO: /* I/O error */ + return -1; + case -PVFS_ENXIO: /* No such device or address */ + return -ERROR_DEV_NOT_EXIST; /* 110 */ + case -PVFS_EBADF: /* Bad file number */ + return -ERROR_INVALID_HANDLE; /* 6 */ + case -PVFS_EAGAIN: /* Try again */ + return -1; + case -PVFS_ENOMEM: /* Out of memory */ + return -ERROR_NOT_ENOUGH_MEMORY; /* 8 */ + case -PVFS_EFAULT: /* Bad address */ + return -ERROR_INVALID_ADDRESS; /* 487 */ + case -PVFS_EBUSY: /* Device or resource busy */ + return -ERROR_BUSY; /* 170 */ + case -PVFS_EEXIST: /* File exists */ + return -ERROR_ALREADY_EXISTS; /* 183 */ + case -PVFS_ENODEV: /* No such device */ + return -ERROR_DEV_NOT_EXIST; /* 55 */ + case -PVFS_ENOTDIR: /* Not a directory */ + return -ERROR_DIRECTORY; /* 267 */ + case -PVFS_EISDIR: /* Is a directory */ + return -ERROR_DIRECTORY; /* 267 */ + case -PVFS_EINVAL: /* Invalid argument */ + return -ERROR_INVALID_PARAMETER; /* 87 */ + case -PVFS_EMFILE: /* Too many open files */ + return -ERROR_TOO_MANY_OPEN_FILES; /* 4 */ + case -PVFS_EFBIG: /* File too large */ + return -ERROR_FILE_TOO_LARGE; /* 223 */ + case -PVFS_ENOSPC: /* No space left on device */ + return -ERROR_HANDLE_DISK_FULL; /* 39 */ + case -PVFS_EROFS: /* Read-only file system */ + return -ERROR_NOT_SUPPORTED; /* 50 */ + case -PVFS_EMLINK: /* Too many links */ + return -ERROR_TOO_MANY_LINKS; /* 1142 */ + case -PVFS_EPIPE: /* Broken pipe */ + return -ERROR_BROKEN_PIPE; /* 109 */ + case -PVFS_EDEADLK: /* Resource deadlock would occur */ + return -ERROR_POSSIBLE_DEADLOCK; /* 1131 */ + case -PVFS_ENAMETOOLONG: /* File name too long */ + return -ERROR_BUFFER_OVERFLOW; /* 111 */ + case -PVFS_ENOLCK: /* No record locks available */ + return -ERROR_LOCK_FAILED; /* 167 */ + case -PVFS_ENOSYS: /* Function not implemented */ + return -ERROR_CALL_NOT_IMPLEMENTED; /* 120 */ + case -PVFS_ENOTEMPTY: /* Directory not empty */ + return -ERROR_DIR_NOT_EMPTY; /* 145 */ + case -PVFS_ELOOP: /* Too many symbolic links encountered */ + return -ERROR_TOO_MANY_LINKS; /* 1142 */ + case -PVFS_EWOULDBLOCK: /* Operation would block */ + return -WSAEWOULDBLOCK; /* 10035 */ + case -PVFS_ENOMSG: /* No message of desired type */ + return -ERROR_INVALID_MESSAGE; /* 1002 */ + case -PVFS_EUNATCH: /* Protocol driver not attached */ + return -ERROR_FS_DRIVER_REQUIRED; /* 588 */ + case -PVFS_EBADR: /* Invalid request descriptor */ + case -PVFS_EDEADLOCK: /* Deadlock would result */ + return -ERROR_POSSIBLE_DEADLOCK; /* 1131 */ + case -PVFS_ENODATA: /* No data available */ + return -ERROR_NO_DATA; /* 232 */ + case -PVFS_ETIME: /* Timer expired */ + return -ERROR_TIMEOUT; /* 1460 */ + case -PVFS_ENONET: /* Machine is not on the network */ + return -ERROR_NO_NETWORK; /* 1222 */ + case -PVFS_EREMOTE: /* Object is remote */ + return -1; + case -PVFS_ECOMM: /* Communication error on send */ + return -1; + case -PVFS_EPROTO: /* Protocol error */ + return -1; + case -PVFS_EBADMSG: /* Not a data message */ + return -ERROR_INVALID_MESSAGE; /* 1002 */ + case -PVFS_EOVERFLOW: /* Value too large for defined data type */ + return -ERROR_BUFFER_OVERFLOW; /* 111 */ + case -PVFS_ERESTART: /* Interrupted system call should be restarted */ + return -1; + case -PVFS_EMSGSIZE: /* Message too long */ + return -WSAEMSGSIZE; /* 10040 */ + case -PVFS_EPROTOTYPE: /* Protocol wrong type for socket */ + return -WSAEPROTOTYPE; /* 10041 */ + case -PVFS_ENOPROTOOPT: /* Protocol not available */ + return -WSAENOPROTOOPT; /* 10042 */ + case -PVFS_EPROTONOSUPPORT:/* Protocol not supported */ + return -WSAEPROTONOSUPPORT; /* 10043 */ + case -PVFS_EOPNOTSUPP: /* Operation not supported on transport endpoint */ + return -WSAEOPNOTSUPP; /* 10045 */ + case -PVFS_EADDRINUSE: /* Address already in use */ + return -WSAEADDRINUSE; /* 10048 */ + case -PVFS_EADDRNOTAVAIL: /* Cannot assign requested address */ + return -WSAEADDRNOTAVAIL; /* 10049 */ + case -PVFS_ENETDOWN: /* Network is down */ + return -WSAENETDOWN; /* 10050 */ + case -PVFS_ENETUNREACH: /* Network is unreachable */ + return -WSAENETUNREACH; /* 10051 */ + case -PVFS_ENETRESET: /* Network dropped connection because of reset */ + return -WSAENETRESET; /* 10052 */ + case -PVFS_ENOBUFS: /* No buffer space available */ + return -WSAENOBUFS; /* 10055 */ + case -PVFS_ETIMEDOUT: /* Connection timed out */ + return -WSAETIMEDOUT; /* 10060 */ + case -PVFS_ECONNREFUSED: /* Connection refused */ + return -WSAECONNREFUSED; /* 10061 */ + case -PVFS_EHOSTDOWN: /* Host is down */ + return -WSAEHOSTDOWN; /* 10064 */ + case -PVFS_EHOSTUNREACH: /* No route to host */ + return -WSAEHOSTUNREACH; /* 10065 */ + case -PVFS_EALREADY: /* Operation already in progress */ + return -WSAEALREADY; /* 10037 */ + case -PVFS_ECONNRESET: /* Connection reset by peer */ + return -WSAECONNRESET; /* 10054 */ + } + + return -1; +} + +/* convert string from wide char (Unicode) to multi-byte string */ +char *convert_wstring(const wchar_t *wcstr) +{ + errno_t err; + size_t ret, mb_size; + char *mbstr; + + /* get size of buffer */ + err = wcstombs_s(&ret, NULL, 0, wcstr, 0); + + if (err != 0) + { + DbgPrint("convert_wstring: %d\n", err); + return NULL; + } + + /* allocate buffer */ + mb_size = ret; + mbstr = (char *) malloc(mb_size); + if (mbstr == NULL) + return NULL; + + /* convert string */ + err = wcstombs_s(&ret, mbstr, mb_size, wcstr, wcslen(wcstr)); + + if (err != 0) + { + DbgPrint("convert_wstring 2: %d\n", err); + free(mbstr); + + return NULL; + } + + return mbstr; + +} + +wchar_t *convert_mbstring(const char *mbstr) +{ + errno_t err; + size_t ret, w_size; + wchar_t *wstr; + + /* get size of buffer */ + err = mbstowcs_s(&ret, NULL, 0, mbstr, 0); + + if (err != 0) + { + DbgPrint("convert_mbstring: %d\n", err); + return NULL; + } + + w_size = ret; + wstr = (wchar_t *) malloc(w_size * sizeof(wchar_t)); + if (wstr == NULL) + return NULL; + + /* convert string */ + err = mbstowcs_s(&ret, wstr, w_size, mbstr, strlen(mbstr)); + + if (err != 0) + { + DbgPrint("convert_mbstring 2: %d\n", err); + free(wstr); + + return NULL; + } + + return wstr; +} + +#define cleanup_string(str) free(str) + +/* convert PVFS time to Windows FILETIME + (from MSDN Knowledgebase) */ +static void convert_pvfstime(time_t t, LPFILETIME pft) +{ + LONGLONG ll; + + ll = Int32x32To64(t, 10000000) + 116444736000000000; + pft->dwLowDateTime = (DWORD) ll; + pft->dwHighDateTime = ll >> 32; +} + + +static void convert_filetime(CONST LPFILETIME pft, PVFS_time *t) +{ + LONGLONG ll; + + ll = (LONGLONG) pft->dwHighDateTime << 32; + ll |= pft->dwLowDateTime; + ll -= 116444736000000000; + *t = ll / 10000000LL; +} + +/* Return resolved file system path. + Caller must free returned string. */ +static char *get_fs_path(const wchar_t *local_path) +{ + char *mb_path, *fs_path = NULL; + int ret; + + /* convert from Unicode */ + mb_path = convert_wstring(local_path); + if (mb_path == NULL) + { + return NULL; + } + + /* resolve the path */ + fs_path = (char *) malloc(PVFS_PATH_MAX + 4); + MALLOC_CHECK_N(fs_path); + ret = fs_resolve_path(mb_path, fs_path, PVFS_PATH_MAX); + if (ret != 0) + { + DbgPrint(" fs_resolve_path returned %d\n", ret); + cleanup_string(mb_path); + free(fs_path); + return NULL; + } + + DEBUG_PATH(fs_path); + + cleanup_string(mb_path); + + return fs_path; +} + +int cred_compare(void *key, + struct qhash_head *link) +{ + struct context_entry *entry = qhash_entry(link, struct context_entry, hash_link); + + return (entry->context == *((ULONG64 *) key)); +} + +static int get_requestor_credentials(PDOKAN_FILE_INFO file_info, + PVFS_credentials *credentials) +{ + HANDLE htoken; + PTOKEN_USER token_user; + char buffer[1024], user_name[256], domain_name[256]; + DWORD user_len = 256, domain_len = 256, return_len, err; + SID_NAME_USE snu; + ASN1_UTCTIME *expires; + int ret; + + DbgPrint(" get_requestor_credentials: enter\n"); + + /* get requesting user information */ + htoken = DokanOpenRequestorToken(file_info); + if (htoken == INVALID_HANDLE_VALUE) + { + DbgPrint(" get_requestor_credentials: DokanOpenRequestorToken failed\n"); + return -ERROR_INVALID_HANDLE; + } + + if (!GetTokenInformation(htoken, TokenUser, buffer, sizeof(buffer), &return_len)) + { + err = GetLastError(); + DbgPrint(" get_requestor_credentials: GetTokenInformation failed: %d\n", err); + CloseHandle(htoken); + return err * -1; + } + + token_user = (PTOKEN_USER) buffer; + + if (!LookupAccountSid(NULL, token_user->User.Sid, user_name, &user_len, + domain_name, &domain_len, &snu)) + { + err = GetLastError(); + DbgPrint(" get_requestor_credentials: LookupAccountSid failed: %u\n", err); + CloseHandle(htoken); + + return err * -1; + } + + /* system user functions as root */ + if (!stricmp(user_name, "SYSTEM")) + { + credentials->uid = credentials->gid = 0; + CloseHandle(htoken); + + return 0; + } + + /* search user list for credentials */ + ret = get_cached_user(user_name, credentials); + if (ret == 1) + { + /* cache miss */ + if (goptions->user_mode == USER_MODE_LIST) + { + /* can't locate credentials for requesting user */ + DbgPrint(" get_requestor_credentials: user %s not found\n", user_name); + ret = -ERROR_USER_PROFILE_LOAD; + } + else if (goptions->user_mode == USER_MODE_CERT) + { + /* load credentials from certificate */ + ret = get_cert_credentials(htoken, user_name, credentials, &expires); + if (ret == 0) + { + add_user(user_name, credentials, expires); + } + else + { + /* error reporting has been done through DbgPrint... + result is access denied */ + ret = -ERROR_ACCESS_DENIED; + } + } + else /* user-mode == LDAP */ + { + ret = get_ldap_credentials(user_name, credentials); + if (ret == 0) + { + add_user(user_name, credentials, NULL); + } + else + { + /* error reporting has been done through DbgPrint... + result is access denied */ + ret = -ERROR_ACCESS_DENIED; + } + } + } + + CloseHandle(htoken); + + DbgPrint(" get_requestor_credentials: exit\n"); + + return ret; +} + +static int get_credentials(PDOKAN_FILE_INFO file_info, + PVFS_credentials *credentials) +{ + struct qhash_head *item; + struct context_entry *entry; + int ret = 0; + + if (file_info == NULL || credentials == NULL) + return -ERROR_INVALID_PARAMETER; + + DbgPrint(" get_credentials: context: %llx\n", file_info->Context); + + if (file_info->Context != 0) + { + /* check cache for existing credentials + associated with the context */ + gen_mutex_lock(&context_cache_mutex); + item = qhash_search(context_cache, &file_info->Context); + if (item != NULL) + { + /* if cache hit -- return credentials */ + entry = qhash_entry(item, struct context_entry, hash_link); + credentials->uid = entry->credentials.uid; + credentials->gid = entry->credentials.gid; + + DbgPrint(" get_credentials: found (%d:%d)\n", + credentials->uid, credentials->gid); + } + else + { + DbgPrint(" get_credentials: not found\n"); + ret = -1; + } + gen_mutex_unlock(&context_cache_mutex); + } + else + { + /* retrieve credentials for the requestor */ + ret = get_requestor_credentials(file_info, credentials); + if (ret == 0) + DbgPrint(" get_credentials: requestor credentials (%d:%d)\n", + credentials->uid, credentials->gid); + } + + DbgPrint(" get_credentials: exit\n"); + + return ret; +} + +static void add_credentials(ULONG64 context, PVFS_credentials *credentials) +{ + struct context_entry *entry; + + entry = (struct context_entry *) calloc(1, sizeof(struct context_entry)); + if (entry == NULL) + { + DbgPrint(" add_credentials: out of memory\n"); + return; + } + + entry->context = context; + entry->credentials.uid = credentials->uid; + entry->credentials.gid = credentials->gid; + + gen_mutex_lock(&context_cache_mutex); + qhash_add(context_cache, &entry->context, &entry->hash_link); + gen_mutex_unlock(&context_cache_mutex); +} + +static void remove_credentials(ULONG64 context) +{ + struct qhash_head *link; + + gen_mutex_lock(&context_cache_mutex); + link = qhash_search_and_remove(context_cache, &context); + if (link != NULL) + { + free(qhash_entry(link, struct context_entry, hash_link)); + } + gen_mutex_unlock(&context_cache_mutex); +} + +/* Permission constants */ +#define PERM_READ 4 +#define PERM_WRITE 2 +#define PERM_EXECUTE 1 + +/* Return true if user with credentials has permission (given attributes) */ +static int check_perm(PVFS_sys_attr *attr, PVFS_credentials *credentials, int perm) +{ + int mask; + + /* root user (uid 0 or gid 0) always has rights */ + if (credentials->uid == 0 || credentials->gid == 0) + return 1; + + if (attr->owner == credentials->uid) + /* use owner mask */ + mask = (attr->perms >> 6) & 7; + else if (attr->group == credentials->gid) + /* use group mask (must be primary group) */ + mask = (attr->perms >> 3) & 7; + else + /* use other mask */ + mask = attr->perms & 7; + + if (mask & perm) + return 1; + + return 0; +} + +/* Check permissions for create_file call */ +static int check_create_perm(PVFS_sys_attr *attr, PVFS_credentials *credentials, DWORD access_mode) +{ + int ret = 0, write_flag = 0; + + /* read attributes access */ + if (access_mode & FILE_READ_ATTRIBUTES || + access_mode & FILE_READ_EA || + access_mode & READ_CONTROL || + access_mode & SYNCHRONIZE) + { + /* On PVFS2, all users have these rights */ + ret = 1; + } + + /* read data access */ + if (access_mode & GENERIC_READ || + access_mode & GENERIC_ALL || + access_mode & FILE_READ_DATA) + { + ret = check_perm(attr, credentials, PERM_READ); + + if (!ret) + return ret; + } + + /* write attributes access */ + if (access_mode & FILE_WRITE_ATTRIBUTES || + access_mode & FILE_WRITE_EA || + access_mode & WRITE_DAC || + access_mode & WRITE_OWNER || + access_mode & DELETE) + { + /* owner always has these permissions */ + ret = attr->owner == credentials->uid; + if (!ret) + { + /* otherwise write permissions are needed */ + ret = check_perm(attr, credentials, PERM_WRITE); + if (!ret) + return ret; + write_flag = 1; + } + } + + /* write access */ + if (access_mode & GENERIC_WRITE || + access_mode & GENERIC_ALL || + access_mode & FILE_WRITE_DATA) + { + /* Either user is owner, or has write permissions checked already. + Note that if owner doesn't have write data, the file will be + marked read-only */ + ret = write_flag || check_perm(attr, credentials, PERM_WRITE); + + if (!ret) + return ret; + } + + /* execute access */ + if (access_mode & GENERIC_EXECUTE || + access_mode & GENERIC_ALL) + { + ret = check_perm(attr, credentials, PERM_EXECUTE); + } + + return ret; +} + +/* convert OrangeFS attributes to Windows info */ +static int PVFS_sys_attr_to_file_info(char *filename, + PVFS_credentials *credentials, + PVFS_sys_attr *attr, + LPBY_HANDLE_FILE_INFORMATION phFileInfo) +{ + + if (filename == NULL || credentials == NULL || attr == NULL || + phFileInfo == NULL) + { + return -PVFS_EINVAL; + } + + phFileInfo->dwFileAttributes = 0; + + if (attr->objtype & PVFS_TYPE_DIRECTORY) { + phFileInfo->dwFileAttributes |= FILE_ATTRIBUTE_DIRECTORY; + } + + /* check for hidden file */ + /* + filename = (char *) malloc(strlen(fs_path) + 1); + MALLOC_CHECK(filename); + ret = PINT_remove_base_dir(fs_path, filename, strlen(fs_path) + 1); + */ + if (strcmp(filename, ".") != 0 && + strcmp(filename, "..") != 0 && + filename[0] == '.') + { + phFileInfo->dwFileAttributes |= FILE_ATTRIBUTE_HIDDEN; + } + /* + free(filename); + ret = 0; + */ + + /* Check perms for READONLY */ + if (!check_perm(attr, credentials, PERM_WRITE)) + { + phFileInfo->dwFileAttributes |= FILE_ATTRIBUTE_READONLY; + } + + /* check for temporary file */ + /* + if (DokanFileInfo->DeleteOnClose) + { + phFileInfo->dwFileAttributes |= FILE_ATTRIBUTE_TEMPORARY; + strcat(info, "TEMP "); + } + */ + + /* normal file */ + if (phFileInfo->dwFileAttributes == 0) + { + phFileInfo->dwFileAttributes = FILE_ATTRIBUTE_NORMAL; + } + + /* links */ + phFileInfo->nNumberOfLinks = 1; + + /* file times */ + convert_pvfstime(attr->ctime, &phFileInfo->ftCreationTime); + convert_pvfstime(attr->atime, &phFileInfo->ftLastAccessTime); + convert_pvfstime(attr->mtime, &phFileInfo->ftLastWriteTime); + + /* file size */ + phFileInfo->nFileSizeHigh = (attr->size & 0x7FFFFFFF00000000LL) >> 32; + phFileInfo->nFileSizeLow = (attr->size & 0xFFFFFFFFLL); + + return 0; +} + +static ULONG64 gen_context() +{ + LARGE_INTEGER counter; + + QueryPerformanceCounter(&counter); + + return (ULONG64) counter.QuadPart; +} + +static int __stdcall +PVFS_Dokan_create_file( + LPCWSTR FileName, + DWORD AccessMode, + DWORD ShareMode, + DWORD CreationDisposition, + DWORD FlagsAndAttributes, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret, found, err, attr_flag = 0, + new_flag = 0; + PVFS_handle handle; + PVFS_sys_attr attr; + PVFS_credentials credentials; + + DbgPrint("CreateFile: %S\n", FileName); + + if (CreationDisposition == CREATE_NEW) + DbgPrint(" CREATE_NEW\n"); + if (CreationDisposition == OPEN_ALWAYS) + DbgPrint(" OPEN_ALWAYS\n"); + if (CreationDisposition == CREATE_ALWAYS) + DbgPrint(" CREATE_ALWAYS\n"); + if (CreationDisposition == OPEN_EXISTING) + DbgPrint(" OPEN_EXISTING\n"); + if (CreationDisposition == TRUNCATE_EXISTING) + DbgPrint(" TRUNCATE_EXISTING\n"); + + DbgPrint(" ShareMode = 0x%x\n", ShareMode); + + DEBUG_FLAG(ShareMode, FILE_SHARE_READ); + DEBUG_FLAG(ShareMode, FILE_SHARE_WRITE); + DEBUG_FLAG(ShareMode, FILE_SHARE_DELETE); + + DbgPrint(" AccessMode = 0x%x\n", AccessMode); + + DEBUG_FLAG(AccessMode, GENERIC_READ); + DEBUG_FLAG(AccessMode, GENERIC_WRITE); + DEBUG_FLAG(AccessMode, GENERIC_EXECUTE); + + DEBUG_FLAG(AccessMode, DELETE); + DEBUG_FLAG(AccessMode, FILE_READ_DATA); + DEBUG_FLAG(AccessMode, FILE_READ_ATTRIBUTES); + DEBUG_FLAG(AccessMode, FILE_READ_EA); + DEBUG_FLAG(AccessMode, READ_CONTROL); + DEBUG_FLAG(AccessMode, FILE_WRITE_DATA); + DEBUG_FLAG(AccessMode, FILE_WRITE_ATTRIBUTES); + DEBUG_FLAG(AccessMode, FILE_WRITE_EA); + DEBUG_FLAG(AccessMode, FILE_APPEND_DATA); + DEBUG_FLAG(AccessMode, WRITE_DAC); + DEBUG_FLAG(AccessMode, WRITE_OWNER); + DEBUG_FLAG(AccessMode, SYNCHRONIZE); + DEBUG_FLAG(AccessMode, FILE_EXECUTE); + DEBUG_FLAG(AccessMode, STANDARD_RIGHTS_READ); + DEBUG_FLAG(AccessMode, STANDARD_RIGHTS_WRITE); + DEBUG_FLAG(AccessMode, STANDARD_RIGHTS_EXECUTE); + + DbgPrint(" FlagsAndAttributes = 0x%x\n", FlagsAndAttributes); + + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_ARCHIVE); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_ENCRYPTED); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_HIDDEN); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_NORMAL); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_NOT_CONTENT_INDEXED); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_OFFLINE); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_READONLY); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_SYSTEM); + DEBUG_FLAG(FlagsAndAttributes, FILE_ATTRIBUTE_TEMPORARY); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_WRITE_THROUGH); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_OVERLAPPED); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_NO_BUFFERING); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_RANDOM_ACCESS); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_SEQUENTIAL_SCAN); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_DELETE_ON_CLOSE); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_BACKUP_SEMANTICS); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_POSIX_SEMANTICS); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_OPEN_REPARSE_POINT); + DEBUG_FLAG(FlagsAndAttributes, FILE_FLAG_OPEN_NO_RECALL); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_ANONYMOUS); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_IDENTIFICATION); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_IMPERSONATION); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_DELEGATION); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_CONTEXT_TRACKING); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_EFFECTIVE_ONLY); + DEBUG_FLAG(FlagsAndAttributes, SECURITY_SQOS_PRESENT); + + DokanFileInfo->Context = 0; + + /* load credentials (of requestor) */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("CreateFile", err); + + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* look up the file */ + found = 0; + ret = fs_lookup(fs_path, &credentials, &handle); + + DbgPrint(" fs_lookup returns: %d\n", ret); + + if (ret == -PVFS_ENOENT) + { + found = 0; + } + else if (ret != 0) + { + free(fs_path); + return error_map(ret); + } + else + { + found = 1; + } + + /* check permissions for existing file */ + if (found) + { + ret = fs_getattr(fs_path, &credentials, &attr); + if (ret == 0) + { + ret = check_create_perm(&attr, &credentials, AccessMode); + if (!ret) + { + DbgPrint("CreateFile exit: access denied\n"); + free(fs_path); + return -ERROR_ACCESS_DENIED; + } + attr_flag = 1; + } + else + { + DbgPrint("CreateFile exit: fs_getattr (1) failed with code: %d\n", ret); + free(fs_path); + return error_map(ret); + } + } + + ret = 0; + + switch (CreationDisposition) + { + case CREATE_ALWAYS: + if (found) + { + fs_remove(fs_path, &credentials); + } + ret = fs_create(fs_path, &credentials, &handle, + goptions->new_file_perms); + break; + case CREATE_NEW: + if (found) + { + /* set error */ + ret = -PVFS_EEXIST; + } + else + { + /* create file */ + ret = fs_create(fs_path, &credentials, &handle, + goptions->new_file_perms); + } + break; + case OPEN_ALWAYS: + if (!found) + { + /* create file */ + ret = fs_create(fs_path, &credentials, &handle, + goptions->new_file_perms); + } + break; + case OPEN_EXISTING: + if (!found) + { + /* return error */; + ret = -PVFS_ENOENT; + } + break; + case TRUNCATE_EXISTING: + if (!found) + { + ret = -PVFS_ENOENT; + } + else + { + ret = fs_truncate(fs_path, 0, &credentials); + } + } + + DbgPrint(" fs_create/fs_truncate returns: %d\n", ret); + + + err = error_map(ret); + if (err == ERROR_SUCCESS) + { + /* generate unique context */ + DokanFileInfo->Context = gen_context(); + + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + add_credentials(DokanFileInfo->Context, &credentials); + + /* determine whether this is a directory */ + if (!attr_flag) + { + ret = fs_getattr(fs_path, &credentials, &attr); + } + if (ret == 0) + { + DokanFileInfo->IsDirectory = attr.objtype & PVFS_TYPE_DIRECTORY; + } + else + { + DbgPrint(" fs_getattr (2) failed with code: %d\n", ret); + } + } + + free(fs_path); + + DbgPrint("CreateFile exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_create_directory( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret, err; + PVFS_handle handle; + PVFS_credentials credentials; + + DbgPrint("CreateDirectory: %S\n", FileName); + + DokanFileInfo->Context = 0; + + /* load credentials (of requestor) */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("CreateDirectory", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + ret = fs_mkdir(fs_path, &credentials, &handle, goptions->new_dir_perms); + + DbgPrint(" fs_mkdir returns: %d\n", ret); + + err = error_map(ret); + if (err == ERROR_SUCCESS) + { + DokanFileInfo->IsDirectory = TRUE; + DokanFileInfo->Context = gen_context(); + add_credentials(DokanFileInfo->Context, &credentials); + } + + free(fs_path); + + DbgPrint("CreateDirectory exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_open_directory( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret, err; + PVFS_sys_attr attr; + PVFS_credentials credentials; + + DbgPrint("OpenDirectory: %S\n", FileName); + + DokanFileInfo->Context = 0; + + /* load credentials (of requestor) */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("OpenDirectory", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* verify file is a directory */ + ret = fs_getattr(fs_path, &credentials, &attr); + DbgPrint(" fs_getattr returns: %d\n", ret); + if (ret == 0) + { + if (!(attr.objtype & PVFS_TYPE_DIRECTORY)) + { + ret = -PVFS_ENOTDIR; + } + } + + err = error_map(ret); + if (err == ERROR_SUCCESS) + { + DokanFileInfo->IsDirectory = TRUE; + DokanFileInfo->Context = gen_context(); + add_credentials(DokanFileInfo->Context, &credentials); + } + + free(fs_path); + + DbgPrint("OpenDirectory exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_close_file( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path = NULL; + int ret = 0, err; + PVFS_credentials credentials; + + DbgPrint("CloseFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* delete the file/dir if DeleteOnClose specified */ + if (DokanFileInfo->DeleteOnClose) + { + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("CloseFile", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* remove the file/dir */ + ret = fs_remove(fs_path, &credentials); + } + + /* PVFS doesn't have a close-file semantic */ + + /* remove credentials from table */ + if (DokanFileInfo->Context != 0) + remove_credentials(DokanFileInfo->Context); + + if (fs_path != NULL) + free(fs_path); + + err = error_map(ret); + + DbgPrint("CloseFile exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_cleanup( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + DbgPrint("Cleanup: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + DbgPrint("Cleanup exit: %d\n", 0); + + return 0; +} + + +static int __stdcall +PVFS_Dokan_read_file( + LPCWSTR FileName, + LPVOID Buffer, + DWORD BufferLength, + LPDWORD ReadLength, + LONGLONG Offset, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + PVFS_size len64; + PVFS_credentials credentials; + PVFS_sys_attr attr; + int ret, ret2, err; + + DbgPrint("ReadFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + DbgPrint(" BufferLength: %lu\n", BufferLength); + DbgPrint(" Offset: %llu\n", Offset); + + if (FileName == NULL || wcslen(FileName) == 0 || + Buffer == NULL || BufferLength == 0 || + ReadLength == 0) + return -1; + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("ReadFile", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* perform the read operation */ + ret = fs_read(fs_path, Buffer, BufferLength, Offset, &len64, &credentials); + *ReadLength = (DWORD) len64; + + /* set the access time */ + if (ret == 0) + { + attr.mask = PVFS_ATTR_SYS_ATIME; + attr.atime = time(NULL); + ret2 = fs_setattr(fs_path, &attr, &credentials); + if (ret2 != 0) + DbgPrint(" fs_setattr returned %d\n", ret2); + } + + free(fs_path); + + err = error_map(ret); + + DbgPrint("ReadFile exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_write_file( + LPCWSTR FileName, + LPCVOID Buffer, + DWORD NumberOfBytesToWrite, + LPDWORD NumberOfBytesWritten, + LONGLONG Offset, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + PVFS_size len64; + PVFS_credentials credentials; + PVFS_sys_attr attr; + int ret, ret2, err; + + DbgPrint("WriteFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("WriteFile", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* perform the write operation */ + ret = fs_write(fs_path, (void *) Buffer, NumberOfBytesToWrite, Offset, + &len64, &credentials); + *NumberOfBytesWritten = (DWORD) len64; + + /* set the modify and access times */ + if (ret == 0) + { + attr.mask = PVFS_ATTR_SYS_ATIME|PVFS_ATTR_SYS_MTIME; + attr.atime = attr.mtime = time(NULL); + ret2 = fs_setattr(fs_path, &attr, &credentials); + if (ret2 != 0) + DbgPrint(" fs_setattr returned %d\n", ret2); + } + + free(fs_path); + + err = error_map(ret); + + DbgPrint("WriteFile exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_flush_file_buffers( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret, err; + PVFS_credentials credentials; + + DbgPrint("FlushFileBuffers: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("FlushFileBuffers", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* flush the file */ + ret = fs_flush(fs_path, &credentials); + + err = error_map(ret); + + free(fs_path); + + DbgPrint("FlushFileBuffers exit: %d (%d)\n", err, ret); + + return err; +} + +/* free attribute buffers that are allocated with fs_getattr */ +#define FREE_ATTR_BUFS(attr) do { \ + if (attr.dist_name != NULL) \ + free(attr.dist_name); \ + if (attr.dist_params != NULL) \ + free(attr.dist_params); \ + if (attr.link_target != NULL) \ + free(attr.link_target); \ + } while (0) + + +static int __stdcall +PVFS_Dokan_get_file_information( + LPCWSTR FileName, + LPBY_HANDLE_FILE_INFORMATION HandleFileInformation, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path, *filename; + int ret, err; + PVFS_sys_attr attr; + PVFS_credentials credentials; + char info[32]; + + DbgPrint("GetFileInfo: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("GetFileInfo", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* get file attributes */ + ret = fs_getattr(fs_path, &credentials, &attr); + + if (ret == 0) + { + filename = (char *) malloc(strlen(fs_path) + 1); + MALLOC_CHECK(filename); + PINT_remove_base_dir(fs_path, filename, strlen(fs_path) + 1); + + ret = PVFS_sys_attr_to_file_info(filename, &credentials, &attr, + HandleFileInformation); + + free(filename); + + if (ret == 0) + { + strcpy(info, " "); + /* temporary file */ + if (DokanFileInfo->DeleteOnClose) + { + HandleFileInformation->dwFileAttributes |= FILE_ATTRIBUTE_TEMPORARY; + strcat(info, "TEMP "); + } + + /* debugging */ + if (HandleFileInformation->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) + { + strcat(info, "DIR "); + } + + if (HandleFileInformation->dwFileAttributes & FILE_ATTRIBUTE_HIDDEN) + { + strcat(info, "HIDDEN "); + } + + if (HandleFileInformation->dwFileAttributes & FILE_ATTRIBUTE_READONLY) + { + strcat(info, "READONLY "); + } + + /* normal file */ + if (HandleFileInformation->dwFileAttributes & FILE_ATTRIBUTE_NORMAL) + { + strcat(info, "NORMAL"); + } + + DbgPrint("%s\n", info); + } + + FREE_ATTR_BUFS(attr); + } + + err = error_map(ret); + + free(fs_path); + + DbgPrint("GetFileInfo exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_set_file_attributes( + LPCWSTR FileName, + DWORD FileAttributes, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret, err, change_flag = 0; + PVFS_sys_attr attr; + PVFS_credentials credentials; + + DbgPrint("SetFileAttributes: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("SetFileAttributes", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* convert attributes to PVFS */ + ret = fs_getattr(fs_path, &credentials, &attr); + + if (ret == 0) + { + attr.mask = PVFS_ATTR_SYS_PERM; + /* write permission is on and request to make + file readonly */ + if (((attr.perms & 0200) || + (attr.perms & 0020) || + (attr.perms & 0002)) && + (FileAttributes & FILE_ATTRIBUTE_READONLY)) + { + attr.perms &= ~0222; + change_flag = 1; + } + else if ((!(attr.perms & 0200) || + !(attr.perms & 0020) || + !(attr.perms & 0002)) && + !(FileAttributes & FILE_ATTRIBUTE_READONLY)) + { + /* write permission is off and request to make + file writable */ + attr.perms |= 0222; + change_flag = 1; + } + + if (change_flag) + { + ret = fs_setattr(fs_path, &attr, &credentials); + } + } + + free(fs_path); + + err = error_map(ret); + + DbgPrint("SetFileAttributes exit: %d (%d)\n", err, ret); + + return err; +} + + +/* add . and .. entries to directory listing */ +static int add_dir_entries( + char *fs_path, + PVFS_credentials *credentials, + PFillFindData FillFindData, + PDOKAN_FILE_INFO DokanFileInfo) +{ + int ret; + PVFS_sys_attr attr1, attr2; + char parent_path[PVFS_PATH_MAX+8]; + WIN32_FIND_DATAW find_data; + BY_HANDLE_FILE_INFORMATION hfile_info; + + /* get attributes of current directory */ + ret = fs_getattr(fs_path, credentials, &attr1); + if (ret != 0) + { + DbgPrint(" add_dir_entries: fs_getattr (1) returned %d\n", ret); + return ret; + } + + /* determine parent path */ + memset(parent_path, 0, sizeof(parent_path)); + if (strcmp(fs_path, "/") == 0) + { + /* just use current path for root */ + memcpy(&attr2, &attr1, sizeof(PVFS_sys_attr)); + } + else + { + /* get attrs of parent for .. entry */ + ret = PINT_get_base_dir(fs_path, parent_path, PVFS_PATH_MAX); + if (ret == -1) + { + return -PVFS_EINVAL; + } + + ret = fs_getattr(parent_path, credentials, &attr2); + if (ret != 0) + { + DbgPrint(" add_dir_entries: fs_getattr (2) returned %d\n", ret); + return ret; + } + } + + /* convert attributes of . entry */ + memset(&find_data, 0, sizeof(WIN32_FIND_DATAW)); + ret = PVFS_sys_attr_to_file_info(".", credentials, &attr1, &hfile_info); + if (ret != 0) + { + DbgPrint(" add_dir_entries: PVFS_sys_attr_to_file_info returned %d\n", ret); + return -PVFS_EINVAL; + } + + /* attributes */ + find_data.dwFileAttributes = hfile_info.dwFileAttributes; + memcpy(&find_data.ftCreationTime, &hfile_info.ftCreationTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastAccessTime, &hfile_info.ftLastAccessTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastWriteTime, &hfile_info.ftLastWriteTime, + sizeof(FILETIME)); + find_data.nFileSizeHigh = hfile_info.nFileSizeHigh; + find_data.nFileSizeLow = hfile_info.nFileSizeLow; + + /* filename */ + wcscpy(find_data.cFileName, L"."); + + /* Dokan callback function */ + FillFindData(&find_data, DokanFileInfo); + + /* convert attributes of .. entry */ + memset(&find_data, 0, sizeof(WIN32_FIND_DATAW)); + ret = PVFS_sys_attr_to_file_info("..", credentials, &attr2, &hfile_info); + if (ret != 0) + { + DbgPrint(" add_dir_entries: PVFS_sys_attr_to_file_info returned %d\n", ret); + return -PVFS_EINVAL; + } + + /* attributes */ + find_data.dwFileAttributes = hfile_info.dwFileAttributes; + memcpy(&find_data.ftCreationTime, &hfile_info.ftCreationTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastAccessTime, &hfile_info.ftLastAccessTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastWriteTime, &hfile_info.ftLastWriteTime, + sizeof(FILETIME)); + find_data.nFileSizeHigh = hfile_info.nFileSizeHigh; + find_data.nFileSizeLow = hfile_info.nFileSizeLow; + + /* filename */ + wcscpy(find_data.cFileName, L".."); + + /* Dokan callback function */ + FillFindData(&find_data, DokanFileInfo); + + return 0; +} + +/* max files per request - based on PVFS_REQ_LIMIT_DIRENT_COUNT_READDIRPLUS in + pvfs2-req-proto.h */ +#define PVFS2_FIND_FILES_MAX 60 + +static int __stdcall +PVFS_Dokan_find_files_with_pattern( + LPCWSTR PathName, + LPCWSTR SearchPattern, + PFillFindData FillFindData, // function pointer + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path, **filename_array; + int ret, err, count = 0, i, incount, outcount; + PVFS_ds_position token; + PVFS_credentials credentials; + PVFS_sys_attr *attr_array; + WIN32_FIND_DATAW find_data; + wchar_t *wfilename = NULL; + BY_HANDLE_FILE_INFORMATION hfile_info; + int match_flag; + + DbgPrint("FindFilesWithPattern: %S\n", PathName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + DbgPrint(" Pattern: %S\n", SearchPattern); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("FindFiles", err); + + /* get file system path */ + fs_path = get_fs_path(PathName); + if (fs_path == NULL) + return -1; + + /* max files per request */ + incount = PVFS2_FIND_FILES_MAX; + + /* allocate filename buffers */ + filename_array = (char **) malloc(incount * sizeof(char *)); + MALLOC_CHECK(filename_array); + for (i = 0; i < incount; i++) + { + filename_array[i] = (char *) malloc(PVFS_NAME_MAX + 8); + MALLOC_CHECK(filename_array[i]); + } + + /* allocate attr buffer */ + attr_array = (PVFS_sys_attr *) malloc(incount * sizeof(PVFS_sys_attr)); + MALLOC_CHECK(attr_array); + + /* no need to match if pattern is "*" (all files) */ + match_flag = wcscmp(SearchPattern, L"*"); + + /* if we have a * (all files) pattern, add . and .. entries */ + if (!match_flag) + { + ret = add_dir_entries(fs_path, &credentials, FillFindData, DokanFileInfo); + if (ret != 0) + { + goto find_files_exit; + } + } + + token = PVFS_READDIR_START; + + /* loop until all files are returned */ + do + { + /* Dokan timeout */ + DokanResetTimeout(30000, DokanFileInfo); + + /* request up to incount files from file system */ + ret = fs_find_files(fs_path, &credentials, &token, incount, &outcount, + filename_array, attr_array); + if (ret != 0) + { + DbgPrint(" fs_find_files returned %d\n", ret); + goto find_files_exit; + } + + /* loop through files */ + for (i = 0; i < outcount; i++) + { + DbgPrint(" File found: %s\n", filename_array[i]); + + wfilename = convert_mbstring(filename_array[i]); + + /* match file against search pattern */ + if (match_flag) + { + if (!DokanIsNameInExpression(SearchPattern, wfilename, FALSE)) + { + DbgPrint(" File doesn't match\n"); + goto find_files_no_match; + } + } + + count++; + + /* convert file information */ + memset(&find_data, 0, sizeof(WIN32_FIND_DATAW)); + ret = PVFS_sys_attr_to_file_info(filename_array[i], &credentials, + &attr_array[i], &hfile_info); + if (ret != 0) + { + DbgPrint(" PVFS_sys_attr_to_file_info returned %d\n", ret); + cleanup_string(wfilename); + goto find_files_exit; + } + + + find_data.dwFileAttributes = hfile_info.dwFileAttributes; + memcpy(&find_data.ftCreationTime, &hfile_info.ftCreationTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastAccessTime, &hfile_info.ftLastAccessTime, + sizeof(FILETIME)); + memcpy(&find_data.ftLastWriteTime, &hfile_info.ftLastWriteTime, + sizeof(FILETIME)); + find_data.nFileSizeHigh = hfile_info.nFileSizeHigh; + find_data.nFileSizeLow = hfile_info.nFileSizeLow; + + /* copy filename */ + wcscpy(find_data.cFileName, wfilename); + + /* Dokan callback function */ + FillFindData(&find_data, DokanFileInfo); + +find_files_no_match: + if (wfilename) + { + cleanup_string(wfilename); + wfilename = NULL; + } + + } /* for */ + + } while (outcount && (incount == outcount)); + +find_files_exit: + + /* free filenames */ + for (i = 0; i < incount; i++) + { + free(filename_array[i]); + } + free(filename_array); + + free(attr_array); + + free(fs_path); + + err = error_map(ret); + + DbgPrint("FindFiles exit: %d (%d) (%d files)\n", err, ret, count); + + return err; +} + + +static int __stdcall +PVFS_Dokan_delete_file( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + PVFS_handle handle; + PVFS_credentials credentials; + int ret, err; + + DbgPrint("DeleteFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("DeleteFile", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* Do not actually remove the file here, just return + success if file is found. + The file/dir will be deleted in close_file(). */ + ret = fs_lookup(fs_path, &credentials, &handle); + + free(fs_path); + + err = error_map(ret); + + DbgPrint("DeleteFile exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_delete_directory( + LPCWSTR FileName, + PDOKAN_FILE_INFO DokanFileInfo) +{ + int err; + + DbgPrint("DeleteDirectory: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + err = PVFS_Dokan_delete_file(FileName, DokanFileInfo); + + DbgPrint("DeleteDirectory exit: %d\n", err); + + return err; +} + + +static int __stdcall +PVFS_Dokan_move_file( + LPCWSTR FileName, // existing file name + LPCWSTR NewFileName, + BOOL ReplaceIfExisting, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *old_fs_path, *new_fs_path; + int ret, err; + PVFS_credentials credentials; + + DbgPrint("MoveFile: %S -> %S\n", FileName, NewFileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("MoveFile", err); + + /* get file system path */ + old_fs_path = get_fs_path(FileName); + if (old_fs_path == NULL) + return -1; + + new_fs_path = get_fs_path(NewFileName); + if (new_fs_path == NULL) + { + free(old_fs_path); + return -1; + } + + /* rename/move the file */ + ret = fs_rename(old_fs_path, new_fs_path, &credentials); + + free(old_fs_path); + free(new_fs_path); + + err = error_map(ret); + + DbgPrint("MoveFile exit: %d (%d)\n", err, ret); + + return err; +} + +static int __stdcall +PVFS_Dokan_lock_file( + LPCWSTR FileName, + LONGLONG ByteOffset, + LONGLONG Length, + PDOKAN_FILE_INFO DokanFileInfo) +{ + DbgPrint("LockFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* PVFS does not currently have a locking mechanism */ + + DbgPrint("LockFile exit: %d\n", 0); + + return 0; +} + + +static int __stdcall +PVFS_Dokan_set_end_of_file( + LPCWSTR FileName, + LONGLONG ByteOffset, + PDOKAN_FILE_INFO DokanFileInfo) +{ + DbgPrint("SetEndOfFile %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* PVFS doesn't open file handles, so this function is not needed (?) */ + + DbgPrint("SetEndOfFile exit: %d\n", 0); + + return 0; +} + + +static int __stdcall +PVFS_Dokan_set_allocation_size( + LPCWSTR FileName, + LONGLONG AllocSize, + PDOKAN_FILE_INFO DokanFileInfo) +{ + int ret, err; + PVFS_credentials credentials; + char *fs_path; + + DbgPrint("SetAllocationSize %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("SetFileTime", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* truncate file */ + ret = fs_truncate(fs_path, AllocSize, &credentials); + + free(fs_path); + + err = error_map(ret); + + DbgPrint("SetAllocationSize exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_set_file_time( + LPCWSTR FileName, + CONST FILETIME* CreationTime, + CONST FILETIME* LastAccessTime, + CONST FILETIME* LastWriteTime, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *fs_path; + int ret = 0, err; + PVFS_credentials credentials; + PVFS_sys_attr attr; + + DbgPrint("SetFileTime: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* load credentials */ + err = get_credentials(DokanFileInfo, &credentials); + CRED_CHECK("SetFileTime", err); + + /* get file system path */ + fs_path = get_fs_path(FileName); + if (fs_path == NULL) + return -1; + + /* convert and set the file times */ + memset(&attr, 0, sizeof(PVFS_sys_attr)); + if (CreationTime != NULL && !(CreationTime->dwLowDateTime == 0 && + CreationTime->dwHighDateTime == 0)) + { + convert_filetime((LPFILETIME) CreationTime, &attr.ctime); + attr.mask |= PVFS_ATTR_SYS_CTIME; + } + if (LastAccessTime != NULL && !(LastAccessTime->dwLowDateTime == 0 && + LastAccessTime->dwHighDateTime == 0)) + { + convert_filetime((LPFILETIME) LastAccessTime, &attr.atime); + attr.mask |= PVFS_ATTR_SYS_ATIME; + } + if (LastWriteTime != NULL && !(LastWriteTime->dwLowDateTime == 0 && + LastWriteTime->dwHighDateTime == 0)) + { + convert_filetime((LPFILETIME) LastWriteTime, &attr.mtime); + attr.mask |= PVFS_ATTR_SYS_MTIME; + } + + if (attr.mask != 0) + ret = fs_setattr(fs_path, &attr, &credentials); + + free(fs_path); + + err = error_map(ret); + + DbgPrint("SetFileTime exit: %d (%d)\n", err, ret); + + return err; +} + +/* TODO: Not currently in use. Causes Windows Explorer to crash. */ +static int __stdcall +PVFS_Dokan_get_file_security( + LPCWSTR FileName, + PSECURITY_INFORMATION SecurityInformation, + PSECURITY_DESCRIPTOR SecurityDescriptor, + ULONG BufferLength, + PULONG LengthNeeded, + PDOKAN_FILE_INFO DokanFileInfo) +{ + SID_IDENTIFIER_AUTHORITY sid_auth_world = SECURITY_WORLD_SID_AUTHORITY; + PSID everyone_sid = NULL, self_sid = NULL /*guest_sid = NULL*/; + DWORD self_sid_size = SECURITY_MAX_SID_SIZE; + EXPLICIT_ACCESS ea; + PACL acl = NULL; + PSECURITY_DESCRIPTOR desc = NULL; + int err = 1; + + DbgPrint("GetFileSecurity: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + DbgPrint(" BufferLength: %u\n", BufferLength); + + /* debug flags */ + DbgPrint(" Flags:\n"); + if (*SecurityInformation & DACL_SECURITY_INFORMATION) + DbgPrint(" DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & GROUP_SECURITY_INFORMATION) + DbgPrint(" GROUP_SECURITY_INFORMATION\n"); + if (*SecurityInformation & LABEL_SECURITY_INFORMATION) + DbgPrint(" LABEL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & OWNER_SECURITY_INFORMATION) + DbgPrint(" OWNER_SECURITY_INFORMATION\n"); + if (*SecurityInformation & PROTECTED_DACL_SECURITY_INFORMATION) + DbgPrint(" PROTECTED_DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & PROTECTED_SACL_SECURITY_INFORMATION) + DbgPrint(" PROTECTED_SACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & SACL_SECURITY_INFORMATION) + DbgPrint(" SACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & UNPROTECTED_DACL_SECURITY_INFORMATION) + DbgPrint(" UNPROTECTED_DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & UNPROTECTED_SACL_SECURITY_INFORMATION) + DbgPrint(" UNPROTECTED_SACL_SECURITY_INFORMATION\n"); + + /* TODO: return all access rights for everyone for now */ + + /* get SID for Everyone group */ + if (!AllocateAndInitializeSid(&sid_auth_world, 1, SECURITY_WORLD_RID, + 0, 0, 0, 0, 0, 0, 0, &everyone_sid)) + { + DbgPrint(" Could not allocate SID for Everyone\n"); + goto get_file_security_exit; + } + + /* get SID for Guest account */ + /* + if (!AllocateAndInitializeSid(&sid_auth_world, 1, DOMAIN_USER_RID_GUEST, + 0, 0, 0, 0, 0, 0, 0, &guest_sid)) + { + DbgPrint(" Could not allocate SID for Guest\n"); + goto get_file_security_exit; + } + */ + + self_sid = LocalAlloc(LMEM_FIXED, self_sid_size); + if (self_sid == NULL) + { + DbgPrint(" Could not allocate SID for self\n"); + goto get_file_security_exit; + } + + /* get SID for current account */ + if (!CreateWellKnownSid(WinSelfSid, NULL, self_sid, &self_sid_size)) + { + DbgPrint(" Could not create SID for self\n"); + goto get_file_security_exit; + } + + /* Specify ACE with all rights for everyone */ + ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS)); + ea.grfAccessPermissions = KEY_ALL_ACCESS; + ea.grfAccessMode = SET_ACCESS; + ea.grfInheritance = NO_INHERITANCE; + ea.Trustee.TrusteeForm = TRUSTEE_IS_SID; + ea.Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; + ea.Trustee.ptstrName = (LPTSTR) everyone_sid; + + /* add entry to the ACL */ + if (SetEntriesInAcl(1, &ea, NULL, &acl) != ERROR_SUCCESS) + { + DbgPrint(" Could not add ACE to ACL\n"); + goto get_file_security_exit; + } + + /* initialize the descriptor */ + desc = (PSECURITY_DESCRIPTOR) LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); + MALLOC_CHECK(desc); + if (!InitializeSecurityDescriptor(desc, + SECURITY_DESCRIPTOR_REVISION)) + { + DbgPrint(" Could not initialize descriptor\n"); + goto get_file_security_exit; + } + + /* set primary owner to Guest */ + if (*SecurityInformation & OWNER_SECURITY_INFORMATION) + { + if (!SetSecurityDescriptorOwner(desc, self_sid, FALSE)) + { + DbgPrint(" Could not set descriptor owner\n"); + goto get_file_security_exit; + } + } + + /* set primary group to Everyone group */ + if (*SecurityInformation & GROUP_SECURITY_INFORMATION) + { + if (!SetSecurityDescriptorGroup(desc, everyone_sid, FALSE)) + { + DbgPrint(" Could not set descriptor group\n"); + goto get_file_security_exit; + } + } + + /* add the ACL to the security descriptor */ + if (*SecurityInformation & DACL_SECURITY_INFORMATION) + { + if (!SetSecurityDescriptorDacl(desc, TRUE, acl, FALSE)) + { + DbgPrint(" Could not set descriptor DACL\n"); + goto get_file_security_exit; + } + } + + *LengthNeeded = GetSecurityDescriptorLength(desc); + + if (BufferLength >= *LengthNeeded) + { + ZeroMemory(SecurityDescriptor, BufferLength); + CopyMemory(SecurityDescriptor, desc, *LengthNeeded); + } + else + { + DbgPrint(" Length Needed: %u\n", *LengthNeeded); + err = -ERROR_INSUFFICIENT_BUFFER; + } + +get_file_security_exit: + + if (desc) + LocalFree(desc); + if (acl) + LocalFree(acl); + /* + if (guest_sid) + FreeSid(guest_sid); + */ + if (self_sid) + FreeSid(self_sid); + if (everyone_sid) + FreeSid(everyone_sid); + + if (err == 1) + err = GetLastError() * -1; + + DbgPrint("GetFileSecurity exit: %d\n", err); + + return err; +} + + +static int __stdcall +PVFS_Dokan_set_file_security( + LPCWSTR FileName, + PSECURITY_INFORMATION SecurityInformation, + PSECURITY_DESCRIPTOR SecurityDescriptor, + ULONG BufferLength, // SecurityDescriptor length + PDOKAN_FILE_INFO DokanFileInfo) +{ + int err; + + DbgPrint("SetFileSecurity: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* debug flags */ + DbgPrint(" Flags:\n"); + if (*SecurityInformation & DACL_SECURITY_INFORMATION) + DbgPrint(" DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & GROUP_SECURITY_INFORMATION) + DbgPrint(" GROUP_SECURITY_INFORMATION\n"); + if (*SecurityInformation & LABEL_SECURITY_INFORMATION) + DbgPrint(" LABEL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & OWNER_SECURITY_INFORMATION) + DbgPrint(" OWNER_SECURITY_INFORMATION\n"); + if (*SecurityInformation & PROTECTED_DACL_SECURITY_INFORMATION) + DbgPrint(" PROTECTED_DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & PROTECTED_SACL_SECURITY_INFORMATION) + DbgPrint(" PROTECTED_SACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & SACL_SECURITY_INFORMATION) + DbgPrint(" SACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & UNPROTECTED_DACL_SECURITY_INFORMATION) + DbgPrint(" UNPROTECTED_DACL_SECURITY_INFORMATION\n"); + if (*SecurityInformation & UNPROTECTED_SACL_SECURITY_INFORMATION) + DbgPrint(" UNPROTECTED_SACL_SECURITY_INFORMATION\n"); + + /* TODO: no effect for now */ + + err = 0; + + DbgPrint("SetFileSecurity exit: %d\n", err); + + return err; +} + + +static int __stdcall +PVFS_Dokan_unlock_file( + LPCWSTR FileName, + LONGLONG ByteOffset, + LONGLONG Length, + PDOKAN_FILE_INFO DokanFileInfo) +{ + DbgPrint("UnLockFile: %S\n", FileName); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* PVFS does not currently have a locking mechanism */ + + DbgPrint("UnLockFile exit: %d\n", 0); + + return 0; +} + + +static int __stdcall +PVFS_Dokan_unmount( + PDOKAN_FILE_INFO DokanFileInfo) +{ + DbgPrint("Unmount\n"); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + DbgPrint("Unmount exit: %d\n", 0); + + return 0; +} + + +static int __stdcall +PVFS_Dokan_get_disk_free_space( + PULONGLONG FreeBytesAvailable, + PULONGLONG TotalNumberOfBytes, + PULONGLONG TotalNumberOfFreeBytes, + PDOKAN_FILE_INFO DokanFileInfo) +{ + int ret, err; + PVFS_credentials credentials; + + DbgPrint("GetDiskFreeSpace\n"); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* use default credentials */ + credentials.uid = credentials.gid = 0; + + ret = fs_get_diskfreespace(&credentials, + (PVFS_size *) FreeBytesAvailable, + (PVFS_size *) TotalNumberOfBytes); + + err = error_map(ret); + if (err == ERROR_SUCCESS) + { + *TotalNumberOfFreeBytes = *FreeBytesAvailable; + } + + DbgPrint("GetDiskFreeSpace exit: %d (%d)\n", err, ret); + + return err; +} + + +static int __stdcall +PVFS_Dokan_get_volume_information( + LPWSTR VolumeNameBuffer, + DWORD VolumeNameSize, + LPDWORD VolumeSerialNumber, + LPDWORD MaximumComponentLength, + LPDWORD FileSystemFlags, + LPWSTR FileSystemNameBuffer, + DWORD FileSystemNameSize, + PDOKAN_FILE_INFO DokanFileInfo) +{ + char *vol_name; + wchar_t *wvol_name; + + DbgPrint("GetVolumeInformation\n"); + DbgPrint(" Context: %llx\n", DokanFileInfo->Context); + + /* volume name */ + vol_name = fs_get_name(0); + wvol_name = convert_mbstring(vol_name); + /* bug in volume.c -- use length of wvol_name */ + wcsncpy(VolumeNameBuffer, wvol_name, wcslen(wvol_name)); + free(wvol_name); + + /* serial number, comp. length and flags */ + *VolumeSerialNumber = fs_get_id(0); + *MaximumComponentLength = PVFS_NAME_MAX; + *FileSystemFlags = FILE_CASE_SENSITIVE_SEARCH | + FILE_CASE_PRESERVED_NAMES; + /* + FILE_SUPPORTS_REMOTE_STORAGE | + FILE_PERSISTENT_ACLS; + */ + + /* File System Name */ + /* bug in volume.c -- see above */ + wcsncpy(FileSystemNameBuffer, L"OrangeFS", 8); + + DbgPrint("GetVolumeInformation exit: 0\n"); + + return 0; +} + + +int __cdecl dokan_loop(PORANGEFS_OPTIONS options) +{ + + int status; + PDOKAN_OPERATIONS dokanOperations = + (PDOKAN_OPERATIONS) malloc(sizeof(DOKAN_OPERATIONS)); + PDOKAN_OPTIONS dokanOptions = + (PDOKAN_OPTIONS) malloc(sizeof(DOKAN_OPTIONS)); + + /* init credential cache */ + context_cache = qhash_init(cred_compare, quickhash_64bit_hash, 257); + gen_mutex_init(&context_cache_mutex); + + g_DebugMode = options->debug; + g_UseStdErr = options->debug_stderr; + + ZeroMemory(dokanOptions, sizeof(DOKAN_OPTIONS)); + dokanOptions->ThreadCount = options->threads; + + if (g_DebugMode) + dokanOptions->Options |= DOKAN_OPTION_DEBUG; + + if (g_UseStdErr) + dokanOptions->Options |= DOKAN_OPTION_STDERR; + + dokanOptions->Options |= DOKAN_OPTION_KEEP_ALIVE | + DOKAN_OPTION_REMOVABLE; + + dokanOptions->Version = 600; + + dokanOptions->MountPoint = convert_mbstring(options->mount_point); + + /* assign file operations */ + ZeroMemory(dokanOperations, sizeof(DOKAN_OPERATIONS)); + dokanOperations->CreateFile = PVFS_Dokan_create_file; + dokanOperations->OpenDirectory = PVFS_Dokan_open_directory; + dokanOperations->CreateDirectory = PVFS_Dokan_create_directory; + dokanOperations->Cleanup = PVFS_Dokan_cleanup; + dokanOperations->CloseFile = PVFS_Dokan_close_file; + dokanOperations->ReadFile = PVFS_Dokan_read_file; + dokanOperations->WriteFile = PVFS_Dokan_write_file; + dokanOperations->FlushFileBuffers = PVFS_Dokan_flush_file_buffers; + dokanOperations->GetFileInformation = PVFS_Dokan_get_file_information; + dokanOperations->FindFilesWithPattern = PVFS_Dokan_find_files_with_pattern; + dokanOperations->SetFileAttributes = PVFS_Dokan_set_file_attributes; + dokanOperations->SetFileTime = PVFS_Dokan_set_file_time; + dokanOperations->DeleteFile = PVFS_Dokan_delete_file; + dokanOperations->DeleteDirectory = PVFS_Dokan_delete_directory; + dokanOperations->MoveFile = PVFS_Dokan_move_file; + dokanOperations->SetEndOfFile = PVFS_Dokan_set_end_of_file; + dokanOperations->SetAllocationSize = PVFS_Dokan_set_allocation_size; + dokanOperations->LockFile = PVFS_Dokan_lock_file; + dokanOperations->UnlockFile = PVFS_Dokan_unlock_file; + dokanOperations->GetDiskFreeSpace = PVFS_Dokan_get_disk_free_space; + dokanOperations->GetVolumeInformation = PVFS_Dokan_get_volume_information; +/* dokanOperations->GetFileSecurityA = PVFS_Dokan_get_file_security; */ + dokanOperations->SetFileSecurityA = PVFS_Dokan_set_file_security; + dokanOperations->Unmount = PVFS_Dokan_unmount; + + /* Attempt to start listening for Dokan messages. Will retry indefinitely. + If service is stopped or CTRL-C is used, thread will terminate. + Retry is primarily for waiting for services to be available on system + startup. */ + do { + DbgPrint("Entering DokanMain\n"); + + /* dokan loops until termination */ + status = DokanMain(dokanOptions, dokanOperations); + + DbgPrint("Exited DokanMain\n"); + + switch (status) { + case DOKAN_SUCCESS: + DbgPrint("Success\n"); + break; + case DOKAN_ERROR: + DbgPrint("Error\n"); + break; + case DOKAN_DRIVE_LETTER_ERROR: + DbgPrint("Bad Drive letter\n"); + break; + case DOKAN_DRIVER_INSTALL_ERROR: + DbgPrint("Can't install driver\n"); + break; + case DOKAN_START_ERROR: + DbgPrint("Driver something wrong\n"); + break; + case DOKAN_MOUNT_ERROR: + DbgPrint("Can't assign a drive letter\n"); + break; + case DOKAN_MOUNT_POINT_ERROR: + DbgPrint("Can't assign mount point\n"); + break; + default: + DbgPrint("Unknown error: %d\n", status); + break; + } + + DbgPrint("Retrying in 30 seconds...\n"); + + Sleep(30000); + + } while (TRUE); + + cleanup_string(dokanOptions->MountPoint); + + qhash_destroy_and_finalize(context_cache, struct context_entry, hash_link, free); + gen_mutex_destroy(&context_cache_mutex); + + free(dokanOptions); + free(dokanOperations); + + return status; + +} diff --git a/src/client/windows/client-service/fs.c b/src/client/windows/client-service/fs.c new file mode 100755 index 0000000..84e33b1 --- /dev/null +++ b/src/client/windows/client-service/fs.c @@ -0,0 +1,920 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Client Service - file system routines + * These routines provide a layer of abstraction between the Dokan + * callbacks (dokan-interface.c) and OrangeFS. + */ + +#include +#include +#include + +#include "pvfs2.h" +#include "str-utils.h" + +#include "client-service.h" + +const PVFS_util_tab *tab; + +int sys_get_symlink_attr(char *fs_path, + char *target, + PVFS_object_ref *ref, + PVFS_credentials *credentials, + PVFS_sys_attr *attr); + +/* split path into base dir and entry name components */ +int split_path(char *fs_path, + char *base_dir, + int base_dir_len, + char *entry_name, + int entry_name_len) +{ + int ret; + + /* get base dir */ + ret = PINT_get_base_dir(fs_path, base_dir, base_dir_len); + + if (ret != 0) + return ret; + + /* get entry name */ + ret = PINT_remove_base_dir(fs_path, entry_name, entry_name_len); + + return ret; +} + +/* initialize file systems */ +int fs_initialize(const char *tabfile, + char *error_msg, + size_t error_msg_len) +{ + int ret, i, found_one = 0; + char errbuf[256]; + + /* read tab file */ + tab = PVFS_util_parse_pvfstab(tabfile); + if (!tab) + { + _snprintf(error_msg, error_msg_len, "fs_initialize: failed to parse %s", + tabfile); + return -1; + } + + /* initialize PVFS */ + ret = PVFS_sys_initialize(GOSSIP_NO_DEBUG); + if (ret < 0) + { + PVFS_strerror_r(ret, errbuf, 256); + _snprintf(error_msg, error_msg_len, "PVFS_sys_initialize: %s", errbuf); + return ret; + } + + /* initialize file systems */ + for (i = 0; i < tab->mntent_count; i++) + { + ret = PVFS_sys_fs_add(&tab->mntent_array[i]); + if (ret == 0) + found_one = 1; + } + + if (!found_one) + { + _snprintf(error_msg, error_msg_len, "fs_initialize: could not initialize any " + "file systems from %s", tab->tabfile_name); + + PINT_release_pvfstab(); + PVFS_sys_finalize(); + return -1; + } + + return 0; +} + +struct PVFS_sys_mntent *fs_get_mntent(PVFS_fs_id fs_id) +{ + /* TODO: ignore fs_id right now, + return first entry */ + return &tab->mntent_array[0]; +} + +int fs_resolve_path(const char *local_path, + char *fs_path, + size_t fs_path_max) +{ + /* struct PVFS_sys_mntent *mntent; */ + /* char *trans_path, *full_path; */ + char *inptr, *outptr; + /* PVFS_fs_id fs_id; */ + size_t count; + + if (local_path == NULL || fs_path == NULL || + fs_path_max == 0) + return -1; + + /* + trans_path = (char *) malloc(strlen(local_path) + 1); + if (trans_path == NULL) + { + return -1; /* TODO */ + /* } */ + + /* remove drive: if necessary */ + if (strlen(local_path) >= 2 && local_path[1] == ':') + inptr = (char *) local_path + 2; + else + inptr = (char *) local_path; + + /* translate \'s to /'s */ + for (outptr = fs_path, count = 0; + *inptr && (count < fs_path_max); + inptr++, outptr++, count++) + { + if (*inptr == '\\') + *outptr = '/'; + else + *outptr = *inptr; + } + *outptr = '\0'; + +#if 0 + mntent = fs_get_mntent(0); + + full_path = (char *) malloc(strlen(trans_path) + + strlen(mntent->mnt_dir) + 2); + if (full_path == NULL) + { + free(trans_path); + return -1; + } + + /* prepend mount directory to path */ + strcpy(full_path, mntent->mnt_dir); + /* append path */ + if (full_path[strlen(full_path)-1] != '/') + strcat(full_path, "/"); + if (trans_path[0] == '/') + strcat(full_path, trans_path+1); + else + strcat(full_path, trans_path); + /* strncpy(fs_path, full_path, fs_path_max); */ + + /* resolve the path against PVFS */ + ret = PVFS_util_resolve(full_path, &fs_id, fs_path, fs_path_max); + + free(full_path); + free(trans_path); +#endif + + return 0; +} + +#define FS_MAX_LINKS 256 + +/* Workaround to follow PVFS2 file links */ +int sys_lookup_follow_links(PVFS_fs_id fs_id, + char *fs_path, + PVFS_credentials *credentials, + PVFS_sysresp_lookup *resp, + PVFS_sys_attr *attr) +{ + char *real_path, *link_path; + PVFS_sysresp_getattr resp_getattr; + int ret, link_flag, count; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL || + resp == NULL) + return -1; + + /* copy to be used for link paths */ + real_path = strdup(fs_path); + count = 0; + do + { + link_flag = FALSE; + + /* lookup the given path on the FS */ + ret = PVFS_sys_lookup(fs_id, real_path, credentials, resp, + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); + if (ret != 0) + break; + + /* check if it's a link */ + memset(&resp_getattr, 0, sizeof(resp_getattr)); + ret = PVFS_sys_getattr(resp->ref, PVFS_ATTR_SYS_ALL_NOHINT, credentials, + &resp_getattr, NULL); + if (ret != 0) + break; + + if (resp_getattr.attr.link_target != NULL) + { + /* we have a link -- compute the target */ + link_flag = TRUE; + link_path = (char *) malloc(PVFS_PATH_MAX + 4); + if (link_path == NULL) + { + PVFS_util_release_sys_attr(&resp_getattr.attr); + ret = -PVFS_ENOMEM; + break; + } + /* if link target is not absolute, prepend path */ + memset(link_path, 0, PVFS_PATH_MAX + 4); + if (resp_getattr.attr.link_target[0] != '/') + { + char *lastslash = strrchr(real_path, '/'); + if (lastslash) + { + /* copy path including slash */ + strncpy(link_path, real_path, lastslash - real_path + 1); + strncat(link_path, resp_getattr.attr.link_target, + PVFS_PATH_MAX - strlen(link_path)); + } + else + { + free(link_path); + PVFS_util_release_sys_attr(&resp_getattr.attr); + ret = -PVFS_EINVAL; + break; + } + } + else + { + /* use absolute link target */ + strncpy(link_path, resp_getattr.attr.link_target, PVFS_PATH_MAX); + } + link_path[PVFS_PATH_MAX-1] = '\0'; + /* get file name */ + free(real_path); + real_path = (char *) malloc(PVFS_PATH_MAX + 4); + ret = PVFS_util_resolve(link_path, &fs_id, real_path, PVFS_PATH_MAX); + if (ret == -PVFS_ENOENT) + { + /* link may not include the mount point, e.g. /mnt/pvfs2. + in this case just use link_path */ + strncpy(real_path, link_path, PVFS_PATH_MAX); + ret = 0; + } + free(link_path); + /* free attr buffer */ + PVFS_util_release_sys_attr(&resp_getattr.attr); + } + else + { + /* copy the attr to the buffer */ + if (attr != NULL) + { + memcpy(attr, &resp_getattr.attr, sizeof(PVFS_sys_attr)); + } + else + { + PVFS_util_release_sys_attr(&resp_getattr.attr); + } + } + } while (ret == 0 && link_flag && (++count) < FS_MAX_LINKS); + + free(real_path); + + if (ret == 0 && count >= FS_MAX_LINKS) + { + ret = -PVFS_EMLINK; + } + + return ret; +} + +/* get the attributes of the target of a symlink */ +int sys_get_symlink_attr(char *fs_path, + char *target, + PVFS_object_ref *ref, + PVFS_credentials *credentials, + PVFS_sys_attr *attr) +{ + int ret; + char link_path[PVFS_PATH_MAX + 4]; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || target == NULL || ref == NULL || + credentials == NULL || attr == NULL) + { + return -PVFS_EINVAL; + } + + if (strlen(fs_path) == 0 || strlen(target) == 0) + { + return -PVFS_EINVAL; + } + + /* if target is relative, append to fs_path */ + memset(link_path, 0, PVFS_PATH_MAX+4); + if (target[0] != '/') + { + strncpy(link_path, fs_path, PVFS_PATH_MAX); + if (link_path[strlen(link_path)-1] != '/') + { + strcat(link_path, "/"); + } + strncat(link_path, target, PVFS_PATH_MAX - strlen(link_path)); + } + else + { + PVFS_fs_id fs_id; + /* use PVFS_util_resolve to remove preceding mount point */ + ret = PVFS_util_resolve(target, &fs_id, link_path, PVFS_PATH_MAX); + if (ret == -PVFS_ENOENT) + { + /* just use target as path */ + strncpy(link_path, target, PVFS_PATH_MAX); + } + else if (ret != 0) + { + return ret; + } + } + + /* lookup the target and retrieve the attributes */ + ret = sys_lookup_follow_links(ref->fs_id, link_path, credentials, &resp_lookup, + attr); + + return ret; +} + +/* lookup PVFS file path + returns 0 and handle if exists */ +int fs_lookup(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + PVFS_sysresp_lookup resp; + int ret; + + if (fs_path == NULL || credentials == NULL || handle == NULL) + return -1; + + /* lookup the given path on the FS - do not follow links */ + ret = PVFS_sys_lookup(mntent->fs_id, fs_path, credentials, &resp, + PVFS2_LOOKUP_LINK_NO_FOLLOW, NULL); + + if (ret == 0) + *handle = resp.ref.handle; + + return ret; +} + +/* create file with specified path + returns 0 and handle on success */ +int fs_create(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle, + unsigned int perms) +{ + char *base_dir, *entry_name; + size_t len; + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref parent_ref; + int ret; + PVFS_sys_attr attr; + PVFS_sysresp_create resp_create; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL) + return -PVFS_EINVAL; + + /* cannot be only a dir */ + if (fs_path[strlen(fs_path)-1] == '/') + return -PVFS_EINVAL; + + /* split path into path and file components */ + len = strlen(fs_path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(fs_path, base_dir, len, entry_name, len); + if (ret != 0) + goto fs_create_exit; + + /* lookup parent path - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, base_dir, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_create_exit; + + parent_ref.fs_id = resp_lookup.ref.fs_id; + parent_ref.handle = resp_lookup.ref.handle; + + /* create file */ + memset(&attr, 0, sizeof(PVFS_sys_attr)); + attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + attr.owner = credentials->uid; + attr.group = credentials->gid; + /* configurable in options */ + attr.perms = perms; + attr.atime = attr.mtime = attr.ctime = time(NULL); + + ret = PVFS_sys_create(entry_name, parent_ref, attr, + credentials, NULL, &resp_create, NULL, NULL); + if (ret) + goto fs_create_exit; + + *handle = resp_create.ref.handle; + +fs_create_exit: + free(entry_name); + free(base_dir); + + return ret; +} + +/* remove specified directory or file */ +int fs_remove(char *fs_path, + PVFS_credentials *credentials) +{ + char *base_dir, *entry_name; + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + size_t len; + int ret; + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref parent_ref; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL) + return -PVFS_EINVAL; + + /* split path into path and file components */ + len = strlen(fs_path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(fs_path, base_dir, len, entry_name, len); + if (ret != 0) + goto fs_remove_exit; + + /* lookup parent entry - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, base_dir, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_remove_exit; + + parent_ref.fs_id = resp_lookup.ref.fs_id; + parent_ref.handle = resp_lookup.ref.handle; + + ret = PVFS_sys_remove(entry_name, parent_ref, credentials, NULL); + +fs_remove_exit: + free(entry_name); + free(base_dir); + + return ret; +} + +int fs_rename(char *old_path, + char *new_path, + PVFS_credentials *credentials) +{ + char *old_base_dir, *old_entry_name, + *new_base_dir, *new_entry_name; + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + size_t len; + int ret; + PVFS_sysresp_lookup old_resp_lookup, new_resp_lookup; + PVFS_object_ref old_parent_ref, new_parent_ref; + + if (old_path == NULL || strlen(old_path) == 0 || + new_path == NULL || strlen(new_path) == 0 || + credentials == NULL) + return -PVFS_EINVAL; + + /* split paths into path and file components */ + len = strlen(old_path) + 1; + old_base_dir = (char *) malloc(len); + old_entry_name = (char *) malloc(len); + if (old_base_dir == NULL || old_entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(old_path, old_base_dir, len, old_entry_name, len); + if (ret != 0) + goto fs_rename_exit; + + /* lookup parent entry - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, old_base_dir, credentials, + &old_resp_lookup, NULL); + if (ret != 0) + goto fs_rename_exit; + + old_parent_ref.fs_id = old_resp_lookup.ref.fs_id; + old_parent_ref.handle = old_resp_lookup.ref.handle; + + len = strlen(new_path) + 1; + new_base_dir = (char *) malloc(len); + new_entry_name = (char *) malloc(len); + if (new_base_dir == NULL || new_entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(new_path, new_base_dir, len, new_entry_name, len); + if (ret != 0) + goto fs_rename_exit; + + /* lookup parent entry - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, new_base_dir, credentials, + &new_resp_lookup, NULL); + if (ret != 0) + goto fs_rename_exit; + + new_parent_ref.fs_id = new_resp_lookup.ref.fs_id; + new_parent_ref.handle = new_resp_lookup.ref.handle; + + /* rename/move the file */ + ret = PVFS_sys_rename(old_entry_name, old_parent_ref, new_entry_name, + new_parent_ref, credentials, NULL); + +fs_rename_exit: + + free(new_entry_name); + free(new_base_dir); + free(old_entry_name); + free(old_base_dir); + + return ret; +} + +int fs_truncate(char *fs_path, + PVFS_size size, + PVFS_credentials *credentials) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL) + { + return -PVFS_EINVAL; + } + + /* lookup file - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_truncate_exit; + + ret = PVFS_sys_truncate(resp_lookup.ref, size, credentials, NULL); + +fs_truncate_exit: + + return ret; +} + +int fs_getattr(char *fs_path, + PVFS_credentials *credentials, + PVFS_sys_attr *attr) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || strlen(fs_path) == 0 || + attr == NULL || credentials == NULL) + return -PVFS_EINVAL; + + /* lookup file - follow links + attributes will be read and placed in attr */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, attr); + if (ret != 0) + goto fs_getattr_exit; + + /* free attr bufs */ + PVFS_util_release_sys_attr(attr); + +fs_getattr_exit: + + return ret; +} + +int fs_setattr(char *fs_path, + PVFS_sys_attr *attr, + PVFS_credentials *credentials) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || strlen(fs_path) == 0 || + attr == NULL || credentials == NULL) + return -PVFS_EINVAL; + + /* lookup file - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_setattr_exit; + + /* set attributes */ + ret = PVFS_sys_setattr(resp_lookup.ref, *attr, credentials, NULL); + +fs_setattr_exit: + + return ret; +} + +int fs_mkdir(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle, + unsigned int perms) +{ + char *base_dir, *entry_name; + size_t len; + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref parent_ref; + PVFS_sys_attr attr; + PVFS_sysresp_mkdir resp_mkdir; + int ret; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL) + return -PVFS_EINVAL; + + /* split path into path and file components */ + len = strlen(fs_path) + 1; + base_dir = (char *) malloc(len); + entry_name = (char *) malloc(len); + if (base_dir == NULL || entry_name == NULL) + { + return -PVFS_ENOMEM; + } + ret = split_path(fs_path, base_dir, len, entry_name, len); + if (ret != 0) + goto fs_mkdir_exit; + + /* lookup parent path - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, base_dir, credentials, + &resp_lookup, NULL); + + if (ret != 0) + goto fs_mkdir_exit; + + parent_ref.fs_id = resp_lookup.ref.fs_id; + parent_ref.handle = resp_lookup.ref.handle; + + /* create file */ + memset(&attr, 0, sizeof(PVFS_sys_attr)); + attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; + attr.owner = credentials->uid; + attr.group = credentials->gid; + /* configurable in options */ + attr.perms = perms; + attr.atime = attr.mtime = attr.ctime = time(NULL); + + ret = PVFS_sys_mkdir(entry_name, parent_ref, attr, credentials, + &resp_mkdir, NULL); + + if (ret == 0) + *handle = resp_mkdir.ref.handle; + +fs_mkdir_exit: + free(entry_name); + free(base_dir); + + return ret; +} + +int fs_io(enum PVFS_io_type io_type, + char *fs_path, + void *buffer, + size_t buffer_len, + uint64_t offset, + PVFS_size *op_len, + PVFS_credentials *credentials) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + PVFS_sysresp_lookup resp_lookup; + PVFS_object_ref object_ref; + PVFS_Request file_req, mem_req; + PVFS_sysresp_io resp_io; + int ret; + + if (fs_path == NULL || strlen(fs_path) == 0 || + buffer == NULL || credentials == NULL) + return -PVFS_EINVAL; + + /* lookup file - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_io_exit; + + /* copy object ref */ + object_ref.fs_id = resp_lookup.ref.fs_id; + object_ref.handle = resp_lookup.ref.handle; + + /* get memory buffer */ + file_req = PVFS_BYTE; + + ret = PVFS_Request_contiguous(buffer_len, PVFS_BYTE, &(mem_req)); + if (ret != 0) + goto fs_io_exit; + + /* perform io operation */ + ret = PVFS_sys_io(object_ref, file_req, offset, buffer, mem_req, + credentials, &resp_io, io_type, NULL); + if (ret == 0 && op_len != NULL) + { + *op_len = resp_io.total_completed; + } + + PVFS_Request_free(&mem_req); + +fs_io_exit: + + return ret; +} + +int fs_flush(char *fs_path, + PVFS_credentials *credentials) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + int ret; + PVFS_sysresp_lookup resp_lookup; + + if (fs_path == NULL || strlen(fs_path) == 0 || credentials == NULL) + return -PVFS_EINVAL; + + /* lookup file - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_flush_exit; + + /* flush file */ + ret = PVFS_sys_flush(resp_lookup.ref, credentials, NULL); + +fs_flush_exit: + + return ret; +} + +int fs_find_files(char *fs_path, + PVFS_credentials *credentials, + PVFS_ds_position *token, + int32_t incount, + int32_t *outcount, + char **filename_array, + PVFS_sys_attr *attr_array) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + int ret, i; + PVFS_sysresp_lookup resp_lookup; + PVFS_sysresp_readdirplus resp_readdirplus; + PVFS_object_ref ref; + PVFS_sysresp_getattr resp_getattr; + + if (fs_path == NULL || strlen(fs_path) == 0 || token == NULL || + outcount == NULL || filename_array == NULL || attr_array == NULL || + credentials == NULL) + return -PVFS_EINVAL; + + /* lookup path - follow links */ + ret = sys_lookup_follow_links(mntent->fs_id, fs_path, credentials, + &resp_lookup, NULL); + if (ret != 0) + goto fs_readdir_exit; + + /* read up to incount entries, starting with token */ + memset(&resp_readdirplus, 0, sizeof(resp_readdirplus)); + ret = PVFS_sys_readdirplus(resp_lookup.ref, *token, incount, credentials, + PVFS_ATTR_SYS_ALL_NOHINT, &resp_readdirplus, NULL); + if (ret != 0) + goto fs_readdir_exit; + + /* copy output results */ + *outcount = resp_readdirplus.pvfs_dirent_outcount; + if (*outcount != 0) + { + *token = resp_readdirplus.token; + + for (i = 0; i < *outcount; i++) + { + strncpy(filename_array[i], resp_readdirplus.dirent_array[i].d_name, PVFS_NAME_MAX); + if (resp_readdirplus.stat_err_array[i] == 0) + { + memcpy(&attr_array[i], &resp_readdirplus.attr_array[i], sizeof(PVFS_sys_attr)); + /* TODO: DEBUG */ + if (resp_readdirplus.attr_array[i].link_target) + { + DbgPrint(" %s link: %s\n", filename_array[i], resp_readdirplus.attr_array[i].link_target); + } + } + else + { + /* attempt to get attrs with PVFS_sys_getattr */ + ref.fs_id = mntent->fs_id; + ref.handle = resp_readdirplus.dirent_array[i].handle; + memset(&resp_getattr, 0, sizeof(PVFS_sysresp_getattr)); + ret = PVFS_sys_getattr(ref, PVFS_ATTR_SYS_ALL_NOHINT, credentials, + &resp_getattr, NULL); + if (ret == 0) + { + memcpy(&attr_array[i], &resp_getattr.attr, sizeof(PVFS_sys_attr)); + } + else { + break; + } + } + /* get attributes of symbolic link if applicable */ + if (attr_array[i].link_target != NULL) + { + ref.fs_id = mntent->fs_id; + ref.handle = resp_readdirplus.dirent_array[i].handle; + /* note: ignore return code... just use attrs of the symlink */ + sys_get_symlink_attr(fs_path, attr_array[i].link_target, + &ref, credentials, &attr_array[i]); + } + /* clear allocated fields */ + PVFS_util_release_sys_attr(&attr_array[i]); + } + + /* free memory */ + free(resp_readdirplus.dirent_array); + free(resp_readdirplus.stat_err_array); + free(resp_readdirplus.attr_array); + } + +fs_readdir_exit: + + return ret; +} + +/* +int fs_find_first_file(char *fs_path, + PVFS_ds_position *token, + PVFS_credentials *credentials, + char *filename, + size_t max_name_len) +{ + if (token == NULL) + { + return -PVFS_EINVAL; + } + + *token = PVFS_READDIR_START; + return fs_find_next_file(fs_path, token, credentials, filename, max_name_len); +} +*/ + +int fs_get_diskfreespace(PVFS_credentials *credentials, + PVFS_size *free_bytes, + PVFS_size *total_bytes) +{ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + PVFS_sysresp_statfs resp_statfs; + int ret; + + if (free_bytes == NULL || total_bytes == NULL || credentials == NULL) + { + return -PVFS_EINVAL; + } + + ret = PVFS_sys_statfs(mntent->fs_id, credentials, &resp_statfs, NULL); + + if (ret == 0) + { + *free_bytes = resp_statfs.statfs_buf.bytes_available; + *total_bytes = resp_statfs.statfs_buf.bytes_total; + } + + return ret; +} + +PVFS_fs_id fs_get_id(int fs_num) +{ + /* TODO: ignore fs_num for now */ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + + return mntent ? mntent->fs_id : 0; +} + +char *fs_get_name(int fs_num) +{ + /* TODO: ignore fs_num for now */ + struct PVFS_sys_mntent *mntent = fs_get_mntent(0); + + return mntent ? mntent->pvfs_fs_name : "PVFS2"; +} + +int fs_finalize() +{ + /* TODO */ + PVFS_sys_finalize(); + + return 0; +} diff --git a/src/client/windows/client-service/fs.h b/src/client/windows/client-service/fs.h new file mode 100755 index 0000000..1fb75d4 --- /dev/null +++ b/src/client/windows/client-service/fs.h @@ -0,0 +1,111 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + + /* + * Client Service - file system declarations + */ + +#ifndef __FS_H +#define __FS_H + +#include "pvfs2.h" + +int fs_initialize(const char *tabfile, + char *error_msg, + size_t error_msg_len); + +struct PVFS_sys_mntent *fs_get_mntent(PVFS_fs_id fs_id); + +int fs_resolve_path(const char *local_path, + char *fs_path, + size_t fs_path_max); + +int fs_lookup(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle); + +int fs_create(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle, + unsigned int perms); + +int fs_remove(char *fs_path, + PVFS_credentials *credentials); + +int fs_rename(char *old_path, + char *new_path, + PVFS_credentials *credentials); + +int fs_truncate(char *fs_path, + PVFS_size size, + PVFS_credentials *credentials); + +int fs_getattr(char *fs_path, + PVFS_credentials *credentials, + PVFS_sys_attr *attr); + +int fs_setattr(char *fs_path, + PVFS_sys_attr *attr, + PVFS_credentials *credentials); + +int fs_mkdir(char *fs_path, + PVFS_credentials *credentials, + PVFS_handle *handle, + unsigned int perms); + +int fs_io(enum PVFS_io_type io_type, + char *fs_path, + void *buffer, + size_t buffer_len, + uint64_t offset, + PVFS_size *op_len, + PVFS_credentials *credentials); + +#define fs_read(fs_path, \ + buffer, \ + buffer_len, \ + offset, \ + read_len, \ + credentials) fs_io(PVFS_IO_READ, fs_path, buffer, buffer_len, offset, read_len, credentials) + + +#define fs_write(fs_path, \ + buffer, \ + buffer_len, \ + offset, \ + write_len, \ + credentials) fs_io(PVFS_IO_WRITE, fs_path, buffer, buffer_len, offset, write_len, credentials) + +int fs_flush(char *fs_path, + PVFS_credentials *credentials); + +/* +int fs_find_first_file(char *fs_path, + PVFS_ds_position *token, + PVFS_credential *credential, + char *filename, + size_t max_name_len); +*/ + +int fs_find_files(char *fs_path, + PVFS_credentials *credentials, + PVFS_ds_position *token, + int32_t incount, + int32_t *outcount, + char **filename_array, + PVFS_sys_attr *attr_array); + +int fs_get_diskfreespace(PVFS_credentials *credentials, + PVFS_size *free_bytes, + PVFS_size *total_bytes); + +PVFS_fs_id fs_get_id(int fs_num); + +char *fs_get_name(int fs_num); + +int fs_finalize(); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/ldap-support.c b/src/client/windows/client-service/ldap-support.c new file mode 100755 index 0000000..08893f2 --- /dev/null +++ b/src/client/windows/client-service/ldap-support.c @@ -0,0 +1,247 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* LDAP functions - OrangeFS credentials (UID/GID) can be stored + * in an LDAP directory. The system will search for the username + * and locate attributes containing information. The details of the + * search can be configured in the configuration file. + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include "ldap-support.h" + +/* 15-second search timeout */ +struct timeval timeout = {15, 0}; + +extern PORANGEFS_OPTIONS goptions; + +#define report_ldap_error(msg) _report_ldap_error(msg, __func__) + +static void _report_ldap_error(char *message, char *fn_name) +{ + /* debug the message */ + DbgPrint(" %s: %s\n", fn_name, message); + + /* write to Event Log */ + report_error_event(message, FALSE); +} + +/* initialize LDAP SSL */ +int PVFS_ldap_init() +{ + int ret; + + ret = ldapssl_client_init(NULL, NULL); + + if (ret == 0) + ret = ldapssl_set_verify_mode(LDAPSSL_VERIFY_NONE); + + return ret; +} + +/* cleanup LDAP SSL */ +void PVFS_ldap_cleanup() +{ + ldapssl_client_deinit(); +} + +static int check_number(char *s) +{ + char *p = s; + + if (s == NULL || *s == '\0') + return 0; + + while (*p) + { + if (!isdigit(*p++)) + return 0; + } + + return 1; +} + +int get_ldap_credentials(char *userid, + PVFS_credentials *credentials) +{ + LDAP *ld; + int version, ret = -1, bind_ret = 0; + char *bind_dn, *password, filter[384], + *attrs[3], *attr_name, **values, + error_msg[256]; + LDAPMessage *results, *entry; + BerElement *ptr; + + DbgPrint(" get_ldap_credentials: enter\n"); + + /* connect to LDAP - this will not be encrypted if + secure is not set */ + ld = ldapssl_init(goptions->ldap.host, goptions->ldap.port, + goptions->ldap.secure); + if (ld == NULL) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: could not initialize " + "LDAP", userid); + report_ldap_error(error_msg); + goto get_ldap_credentials_exit; + } + + /* set the version */ + version = LDAP_VERSION3; + ldap_set_option(ld, LDAP_OPT_PROTOCOL_VERSION, &version); + + /* connect to the LDAP host */ + if (strlen(goptions->ldap.bind_dn) > 0) + { + bind_dn = goptions->ldap.bind_dn; + password = goptions->ldap.bind_password; + } + else + { + /* anonymous bind */ + bind_dn = password = NULL; + } + + bind_ret = ldap_simple_bind_s(ld, bind_dn, password); + if (bind_ret != 0) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: could not bind to " + "LDAP server: %s (%d)", userid, ldap_err2string(bind_ret), bind_ret); + report_ldap_error(error_msg); + goto get_ldap_credentials_exit; + } + + /* construct the filter in the form + (&(objectClass={search-class})({naming-attr}={userid})) + */ + _snprintf(filter, 384, "(&(objectClass=%s)(%s=%s))", + goptions->ldap.search_class, + goptions->ldap.naming_attr, + userid); + + /* set to read uid and gid attrs */ + attrs[0] = (char *) malloc(32); + attrs[1] = (char *) malloc(32); + strncpy(attrs[0], goptions->ldap.uid_attr, 32); + strncpy(attrs[1], goptions->ldap.gid_attr, 32); + attrs[2] = NULL; + + DbgPrint(" get_ldap_credentials: search root: %s\n", + goptions->ldap.search_root); + DbgPrint(" get_ldap_credentials: search scope: %d\n", + goptions->ldap.search_scope); + DbgPrint(" get_ldap_credentials: filter: %s\n", filter); + DbgPrint(" get_ldap_credentials: attrs: %s/%s\n", + goptions->ldap.uid_attr, goptions->ldap.gid_attr); + ret = ldap_search_st(ld, goptions->ldap.search_root, goptions->ldap.search_scope, + filter, (char **) attrs, 0, &timeout, &results); + + /* retrieve uid/gid values from results */ + if (ret == 0) + { + credentials->uid = credentials->gid = -1; + + if (results != NULL) + { + /* note: we only check the first entry */ + entry = ldap_first_entry(ld, results); + if (entry != NULL) + { + attr_name = ldap_first_attribute(ld, entry, &ptr); + while (attr_name != NULL) + { + values = ldap_get_values(ld, entry, attr_name); + if (values != NULL) + { + if (check_number(values[0])) + { + if (!stricmp(attr_name, goptions->ldap.uid_attr)) + credentials->uid = atoi(values[0]); + else if (!stricmp(attr_name, goptions->ldap.gid_attr)) + credentials->gid = atoi(values[0]); + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: " + "LDAP attribute %s: not a number (%s)", userid, + attr_name, values[0]); + report_ldap_error(error_msg); + ret = -1; + } + + ldap_value_free(values); + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: no " + "values for LDAP attribute %s", userid, attr_name); + report_ldap_error(error_msg); + ret = -1; + } + + ldap_memfree(attr_name); + + attr_name = ldap_next_attribute(ld, entry, ptr); + } + ber_free(ptr, 0); + } + else + { + ldap_get_option(ld, LDAP_OPT_RESULT_CODE, &ret); + _snprintf(error_msg, sizeof(error_msg), "User %s: no LDAP " + "entries", userid); + report_ldap_error(error_msg); + ret = -1; + } + + ldap_msgfree(results); + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: no LDAP " + "results", userid); + report_ldap_error(error_msg); + ret = -1; + } + } + else + { + _snprintf(error_msg, sizeof(error_msg), "User %s: LDAP search error: " + "%s (%d)", userid, ldap_err2string(ret), ret); + report_ldap_error(error_msg); + } + + free(attrs[0]); + free(attrs[1]); + + if (ret == 0 && (credentials->uid == -1 || credentials->gid == -1)) + { + _snprintf(error_msg, sizeof(error_msg), "User %s: LDAP credentials " + "not found", userid); + report_ldap_error(error_msg); + ret = -1; + } + +get_ldap_credentials_exit: + + if (bind_ret != 0) + ret = bind_ret; + + if (ld != NULL) + ldap_unbind_s(ld); + + DbgPrint(" get_ldap_credentials: exit\n"); + + return ret; +} \ No newline at end of file diff --git a/src/client/windows/client-service/ldap-support.h b/src/client/windows/client-service/ldap-support.h new file mode 100755 index 0000000..37e2f42 --- /dev/null +++ b/src/client/windows/client-service/ldap-support.h @@ -0,0 +1,24 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * LDAP support declarations + */ + +#ifndef __LDAP_SUPPORT_H +#define __LDAP_SUPPORT_H + +#include "pvfs2.h" +#include "client-service.h" + +int PVFS_ldap_init(); + +void PVFS_ldap_cleanup(); + +int get_ldap_credentials(char *userid, + PVFS_credentials *credentials); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-service/messages.aps b/src/client/windows/client-service/messages.aps new file mode 100755 index 0000000000000000000000000000000000000000..7604a2569406fbe57b2cd3a3a358bfa59f57ff7c GIT binary patch literal 572 zcmaJ-%MQUn6ura-k?;qVuq5r)QY>ujBsR0522D`uH1%5+KEM*c;V10IxqX;64L3P6 z_cdqEy+lM7pmhSc1)Cx20aIGg7`N7yv|g{J4(*VdjYQ!4p*TewwU&`Md&hwam#e)L zDsY9n_vA6;?Akx8G#n@yM4l_fK`OP}N;M2z=Co31-TeM%llhMo05?V(ej8Dr92!!K z8i+eUQS%)cBIc;Z9#J>GalSBk&Wi6IaV7t*%>69&I1a?H^&p=C_Y#NsJtj)>+`Q`v m@Nd@^>Q~^`Zdl(NFdSxfq`zikd8WtAnKdxaywGFj%z8e}$5^QV literal 0 HcmV?d00001 diff --git a/src/client/windows/client-service/messages.h b/src/client/windows/client-service/messages.h new file mode 100644 index 0000000..424513f --- /dev/null +++ b/src/client/windows/client-service/messages.h @@ -0,0 +1,46 @@ + /* Provide a generic message for reporting errors */ +// +// Values are 32 bit values laid out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// + + +// +// Define the severity codes +// + + +// +// MessageId: MSG_GENERIC_ERROR +// +// MessageText: +// +// %1. +// +#define MSG_GENERIC_ERROR 0xC0000001L + diff --git a/src/client/windows/client-service/messages.mc b/src/client/windows/client-service/messages.mc new file mode 100755 index 0000000..c903841 --- /dev/null +++ b/src/client/windows/client-service/messages.mc @@ -0,0 +1,7 @@ +; /* Provide a generic message for reporting errors */ +MessageId=0x1 +Severity=Error +SymbolicName=MSG_GENERIC_ERROR +Language=English +%1. +. diff --git a/src/client/windows/client-service/messages.rc b/src/client/windows/client-service/messages.rc new file mode 100644 index 0000000..a928b13 --- /dev/null +++ b/src/client/windows/client-service/messages.rc @@ -0,0 +1,2 @@ +LANGUAGE 0x9,0x1 +1 11 "MSG00001.bin" diff --git a/src/client/windows/client-service/service-main.c b/src/client/windows/client-service/service-main.c new file mode 100755 index 0000000..0056fa8 --- /dev/null +++ b/src/client/windows/client-service/service-main.c @@ -0,0 +1,859 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * Client Service - service control functions + * -- Install or remove OrangeFS Client service + * -- Run client as a service or console app + */ + +#include +#include +#include +#include + +#include "gen-locks.h" +#include "gossip.h" + +#include "client-service.h" +#include "config.h" +#include "fs.h" +#include "cert.h" +#include "user-cache.h" +#include "ldap-support.h" +#include "messages.h" + +#define WIN32ServiceName "orangefs-client" +#define WIN32ServiceDisplayName "OrangeFS Client" + +/* globals */ +SERVICE_STATUS_HANDLE hstatus; +SERVICE_STATUS service_status; + +BOOL debug = FALSE; + +int is_running = 0; +int run_service = 0; + +HANDLE hthread, hcache_thread; +HANDLE hevent_log = NULL; + +DWORD thread_start(PORANGEFS_OPTIONS options); +DWORD thread_stop(); + +DWORD cache_thread_start(); +DWORD cache_thread_stop(); + +DWORD WINAPI main_loop(LPVOID poptions); + +FILE *debug_log = NULL; + +extern struct qhash_table *user_cache; + +extern gen_mutex_t user_cache_mutex; +PORANGEFS_OPTIONS goptions; + +/* externs */ +extern int __cdecl dokan_loop(PORANGEFS_OPTIONS options); + +void init_service_log() +{ + char exe_path[MAX_PATH], *p; + int ret; + + if (!debug || !run_service) + return; + + /* create log file in exe directory */ + ret = GetModuleFileName(NULL, exe_path, MAX_PATH); + if (ret != 0) + { + /* get directory */ + p = strrchr(exe_path, '\\'); + if (p) + *p = '\0'; + + strcat(exe_path, "\\service.log"); + + debug_log = fopen(exe_path, "w"); + } +} + +void service_debug(char *format, ...) +{ + char buffer[512]; + va_list argp; + + if (!debug || !run_service) + return; + + va_start(argp, format); + vsprintf_s(buffer, sizeof(buffer), format, argp); + va_end(argp); + + fprintf(debug_log, buffer); + fflush(debug_log); + +} + +void close_service_log() +{ + if (!debug || !run_service) + return; + + if (debug_log) + { + fprintf(debug_log, "\n"); + fclose(debug_log); + } +} + +/* Open our Event Log entry (from registry) */ +DWORD init_event_log() +{ + hevent_log = RegisterEventSource(NULL, "OrangeFS Client"); + return GetLastError(); +} + +/* Report an error to the Event Log, service log (file), and stderr. The + entire text of the message is displayed without modification. */ +BOOL report_error_event(char *message, BOOL startup) +{ + char *strings[1]; + + /* startup errors also go to service log or stderr */ + if (startup) + { + if (run_service) + { + service_debug("%s\n", message); + } + else + { + fprintf(stderr, "%s\n", message); + } + } + + if (hevent_log != NULL) + { + strings[0] = message; + + return ReportEvent(hevent_log, EVENTLOG_ERROR_TYPE, 0, + MSG_GENERIC_ERROR, NULL, 1, 0, strings, NULL); + } + + return FALSE; +} + +/* Return the Windows error message for the specified code. + The returned string must be freed with LocalFree. */ +LPTSTR get_windows_message(DWORD err) +{ + LPVOID msg_buf; + + FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + err, + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &msg_buf, + 0, NULL); + + return (LPTSTR) msg_buf; +} + +/* Report a Windows error to the Event Log + Format is {prefix}{windows msg} ({err}) */ +BOOL report_windows_error(char *prefix, DWORD err) +{ + LPTSTR win_msg, message; + size_t msg_len; + BOOL ret; + + win_msg = get_windows_message(err); + if (win_msg == NULL) + return FALSE; + + /* remove trailing \r\n from win_msg */ + if (win_msg[strlen(win_msg)-1] == '\n') + win_msg[strlen(win_msg)-1] = '\0'; + if (win_msg[strlen(win_msg)-1] == '\r') + win_msg[strlen(win_msg)-1] = '\0'; + + msg_len = strlen(prefix)+strlen(win_msg)+16; + message = (LPTSTR) LocalAlloc(0, msg_len); + _snprintf(message, msg_len, "%s%s (%u)", prefix, win_msg, err); + + ret = report_error_event(message, TRUE); + + LocalFree(message); + LocalFree(win_msg); + + return ret; +} + +/* Close our Event Log source */ +void close_event_log() +{ + if (hevent_log != NULL) + DeregisterEventSource(hevent_log); +} + +BOOL check_mount_point(const char *mount_point) +{ + const char *slash; + char drive; + DWORD mask; + + /* first check if a directory rather than drive is mapped */ + slash = strchr(mount_point, '\\'); + if (slash && slash[1] != '\0') + /* Dokan will exit if directory is invalid */ + return TRUE; + + drive = toupper(mount_point[0]); + drive -= 'A'; + if (drive < 0 || drive > 25) + return FALSE; + + mask = GetLogicalDrives(); + if (mask == 0) + { + report_windows_error("GetLogicalDrives failed: ", GetLastError()); + return FALSE; + } + + return !(mask & (1 << drive)); +} + +DWORD service_install() +{ + SC_HANDLE sch_service; + SC_HANDLE sch_manager; + char *exe_path, *command; + DWORD size; + int err; + + /* Get location of executable */ + size = 512; + do { + exe_path = (char *) malloc(size); + if (!exe_path) + { + fprintf(stderr, "Insufficient memory\n"); + return -1; + } + + GetModuleFileName(NULL, exe_path, size); + err = GetLastError(); + + if (err == ERROR_INSUFFICIENT_BUFFER) + { + free(exe_path); + size *= 2; + } + else if (err != ERROR_SUCCESS) + { + free(exe_path); + fprintf(stderr, "Error: GetModuleFileName (%u)\n", err); + return -1; + } + + } while (err == ERROR_INSUFFICIENT_BUFFER); + + /* append -service option to command */ + command = (char *) malloc(strlen(exe_path) + 16); + if (!command) + { + fprintf(stderr, "Insufficient memory\n"); + return -1; + } + strcpy(command, exe_path); + strcat(command, " -service"); + + /* open the service manager */ + sch_manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + if (sch_manager != NULL) + { + /* create the service */ + sch_service = CreateService( + sch_manager, + WIN32ServiceName, + WIN32ServiceDisplayName, + SERVICE_ALL_ACCESS, + SERVICE_WIN32_OWN_PROCESS, + SERVICE_AUTO_START, + SERVICE_ERROR_NORMAL, + command, + NULL, + NULL, + TEXT("\0\0"), + NULL, + NULL); + + if (sch_service != NULL) + { + printf("%s installed\n", WIN32ServiceDisplayName); + CloseServiceHandle(sch_service); + } + else + { + fprintf(stderr, "Error: CreateService (%u)\n", GetLastError()); + return -1; + } + + CloseServiceHandle(sch_manager); + } + else + { + fprintf(stderr, "Error: OpenSCManager (%u)\n", GetLastError()); + return -1; + } + + free(exe_path); + free(command); + + return 0; +} + +DWORD service_remove() +{ + SC_HANDLE sch_service; + SC_HANDLE sch_manager; + + /* open service manager */ + sch_manager = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); + + if (sch_manager != NULL) + { + /* open service */ + sch_service = OpenService(sch_manager, WIN32ServiceName, + SERVICE_ALL_ACCESS | DELETE); + if (sch_service != NULL) + { + /* attempt to stop service */ + if (ControlService(sch_service, SERVICE_CONTROL_STOP, + &service_status)) + { + Sleep(1000); + + while (QueryServiceStatus(sch_service, &service_status)) + { + if (service_status.dwCurrentState == SERVICE_STOP_PENDING) + Sleep(1000); + else + break; + } + + } + + if (DeleteService(sch_service)) + printf("%s removed\n", WIN32ServiceDisplayName); + else + fprintf(stderr, "Error: DeleteService (%u)\n", GetLastError()); + + CloseServiceHandle(sch_service); + + } + else + { + fprintf(stderr, "Error: OpenService (%u)\n", GetLastError()); + return -1; + } + + CloseServiceHandle(sch_manager); + } + else + { + fprintf(stderr, "Error: OpenSCManager (%u)\n", GetLastError()); + return -1; + } + + return 0; + +} + +/* service control handler */ +void WINAPI service_ctrl(DWORD ctrl_code) +{ + switch (ctrl_code) + { + case SERVICE_CONTROL_STOP: + case SERVICE_CONTROL_SHUTDOWN: + service_debug("service_ctrl: shutdown received\n"); + + service_status.dwCurrentState = SERVICE_STOP_PENDING; + Sleep(1000); + SetServiceStatus(hstatus, &service_status); + + is_running = 0; + thread_stop(); + } +} + +void WINAPI service_main(DWORD argc, char *argv[]) +{ + PORANGEFS_OPTIONS options; + int ret; + char error_msg[512]; + char env_debug_file[MAX_PATH+16], env_debug_mask[256+16]; + + /* allocate options */ + options = (PORANGEFS_OPTIONS) calloc(1, sizeof(ORANGEFS_OPTIONS)); + + /* init user cache */ + user_cache = qhash_init(user_compare, quickhash_string_hash, 257); + + gen_mutex_init(&user_cache_mutex); + + /* read from config file */ + ret = get_config(options, error_msg, 512); + + /* point global options */ + goptions = options; + + debug = options->debug; + + init_service_log(); + + if (ret != 0) + { + report_error_event(error_msg, TRUE); + close_service_log(); + close_event_log(); + return; + } + + if (!check_mount_point(options->mount_point)) + return; + + /* turn on gossip debugging */ + if (debug) + { + /* enable win_client debugging by default */ + if (strlen(options->debug_mask) == 0) + { + strcpy(options->debug_mask, "win_client"); + } + _snprintf(env_debug_mask, sizeof(env_debug_mask), "PVFS2_DEBUGMASK=%s", + options->debug_mask); + _putenv(env_debug_mask); + /* debug file */ + _snprintf(env_debug_file, sizeof(env_debug_file), "PVFS2_DEBUGFILE=%s", + options->debug_file); + _putenv(env_debug_file); + } + + /* register our control handler routine */ + if ((hstatus = RegisterServiceCtrlHandler(WIN32ServiceName, service_ctrl)) + != NULL) + { + service_debug("Service registered\n"); + + /* run the user cache thread */ + ret = cache_thread_start(); + if (ret != 0) + { + _snprintf(error_msg, sizeof(error_msg), "Fatal init error: could " + "not start cache thread: %u", ret); + report_error_event(error_msg, TRUE); + close_service_log(); + close_event_log(); + free(options); + + return; + } + + /* run the service */ + service_status.dwCurrentState = SERVICE_RUNNING; + service_status.dwControlsAccepted = SERVICE_ACCEPT_STOP; + service_status.dwServiceType = SERVICE_WIN32_OWN_PROCESS; + service_status.dwWin32ExitCode = NO_ERROR; + service_status.dwServiceSpecificExitCode = 0; + + /* execute service main loop */ + if (SetServiceStatus(hstatus, &service_status)) + { + is_running = 1; + service_debug("Starting thread\n"); + thread_start(options); + } + + /* stop cache thread */ + cache_thread_stop(); + + /* LDAP cleanup */ + PVFS_ldap_cleanup(); + + /* cleanup OpenSSL */ + openssl_cleanup(); + + /* shut down service */ + service_status.dwCurrentState = SERVICE_STOPPED; + SetServiceStatus(hstatus, &service_status); + } + else + { + report_windows_error("RegisterServiceCtrlHandler failed: ", GetLastError()); + } + + qhash_destroy_and_finalize(user_cache, struct user_entry, hash_link, free); + + close_service_log(); + + close_event_log(); + + free(options); +} + +DWORD thread_start(PORANGEFS_OPTIONS options) +{ + DWORD err = 0; + + service_debug("thread_start enter\n"); + + /* create and run the new thread */ + hthread = CreateThread(NULL, + 0, + main_loop, + options, + 0, + NULL); + if (hthread) + { + WaitForSingleObject(hthread, INFINITE); + } + else + { + err = GetLastError(); + report_windows_error("CreateThread (main) failed: ", err); + } + + service_debug("thread_start exit\n"); + + return err; +} + +DWORD thread_stop() +{ + DWORD err = 0; + + service_debug("thread_stop enter\n"); + + /* stop the thread */ + if (!TerminateThread(hthread, 0)) + { + err = GetLastError(); + report_windows_error("TerminateThread (main) failed: ", err); + } + + service_debug("thread_stop exit\n"); + + return err; +} + +DWORD cache_thread_start() +{ + DWORD err = 0; + + /* create and run the user cache thread */ + hcache_thread = CreateThread(NULL, + 0, + (LPTHREAD_START_ROUTINE) user_cache_thread, + NULL, + 0, + NULL); + + if (hcache_thread == NULL) + { + err = GetLastError(); + report_windows_error("CreateThread (user cache) failed: ", err); + } + + return err; +} + +DWORD cache_thread_stop() +{ + DWORD err = 0; + + if (hcache_thread != NULL) + if (!TerminateThread(hcache_thread, 0)) + { + err = GetLastError(); + report_windows_error("TerminateThread (user cache) failed: ", err); + } + + return err; +} + +DWORD WINAPI main_loop(LPVOID poptions) +{ + PORANGEFS_OPTIONS options = (PORANGEFS_OPTIONS) poptions; + char *tabfile, exe_path[MAX_PATH], *p, error_msg[256], + event_msg[512]; + FILE *f; + int ret, malloc_flag = 0; + + /* locate tabfile -- env. variable overrides */ + if (!(tabfile = getenv("PVFS2TAB_FILE"))) + { + ret = GetModuleFileName(NULL, exe_path, MAX_PATH); + if (ret) + { + /* get directory */ + p = strrchr(exe_path, '\\'); + if (p) + *p = '\0'; + + tabfile = (char *) malloc(MAX_PATH); + malloc_flag = TRUE; + + strcpy(tabfile, exe_path); + strcat(tabfile, "\\orangefstab"); + + /* attempt to open file */ + f = fopen(tabfile, "r"); + if (f) + fclose(f); + else + { + /* switch to pvfs2tab -- fs_initialize will fail if not valid */ + strcpy(tabfile, exe_path); + strcat(tabfile, "\\pvfs2tab"); + } + } + } + + /* init file systems */ + if (tabfile) + { + service_debug("Using tabfile: %s\n", tabfile); + do { + ret = fs_initialize(tabfile, error_msg, 256); + + if (ret != 0) + { + service_debug("Retrying fs initialization...\n"); + report_error_event(error_msg, TRUE); + Sleep(30000); + } + + } while (ret != 0); + } + else + { + report_windows_error("GetModuleFileName failed: ", GetLastError()); + } + + /*** main loop - run dokan client ***/ + if (ret == 0) + { + dokan_loop(options); + + /* close file systems */ + fs_finalize(); + } + else + { + /* note: this will no longer occur */ + _snprintf(event_msg, sizeof(event_msg), "Fatal init error: %s", + error_msg); + report_error_event(event_msg, TRUE); + } + + if (malloc_flag) + free(tabfile); + + return (DWORD) ret; +} + +int main(int argc, char **argv, char **envp) +{ + int i = 0; + PORANGEFS_OPTIONS options; + DWORD err = 0, cmd_debug = FALSE; + char mount_point[256]; + char error_msg[512]; + char env_debug_file[MAX_PATH+16], env_debug_mask[256+16]; + + SERVICE_TABLE_ENTRY dispatch_table[2] = + { + {WIN32ServiceName, (LPSERVICE_MAIN_FUNCTION) service_main}, + {NULL, NULL} + }; + + mount_point[0] = '\0'; + + /* command line arguments */ + for (i = 1; i < argc; i++) + { + if (!stricmp(argv[i], "-installService") || + !stricmp(argv[i], "-w") || !stricmp(argv[i], "/w")) + { + return service_install(); + } + else if (!stricmp(argv[i], "-removeService") || + !stricmp(argv[i], "-u") || !stricmp(argv[i], "/u")) + { + return service_remove(); + } + else if (!strcmp(argv[i], "-service")) + { + run_service = 1; + } + else if (!strcmp(argv[i], "-mount") || !strcmp(argv[i], "-m") || + !strcmp(argv[i], "/m")) + { + if (i < (argc - 1)) + strncpy(mount_point, argv[++i], MAX_PATH); + else + fprintf(stderr, "Invalid argument -mount. Using mount point Z:\n"); + } + else if (!strcmp(argv[i], "-debug") || !strcmp(argv[i], "-d") || + !strcmp(argv[i], "/d")) + { + cmd_debug = TRUE; + } + } + + /* init event log */ + if ((err = init_event_log()) != 0) + /* since we can't log to event log, log to stderr */ + fprintf(stderr, "Could not open event log: %u\n", err); + + /* initialize OpenSSL */ + openssl_init(); + + /* initialize LDAP */ + if (PVFS_ldap_init() != 0) + { + report_error_event("Fatal error: LDAP could not be initialized", TRUE); + return 1; + } + + if (run_service) + { + /* dispatch the main service thread */ + StartServiceCtrlDispatcher(dispatch_table); + } + else + { +#if defined(_DEBUG) && defined(_MEMLEAKS) + /* Windows memory debugging + NOTE: run from command prompt to generate file */ + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); + /* Output to memleaks.log */ + _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE); + { + HANDLE hfile = CreateFile("memleaks.log", GENERIC_WRITE, + FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, + NULL); + if (hfile != INVALID_HANDLE_VALUE) + _CrtSetReportFile(_CRT_WARN, hfile); + } +#endif + + options = (PORANGEFS_OPTIONS) calloc(1, sizeof(ORANGEFS_OPTIONS)); + + /* init user list */ + user_cache = qhash_init(user_compare, quickhash_string_hash, 257); + + gen_mutex_init(&user_cache_mutex); + + /* get options from config file */ + if (get_config(options, error_msg, 512) != 0) + { + err = 1; + goto main_exit; + } + + /* point goptions */ + goptions = options; + + /* override with mount point from command line */ + if (strlen(mount_point) > 0) + strcpy(options->mount_point, mount_point); + + /* turn debug on if specified on command line */ + if (cmd_debug) + debug = TRUE; + if (debug) + options->debug = TRUE; + + if (options->debug) + { + /* enable win_client debugging by default */ + if (strlen(options->debug_mask) == 0) + { + strcpy(options->debug_mask, "win_client"); + } + _snprintf(env_debug_mask, sizeof(env_debug_mask), "PVFS2_DEBUGMASK=%s", + options->debug_mask); + _putenv(env_debug_mask); + /* debug file */ + if (!options->debug_stderr) + { + _snprintf(env_debug_file, sizeof(env_debug_file), "PVFS2_DEBUGFILE=%s", + options->debug_file); + _putenv(env_debug_file); + } + /* log thread id */ + gossip_set_logstamp(GOSSIP_LOGSTAMP_THREAD); + } + + if (!check_mount_point(options->mount_point)) + { + _snprintf(error_msg, sizeof(error_msg), "Fatal error: %s already " + "in use", options->mount_point); + err = 1; + goto main_exit; + } + + /* start user cache thread */ + err = cache_thread_start(); + if (err != 0) + { + sprintf(error_msg, "Fatal error: user cache thread did not start"); + goto main_exit; + } + + is_running = 1; + + /* process requests */ + err = main_loop(options); + if (err != 0) + { + sprintf(error_msg, "Main loop exited with error code: %d", err); + } + + printf("main_loop exited: %d\n", err); + + cache_thread_stop(); + + gen_mutex_destroy(&user_cache_mutex); + +main_exit: + + if (err != 0) + { + report_error_event(error_msg, TRUE); + } + + qhash_destroy_and_finalize(user_cache, struct user_entry, hash_link, free); + + PVFS_ldap_cleanup(); + + openssl_cleanup(); + + close_event_log(); + + free(options); + } + + return err; +} \ No newline at end of file diff --git a/src/client/windows/client-service/user-cache.c b/src/client/windows/client-service/user-cache.c new file mode 100755 index 0000000..e1ee8ec --- /dev/null +++ b/src/client/windows/client-service/user-cache.c @@ -0,0 +1,167 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * User cache functions - to speed credential lookup, the + * OrangeFS credentials (UID/GID) are cached with the username. + * Cache entries from certificates expire when the certificate + * expires. + */ + +#include +#include +#include +#include + +#include "gen-locks.h" + +#include "client-service.h" +#include "user-cache.h" + +/* amount of time cache mgmt thread sleeps (ms) */ +#define USER_THREAD_SLEEP_TIME 60000 + +struct qhash_table *user_cache; + +gen_mutex_t user_cache_mutex; + +int user_compare(void *key, + struct qhash_head *link) +{ + struct user_entry *entry = qhash_entry(link, struct user_entry, hash_link); + + return !stricmp((char *) key, entry->user_name); +} + +int add_user(char *user_name, + PVFS_credentials *credentials, + ASN1_UTCTIME *expires) +{ + struct qhash_head *link; + struct user_entry *entry; + + /* search for existing entry -- delete if found */ + gen_mutex_lock(&user_cache_mutex); + link = qhash_search(user_cache, user_name); + if (link != NULL) + { + DbgPrint(" add_user: deleting user %s\n", user_name); + qhash_del(link); + free(qhash_entry(link, struct user_entry, hash_link)); + } + gen_mutex_unlock(&user_cache_mutex); + + /* allocate entry */ + entry = (struct user_entry *) calloc(1, sizeof(struct user_entry)); + if (entry == NULL) + { + DbgPrint(" add_user: out of memory\n"); + return -1; + } + + /* add to hash table */ + strncpy(entry->user_name, user_name, 256); + entry->credentials.uid = credentials->uid; + entry->credentials.gid = credentials->gid; + entry->expires = expires; + + gen_mutex_lock(&user_cache_mutex); + qhash_add(user_cache, &entry->user_name, &entry->hash_link); + DbgPrint(" add_user: adding user %s (%u:%u) expires %s\n", + user_name, credentials->uid, credentials->gid, + expires != NULL ? expires->data : "never"); + gen_mutex_unlock(&user_cache_mutex); + + return 0; +} + +int get_cached_user(char *user_name, + PVFS_credentials *credentials) +{ + struct qhash_head *link; + struct user_entry *entry; + + /* locate user by user_name */ + gen_mutex_lock(&user_cache_mutex); + link = qhash_search(user_cache, user_name); + if (link != NULL) + { + /* if cache hit -- return credentials */ + entry = qhash_entry(link, struct user_entry, hash_link); + credentials->uid = entry->credentials.uid; + credentials->gid = entry->credentials.gid; + + DbgPrint(" get_cached_user: hit for %s (%u:%u)\n", user_name, + credentials->uid, credentials->gid); + + gen_mutex_unlock(&user_cache_mutex); + + return 0; + } + + gen_mutex_unlock(&user_cache_mutex); + + /* cache miss */ + return 1; +} + +/* remove user entry -- note user_cache_mutex + should be locked */ +/* *** not currently needed +int remove_user(char *user_name) +{ + struct qhash_head *link; + + link = qhash_search_and_remove(user_cache, user_name); + if (link != NULL) + { + free(qhash_entry(link, struct user_entry, hash_link)); + } + + return 0; +} +*/ + +unsigned int user_cache_thread(void *options) +{ + int i; + struct qhash_head *head; + struct user_entry *entry; + time_t now; + + /* remove expired user entries from user cache */ + do + { + Sleep(USER_THREAD_SLEEP_TIME); + + DbgPrint("user_cache_thread: checking\n"); + + now = time(NULL); + + gen_mutex_lock(&user_cache_mutex); + for (i = 0; i < user_cache->table_size; i++) + { + head = qhash_search_at_index(user_cache, i); + if (head != NULL) + { + entry = qhash_entry(head, struct user_entry, hash_link); + if (entry->expires != NULL && + ASN1_UTCTIME_cmp_time_t(entry->expires, now) == -1) + { + DbgPrint("user_cache_thread: removing %s\n", entry->user_name); + qhash_del(head); + free(entry); + } + } + } + gen_mutex_unlock(&user_cache_mutex); + + DbgPrint("user_cache_thread: check complete\n"); + + } while (1); + + return 0; +} diff --git a/src/client/windows/client-service/user-cache.h b/src/client/windows/client-service/user-cache.h new file mode 100755 index 0000000..4853253 --- /dev/null +++ b/src/client/windows/client-service/user-cache.h @@ -0,0 +1,41 @@ +/* + * (C) 2010-2011 Clemson University and Omnibond LLC + * + * See COPYING in top-level directory. + */ + +/* + * User cache declarations + */ + +#ifndef __USER_CACHE_H +#define __USER_CACHE_H + +#include + +#include "pvfs2.h" +#include "quickhash.h" + +struct user_entry +{ + struct qhash_head hash_link; + char user_name[256]; + PVFS_credentials credentials; + ASN1_UTCTIME *expires; +}; + +int user_compare(void *key, + struct qhash_head *link); + +int add_user(char *user_name, + PVFS_credentials *credentials, + ASN1_UTCTIME *expires); + +int get_cached_user(char *user_name, + PVFS_credentials *credentials); + +int remove_user(char *user_name); + +unsigned int user_cache_thread(void *options); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/Makefile b/src/client/windows/client-test/Makefile new file mode 100755 index 0000000..1d01258 --- /dev/null +++ b/src/client/windows/client-test/Makefile @@ -0,0 +1,39 @@ +# Makefile for client tests +# Copyright (C) 2011 Omnibond, LLC +# Use with Linux kernel module to compare +# results to the Windows client test + +CFLAGS=-g +LDFLAGS=-lpthread + +objects=client-test.o create.o file-ops.o info.o open.o test-io.o test-support.o timer.o + +client-test : $(objects) + cc -o client-test $(objects) $(CFLAGS) $(LDFLAGS) + +client-test.o: client-test.c test-support.h test-list.h + cc -o $@ -c $< $(CFLAGS) +create.o: create.c create.h + cc -o $@ -c $< $(CFLAGS) +file-ops.o: file-ops.c file-ops.h test-support.h + cc -o $@ -c $< $(CFLAGS) +info.o: info.c info.h test-support.h + cc -o $@ -c $< $(CFLAGS) +open.o: open.c open.h test-support.h + cc -o $@ -c $< $(CFLAGS) +test-io.o: test-io.c test-io.h test-support.h + cc -o $@ -c $< $(CFLAGS) +test-support.o: test-support.c test-support.h + cc -o $@ -c $< $(CFLAGS) +timer.o: timer.c timer.h + cc -o $@ -c $< $(CFLAGS) + +# override implicit rule +#%.o: %.c + +#%.o: %.c %.h test-support.h test-list.h +# cc -o $@ -c $< $(CFLAGS) + +clean: + rm -f client-test *.o + diff --git a/src/client/windows/client-test/client-test.c b/src/client/windows/client-test/client-test.c new file mode 100755 index 0000000..b290644 --- /dev/null +++ b/src/client/windows/client-test/client-test.c @@ -0,0 +1,324 @@ +/* Copyright (C) 2011 Omnibond, LLC + Windows client - test program */ + +#ifdef WIN32 +#include +#else +#include +#include +#include +#endif +#include +#include +#include +#include +#include + +#include "test-support.h" +#include "test-list.h" + +/* globals */ + +#define MALLOC_CHECK(ptr) if (ptr == NULL) \ + return NULL; + +typedef struct _list_node +{ + void *data; + struct _list_node *next; +} list_node; + +list_node *add_list_node(list_node *head, void *pdata, size_t len) +{ + list_node *last_node, *new_node; + + /* create new head */ + if (head->data == NULL) + { + head->data = malloc(len); + MALLOC_CHECK(head->data); + memcpy(head->data, pdata, len); + + new_node = head; + } + else + { + last_node = head; + while (last_node->next) + last_node = last_node->next; + + new_node = (list_node *) calloc(1, sizeof(list_node)); + MALLOC_CHECK(new_node); + new_node->data = malloc(len); + MALLOC_CHECK(new_node->data); + memcpy(new_node->data, pdata, len); + + /* link in new node */ + last_node->next = new_node; + } + + return new_node; +} + +void free_list(list_node *head) +{ + list_node *pnode, *next_node; + + /* free list memory */ + pnode = head; + do + { + next_node = pnode->next; + free(pnode->data); + free(pnode); + pnode = next_node; + } while (pnode); + +} + +test_operation *find_operation(char *name) +{ + int i; + + /* search op_table for operations */ + for (i = 0; op_table[i].name; i++) + { + if (!strcmp(name, op_table[i].name)) + return &op_table[i]; + } + + return NULL; +} + +int setoption(int argc, char **argv, global_options *options, int *index) +{ + int ret = 0; + + /* set option */ + if (!_stricmp(argv[*index], "-tabfile")) + { + (*index)++; + if (*index >= argc || argv[*index][0] == '-') + { + fprintf(stderr, "illegal option -tabfile: missing filename\n"); + ret = -1; + } + else + options->tab_file = argv[*index]; + } + else if (!_stricmp(argv[*index], "-console")) + { + options->report_flags |= REPORT_CONSOLE; + } + else if (!_stricmp(argv[*index], "-file")) + { + (*index)++; + if (*index >= argc || argv[*index][0] == '-') + { + fprintf(stderr, "illegal option -file: missing filename\n"); + ret = -1; + } + else + { + options->report_flags |= REPORT_FILE; + options->freport = fopen(argv[*index], "w"); + if (options->freport == NULL) + { + fprintf(stderr, "error: could not open report file\n"); + ret = -1; + } + } + } + + return ret; +} + +int init(int argc, char **argv, + global_options *options, list_node *test_list) +{ + int i, ret = 0; +#ifdef WIN32 + DWORD attrs; +#else + struct stat buf; +#endif + + srand((unsigned int) time(NULL)); + + /* Check the specified root directory */ +#ifdef WIN32 + attrs = GetFileAttributes(options->root_dir); + + /* root directory must be found */ + if ((attrs == INVALID_FILE_ATTRIBUTES) || + !(attrs & FILE_ATTRIBUTE_DIRECTORY)) + return FALSE; +#else + ret = stat(options->root_dir, &buf); + if (ret != 0 || !(S_ISDIR(buf.st_mode))) + return FALSE; +#endif + + /* option default */ + options->report_flags = REPORT_CONSOLE; + + /* get options */ + i = 2; + while (i < argc) + { + if (argv[i][0] == '-') + ret = setoption(argc, argv, options, &i); + else + add_list_node(test_list, argv[i], strlen(argv[i])+1); + + if (ret != 0) + return FALSE; + + i++; + } + + return TRUE; +} + +int run_tests(global_options *options, list_node *test_list) +{ + int i, ret = 0; + int all_tests = TRUE; + list_node *node; + test_operation *op; + + all_tests = test_list->data == NULL; + + /* call the test options */ + if (all_tests) + { + for (i = 0; op_table[i].name; i++) + { + /* run the test function */ + ret = op_table[i].function(options, op_table[i].fatal); + /* this means the test had a technical failure, rather than + an expected failure (for some tests) */ + if (ret == CODE_FATAL) + { + fprintf(stderr, "Test %s: fatal exit\n", op_table[i].name); + break; + } + else if (ret != 0) { + fprintf(stderr, "Test %s exited with technical error %d\n", + op_table[i].name, ret); + break; + } + } + } + else + { + /* run in order specified */ + node = test_list; + while (node) + { + op = find_operation((char *) node->data); + if (op) + { + /* run the test function */ + ret = op->function(options, op->fatal); + if (ret == CODE_FATAL) + { + fprintf(stderr, "Test %s: fatal exit\n", op->name); + break; + } + else if (ret != 0) + { + fprintf(stderr, "Test %s exited with technical error %d\n", + op->name, ret); + break; + } + } + else + { + fprintf(stderr, "Invalid test: %s\n", (char *) node->data); + } + node = node->next; + } + } + + free_list(test_list); + + return ret; +} + +void finalize() +{ + +} + +int main(int argc, char **argv) +{ + int ret = 0; + global_options *options; + list_node *test_list; + test_operation *cur_test; + + if (argc < 2) + { + printf("USAGE: client-test root-dir [options]\n"); + printf(" root-dir: path for test files, e.g. Z:\\client-test or /pvfs2\n"); + /* TODO: list available tests */ + printf("Tests:\n"); + + cur_test = &op_table[0]; + while (cur_test->name) + { + printf(" %s\n", cur_test->name); + cur_test++; + } + + return -1; + } + + /* init options */ + options = (global_options *) calloc(1, sizeof(global_options)); + + /* append trailing slash to root_dir if necessary */ + options->root_dir = (char *) malloc(strlen(argv[1]) + 2); + strcpy(options->root_dir, argv[1]); + if (argv[1][strlen(argv[1])-1] != SLASH_CHAR) + strcat(options->root_dir, SLASH_STR); + + test_list = (list_node *) calloc(1, sizeof(list_node)); + + /* initialize and run tests */ + if (init(argc, argv, options, test_list)) + { + ret = run_tests(options, test_list); + finalize(); + } + else + { +#ifdef WIN32 + ret = GetLastError(); + if (ret == ERROR_FILE_NOT_FOUND) +#else + ret = errno; + if (ret == ENOENT) +#endif + fprintf(stderr, "init failed: %s not found\n", argv[1]); + else + fprintf(stderr, "init failed with error code %u\n", ret); + + free(options->root_dir); + + return ret; + } + + if (ret != 0 && ret != CODE_FATAL) + fprintf(stderr, "Testing failed with error code %d\n", ret); + + free(options->root_dir); + + { + char dummy[16]; + gets(dummy); + } + + return ret; +} \ No newline at end of file diff --git a/src/client/windows/client-test/create.c b/src/client/windows/client-test/create.c new file mode 100755 index 0000000..e80514c --- /dev/null +++ b/src/client/windows/client-test/create.c @@ -0,0 +1,381 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client -- creation tests */ + +#include +#include +#include +#ifdef WIN32 +#include +#endif +#include +#include "test-support.h" + +void create_dir_cleanup(char *dir) +{ + _rmdir(dir); +} + +char randchar() +{ + return rand() % 26 + 'a'; +} + +int create_dir(global_options *options, int fatal) +{ + int code; + char *dir; + + /* create a directory in the root dir */ + dir = randdir(options->root_dir); + _mkdir(dir); + code = errno; + + report_result(options, "create-dir", "main", RESULT_SUCCESS, 0, OPER_EQUAL, code); + + create_dir_cleanup(dir); + + free(dir); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +void create_subdir_cleanup(char *root_dir, char *path) +{ + char *root_dir_int, *slash; + + /* copy root_dir without trailing backslash */ + root_dir_int = _strdup(root_dir); + if (root_dir_int[strlen(root_dir_int)-1] == SLASH_CHAR) + root_dir_int[strlen(root_dir_int)-1] = '\0'; + + if (!_stricmp(root_dir_int, path)) + return; + + /* remove directories back to front */ + do + { + _rmdir(path); + + slash = strrchr(path, SLASH_CHAR); + if (slash) + *slash = '\0'; + + } while (_stricmp(root_dir_int, path)); + + free(root_dir_int); + +} + +#define MAX_SIZE 254 + +int create_subdir_int(global_options *options, int fatal, int max_size) +{ + int rem_size = max_size, dir_size, i, + code = 0, dir_num; + FILE *ftab; + char line[256], *token, *fs_root = NULL, + path[MAX_SIZE*2], dir[9]; + + if (options->tab_file == NULL) + { + report_error(options, "create_subdir: missing -tabfile option"); + return -87; /* invalid parameter */ + } + + ftab = fopen(options->tab_file, "r"); + if (ftab == NULL) + { + report_error(options, "create_subdir: could not open tabfile"); + return -87; /* file not found */ + } + + /* TODO: get line for specified file system, for now just read first line */ + fgets(line, 256, ftab); + token = strtok(line, " "); + if (token) + { + fs_root = strtok(NULL, " "); + } + if (token == NULL || fs_root == NULL) + { + report_error(options, "create_subdir: could not parse tabfile"); + fclose(ftab); + return 1; + } + + fclose(ftab); + + /* remove the length of the root dir from the max path size */ + rem_size -= strlen(fs_root); + + /* copy root into path */ + strcpy(path, options->root_dir); + /* rem_size -= strlen(options->root_dir); */ + + /* note--local root dir is not included in the path size */ + dir_num = 1; + while (rem_size > 0 && code == 0) + { + /* generate subdir */ + dir_size = rem_size > 8 ? 8 : rem_size; + for (i = 0; i < dir_size-1; i++) + dir[i] = randchar(); + dir[dir_size-1] = SLASH_CHAR; + dir[dir_size] = '\0'; + + /* append the path */ + strcat(path, dir); + + /* create the sub-directory */ + _mkdir(path); + code = errno; + + rem_size -= dir_size; + } + + create_subdir_cleanup(options->root_dir, path); + + return code; +} + +int create_subdir(global_options *options, int fatal) +{ + int code; + code = create_subdir_int(options, fatal, MAX_SIZE); + if (code >= 0) + { + report_result(options, "create-subdir", "main", RESULT_SUCCESS, 0, OPER_EQUAL, code); + if (code != 0 && fatal) + return CODE_FATAL; + } + else + /* technical error */ + return code; + + return 0; +} + +int create_dir_toolong(global_options *options, int fatal) +{ + int code; + + code = create_subdir_int(options, fatal, MAX_SIZE+1); + if (code >= 0) + { + report_result(options, "create-dir-toolong", "main", RESULT_FAILURE, 2, OPER_EQUAL, code); + if (code != 2 && fatal) /* expected result is 2 */ + return CODE_FATAL; + } + else + /* technical error */ + return code; + + return 0; +} + +void create_files_cleanup(char *path) +{ + + _unlink(path); + +} + +int create_file_int(char *path) +{ + int code; + FILE *f; + + /* create a 0 byte file */ + f = fopen(path, "w"); + code = f ? 0 : errno; + if (f) + fclose(f); + + create_files_cleanup(path); + + return code; + +} + +int create_files(global_options *options, int fatal) +{ + int code; + char *path, *dir; + + /* attempt single file creation */ + path = randfile(options->root_dir); + + code = create_file_int(path); + + free(path); + + report_result(options, + "create-files", + "root-file", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + return CODE_FATAL; + + /* create file in subdir */ + + dir = randdir(options->root_dir); + code = _mkdir(dir); + if (code != 0) + { + free(dir); + /* technical error */ + report_error(options, "create-files: could not create directory"); + return -errno; + } + + path = randfile(dir); + + code = create_file_int(path); + + free(path); + + /* remove subdir */ + _rmdir(dir); + free(dir); + + report_result(options, + "create-files", + "subdir-file", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +#define MAX_FILE_NAME 257 + +int create_file_long_int(global_options *options, int max_size) +{ + int code, rem_size, i; + FILE *ftab; + char line[256], *token, *fs_root = NULL, + path[MAX_FILE_NAME*2]; + + if (options->tab_file == NULL) + { + report_error(options, "create_file_long: missing -tabfile option"); + return -87; /* invalid parameter */ + } + + ftab = fopen(options->tab_file, "r"); + if (ftab == NULL) + { + report_error(options, "create_file_long: could not open tabfile"); + return -87; /* file not found */ + } + + /* TODO: get line for specified file system, for now just read first line */ + fgets(line, 256, ftab); + token = strtok(line, " "); + if (token) + { + fs_root = strtok(NULL, " "); + } + if (token == NULL || fs_root == NULL) + { + report_error(options, "create_file_long: could not parse tabfile"); + fclose(ftab); + return 1; + } + + fclose(ftab); + + rem_size = max_size - strlen(fs_root); + + strcpy(path, options->root_dir); + + for (i = strlen(path); i < rem_size; i++) + path[i] = randchar(); + path[i] = '\0'; + + code = create_file_int(path); + + return code; + +} + +/* create a file with the maximum length file name */ +int create_file_long(global_options *options, int fatal) +{ + int code; + + code = create_file_long_int(options, MAX_FILE_NAME); + + report_result(options, + "create_file_long", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +/* attempt to create a file over the maximum length file name */ +int create_file_toolong(global_options *options, int fatal) +{ + int code; + + code = create_file_long_int(options, MAX_FILE_NAME+1); + + report_result(options, + "create_file_toolong", + "main", + RESULT_FAILURE, + 22, + OPER_EQUAL, + code); + + if (code != 22 && fatal) + return CODE_FATAL; + + return 0; +} + +/* create 1000 0-byte files */ +int create_files_many(global_options *options, int fatal) +{ + int code = 0, i; + char *path; + + for (i = 0; i < 1000 && code == 0; i++) + { + path = randfile(options->root_dir); + code = create_file_int(path); + free(path); + } + + report_result(options, + "create_files_many", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} \ No newline at end of file diff --git a/src/client/windows/client-test/create.h b/src/client/windows/client-test/create.h new file mode 100755 index 0000000..f359a1f --- /dev/null +++ b/src/client/windows/client-test/create.h @@ -0,0 +1,17 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test - create function prototypes */ + +#ifndef __CREATE_H +#define __CREATE_H + +#include "test-support.h" + +int create_dir(global_options *options, int fatal); +int create_subdir(global_options *options, int fatal); +int create_dir_toolong(global_options *options, int fatal); +int create_files(global_options *options, int fatal); +int create_file_long(global_options *options, int fatal); +int create_file_toolong(global_options *options, int fatal); +int create_files_many(global_options *options, int fatal); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/file-ops.c b/src/client/windows/client-test/file-ops.c new file mode 100755 index 0000000..279abb6 --- /dev/null +++ b/src/client/windows/client-test/file-ops.c @@ -0,0 +1,409 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client tests -- file operations */ + +#include +#include +#include +#include +#include +#include +#ifdef WIN32 +#include +#endif + +#include "test-support.h" +#include "file-ops.h" + + +/* return 0 if file found */ +int lookup_file_int(char *file_name) +{ + struct _stat buf; + + return _stat(file_name, &buf) == 0 ? 0 : ENOENT; +} + +int delete_file(global_options *options, int fatal) +{ + char *file_name; + int code; + + /* delete existing file */ + file_name = randfile(options->root_dir); + + code = quick_create(file_name); + if (code != 0) + { + free(file_name); + return -code; + } + + /* delete file */ + if (_unlink(file_name) == 0) + { + code = lookup_file_int(file_name) == ENOENT ? 0 : 1; + } + else + { + code = errno; + } + + report_result(options, + "delete-file", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + free(file_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +int delete_file_notexist(global_options *options, int fatal) +{ + char *file_name; + int code; + + /* delete existing file */ + file_name = randfile(options->root_dir); + + /* delete nonexistent file */ + _unlink(file_name); + code = errno; + + report_result(options, + "delete-file-notexist", + "main", + RESULT_FAILURE, + ENOENT, + OPER_EQUAL, + code); + + free(file_name); + + if (code != ENOENT && fatal) + return CODE_FATAL; + + return 0; +} + +int delete_dir_empty(global_options *options, int fatal) +{ + char *dir_name; + int code; + + /* create directory */ + dir_name = randdir(options->root_dir); + + if (_mkdir(dir_name) != 0) + { + free(dir_name); + return errno; + } + + /* remove directory */ + if (_rmdir(dir_name) == 0) + { + code = lookup_file_int(dir_name) == ENOENT ? 0 : 1; + } + else + { + code = errno; + } + + report_result(options, + "delete-dir-empty", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + free(dir_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +int delete_dir_notempty(global_options *options, int fatal) +{ + char *dir_name, *file_name; + int code; + + /* create dir */ + dir_name = randdir(options->root_dir); + if (_mkdir(dir_name) != 0) + { + free(dir_name); + return errno; + } + + /* create file */ + file_name = randfile(dir_name); + if ((code = quick_create(file_name)) != 0) + { + _rmdir(dir_name); + free(file_name); + free(dir_name); + + return code; + } + + /* attempt to delete dir */ + code = _rmdir(dir_name) == 0 ? 0 : errno; + + report_result(options, + "delete-dir-notempty", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + /* cleanup file and dir */ + _unlink(file_name); + _rmdir(dir_name); + + free(file_name); + free(dir_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +int rename_file(global_options *options, int fatal) +{ + char *file_name, *new_name; + int code; + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* rename */ + new_name = randfile(options->root_dir); + code = rename(file_name, new_name) == 0 ? 0 : errno; + + report_result(options, + "rename-file", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + /* cleanup file */ + _unlink(new_name); + + free(new_name); + free(file_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +/* On OrangeFS, the target file will be overwritten */ +int rename_file_exist(global_options *options, int fatal) +{ + char *file_name, *new_name; + int code; + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* create second file */ + new_name = randfile(options->root_dir); + if ((code = quick_create(new_name)) != 0) + { + free(new_name); + free(file_name); + return code; + } + + /* rename */ + code = rename(file_name, new_name) == 0 ? 0 : errno; + + report_result(options, + "rename-file-exist", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + /* cleanup file */ + _unlink(new_name); + + free(new_name); + free(file_name); + + if (code != EACCES && fatal) + return CODE_FATAL; + + return 0; +} + +int move_file(global_options *options, int fatal) +{ + char *dir_name, *file_name, *new_name; + int code; + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* create dir */ + dir_name = randdir(options->root_dir); + if (_mkdir(dir_name) != 0) + { + free(dir_name); + free(file_name); + return errno; + } + + /* move file */ + new_name = (char *) malloc(strlen(dir_name) + strlen(file_name) + 4); + sprintf(new_name, "%s%c%s", dir_name, SLASH_CHAR, strrchr(file_name, SLASH_CHAR)+1); + code = rename(file_name, new_name) == 0 ? 0 : errno; + + report_result(options, + "move-file", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + free(new_name); + free(dir_name); + free(file_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +int move_file_baddir(global_options *options, int fatal) +{ + char *dir_name, *file_name, *new_name; + int code; + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* "fake" dir */ + dir_name = randdir(options->root_dir); + + /* move file */ + new_name = (char *) malloc(strlen(dir_name) + strlen(file_name) + 4); + sprintf(new_name, "%s%c%s", dir_name, SLASH_CHAR, strrchr(file_name, SLASH_CHAR)+1); + code = rename(file_name, new_name) == 0 ? 0 : errno; + + report_result(options, + "move-file-baddir", + "main", + RESULT_FAILURE, + ENOENT, + OPER_EQUAL, + code); + + /* cleanup */ + _rmdir(dir_name); + + free(new_name); + free(dir_name); + free(file_name); + + if (code != ENOENT && fatal) + return CODE_FATAL; + + return 0; +} + +int move_file_exist(global_options *options, int fatal) +{ + char *dir_name, *file_name, *new_name; + int code; + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* "fake" dir */ + dir_name = randdir(options->root_dir); + if (_mkdir(dir_name) != 0) + { + free(dir_name); + free(file_name); + return errno; + } + + /* create new file */ + new_name = (char *) malloc(strlen(dir_name) + strlen(file_name) + 4); + sprintf(new_name, "%s%c%s", dir_name, SLASH_CHAR, strrchr(file_name, SLASH_CHAR)+1); + if ((code = quick_create(new_name)) != 0) + { + free(new_name); + free(dir_name); + free(file_name); + return 0; + } + + /* move file over existing file */ + code = rename(file_name, new_name) == 0 ? 0 : errno; + + report_result(options, + "move-file-exist", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + /* cleanup */ + _rmdir(dir_name); + + free(new_name); + free(dir_name); + free(file_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + diff --git a/src/client/windows/client-test/file-ops.h b/src/client/windows/client-test/file-ops.h new file mode 100755 index 0000000..ee814bf --- /dev/null +++ b/src/client/windows/client-test/file-ops.h @@ -0,0 +1,21 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client tests -- file operation declarations */ + +#ifndef __FILE_OPS_H +#define __FILE_OPS_H + +#include "test-support.h" + +int delete_file(global_options *options, int fatal); +int delete_file_notexist(global_options *options, int fatal); +int delete_dir_empty(global_options *options, int fatal); +int delete_dir_notempty(global_options *options, int fatal); + +int rename_file(global_options *options, int fatal); +int rename_file_exist(global_options *options, int fatal); + +int move_file(global_options *options, int fatal); +int move_file_baddir(global_options *options, int fatal); +int move_file_exist(global_options *options, int fatal); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/find.c b/src/client/windows/client-test/find.c new file mode 100755 index 0000000..0a107ef --- /dev/null +++ b/src/client/windows/client-test/find.c @@ -0,0 +1,223 @@ +/* Copyright (C) 2011 + Client tests -- find files functions */ + +#include +#include +#include +#ifdef WIN32 +#include +#else +#include +#include +#endif +#include + +#include "test-support.h" +#include "find.h" + +#ifdef WIN32 +int find_files(global_options *options, int fatal) +{ + char *file_names[10]; + int code, i, j; + struct _finddata_t fileinfo; + intptr_t findptr; + + /* create 10 files */ + for (i = 0; i < 10; i++) + { + file_names[i] = randfile(options->root_dir); + if ((code = quick_create(file_names[i])) != 0) + { + for (j = 0; j <= i; j++) + { + _unlink(file_names[j]); + free(file_names[j]); + } + + return code; + } + } + + /* find the files */ + for (i = 0, findptr = 0; i < 10 && findptr != -1; i++) + { + findptr = _findfirst(file_names[i], &fileinfo); + if (findptr != -1) + _findclose(findptr); + } + + code = (findptr != -1) ? 0 : errno; + + report_result(options, + "find-files", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + for (i = 0; i < 10; i++) + { + _unlink(file_names[i]); + free(file_names[i]); + } + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +int find_files_pattern(global_options *options, int fatal) +{ + char *file_names[10], *file_name, *pattern; + int code = 0, i, j, mark[10], found, ret; + struct _finddata_t fileinfo; + intptr_t findptr; + + /* create 10 files */ + for (i = 0; i < 10; i++) + { + file_names[i] = (char *) malloc(strlen(options->root_dir) + 9); + sprintf(file_names[i], "%sxyz%05d", options->root_dir, rand()); + if ((code = quick_create(file_names[i])) != 0) + { + for (j = 0; j <= i; j++) + { + _unlink(file_names[j]); + free(file_names[j]); + } + + return code; + } + mark[i] = 0; + } + + /* find the files with the * wildcard */ + pattern = (char *) malloc(strlen(options->root_dir) + 5); + sprintf(pattern, "%sxyz*", options->root_dir); + + ret = findptr = _findfirst(pattern, &fileinfo); + while (ret != -1) + { + /* search file list for file */ + for (i = 0; i < 10; i++) + { + file_name = strrchr(file_names[i], SLASH_CHAR) + 1; + if (!_stricmp(file_name, fileinfo.name)) + { + mark[i] = 1; + break; + } + } + + ret = _findnext(findptr, &fileinfo); + } + + if (errno == ENOENT) + { + /* all found? */ + for (i = 0, found = 1; i < 10 && found; i++) + found = found && mark[i]; + + code = !found; + + report_result(options, + "find-files-pattern", + "pattern-*", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + _findclose(findptr); + } + else + { + _findclose(findptr); + + free(pattern); + /* technical error */ + for (i = 0; i < 10; i++) + { + _unlink(file_names[i]); + free(file_names[i]); + } + + return errno; + } + + /* find by ? pattern */ + free(pattern); + pattern = (char *) malloc(strlen(options->root_dir) + 9); + sprintf(pattern, "%sxyz?????", options->root_dir); + + ret = findptr = _findfirst(pattern, &fileinfo); + while (ret != -1) + { + /* search file list for file */ + for (i = 0; i < 10; i++) + { + file_name = strrchr(file_names[i], SLASH_CHAR) + 1; + if (!_stricmp(file_name, fileinfo.name)) + { + mark[i] = 1; + break; + } + } + + ret = _findnext(findptr, &fileinfo); + } + + if (errno == ENOENT) + { + /* all found? */ + for (i = 0, found = 1; i < 10 && found; i++) + found = found && mark[i]; + + code = !found; + + report_result(options, + "find-files-pattern", + "pattern-?", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + _findclose(findptr); + } + else + { + _findclose(findptr); + + free(pattern); + /* technical error */ + for (i = 0; i < 10; i++) + { + _unlink(file_names[i]); + free(file_names[i]); + } + + return errno; + } + + + /* cleanup */ + free(pattern); + for (i = 0; i < 10; i++) + { + _unlink(file_names[i]); + free(file_names[i]); + } + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} +#else +/* Not implemented on Linux -- there is no easy way to + iterate through files */ +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/find.h b/src/client/windows/client-test/find.h new file mode 100755 index 0000000..ac68013 --- /dev/null +++ b/src/client/windows/client-test/find.h @@ -0,0 +1,16 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client tests - find file declarations */ + +#ifndef __FIND_H +#define __FIND_H + +#ifdef WIN32 + +#include "test-support.h" + +int find_files(global_options *options, int fatal); +int find_files_pattern(global_options *options, int fatal); + +#endif + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/info.c b/src/client/windows/client-test/info.c new file mode 100755 index 0000000..65ccdfd --- /dev/null +++ b/src/client/windows/client-test/info.c @@ -0,0 +1,153 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client tests -- file info functions */ + +#include +#include +#include +#include +#include +#include +#ifdef WIN32 +#include +#else +#include +#endif +#include +#include + +#include "test-support.h" +#include "info.h" + +int file_time(global_options *options, int fatal) +{ + time_t t, diff1, diff2, diff3; + char *file_name; + int code; + struct _stat buf; + + t = time(NULL); + + /* create file */ + file_name = randfile(options->root_dir); + if ((code = quick_create(file_name)) != 0) + { + free(file_name); + return code; + } + + /* get times */ + if (_stat(file_name, &buf) != 0) + { + free(file_name); + return errno; + } + + diff1 = buf.st_atime - t; + if (diff1 < 0) diff1 *= -1; + diff2 = buf.st_ctime - t; + if (diff2 < 0) diff2 *= -1; + diff3 = buf.st_mtime - t; + if (diff3 < 0) diff3 *= -1; + + code = !((diff1 < 15) && (diff2 < 15) && (diff3 < 15)); + + report_result(options, + "file-time", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + 0); + + _unlink(file_name); + + free(file_name); + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} + +#ifdef WIN32 +int volume_space(global_options *options, int fatal) +{ + struct _diskfree_t driveinfo; + __int64 total_clusters, avail_clusters, + sectors_per_cluster, bytes_per_sector, + bytes_free, bytes_total; + int code; + double gb_free, gb_total; + + code = _getdiskfree(toupper(options->root_dir[0]) - 'A' + 1, &driveinfo); + + report_result(options, + "volume-space", + "main", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code == 0) + { + total_clusters = driveinfo.total_clusters; + avail_clusters = driveinfo.avail_clusters; + sectors_per_cluster = driveinfo.sectors_per_cluster; + bytes_per_sector = driveinfo.bytes_per_sector; + + bytes_free = avail_clusters * sectors_per_cluster * bytes_per_sector; + gb_free = (double) bytes_free / (double) (1024*1024*1024); + + report_perf(options, + "volume-space", + "free-space", + gb_free, + "%4.3f GB"); + + bytes_total = total_clusters * sectors_per_cluster * bytes_per_sector; + gb_total = (double) bytes_total / (double) (1024*1024*1024); + + report_perf(options, + "volume-space", + "avail-space", + gb_total, + "%4.3f GB"); + } + + if (code != 0 && fatal) + return CODE_FATAL; + + return 0; +} +#else +int volume_space(global_options *options, int fatal) +{ + struct statfs buf; + int code; + double gb_free, gb_total; + + code = statfs(options->root_dir, &buf); + if (code != 0) + { + return errno; + } + + gb_free = (double) (buf.f_bsize * buf.f_bfree) / (double) 1024*1024*1024; + gb_total = (double) (buf.f_bsize * buf.f_blocks) / (double) 1024*1024*1024; + + report_perf(options, + "volume-space", + "free-space", + gb_free, + "%4.3f GB"); + + report_perf(options, + "volume-space", + "avail-space", + gb_total, + "%4.3f GB"); + + return 0; +} +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/info.h b/src/client/windows/client-test/info.h new file mode 100755 index 0000000..345c173 --- /dev/null +++ b/src/client/windows/client-test/info.h @@ -0,0 +1,12 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client tests - file info declarations */ + +#ifndef __INFO_H +#define __INFO_H + +#include "test-support.h" + +int file_time(global_options *options, int fatal); +int volume_space(global_options *options, int fatal); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/open.c b/src/client/windows/client-test/open.c new file mode 100755 index 0000000..2428ace --- /dev/null +++ b/src/client/windows/client-test/open.c @@ -0,0 +1,116 @@ +/* Copyright (C) 2011 + Client test - open file functions */ + +#include +#include +#include +#include + +#include "open.h" + +void open_file_cleanup(char *file_name) +{ + _unlink(file_name); +} + +/* open file w/specified mode */ +int open_file_int(char *file_name, char *mode) +{ + FILE *f; + int code = 0; + + f = fopen(file_name, mode); + if (f) + fclose(f); + else + code = errno; + + return code; +} + +/* different subtests for file modes */ +int open_file(global_options *options, int fatal) +{ + int code; + char *file_name; + + file_name = randfile(options->root_dir); + + /* write mode */ + code = open_file_int(file_name, "w"); + + report_result(options, + "open_file", + "w_mode", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + { + open_file_cleanup(file_name); + free(file_name); + return CODE_FATAL; + } + + /* read mode */ + code = open_file_int(file_name, "r"); + + report_result(options, + "open_file", + "r_mode", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + { + open_file_cleanup(file_name); + free(file_name); + return CODE_FATAL; + } + + /* append mode */ + code = open_file_int(file_name, "a"); + + report_result(options, + "open_file", + "a_mode", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + { + open_file_cleanup(file_name); + free(file_name); + return CODE_FATAL; + } + + /* read/write mode */ + code = open_file_int(file_name, "w+"); + + report_result(options, + "open_file", + "w+_mode", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + if (code != 0 && fatal) + { + open_file_cleanup(file_name); + free(file_name); + return CODE_FATAL; + } + + open_file_cleanup(file_name); + + free(file_name); + + return 0; +} diff --git a/src/client/windows/client-test/open.h b/src/client/windows/client-test/open.h new file mode 100755 index 0000000..5238deb --- /dev/null +++ b/src/client/windows/client-test/open.h @@ -0,0 +1,11 @@ +/* Copyright (C) 2001 Omnibond, LLC + Client test - open file declarations */ + +#ifndef __OPEN_H +#define __OPEN_H + +#include "test-support.h" + +int open_file(global_options *options, int fatal); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/test-io.c b/src/client/windows/client-test/test-io.c new file mode 100755 index 0000000..09adeb2 --- /dev/null +++ b/src/client/windows/client-test/test-io.c @@ -0,0 +1,534 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test - IO functions */ + +#include +#include +#include +#ifdef WIN32 +#include +#include +#else +#include +#endif +#include + +#include "test-support.h" +#include "test-io.h" +#include "timer.h" +#include "thread.h" + +void io_file_cleanup(char *file_name) +{ + _unlink(file_name); +} + +int io_file_int(char *file_name, char *mode, char *buffer, size_t size) +{ + FILE *f; + int real_size, code = 0; + size_t total = 0; + + f = fopen(file_name, mode); + if (!f) + return errno; + + while ((total < size) && !feof(f)) + { + if (!strcmp(mode, "rb")) + real_size = fread(&(buffer[total]), 1, size - total, f); + else /* "wb" or "ab" */ + real_size = fwrite(&(buffer[total]), 1, size - total, f); + if (real_size == 0) + { + code = errno; + break; + } + total += real_size; + } + + fclose(f); + + return code; +} + +int io_file(global_options *options, int fatal) +{ + char *file_name, *buffer = NULL, *copy = NULL; + int i, j, code, code_flag; + size_t sizes[] = {4*1024, 100*1024, 1024*1024}; + char *perftests[] = {"io_file_write_4kb", "io_file_read_4kb", "io_file_write_100kb", + "io_file_read_100kb", "io_file_write_1mb", "io_file_read_1mb"}; + char *subtests[] = {"4kb", "100kb", "1mb"}; +#ifdef WIN32 + unsigned __int64 start; +#else + struct timeval start; +#endif + double elapsed; + + for (i = 0; i < 3; i++) + { + code_flag = 0; + + /* allocate buffer */ + buffer = (char *) malloc(sizes[i]); + + /* fill buffer */ + for (j = 0; (unsigned) j < sizes[i]; j++) + buffer[j] = (char) j % 256; + + file_name = randfile(options->root_dir); + +#ifdef WIN32 + start = timer_start(); +#else + timer_start(&start); +#endif + code = io_file_int(file_name, "wb", buffer, sizes[i]); +#ifdef WIN32 + elapsed = timer_elapsed(start); +#else + elapsed = timer_elapsed(&start); +#endif + + if (code != 0) + goto io_file_exit; + + report_perf(options, + "io_file", + perftests[i*2], + elapsed, + "%3.3fs"); + + /* copy the buffer */ + copy = (char *) malloc(sizes[i]); + memcpy(copy, buffer, sizes[i]); + +#ifdef WIN32 + start = timer_start(); +#else + timer_start(&start); +#endif + code = io_file_int(file_name, "rb", buffer, sizes[i]); + +#ifdef WIN32 + elapsed = timer_elapsed(start); +#else + elapsed = timer_elapsed(&start); +#endif + + if (code != 0) + goto io_file_exit; + + report_perf(options, + "io_file", + perftests[i*2+1], + elapsed, + "%3.3fs"); + + /* compare buffers */ + code = memcmp(copy, buffer, sizes[i]); + code_flag = 1; + + report_result(options, + "io_file", + subtests[i], + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + io_file_cleanup(file_name); + + free(file_name); file_name = NULL; + free(buffer); buffer = NULL; + free(copy); copy = NULL; + + } + +io_file_exit: + + if (file_name) + { + io_file_cleanup(file_name); + free(file_name); + } + if (buffer) + free(buffer); + if (copy) + free(copy); + + if (!code_flag) + { + report_error(options, + "io_file: I/O error\n"); + return code; + } + + return 0; +} + +int flush_file(global_options *options, int fatal) +{ + char *file_name; + FILE *f, *f2; + int i, size = 4 * 1024, total = 0, + code; + char *buffer, *copy; + + file_name = randfile(options->root_dir); + + f = fopen(file_name, "wb"); + if (!f) + { + free(file_name); + return -1; + } + + /* write bytes to file */ + buffer = (char *) malloc(size); + for (i = 0; i < size; i++) + { + buffer[i] = i % 256; + } + while (total < size) + { + total += fwrite(buffer, 1, size, f); + } + + /* flush the file */ + code = fflush(f); + + report_result(options, + "flush-file", + "flush-call", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + /* open another pointer to the file */ + f2 = fopen(file_name, "rb"); + if (!f2) + { + free(file_name); + return -1; + } + + /* compare data */ + copy = (char *) malloc(size); + memcpy(copy, buffer, size); + total = 0; + while (total < size) + { + total += fread(buffer, 1, size, f2); + } + + code = memcmp(copy, buffer, size); + + report_result(options, + "flush-file", + "flush-compare", + RESULT_SUCCESS, + 0, + OPER_EQUAL, + code); + + fclose(f2); + fclose(f); + + _unlink(file_name); + + free(copy); + free(buffer); + free(file_name); + + return 0; +} + +typedef struct +{ + int threadi; + global_options *options; +} thread_args; + +#define THREAD_COUNT 10 +#define FILE_COUNT 100 + +void io_file_mt_cleanup(global_options *options) +{ + char *dir_name, *file_name; + int i, j; + + for (i = 0; i < THREAD_COUNT; i++) + { + dir_name = (char *) malloc(strlen(options->root_dir) + 16); + sprintf(dir_name, "%smt%02d", options->root_dir, i); + + for (j = 0; j < FILE_COUNT; j++) + { + file_name = (char *) malloc(strlen(dir_name) + 16); + sprintf(file_name, "%s%cmt%04d.tst", dir_name, SLASH_CHAR, j); + + _unlink(file_name); + + free(file_name); + } + + _rmdir(dir_name); + + free(dir_name); + } +} + +#ifdef WIN32 +unsigned __stdcall io_file_mt_thread(void *pargs) +{ + thread_args *args = (thread_args *) pargs; + char *dir_name, *file_name, buf[4096]; + int i; + unsigned __int64 start; + double elapsed; + unsigned int total = 0; + FILE *f; + + /* create directory */ + dir_name = (char *) malloc(strlen(args->options->root_dir) + 16); + sprintf(dir_name, "%smt%02d", args->options->root_dir, args->threadi); + _mkdir(dir_name); + + for (i = 0; i < 4096; i++) + buf[i] = i % 256; + + /* create 1000 files and write 4KB to them */ + for (i = 0; i < FILE_COUNT; i++) + { + file_name = (char *) malloc(strlen(dir_name) + 16); + sprintf(file_name, "%s%cmt%04d.tst", dir_name, SLASH_CHAR, i); + start = timer_start(); + f = fopen(file_name, "wb"); + if (f) + { + fwrite(buf, 1, 4096, f); + fclose(f); + } + elapsed = timer_elapsed(start); + total += (unsigned int) (elapsed * 1000000.0); + + free(file_name); + } + + free(dir_name); + + return total; +} + +int io_file_mt(global_options *options, int fatal) +{ + thread_args *args; + uintptr_t *hthreads; + int threadi, ret, i, code = 0; + unsigned int counter, total; + unsigned long long start; + double elapsed; + + /* allocate args */ + args = (thread_args *) malloc(sizeof(thread_args) * THREAD_COUNT); + + /* allocate thread array */ + hthreads = (uintptr_t *) malloc(sizeof(uintptr_t) * THREAD_COUNT); + + /* spawn threads */ + start = timer_start(); + for (threadi = 0; threadi < THREAD_COUNT; threadi++) + { + args[threadi].options = options; + args[threadi].threadi = threadi; + + hthreads[threadi] = _beginthreadex(NULL, 0, io_file_mt_thread, &(args[threadi]), 0, NULL); + if (hthreads[threadi] == 0) + { + /* TODO */ + code = -1; + break; + } + } + + /* wait for threads to complete */ + if (code == 0) + { + ret = thread_wait_multiple(THREAD_COUNT, hthreads, 1, THREAD_WAIT_INFINITE); + elapsed = timer_elapsed(start); + + if (ret >= THREAD_WAIT_SIGNALED && ret < THREAD_COUNT) + { + /* sum the exit codes */ + for (i = 0, total = 0; i < THREAD_COUNT; i++) + { + /* exit code is time in microseconds */ + if (get_thread_exit_code(hthreads[i], &counter)) + { + total += counter; + } + else + { + /* TODO */ + code = -1; + break; + } + } + } + else + { + code = ret * -1; + } + } + + if (code == 0) + { + report_perf(options, + "io-file-mt", + "file-io", + (double) total / 1000000, + "%3.3f sec"); + + report_perf(options, + "io-file-mt", + "total", + elapsed, + "%3.3f sec"); + } + else + { + /* TODO */ + report_error(options, + "io_file_mt: failed"); + } + + io_file_mt_cleanup(options); + + free(hthreads); + free(args); + + return code; +} +#else +/* Linux version */ +void *io_file_mt_thread(void *pargs) +{ + thread_args *args = (thread_args *) pargs; + char *dir_name, *file_name, buf[4096]; + int i; + struct timeval start; + double elapsed; + unsigned int *total; + FILE *f; + + total = (unsigned int *) malloc(sizeof(unsigned int)); + *total = 0; + + /* create directory */ + dir_name = (char *) malloc(strlen(args->options->root_dir) + 16); + sprintf(dir_name, "%smt%02d", args->options->root_dir, args->threadi); + _mkdir(dir_name); + + for (i = 0; i < 4096; i++) + buf[i] = i % 256; + + /* create 1000 files and write 4KB to them */ + for (i = 0; i < FILE_COUNT; i++) + { + file_name = (char *) malloc(strlen(dir_name) + 16); + sprintf(file_name, "%s%cmt%04d.tst", dir_name, SLASH_CHAR, i); + timer_start(&start); + f = fopen(file_name, "wb"); + if (f) + { + fwrite(buf, 1, 4096, f); + fclose(f); + } + elapsed = timer_elapsed(&start); + *total += (unsigned int) (elapsed * 1000000.0); + + free(file_name); + } + + free(dir_name); + + pthread_exit(total); + + return total; +} + +int io_file_mt(global_options *options, int fatal) +{ + thread_args *args; + pthread_t *hthreads; + int threadi, ret, i, code = 0; + unsigned int total; + void *counter; + struct timeval start; + double elapsed; + + /* allocate args */ + args = (thread_args *) malloc(sizeof(thread_args) * THREAD_COUNT); + + /* allocate thread array */ + hthreads = (pthread_t *) malloc(sizeof(pthread_t) * THREAD_COUNT); + + /* spawn threads */ + timer_start(&start); + for (threadi = 0; threadi < THREAD_COUNT; threadi++) + { + args[threadi].options = options; + args[threadi].threadi = threadi; + + code = pthread_create(&hthreads[threadi], NULL, io_file_mt_thread, &args[threadi]); + if (code != 0) + break; + } + + /* wait for threads to complete */ + if (code == 0) + { + for (i = 0; i < THREAD_COUNT && code == 0; i++) + { + /* return value is time in microseconds */ + code = pthread_join(hthreads[i], &counter); + total += *((unsigned int *) counter); + + free(counter); + } + + elapsed = timer_elapsed(&start); + } + + if (code == 0) + { + report_perf(options, + "io-file-mt", + "file-io", + (double) total / 1000000, + "%3.3f sec"); + + report_perf(options, + "io-file-mt", + "total", + elapsed, + "%3.3f sec"); + } + else + { + /* TODO */ + report_error(options, + "io_file_mt: thread join failed"); + } + + io_file_mt_cleanup(options); + + free(hthreads); + free(args); + + return code; +} +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/test-io.h b/src/client/windows/client-test/test-io.h new file mode 100755 index 0000000..067d3b1 --- /dev/null +++ b/src/client/windows/client-test/test-io.h @@ -0,0 +1,13 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test - IO declarations */ + +#ifndef __TEST_IO_H +#define __TEST_IO_H + +#include "test-support.h" + +int io_file(global_options *options, int fatal); +int flush_file(global_options *options, int fatal); +int io_file_mt(global_options *options, int fatal); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/test-list.h b/src/client/windows/client-test/test-list.h new file mode 100755 index 0000000..714902e --- /dev/null +++ b/src/client/windows/client-test/test-list.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test - function declarations */ + +#ifndef __TEST_LIST_H +#define __TEST_LIST_H + +#include "test-support.h" + +#include "create.h" +#include "open.h" +#include "test-io.h" +#include "file-ops.h" +#include "info.h" +#include "find.h" + +typedef struct +{ + const char *name; + int (*function) (global_options *, int); + int fatal; +} test_operation; + +test_operation op_table[] = +{ + /*{"test-test", test_test, FALSE}, */ + {"create-dir", create_dir, TRUE}, + {"create-subdir", create_subdir, FALSE}, + {"create-dir-toolong", create_dir_toolong, FALSE}, + {"create-files", create_files, TRUE}, + {"create-file-long", create_file_long, FALSE}, + {"create-file-toolong", create_file_toolong, FALSE}, + {"create-files-many", create_files_many, FALSE}, + {"open-file", open_file, TRUE}, + {"io-file", io_file, FALSE}, + {"flush-file", flush_file, FALSE}, + {"delete-file", delete_file, FALSE}, + {"delete-file-notexist", delete_file_notexist, FALSE}, + {"delete-dir-empty", delete_dir_empty, FALSE}, + {"delete-dir-notempty", delete_dir_notempty, FALSE}, + {"rename-file", rename_file, FALSE}, + {"rename-file-exist", rename_file_exist, FALSE}, + {"move-file", move_file, FALSE}, + {"move-file-baddir", move_file_baddir, FALSE}, + {"move-file-exist", move_file_exist, FALSE}, + {"file-time", file_time, FALSE}, +#ifdef WIN32 + {"volume-space", volume_space, FALSE}, + {"find-files", find_files, FALSE}, + {"find-files-pattern", find_files_pattern, FALSE}, +#endif + {"io-file-mt", io_file_mt, FALSE}, + {NULL, NULL, 0} +}; + + +#endif diff --git a/src/client/windows/client-test/test-support.c b/src/client/windows/client-test/test-support.c new file mode 100755 index 0000000..0312913 --- /dev/null +++ b/src/client/windows/client-test/test-support.c @@ -0,0 +1,198 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client testing - support routines */ + +#include +#include +#include +#include + +#include "test-support.h" +#include "timer.h" + +const char *ops[] = {"=", "<>", "<", ">", "=<", ">="}; + +/* allocate and concatenate a string */ +char *quickcat(const char *str1, const char *str2) +{ + char *str; + + str = (char *) malloc(strlen(str1) + strlen(str2) + 1); + + sprintf(str, "%s%s", str1, str2); + + return str; +} + +/* generate a random dir name... caller must free */ +char *randdir(const char *root) +{ + char *slashdir, name[16], *dir; + + if (!root) + return NULL; + + /* append trailing slash */ + if (strlen(root) > 0 && root[strlen(root)-1] != SLASH_CHAR) + slashdir = quickcat(root, SLASH_STR); + else + slashdir = _strdup(root); + + /* generate random dir name */ + sprintf(name, "dir%05d", rand()); + + dir = quickcat(slashdir, name); + + free(slashdir); + + return dir; +} + +/* generate a random file name... caller must free */ +char *randfile(const char *root) +{ + char *slashdir, name[16], *file; + + if (!root) + return NULL; + + /* append trailing slash */ + if (strlen(root) > 0 && root[strlen(root)-1] != SLASH_CHAR) + slashdir = quickcat(root, SLASH_STR); + else + slashdir = _strdup(root); + + /* generate random dir name */ + sprintf(name, "f%05d.tst", rand()); + + file = quickcat(slashdir, name); + + free(slashdir); + + return file; +} + +/* create a 0-byte file */ +int quick_create(char *file_name) +{ + FILE *f; + + f = fopen(file_name, "w"); + if (f) + { + fclose(f); + return 0; + } + + return errno; +} + +void report_error(global_options *options, + const char *msg) +{ + /* report to console and/or file */ + if (options->report_flags & REPORT_CONSOLE) + printf("%s\n", msg); + + if (options->report_flags & REPORT_FILE) + { + fprintf(options->freport, "%s\n", msg); + fflush(options->freport); + } + +} + +void report_result(global_options *options, + const char *test_name, + const char *sub_test, + int expected_result, + int expected_code, + int code_operation, + int actual_code) +{ + int comp, ret; + char *ok_str, *line; + size_t line_size = 0; + + /* determine result of test */ + switch (code_operation) + { + case OPER_EQUAL: + comp = actual_code == expected_code; + break; + case OPER_NOTEQUAL: + comp = actual_code != expected_code; + break; + case OPER_LESS: + comp = actual_code < expected_code; + break; + case OPER_GREATER: + comp = actual_code > expected_code; + break; + case OPER_LESSOREQUAL: + comp = actual_code <= expected_code; + break; + case OPER_GREATEROREQUAL: + comp = actual_code >= expected_code; + } + + ok_str = comp ? "OK" : "NOT_OK"; + + /* determine size of line buffer */ + line_size += strlen(test_name); + line_size += 14; /* EXPECT_SUCCESS */ + line_size += 11; /* max decimal size -- actual_code */ + line_size += 8; /* expected */ + line_size += 2; /* operator */ + line_size += 11; /* expected_code */ + line_size += 3; /* got */ + line_size += 6; /* NOT_OK */ + line_size += 9; /* spaces & null */ + + line = (char *) malloc(line_size); + + /* print to buffer */ + ret = _snprintf(line, line_size, "%s %s %s expected %s %d got %d %s", + test_name, + sub_test, + (expected_result == RESULT_SUCCESS) ? "EXPECT_SUCCESS" : "EXPECT_FAILURE", + ops[code_operation], expected_code, actual_code, + ok_str); + if (ret < 0) + sprintf(line, "LINE BUFFER OVERFLOW"); + + /* report to console and/or file */ + if (options->report_flags & REPORT_CONSOLE) + printf("%s\n", line); + + if (options->report_flags & REPORT_FILE) + { + fprintf(options->freport, "%s\n", line); + fflush(options->freport); + } + + free(line); +} + +void report_perf(global_options *options, + const char *test_name, + const char *sub_test, + double value, + char *format) +{ + char valstr[32]; + + /* get the string for the value in the specified format */ + sprintf(valstr, format, value); + + /* report to console and/or file */ + if (options->report_flags & REPORT_CONSOLE) + printf("%s %s PERF %s\n", test_name, sub_test, valstr); + + if (options->report_flags & REPORT_FILE) + { + fprintf(options->freport, "%s %s PERF %s\n", test_name, sub_test, valstr); + fflush(options->freport); + } + +} + \ No newline at end of file diff --git a/src/client/windows/client-test/test-support.h b/src/client/windows/client-test/test-support.h new file mode 100755 index 0000000..4054f25 --- /dev/null +++ b/src/client/windows/client-test/test-support.h @@ -0,0 +1,78 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client testing -- declarations */ + +#ifndef __TESTS_H +#define __TESTS_H + +#ifdef WIN32 +#define SLASH_CHAR '\\' +#define SLASH_STR "\\" +#else +#define SLASH_CHAR '/' +#define SLASH_STR "/" + +#define TRUE 1 +#define FALSE 0 + +#define _rmdir rmdir +#define _mkdir(dir) mkdir(dir, 0777) +#define _strdup strdup +#define _unlink unlink +#define _stricmp strcasecmp +#define _stat stat +#define _snprintf snprintf + +#endif + +typedef struct +{ + char *root_dir; + char *tab_file; + int fs; + int report_flags; + FILE *freport; +} global_options; + +/* constants */ +#define CODE_FATAL 0x11111111L + +#define RESULT_SUCCESS 0 +#define RESULT_FAILURE 1 + +#define OPER_EQUAL 0 +#define OPER_NOTEQUAL 1 +#define OPER_LESS 2 +#define OPER_GREATER 3 +#define OPER_LESSOREQUAL 4 +#define OPER_GREATEROREQUAL 5 + +#define REPORT_CONSOLE 1 +#define REPORT_FILE 2 + +/* functions */ +char *quickcat(const char *str1, const char *str2); + +int quick_create(char *file_name); + +char *randdir(const char *root); + +char *randfile(const char *root); + +void report_error(global_options *options, + const char *msg); + +void report_result(global_options *options, + const char *test_name, + const char *sub_test, + int expected_result, + int expected_code, + int code_operation, + int actual_code); + +void report_perf(global_options *options, + const char *test_name, + const char *sub_test, + double value, + char *format); + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/test-test.c b/src/client/windows/client-test/test-test.c new file mode 100755 index 0000000..37343cc --- /dev/null +++ b/src/client/windows/client-test/test-test.c @@ -0,0 +1,16 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client -- A test of a test */ + +#include +#include +#include + +#include "test-support.h" + +int test_test(global_options *options, int fatal) +{ + + report_result(options, "test-test", "main", RESULT_SUCCESS, 0, OPER_EQUAL, 0); + + return 0; +} \ No newline at end of file diff --git a/src/client/windows/client-test/thread.c b/src/client/windows/client-test/thread.c new file mode 100755 index 0000000..cd9535a --- /dev/null +++ b/src/client/windows/client-test/thread.c @@ -0,0 +1,70 @@ +/* Copyright (C) 2011 Omnibond, LLC + Windows client tests -- thread functions */ + +#ifdef WIN32 + +#include +#include +#include +#include +#include + +#include "thread.h" + + +/* +#ifdef WIN32 +int thread_create(void *handle, void *(*start_routine)(void *), void *arg) +{ + uintptr_t uhandle; + uhandle = _beginthreadex(NULL, 0, start_routine, arg, 0, NULL); + + if (uhandle == 0) + return -1; + + memcpy(handle, &uhandle, sizeof(uintptr_t)); + + return 0; +} +#else +int thread_create(void *handle, void *(*start_routine)(void *), void *arg) +{ + return pthread_create((pthread_t *) handle, + NULL, + start_routine, + arg); +} +#endif +*/ + +int thread_wait(uintptr_t handle, unsigned int timeout) +{ + DWORD ret; + + ret = WaitForSingleObject((HANDLE) handle, timeout); + + if (ret == WAIT_FAILED) + ret = GetLastError() * -1; + + return ret; +} + +int thread_wait_multiple(unsigned int count, uintptr_t *handles, + int wait_all, unsigned int timeout) +{ + DWORD ret; + + ret = WaitForMultipleObjects(count, (HANDLE *) handles, wait_all, timeout); + + if (ret == WAIT_FAILED) + ret = GetLastError() * -1; + + return ret; +} + +int get_thread_exit_code(uintptr_t handle, unsigned int *code) +{ + return GetExitCodeThread((HANDLE) handle, (LPDWORD) code); +} + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/thread.h b/src/client/windows/client-test/thread.h new file mode 100755 index 0000000..c3a6b0a --- /dev/null +++ b/src/client/windows/client-test/thread.h @@ -0,0 +1,24 @@ +/* Copyright (C) 2011 Omnibond LLC + Windows client tests -- thread declaractions */ + +#ifndef __THREAD_H +#define __THREAD_H + +#ifdef WIN32 + +#define THREAD_WAIT_SIGNALED 0 +#define THREAD_WAIT_TIMEOUT 0x102L +#define THREAD_WAIT_INFINITE 0xFFFFFFFFL + +/*int thread_create(void *handle, void *(*start_routine)(void *), void *arg);*/ + +int thread_wait(uintptr_t handle, unsigned int timeout); + +int thread_wait_multiple(unsigned int count, uintptr_t *handles, + int wait_all, unsigned int timeout); + +int get_thread_exit_code(uintptr_t handle, unsigned int *code); + +#endif + +#endif \ No newline at end of file diff --git a/src/client/windows/client-test/timer.c b/src/client/windows/client-test/timer.c new file mode 100755 index 0000000..49f2636 --- /dev/null +++ b/src/client/windows/client-test/timer.c @@ -0,0 +1,58 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test -- timer functions */ + +#ifdef WIN32 +#include +#else +#include +#endif +#include + +#include "timer.h" + +/* get the start time for the timer */ +#ifdef WIN32 +unsigned __int64 timer_start() +{ + LARGE_INTEGER counter; + + if (!QueryPerformanceCounter(&counter)) + return 0; + + return counter.QuadPart; +} +#else +void timer_start(struct timeval *start) +{ + gettimeofday(start, NULL); +} +#endif + +#ifdef WIN32 +/* get the elapsed time for the timer (seconds) */ +double timer_elapsed(unsigned __int64 start) +{ + LARGE_INTEGER counter, freq; + + if (!QueryPerformanceCounter(&counter)) + return 0; + + if (!QueryPerformanceFrequency(&freq)) + return 0; + + return ((double) counter.QuadPart - (double) start) / (double) freq.QuadPart; +} +#else +double timer_elapsed(struct timeval *start) +{ + struct timeval end; + double elapsed; + + gettimeofday(&end, NULL); + + elapsed = (double) end.tv_sec + (double) end.tv_usec * 0.000001; + elapsed -= (double) start->tv_sec + (double) start->tv_usec * 0.000001; + + return elapsed; +} +#endif diff --git a/src/client/windows/client-test/timer.h b/src/client/windows/client-test/timer.h new file mode 100755 index 0000000..522d0cb --- /dev/null +++ b/src/client/windows/client-test/timer.h @@ -0,0 +1,15 @@ +/* Copyright (C) 2011 Omnibond, LLC + Client test -- timer declarations */ + +#ifdef WIN32 +/* get the start time for the timer */ +unsigned __int64 timer_start(); + +/* get the elapsed time for the timer (seconds) */ +double timer_elapsed(unsigned __int64 start); +#else +#include + +void timer_start(struct timeval *start); +double timer_elapsed(struct timeval *start); +#endif diff --git a/src/common/avahi/avahi.c b/src/common/avahi/avahi.c deleted file mode 100644 index 7b6ae48..0000000 --- a/src/common/avahi/avahi.c +++ /dev/null @@ -1,232 +0,0 @@ -/*** - Derived from Avahi's core-browse-services.c - - avahi is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - avahi is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with avahi; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. -***/ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "avahi.h" - -static void resolve_callback(AvahiSServiceResolver *r, - AvahiIfIndex interface, - AvahiProtocol protocol, - AvahiResolverEvent event, - const char *name, - const char *type, - const char *domain, - const char *host_name, - const AvahiAddress *address, - uint16_t port, - AvahiStringList *txt, - AvahiLookupResultFlags flags, - void* userdata) -{ - OSDAvahi* osd = userdata; - assert(osd); - assert(r); - - AvahiServer* server = osd->server; - assert(server); - - /* Called whenever a service has been resolved successfully or timed out */ - char a[512], *t; - fprintf(stderr, "I am in the resolver!\n"); - switch (event) { - case AVAHI_RESOLVER_FAILURE: - fprintf(stderr, "(Resolver) Failed to resolve service '%s' of type '%s' in domain '%s': %s\n", name, type, domain, avahi_strerror(avahi_server_errno(server))); - break; - - case AVAHI_RESOLVER_FOUND: - fprintf(stderr, "(Resolver) Service '%s' of type '%s' in domain '%s':\n", name, type, domain); - - avahi_address_snprint(a, sizeof(a), address); - t = avahi_string_list_to_string(txt); - fprintf(stderr, - "\t%s:%u (%s)\n" - "\tTXT=%s\n" - "\tcookie is %u\n" - "\tis_local: %i\n" - "\twide_area: %i\n" - "\tmulticast: %i\n" - "\tcached: %i\n", - host_name, port, a, - t, - avahi_string_list_get_service_cookie(txt), - !!(flags & AVAHI_LOOKUP_RESULT_LOCAL), - !!(flags & AVAHI_LOOKUP_RESULT_WIDE_AREA), - !!(flags & AVAHI_LOOKUP_RESULT_MULTICAST), - !!(flags & AVAHI_LOOKUP_RESULT_CACHED)); - avahi_free(t); - - } - - avahi_s_service_resolver_free(r); -} - -static void browse_callback(AvahiSServiceBrowser *b, - AvahiIfIndex interface, - AvahiProtocol protocol, - AvahiBrowserEvent event, - const char *name, - const char *type, - const char *domain, - AvahiLookupResultFlags flags, - void* userdata) -{ - OSDAvahi* osd = userdata; - assert(osd); - - AvahiServer* s = osd->server; - assert(b); - - /* Called whenever a new services becomes available on the LAN or is removed from the LAN */ - fprintf(stderr, "Name=>'%s', type=>'%s', domain=>'%s'", - name, type, domain); - - switch (event) { - case AVAHI_BROWSER_FAILURE: - fprintf(stderr, "(Browser) %s\n", avahi_strerror(avahi_server_errno(s))); - osd->fail_occurred = 1; - return; - - case AVAHI_BROWSER_NEW: - fprintf(stderr, "(Browser) NEW: service '%s' of type '%s' in domain '%s'\n", name, type, domain); - - /* We ignore the returned resolver object. In the callback - function we free it. If the server is terminated before - the callback function is called the server will free - the resolver for us. */ - if (!(avahi_s_service_resolver_new(s, interface, protocol, name, type, domain, AVAHI_PROTO_UNSPEC, 0, resolve_callback, osd))) - fprintf(stderr, "Failed to resolve service '%s': %s\n", name, avahi_strerror(avahi_server_errno(s))); - break; - - case AVAHI_BROWSER_REMOVE: - fprintf(stderr, "(Browser) REMOVE: service '%s' of type '%s' in domain '%s'\n", name, type, domain); - break; - - case AVAHI_BROWSER_ALL_FOR_NOW: - case AVAHI_BROWSER_CACHE_EXHAUSTED: - fprintf(stderr, "(Browser) %s\n", event == AVAHI_BROWSER_CACHE_EXHAUSTED ? "CACHE_EXHAUSTED" : "ALL_FOR_NOW"); - break; - } -} - - -OSDAvahi* osd_avahi_initialize(void) -{ - AvahiServerConfig config; - AvahiSServiceBrowser *sb = NULL; - AvahiSimplePoll *simple_poll = NULL; - AvahiServer *server = NULL; - OSDAvahi* ret = malloc(sizeof(OSDAvahi)); - int error = 0; - - /* Allocate main loop object */ - if (!(simple_poll = avahi_simple_poll_new())) { - fprintf(stderr, "Failed to create simple poll object.\n"); - goto fail; - } - - /* Publish local records */ - avahi_server_config_init(&config); - config.publish_hinfo = 0; - config.publish_addresses = 0; - config.publish_workstation = 0; - config.publish_domain = 0; - -#if 0 - /* Set a unicast DNS server for wide area DNS-SD */ - /* FIXME: We may use this functionality later to traverse - * separate LANs */ - avahi_address_parse("192.168.50.1", AVAHI_PROTO_UNSPEC, &config.wide_area_servers[0]); - config.n_wide_area_servers = 1; - config.enable_wide_area = 1; -#endif - - /* Allocate a new server */ - server = avahi_server_new(avahi_simple_poll_get(simple_poll), &config, NULL, NULL, &error); - - /* Free the configuration data */ - avahi_server_config_free(&config); - - /* Check whether creating the server object succeeded */ - if (!server) { - fprintf(stderr, "Failed to create server: %s\n", avahi_strerror(error)); - goto fail; - } - - ret->simple_poll = simple_poll; - ret->server = server; - ret->fail_occurred = 0; - - /* Create the service browser */ - if (!(sb = avahi_s_service_browser_new(server, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, "_workstation._tcp", NULL, 0, browse_callback, ret))) { - fprintf(stderr, "Failed to create service browser: %s\n", avahi_strerror(avahi_server_errno(server))); - goto fail; - } - - ret->sb = sb; - return ret; - -fail: - if (sb) - avahi_s_service_browser_free(sb); - - if (server) - avahi_server_free(server); - - if (simple_poll) - avahi_simple_poll_free(simple_poll); - return NULL; -} - -void osd_avahi_eventloop(OSDAvahi* server) -{ - if(server->fail_occurred) - fprintf(stderr, "Fail occurred!\n"); - - avahi_simple_poll_loop(server->simple_poll); -} - -void osd_avahi_free(OSDAvahi* obj) -{ - /* Cleanup things */ - if (obj->sb) - avahi_s_service_browser_free(obj->sb); - - if (obj->server) - avahi_server_free(obj->server); - - if (obj->simple_poll) - avahi_simple_poll_free(obj->simple_poll); - - free(obj); -} diff --git a/src/common/avahi/avahi.h b/src/common/avahi/avahi.h deleted file mode 100644 index 3bb9fca..0000000 --- a/src/common/avahi/avahi.h +++ /dev/null @@ -1,37 +0,0 @@ -/*** - Adapted from core-publish-service.c from Avahi - - avahi is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 2.1 of the - License, or (at your option) any later version. - - avahi is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General - Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with avahi; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - USA. -***/ - -#include -#include -#include -#include -#include -#include -#include - -typedef struct _OSDAvahi { - int fail_occurred; - AvahiServer* server; - AvahiSimplePoll* simple_poll; - AvahiSServiceBrowser* sb; -} OSDAvahi; - -OSDAvahi* osd_avahi_initialize(void); -void osd_avahi_free(OSDAvahi* obj); -void osd_avahi_eventloop(OSDAvahi* client); diff --git a/src/common/avahi/test_avahi_client.c b/src/common/avahi/test_avahi_client.c deleted file mode 100644 index 80c1327..0000000 --- a/src/common/avahi/test_avahi_client.c +++ /dev/null @@ -1,35 +0,0 @@ - -#include -#include -#include -#include "avahi.h" - -static int quit; - -void catch_ctrlc(int sig) -{ - quit = 1; -} - -int main(int argv, char** argc) -{ - OSDAvahi* osd; - - osd = osd_avahi_initialize(); - quit = 0; - signal(SIGINT, catch_ctrlc); - - int looped = 0; - while(!quit && osd && osd->fail_occurred == 0) - { - osd_avahi_eventloop(osd); - if(!looped) { - printf("looped!\n"); - looped = 1; - } - } - - osd_avahi_free(osd); - - return 0; -} diff --git a/src/common/dotconf/dotconf.c b/src/common/dotconf/dotconf.c index abc57be..d74c855 100644 --- a/src/common/dotconf/dotconf.c +++ b/src/common/dotconf/dotconf.c @@ -67,6 +67,8 @@ #include #include "./dotconf.h" +#include "pvfs2-internal.h" + #ifdef WIN32 #define snprintf _snprintf #define strcasecmp stricmp @@ -407,9 +409,8 @@ char *PINT_dotconf_get_here_document( return (char *) realloc(here_doc, offset); } -const char *PINT_dotconf_invoke_command( - configfile_t * configfile, - command_t * cmd) +const char *PINT_dotconf_invoke_command(configfile_t *configfile, + command_t *cmd) { const char *error = 0; @@ -417,9 +418,8 @@ const char *PINT_dotconf_invoke_command( return error; } -const char *PINT_dotconf_set_defaults( - configfile_t * configfile, - unsigned long context) +const char *PINT_dotconf_set_defaults(configfile_t *configfile, + unsigned long context) { const char *error = 0; const configoption_t *option; @@ -697,16 +697,19 @@ static void PINT_dotconf_free_command( int i; if (command->data.str) + { free(command->data.str); + } for (i = 0; i < command->arg_count; i++) + { free(command->data.list[i]); + } free(command->data.list); } -const char *PINT_dotconf_handle_command( - configfile_t * configfile, - char *buffer) +const char *PINT_dotconf_handle_command(configfile_t * configfile, + char *buffer) { char *cp1, *cp2; /* generic char pointer */ char *eob; /* end of buffer; end of string */ @@ -728,11 +731,15 @@ const char *PINT_dotconf_handle_command( /* ignore comments and empty lines */ if (!cp1 || !*cp1 || *cp1 == '#' || *cp1 == '\n' || *cp1 == (char) EOF) + { return NULL; + } /* skip line if it only contains whitespace */ if (cp1 == eob) + { return NULL; + } /* get first token: read the name of a possible option */ cp2 = name; @@ -763,7 +770,9 @@ const char *PINT_dotconf_handle_command( } if (!option) + { option = get_argname_fallback(configfile->config_options[1]); + } if (!option || !option->callback) { @@ -784,17 +793,21 @@ const char *PINT_dotconf_handle_command( } if (configfile->contextchecker) + { context_error = configfile->contextchecker(&command, command.option->context); + } if (!context_error) + { error = PINT_dotconf_invoke_command(configfile, &command); + } else { if (!error) { - /* avoid returning another error then the first. This makes it easier to - reproduce problems. */ + /* avoid returning another error then the first. + * This makes it easier to reproduce problems. */ error = context_error; } } @@ -828,7 +841,7 @@ const char *PINT_dotconf_command_loop_until_error( int PINT_dotconf_command_loop( configfile_t * configfile) { - /* ------ returns: 0 for failure -- !0 for success ------------------------------------------ */ + /* ------ returns: 0 for failure -- !0 for success ---------------- */ char buffer[CFG_BUFSIZE]; while (!(PINT_dotconf_get_next_line(buffer, CFG_BUFSIZE, configfile))) diff --git a/src/common/gen-locks/gen-locks.c b/src/common/gen-locks/gen-locks.c index 6a49211..ff4daf7 100644 --- a/src/common/gen-locks/gen-locks.c +++ b/src/common/gen-locks/gen-locks.c @@ -26,10 +26,49 @@ * * returns 0 on success, -1 and sets errno on failure. */ -int gen_posix_mutex_init( - pthread_mutex_t * mut) +int gen_posix_mutex_init(pthread_mutex_t *mutex) { - return (pthread_mutex_init(mut, NULL)); + return (pthread_mutex_init(mutex, NULL)); +} + +int gen_posix_recursive_mutex_init(pthread_mutex_t *mutex) +{ + int rc; + pthread_mutexattr_t mattr; + rc = pthread_mutexattr_init(&mattr); + if (rc < 0) + { + return rc; + } + rc = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE); + if (rc < 0) + { + return rc; + } + rc = (pthread_mutex_init(mutex, &mattr)); + pthread_mutexattr_destroy(&mattr); + /* if this fails it fails silently */ + return rc; +} + +int gen_posix_shared_mutex_init(pthread_mutex_t *mutex) +{ + int rc; + pthread_mutexattr_t mattr; + rc = pthread_mutexattr_init(&mattr); + if (rc < 0) + { + return rc; + } + rc = pthread_mutexattr_setpshared(&mattr, PTHREAD_PROCESS_SHARED); + if (rc < 0) + { + return rc; + } + rc = (pthread_mutex_init(mutex, &mattr)); + pthread_mutexattr_destroy(&mattr); + /* if this fails it fails silently */ + return rc; } /* @@ -39,10 +78,9 @@ int gen_posix_mutex_init( * * returns 0 on success, -1 and sets errno on failure. */ -int gen_posix_mutex_lock( - pthread_mutex_t * mut) +int gen_posix_mutex_lock(pthread_mutex_t *mutex) { - return (pthread_mutex_lock(mut)); + return (pthread_mutex_lock(mutex)); } @@ -53,10 +91,9 @@ int gen_posix_mutex_lock( * * returns 0 on success, -1 and sets errno on failure */ -int gen_posix_mutex_unlock( - pthread_mutex_t * mut) +int gen_posix_mutex_unlock(pthread_mutex_t *mutex) { - return (pthread_mutex_unlock(mut)); + return (pthread_mutex_unlock(mutex)); } @@ -68,10 +105,9 @@ int gen_posix_mutex_unlock( * returns 0 on success, -1 and sets errno on failure, sets errno to EBUSY * if it cannot obtain the lock */ -int gen_posix_mutex_trylock( - pthread_mutex_t * mut) +int gen_posix_mutex_trylock(pthread_mutex_t *mutex) { - return (pthread_mutex_trylock(mut)); + return (pthread_mutex_trylock(mutex)); } /* @@ -81,15 +117,14 @@ int gen_posix_mutex_trylock( * * returns 0 on success, -errno on failure. */ -int gen_posix_mutex_destroy( - pthread_mutex_t * mut) +int gen_posix_mutex_destroy(pthread_mutex_t *mutex) { - if (!mut) + if (!mutex) { return (-EINVAL); } - pthread_mutex_destroy(mut); + pthread_mutex_destroy(mutex); return (0); } @@ -135,6 +170,34 @@ int gen_posix_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) return pthread_cond_init(cond, attr); } +int gen_posix_shared_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr) +{ + int rc, destroy_attr = 0; + pthread_condattr_t cattr; + if (!attr) + { + rc = pthread_condattr_init(&cattr); + if (rc < 0) + { + return rc; + } + attr = &cattr; + destroy_attr = 1; + } + rc = pthread_condattr_setpshared(attr, PTHREAD_PROCESS_SHARED); + if (rc < 0) + { + return rc; + } + rc = pthread_cond_init(cond, attr); + if (destroy_attr) + { + pthread_condattr_destroy(&cattr); + /* if this fails it fails silently */ + } + return rc; +} + #endif /* diff --git a/src/common/gen-locks/gen-locks.h b/src/common/gen-locks/gen-locks.h index ac8f98f..d32e858 100644 --- a/src/common/gen-locks/gen-locks.h +++ b/src/common/gen-locks/gen-locks.h @@ -9,6 +9,7 @@ * programmers should use the following interface for portability rather * than directly calling specific lock implementations: * + * int gen_mutex_init(gen_mutex_t* mut); * int gen_mutex_lock(gen_mutex_t* mut); * int gen_mutex_unlock(gen_mutex_t* mut); * int gen_mutex_trylock(gen_mutex_t* mut); @@ -20,6 +21,8 @@ #ifndef __GEN_LOCKS_H #define __GEN_LOCKS_H +#include "pvfs2-internal.h" + #include #ifndef WIN32 #include @@ -45,18 +48,22 @@ #include /* function prototypes for specific locking implementations */ -int gen_posix_mutex_lock(pthread_mutex_t * mut); -int gen_posix_mutex_unlock(pthread_mutex_t * mut); -int gen_posix_mutex_trylock(pthread_mutex_t * mut); +int gen_posix_mutex_lock(pthread_mutex_t *mutex); +int gen_posix_mutex_unlock(pthread_mutex_t *mutex); +int gen_posix_mutex_trylock(pthread_mutex_t *mutex); pthread_mutex_t *gen_posix_mutex_build(void); -int gen_posix_mutex_destroy(pthread_mutex_t * mut); -int gen_posix_mutex_init(pthread_mutex_t * mut); +int gen_posix_mutex_destroy(pthread_mutex_t *mutex); +int gen_posix_mutex_init(pthread_mutex_t *mutex); +int gen_posix_recursive_mutex_init(pthread_mutex_t *mutex); +int gen_posix_shared_mutex_init(pthread_mutex_t *mutex); pthread_t gen_posix_thread_self(void); int gen_posix_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr); +int gen_posix_shared_cond_init(pthread_cond_t *cond, pthread_condattr_t *attr); int gen_posix_cond_destroy(pthread_cond_t *cond); -int gen_posix_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mut); -int gen_posix_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mut, +int gen_posix_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex); +int gen_posix_cond_timedwait(pthread_cond_t *cond, + pthread_mutex_t *mutex, const struct timespec *abstime); int gen_posix_cond_signal(pthread_cond_t *cond); int gen_posix_cond_broadcast(pthread_cond_t *cond); @@ -72,31 +79,44 @@ typedef pthread_cond_t gen_cond_t; # if _POSIX_THREAD_PROCESS_SHARED != -1 # if __WORDSIZE == 64 # define GEN_SHARED_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, 128, 0, { 0, 0 } } } + { { 0, 0, 0, 0, 128, 0, { 0, 0 } } } # else # define GEN_SHARED_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, 128, { 0 } } } + { { 0, 0, 0, 0, 128, { 0 } } } # endif /* __WORDSIZE */ # endif /* _POSIX_THREAD_PROCESS_SHARED */ /* Support for custom static initializer for a recursive pthread mutex */ -# if __WORDSIZE == 64 +/* Newer pthread.h provide this, use what is there if we can */ +# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } + PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP # else -# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ - { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } -# endif /* __WORDSIZE */ +# if __WORDSIZE == 64 +# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0, 0 } } } +# else +# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP \ + { { 0, 0, 0, PTHREAD_MUTEX_RECURSIVE_NP, 0, { 0 } } } +# endif /* __WORDSIZE */ +# endif /* PTHREAD_RECURSIVE */ #endif /* __USE_GNU */ +#ifdef __DARWIN__ +# define GEN_RECURSIVE_MUTEX_INITIALIZER_NP PTHREAD_RECURSIVE_MUTEX_INITIALIZER +#endif + #define gen_mutex_lock(m) gen_posix_mutex_lock(m) #define gen_mutex_unlock(m) gen_posix_mutex_unlock(m) #define gen_mutex_trylock(m) gen_posix_mutex_trylock(m) #define gen_mutex_destroy(m) gen_posix_mutex_destroy(m) #define gen_mutex_init(m) gen_posix_mutex_init(m) +#define gen_recursive_mutex_init(m) gen_posix_recursive_mutex_init(m) +#define gen_shared_mutex_init(m) gen_posix_shared_mutex_init(m) #define gen_thread_self() gen_posix_thread_self() #define gen_cond_init(c) gen_posix_cond_init(c, NULL) +#define gen_shared_cond_init(c) gen_posix_shared_cond_init(c, NULL) #define gen_cond_destroy(c) gen_posix_cond_destroy(c) #define gen_cond_wait(c, m) gen_posix_cond_wait(c, m) #define gen_cond_timedwait(c, m, s) gen_posix_cond_timedwait(c, m, s) @@ -133,12 +153,12 @@ struct gen_cond_t_ gen_cond_t prev; }; -int gen_win_mutex_lock(HANDLE *mut); -int gen_win_mutex_unlock(HANDLE *mut); -int gen_win_mutex_trylock(HANDLE *mut); +int gen_win_mutex_lock(HANDLE *mutex); +int gen_win_mutex_unlock(HANDLE *mutex); +int gen_win_mutex_trylock(HANDLE *mutex); HANDLE *gen_win_mutex_build(void); -int gen_win_mutex_destroy(HANDLE *mut); -int gen_win_mutex_init(HANDLE *mut); +int gen_win_mutex_destroy(HANDLE *mutex); +int gen_win_mutex_init(HANDLE *mutex); HANDLE gen_win_thread_self(void); #define GEN_MUTEX_INITIALIZER ((gen_mutex_t) -1) @@ -152,8 +172,8 @@ HANDLE gen_win_thread_self(void); int gen_win_cond_init(gen_cond_t *cond); int gen_win_cond_destroy(gen_cond_t *cond); -int gen_win_cond_wait(gen_cond_t *cond, HANDLE *mut); -int gen_win_cond_timedwait(gen_cond_t *cond, HANDLE *mut, +int gen_win_cond_wait(gen_cond_t *cond, HANDLE *mutex); +int gen_win_cond_timedwait(gen_cond_t *cond, HANDLE *mutex, const struct timespec *abstime); int gen_win_cond_signal(gen_cond_t *cond); int gen_win_cond_broadcast(gen_cond_t *cond); @@ -177,20 +197,17 @@ typedef int gen_cond_t; #define GEN_RECURSIVE_MUTEX_INITIALIZER_NP 0 #define GEN_COND_INITIALIZER 0 -static inline int gen_mutex_lock( - gen_mutex_t * mutex_p) +static inline int gen_mutex_lock(gen_mutex_t *mutex_p) { (void) mutex_p; return 0; } -static inline int gen_mutex_unlock( - gen_mutex_t * mutex_p) +static inline int gen_mutex_unlock(gen_mutex_t *mutex_p) { (void) mutex_p; return 0; } -static inline int gen_mutex_trylock( - gen_mutex_t * mutex_p) +static inline int gen_mutex_trylock(gen_mutex_t *mutex_p) { (void) mutex_p; return 0; @@ -200,9 +217,12 @@ static inline gen_thread_t gen_thread_self(void) return 0; } #define gen_mutex_init(m) do{}while(0) +#define gen_recursive_mutex_init(m) do{}while(0) +#define gen_shared_mutex_init(m) do{}while(0) #define gen_mutex_destroy(m) do{}while(0) #define gen_cond_init(c) do{}while(0) +#define gen_shared_cond_init(c) do{}while(0) #define gen_cond_destroy(c) do{}while(0) static inline int gen_cond_wait(gen_cond_t *cond, gen_mutex_t *mut) @@ -211,7 +231,8 @@ static inline int gen_cond_wait(gen_cond_t *cond, gen_mutex_t *mut) return 0; } -static inline int gen_cond_timedwait(gen_cond_t *cond, gen_mutex_t *mut, +static inline int gen_cond_timedwait(gen_cond_t *cond, + gen_mutex_t *mutex`, const struct timespec *abstime) { (void) cond; diff --git a/src/common/gen-locks/gen-win-locks.c b/src/common/gen-locks/gen-win-locks.c old mode 100644 new mode 100755 diff --git a/src/common/gossip/gossip.c b/src/common/gossip/gossip.c index 5a54a5f..21745a4 100644 --- a/src/common/gossip/gossip.c +++ b/src/common/gossip/gossip.c @@ -25,7 +25,7 @@ #include #endif -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #ifdef HAVE_EXECINFO_H #include #endif @@ -407,9 +407,13 @@ int gossip_err( } #ifdef GOSSIP_ENABLE_BACKTRACE - #ifndef GOSSIP_BACKTRACE_DEPTH - #define GOSSIP_BACKTRACE_DEPTH 12 - #endif +# ifndef GOSSIP_BACKTRACE_DEPTH +# define GOSSIP_BACKTRACE_DEPTH 24 +# endif +# ifndef GOSSIP_MAX_BT +# define GOSSIP_MAX_BT 8 +# endif + /** Prints out a dump of the current stack (excluding this function) * using gossip_err. */ @@ -418,6 +422,7 @@ void gossip_backtrace(void) void *trace[GOSSIP_BACKTRACE_DEPTH]; char **messages = NULL; int i, trace_size; + static int btcnt = 0; trace_size = backtrace(trace, GOSSIP_BACKTRACE_DEPTH); messages = backtrace_symbols(trace, trace_size); @@ -425,13 +430,20 @@ void gossip_backtrace(void) { gossip_err("\t[bt] %s\n", messages[i]); } - free(messages); + /* backtrace_symbols is a libc call that mallocs */ + /* we need to free it with clean_free, not our free */ + clean_free(messages); + if (++btcnt >= GOSSIP_MAX_BT) + { + /* something is really wrong, time to bail out */ + exit(-1); + } } #else void gossip_backtrace(void) { } -#endif +#endif /* GOSSIP_ENABLE_BACKTRACE */ /**************************************************************** * Internal functions @@ -537,12 +549,13 @@ static int gossip_debug_fp_va(FILE *fp, char prefix, tp = tv.tv_sec; strftime(bptr, 9, "%H:%M:%S", localtime(&tp)); bptr += 8; + bsize -= 8; #ifdef WIN32 temp_size = sprintf(bptr, ".%03ld (%4ld)] ", (long)tv.tv_usec / 1000, GetThreadId(GetCurrentThread())); #else temp_size = sprintf(bptr, ".%06ld (%ld)] ", (long)tv.tv_usec, - gen_thread_self()); + (long int)gen_thread_self()); #endif bptr += temp_size; bsize -= temp_size; @@ -557,12 +570,20 @@ static int gossip_debug_fp_va(FILE *fp, char prefix, default: break; } - + +#ifndef WIN32 ret = vsnprintf(bptr, bsize, format, ap); if (ret < 0) { return -errno; } +#else + ret = vsnprintf_s(bptr, bsize, _TRUNCATE, format, ap); + if (ret == -1 && errno != 0) + { + return -errno; + } +#endif ret = fprintf(fp, "%s", buffer); if (ret < 0) diff --git a/src/common/gossip/gossip.h b/src/common/gossip/gossip.h index 5f24214..9ad4e55 100644 --- a/src/common/gossip/gossip.h +++ b/src/common/gossip/gossip.h @@ -197,6 +197,11 @@ int __gossip_debug( char prefix, const char *format, ...); +int __gossip_debug_va( + uint64_t mask, + char prefix, + const char *format, + va_list ap); int __gossip_debug_stub( uint64_t mask, char prefix, diff --git a/src/common/id-generator/id-generator.c b/src/common/id-generator/id-generator.c index 36ddef9..7fec174 100644 --- a/src/common/id-generator/id-generator.c +++ b/src/common/id-generator/id-generator.c @@ -14,6 +14,7 @@ #include "id-generator.h" #include "quickhash.h" #include "gen-locks.h" +#include "pvfs2-internal.h" #define DEFAULT_ID_GEN_SAFE_TABLE_SIZE 997 diff --git a/src/common/llist/llist.c b/src/common/llist/llist.c old mode 100644 new mode 100755 index 28fb218..64b6073 --- a/src/common/llist/llist.c +++ b/src/common/llist/llist.c @@ -6,6 +6,7 @@ #include "llist.h" +#include "pvfs2-internal.h" /* PINT_llist_new() - returns a pointer to an empty list */ @@ -15,7 +16,7 @@ PINT_llist_p PINT_llist_new( PINT_llist_p l_p; if (!(l_p = (PINT_llist_p) malloc(sizeof(PINT_llist)))) - return (NULL); + return (NULL); l_p->next = l_p->item = NULL; return (l_p); } @@ -28,7 +29,7 @@ int PINT_llist_empty( PINT_llist_p l_p) { if (l_p->next == NULL) - return (1); + return (1); return (0); } @@ -44,17 +45,17 @@ int PINT_llist_add_to_tail( { PINT_llist_p new_p; - if (!l_p) /* not a list */ - return (-1); + if (!l_p) /* not a list */ + return (-1); /* NOTE: first "item" pointer in list is _always_ NULL */ if ((new_p = (PINT_llist_p) malloc(sizeof(PINT_llist))) == NULL) - return -1; + return -1; new_p->next = NULL; new_p->item = item; while (l_p->next) - l_p = l_p->next; + l_p = l_p->next; l_p->next = new_p; return (0); } @@ -71,13 +72,13 @@ int PINT_llist_add_to_head( { PINT_llist_p new_p; - if (!l_p) /* not a list */ - return (-1); + if (!l_p) /* not a list */ + return (-1); /* NOTE: first "item" pointer in list is _always_ NULL */ if ((new_p = (PINT_llist_p) malloc(sizeof(PINT_llist))) == NULL) - return -1; + return -1; new_p->next = l_p->next; new_p->item = item; l_p->next = new_p; @@ -93,7 +94,7 @@ void *PINT_llist_head( PINT_llist_p l_p) { if (!l_p || !l_p->next) - return (NULL); + return (NULL); return (l_p->next->item); } @@ -105,9 +106,9 @@ void *PINT_llist_tail( PINT_llist_p l_p) { if (!l_p || !l_p->next) - return (NULL); + return (NULL); while (l_p->next) - l_p = l_p->next; + l_p = l_p->next; return (l_p->item); } @@ -120,16 +121,16 @@ void *PINT_llist_search( PINT_llist_p l_p, void *key, int (*comp) (void *, - void *)) + void *)) { - if (!l_p || !l_p->next || !comp) /* no or empty list */ - return (NULL); + if (!l_p || !l_p->next || !comp) /* no or empty list */ + return (NULL); for (l_p = l_p->next; l_p; l_p = l_p->next) { - /* NOTE: "comp" function must return _0_ if a match is made */ - if (!(*comp) (key, l_p->item)) - return (l_p->item); + /* NOTE: "comp" function must return _0_ if a match is made */ + if (!(*comp) (key, l_p->item)) + return (l_p->item); } return (NULL); } @@ -144,23 +145,23 @@ void *PINT_llist_rem( PINT_llist_p l_p, void *key, int (*comp) (void *, - void *)) + void *)) { - if (!l_p || !l_p->next || !comp) /* no or empty list */ - return (NULL); + if (!l_p || !l_p->next || !comp) /* no or empty list */ + return (NULL); for (; l_p->next; l_p = l_p->next) { - /* NOTE: "comp" function must return _0_ if a match is made */ - if (!(*comp) (key, l_p->next->item)) - { - void *i_p = l_p->next->item; - PINT_llist_p rem_p = l_p->next; - - l_p->next = l_p->next->next; - free(rem_p); - return (i_p); - } + /* NOTE: "comp" function must return _0_ if a match is made */ + if (!(*comp) (key, l_p->next->item)) + { + void *i_p = l_p->next->item; + PINT_llist_p rem_p = l_p->next; + + l_p->next = l_p->next->next; + free(rem_p); + return (i_p); + } } return (NULL); } @@ -179,11 +180,11 @@ int PINT_llist_count( int count = 0; if (!l_p) - return (-1); + return (-1); for (l_p = l_p->next; l_p; l_p = l_p->next) { - count++; + count++; } return (count); @@ -201,15 +202,15 @@ int PINT_llist_doall( PINT_llist_p tmp_p; if (!l_p || !l_p->next || !fn) - return (-1); + return (-1); for (l_p = l_p->next; l_p;) { - tmp_p = l_p->next; /* save pointer to next element in case the - * function destroys the element pointed to - * by l_p... - */ - (*fn) (l_p->item); - l_p = tmp_p; + tmp_p = l_p->next; /* save pointer to next element in case the + * function destroys the element pointed to + * by l_p... + */ + (*fn) (l_p->item); + l_p = tmp_p; } return (0); } @@ -222,21 +223,21 @@ int PINT_llist_doall( int PINT_llist_doall_arg( PINT_llist_p l_p, int (*fn) (void *item, - void *arg), + void *arg), void *arg) { PINT_llist_p tmp_p; if (!l_p || !l_p->next || !fn) - return (-1); + return (-1); for (l_p = l_p->next; l_p;) { - tmp_p = l_p->next; /* save pointer to next element in case the - * function destroys the element pointed to - * by l_p... - */ - (*fn) (l_p->item, arg); - l_p = tmp_p; + tmp_p = l_p->next; /* save pointer to next element in case the + * function destroys the element pointed to + * by l_p... + */ + (*fn) (l_p->item, arg); + l_p = tmp_p; } return (0); } @@ -252,7 +253,7 @@ void PINT_llist_free( PINT_llist_p tmp_p; if (!l_p || !fn) - return; + return; /* There is never an item in first entry */ tmp_p = l_p; @@ -260,10 +261,10 @@ void PINT_llist_free( free(tmp_p); while (l_p) { - (*fn) (l_p->item); - tmp_p = l_p; - l_p = l_p->next; - free(tmp_p); + (*fn) (l_p->item); + tmp_p = l_p; + l_p = l_p->next; + free(tmp_p); } } @@ -282,7 +283,7 @@ PINT_llist_p PINT_llist_next( if (!entry) { - return (NULL); + return (NULL); } return (entry->next); diff --git a/src/common/llist/llist.h b/src/common/llist/llist.h old mode 100644 new mode 100755 diff --git a/src/common/mgmt/pint-mgmt.c b/src/common/mgmt/pint-mgmt.c index 120a5a1..f725209 100644 --- a/src/common/mgmt/pint-mgmt.c +++ b/src/common/mgmt/pint-mgmt.c @@ -1416,7 +1416,7 @@ int PINT_manager_complete_op(PINT_manager_t manager, struct qhash_head *hash_entry; struct PINT_op_entry *entry; int ret; - struct qhash_head *link; + struct qhash_head *link __attribute__((unused)); gen_mutex_lock(&manager->mutex); hash_entry = qhash_search(manager->ops, &op->id); diff --git a/src/common/mgmt/pint-op.c b/src/common/mgmt/pint-op.c index 14cb68d..f4c4a17 100644 --- a/src/common/mgmt/pint-op.c +++ b/src/common/mgmt/pint-op.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ +#include "pvfs2-internal.h" #include "pint-op.h" #include diff --git a/src/common/mgmt/pint-queue.c b/src/common/mgmt/pint-queue.c index ddaa21e..8b80bbd 100644 --- a/src/common/mgmt/pint-queue.c +++ b/src/common/mgmt/pint-queue.c @@ -11,6 +11,7 @@ #include #include "pint-util.h" #include "pvfs2-debug.h" +#include "pvfs2-internal.h" struct PINT_queue_trigger { diff --git a/src/common/mgmt/pint-worker-blocking.c b/src/common/mgmt/pint-worker-blocking.c index 06d058f..efb8e32 100644 --- a/src/common/mgmt/pint-worker-blocking.c +++ b/src/common/mgmt/pint-worker-blocking.c @@ -8,6 +8,7 @@ #include "pint-worker-blocking.h" #include "pint-worker.h" #include "pint-mgmt.h" +#include "pvfs2-internal.h" static int blocking_post(struct PINT_manager_s *manager, PINT_worker_inst *inst, diff --git a/src/common/mgmt/pint-worker-none.c b/src/common/mgmt/pint-worker-none.c index d1488b0..f5bf059 100644 --- a/src/common/mgmt/pint-worker-none.c +++ b/src/common/mgmt/pint-worker-none.c @@ -1,6 +1,7 @@ #include "pint-worker-none.h" #include "pint-queue.h" +#include "pvfs2-internal.h" static int PINT_worker_queues_init(PINT_worker_inst *inst, PINT_worker_attr_t *attr) diff --git a/src/common/mgmt/pint-worker-pool.c b/src/common/mgmt/pint-worker-pool.c index 2a02ed7..3fe9769 100644 --- a/src/common/mgmt/pint-worker-pool.c +++ b/src/common/mgmt/pint-worker-pool.c @@ -9,6 +9,7 @@ #include "pint-mgmt.h" #include "pvfs2-types.h" +#include "pvfs2-internal.h" struct PINT_worker_impl PINT_worker_pool_impl = { diff --git a/src/common/mgmt/pint-worker-threaded-queues.c b/src/common/mgmt/pint-worker-threaded-queues.c index 2ff3a96..f30bfb7 100644 --- a/src/common/mgmt/pint-worker-threaded-queues.c +++ b/src/common/mgmt/pint-worker-threaded-queues.c @@ -74,9 +74,17 @@ static int threaded_queues_init(struct PINT_manager_s *manager, free(w->threads); gen_cond_destroy(&w->cond); } +/* On Darwin, thread_id is a structure, not a value. */ +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %p:thread #%d.\n" + ,__func__ + ,w->threads[i].thread_id,i); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %d:thread #%d.\n" ,__func__ ,(int)w->threads[i].thread_id,i); +#endif + } exit: @@ -340,11 +348,19 @@ static void *PINT_worker_queues_thread_function(void * ptr) manager = worker->manager; gen_mutex_unlock(&thread->mutex); +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread-id %p:worker location is %p: manager location is %p.\n" + ,__func__ + ,thread->thread_id + ,worker + ,manager); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread-id %d:worker location is %p: manager location is %p.\n" ,__func__ ,(int)thread->thread_id ,worker ,manager); +#endif gen_mutex_lock(&worker->mutex); op_count = worker->attr.ops_per_queue; @@ -355,11 +371,19 @@ static void *PINT_worker_queues_thread_function(void * ptr) } gen_mutex_unlock(&worker->mutex); +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread-id %p:op-count is %d:timeout is %d.\n" + ,__func__ + ,thread->thread_id + ,op_count + ,timeout); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread-id %d:op-count is %d:timeout is %d.\n" ,__func__ ,(int)thread->thread_id ,op_count ,timeout); +#endif qentries = malloc(sizeof(PINT_queue_entry_t *) * op_count); if(!qentries) { @@ -370,9 +394,16 @@ static void *PINT_worker_queues_thread_function(void * ptr) gen_mutex_lock(&thread->mutex); thread->running = 1; + +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s: starting thread function for thread_id %p\n" + ,__func__ + ,thread->thread_id); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s: starting thread function for thread_id %d\n" ,__func__ ,(int)thread->thread_id); +#endif while(thread->running) { /* unlock the thread mutex to allow someone else @@ -437,20 +468,41 @@ static void *PINT_worker_queues_thread_function(void * ptr) if(op_count > 0) { + +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %p: op_count is %d.\n" + ,__func__ + ,thread->thread_id,op_count); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %d: op_count is %d.\n" ,__func__ ,(int)thread->thread_id,op_count); +#endif for(i = 0; i < op_count; ++i) { struct PINT_op_entry *op_entry; + +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %p: i is %d.\n" + ,__func__ + ,thread->thread_id,i); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %d: i is %d.\n" ,__func__ ,(int)thread->thread_id,i); +#endif op = PINT_op_from_qentry(qentries[i]); /* service the operation */ + +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %p: calling PINT_manager_service_op.\n" + ,__func__ + ,thread->thread_id); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %d: calling PINT_manager_service_op.\n" ,__func__ ,(int)thread->thread_id); +#endif ret = PINT_manager_service_op( manager, op, &service_time, &error); if(ret < 0) @@ -459,9 +511,15 @@ static void *PINT_worker_queues_thread_function(void * ptr) goto free_ops; } +#if defined(__DARWIN__) + gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %p: calling PINT_manager_complete_op.\n" + ,__func__ + ,thread->thread_id); +#else gossip_debug(GOSSIP_MGMT_DEBUG,"%s:thread_id %d: calling PINT_manager_complete_op.\n" ,__func__ ,(int)thread->thread_id); +#endif ret = PINT_manager_complete_op( manager, op, error); if(ret < 0) diff --git a/src/common/misc/digest.c b/src/common/misc/digest.c index f0b8e63..99604d5 100644 --- a/src/common/misc/digest.c +++ b/src/common/misc/digest.c @@ -4,10 +4,11 @@ * See COPYING in top-level directory. */ -#include "pvfs2-config.h" #include #include #include + +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-util.h" #include "pint-util.h" diff --git a/src/common/misc/errno-mapping.c b/src/common/misc/errno-mapping.c index 7618634..7ae9e97 100644 --- a/src/common/misc/errno-mapping.c +++ b/src/common/misc/errno-mapping.c @@ -4,11 +4,13 @@ * See COPYING in top-level directory. */ + #include #include #include #include +#include "pvfs2-internal.h" #include "pvfs2-util.h" #include "gossip.h" @@ -46,13 +48,16 @@ int PVFS_strerror_r(int errnum, char *buf, int n) } else { -#if defined(HAVE_GNU_STRERROR_R) || defined(_GNU_SOURCE) +#if defined(__DARWIN__) + ret = strerror_r(tmp, buf, (size_t)limit); +#elif defined(HAVE_GNU_STRERROR_R) || defined(_GNU_SOURCE) char *tmpbuf = strerror_r(tmp, buf, limit); if (tmpbuf && (strcmp(tmpbuf, buf))) { limit = PVFS_util_min(limit, strlen(tmpbuf)+1); strncpy(buf, tmpbuf, (size_t)limit); } + /* A misnomer - tempbuf is guaranteed to be non-null */ ret = (tmpbuf ? 0 : -1); #elif defined(WIN32) ret = (int) strerror_s(buf, (size_t) limit, tmp); diff --git a/src/common/misc/extent-utils.c b/src/common/misc/extent-utils.c index 87e70f9..a39aff0 100644 --- a/src/common/misc/extent-utils.c +++ b/src/common/misc/extent-utils.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ + #include #include #include @@ -11,6 +12,7 @@ #include #include +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "str-utils.h" #include "extent-utils.h" diff --git a/src/common/misc/extent-utils.h b/src/common/misc/extent-utils.h index 279e224..aefe661 100644 --- a/src/common/misc/extent-utils.h +++ b/src/common/misc/extent-utils.h @@ -7,6 +7,7 @@ #ifndef __EXTENT_UTILS_H #define __EXTENT_UTILS_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-storage.h" #include "str-utils.h" diff --git a/src/common/misc/fsck-utils.c b/src/common/misc/fsck-utils.c index 27a817c..bcad366 100644 --- a/src/common/misc/fsck-utils.c +++ b/src/common/misc/fsck-utils.c @@ -3,6 +3,7 @@ * * See COPYING in top-level directory. */ + #include #include #include @@ -12,6 +13,7 @@ #include #include +#include "pvfs2-internal.h" #include "fsck-utils.h" #define HANDLE_BATCH 1000 diff --git a/src/common/misc/fsck-utils.h b/src/common/misc/fsck-utils.h index 49aee33..04f51d2 100644 --- a/src/common/misc/fsck-utils.h +++ b/src/common/misc/fsck-utils.h @@ -7,9 +7,9 @@ #ifndef __FSCK_UTILS_H #define __FSCK_UTILS_H +#include "pvfs2-internal.h" #include "pvfs2.h" #include "pvfs2-mgmt.h" -#include "pvfs2-internal.h" #include "pint-cached-config.h" #include "pint-sysint-utils.h" diff --git a/src/common/misc/mkspace.c b/src/common/misc/mkspace.c index a1532be..7e71ad5 100644 --- a/src/common/misc/mkspace.c +++ b/src/common/misc/mkspace.c @@ -12,7 +12,9 @@ #include #include #include +#include +#include "pvfs2-internal.h" #include "pvfs2-attr.h" #include "trove.h" #include "mkspace.h" @@ -22,7 +24,6 @@ #include "str-utils.h" #include "extent-utils.h" #include "pvfs2-util.h" -#include "pvfs2-internal.h" #include "pint-util.h" #include "pint-event.h" @@ -42,6 +43,7 @@ do { \ fprintf(stderr,format, ##f); \ } while(0) + static int handle_is_excluded( TROVE_handle handle, TROVE_handle *handles_to_exclude, int num_handles_to_exclude) @@ -110,16 +112,15 @@ static void get_handle_extent_from_ranges( } } -int pvfs2_mkspace( - char *data_path, - char *meta_path, - char *collection, - TROVE_coll_id coll_id, - TROVE_handle root_handle, - char *meta_handle_ranges, - char *data_handle_ranges, - int create_collection_only, - int verbose) +int pvfs2_mkspace(char *data_path, + char *meta_path, + char *collection, + TROVE_coll_id coll_id, + TROVE_handle root_handle, + char *meta_handle_ranges, + char *data_handle_ranges, + int create_collection_only, + int verbose) { int ret = - 1, count = 0; TROVE_op_id op_id; @@ -134,6 +135,9 @@ int pvfs2_mkspace( TROVE_handle root_dirdata_handle = TROVE_HANDLE_NULL; TROVE_handle lost_and_found_handle = TROVE_HANDLE_NULL; TROVE_handle lost_and_found_dirdata_handle = TROVE_HANDLE_NULL; + struct stat root_stat; + struct stat meta_stat; + struct stat data_stat; mkspace_print(verbose,"Data storage space : %s\n",data_path); mkspace_print(verbose,"Metadata storage space : %s\n", meta_path); @@ -149,10 +153,56 @@ int pvfs2_mkspace( new_root_handle = root_handle; + + /* init stat buffers */ + memset(&root_stat, 0, sizeof(root_stat)); + memset(&meta_stat, 0, sizeof(meta_stat)); + + /* call stat on root, meta, and data paths */ + stat("/", &root_stat); + stat(meta_path, &meta_stat); + + /* see if the metadata path is located on the root device */ + if (meta_stat.st_dev == root_stat.st_dev) + { + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*** WARNING *** *** WARNING *** *** WARNING ***\n"); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*The MetadataStorageSpace path %s appears\n" + " to be on the root device.\n", meta_path); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*It is recommended that the meta data be\n" + " stored on a dedicated partition.\n"); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*If you have a dedicated partition setup,\n" + " please be sure it is mounted.\n\n"); + } + + if (!create_collection_only) + { + memset(&data_stat, 0, sizeof(data_stat)); + stat(data_path, &data_stat); + /* see if the data path is located on the root device */ + if (data_stat.st_dev == root_stat.st_dev) + { + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*** WARNING *** *** WARNING *** *** WARNING ***\n"); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*The DataStorageSpace path %s appears\n" + " to be on the root device.\n", data_path); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*It is recommended that the data be\n" + " stored on a dedicated partition.\n"); + mkspace_print(PVFS2_MKSPACE_STDERR_VERBOSE, + "*If you have a dedicated partition setup,\n" + " please be sure it is mounted.\n\n"); + } + } + /* - if we're only creating a collection inside an existing - storage space, we need to assume that it exists already - */ + * if we're only creating a collection inside an existing + * storage space, we need to assume that it exists already + */ if (!create_collection_only) { /* @@ -180,9 +230,11 @@ int pvfs2_mkspace( } /* now that the storage space exists, initialize trove properly */ - ret = trove_initialize( - TROVE_METHOD_DBPF, NULL, - data_path, meta_path, 0); + ret = trove_initialize(TROVE_METHOD_DBPF, + NULL, + data_path, + meta_path, + 0); if (ret < 0) { gossip_err("error: trove initialize failed; aborting!\n"); @@ -195,8 +247,11 @@ int pvfs2_mkspace( meta_path); /* try to look up collection used to store file system */ - ret = trove_collection_lookup( - TROVE_METHOD_DBPF, collection, &coll_id, NULL, &op_id); + ret = trove_collection_lookup(TROVE_METHOD_DBPF, + collection, + &coll_id, + NULL, + &op_id); if (ret == 1) { mkspace_print(verbose, "warning: collection lookup succeeded " @@ -259,9 +314,10 @@ int pvfs2_mkspace( set the trove handle ranges; this initializes the handle allocator with the ranges we were told to use */ - ret = trove_collection_setinfo( - coll_id, trove_context, TROVE_COLLECTION_HANDLE_RANGES, - merged_handle_ranges); + ret = trove_collection_setinfo(coll_id, + trove_context, + TROVE_COLLECTION_HANDLE_RANGES, + merged_handle_ranges); if (ret < 0) { @@ -271,7 +327,7 @@ int pvfs2_mkspace( return -1; } - mkspace_print(verbose,"info: set handle ranges to %s\n", + mkspace_print(verbose, "info: set handle ranges to %s\n", merged_handle_ranges); free(merged_handle_ranges); @@ -288,16 +344,26 @@ int pvfs2_mkspace( extent_array.extent_count = 1; extent_array.extent_array = &cur_extent; - ret = trove_dspace_create( - coll_id, &extent_array, &new_root_handle, - PVFS_TYPE_DIRECTORY, NULL, - (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), - NULL, trove_context, &op_id, NULL); + ret = trove_dspace_create(coll_id, + &extent_array, + &new_root_handle, + PVFS_TYPE_DIRECTORY, + NULL, + (TROVE_SYNC | TROVE_FORCE_REQUESTED_HANDLE), + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test(coll_id, op_id, trove_context, - &count, NULL, NULL, &state, + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, TROVE_DEFAULT_TEST_TIMEOUT); } @@ -317,13 +383,23 @@ int pvfs2_mkspace( key.buffer_sz = ROOT_HANDLE_KEYLEN; val.buffer = &new_root_handle; val.buffer_sz = sizeof(new_root_handle); - ret = trove_collection_seteattr(coll_id, &key, &val, 0, - NULL, trove_context, &op_id); + ret = trove_collection_seteattr(coll_id, + &key, + &val, + 0, + NULL, + trove_context, + &op_id); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) @@ -342,15 +418,23 @@ int pvfs2_mkspace( attr.atime = attr.ctime = PINT_util_get_current_time(); attr.mtime = PINT_util_mktime_version(attr.ctime); - ret = trove_dspace_setattr( - coll_id, new_root_handle, &attr, TROVE_SYNC, NULL, + ret = trove_dspace_setattr(coll_id, + new_root_handle, + &attr, + TROVE_SYNC, + NULL, trove_context, &op_id, NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) @@ -372,8 +456,10 @@ int pvfs2_mkspace( cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL; if (meta_handle_ranges) { - get_handle_extent_from_ranges( - meta_handle_ranges, &cur_extent, s_used_handles, 1); + get_handle_extent_from_ranges(meta_handle_ranges, + &cur_extent, + s_used_handles, + 1); if ((cur_extent.first == TROVE_HANDLE_NULL) && (cur_extent.last == TROVE_HANDLE_NULL)) @@ -393,16 +479,27 @@ int pvfs2_mkspace( extent_array.extent_count = 1; extent_array.extent_array = &cur_extent; - ret = trove_dspace_create( - coll_id, &extent_array, &root_dirdata_handle, - PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, - trove_context, &op_id, NULL); + ret = trove_dspace_create(coll_id, + &extent_array, + &root_dirdata_handle, + PVFS_TYPE_DIRDATA, + NULL, + TROVE_SYNC, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if ((ret != 1) && (state != 0)) @@ -420,16 +517,27 @@ int pvfs2_mkspace( val.buffer = &root_dirdata_handle; val.buffer_sz = sizeof(TROVE_handle); - ret = trove_keyval_write( - coll_id, new_root_handle, &key, &val, - TROVE_SYNC, 0, NULL, - trove_context, &op_id, NULL); + ret = trove_keyval_write(coll_id, + new_root_handle, + &key, + &val, + TROVE_SYNC, + 0, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) @@ -449,8 +557,10 @@ int pvfs2_mkspace( cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL; if (meta_handle_ranges) { - get_handle_extent_from_ranges( - meta_handle_ranges, &cur_extent, s_used_handles, 2); + get_handle_extent_from_ranges(meta_handle_ranges, + &cur_extent, + s_used_handles, + 2); if ((cur_extent.first == TROVE_HANDLE_NULL) && (cur_extent.last == TROVE_HANDLE_NULL)) @@ -469,16 +579,27 @@ int pvfs2_mkspace( extent_array.extent_count = 1; extent_array.extent_array = &cur_extent; - ret = trove_dspace_create( - coll_id, &extent_array, &lost_and_found_handle, - PVFS_TYPE_DIRECTORY, NULL, TROVE_SYNC, NULL, - trove_context, &op_id, NULL); + ret = trove_dspace_create(coll_id, + &extent_array, + &lost_and_found_handle, + PVFS_TYPE_DIRECTORY, + NULL, + TROVE_SYNC, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if ((ret != 1) && (state != 0)) @@ -501,15 +622,25 @@ int pvfs2_mkspace( attr.atime = attr.ctime = PINT_util_get_current_time(); attr.mtime = PINT_util_mktime_version(attr.ctime); - ret = trove_dspace_setattr( - coll_id, lost_and_found_handle, &attr, TROVE_SYNC, NULL, - trove_context, &op_id, NULL); + ret = trove_dspace_setattr(coll_id, + lost_and_found_handle, + &attr, + TROVE_SYNC, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) @@ -523,8 +654,10 @@ int pvfs2_mkspace( cur_extent.first = cur_extent.last = TROVE_HANDLE_NULL; if (meta_handle_ranges) { - get_handle_extent_from_ranges( - meta_handle_ranges, &cur_extent, s_used_handles, 3); + get_handle_extent_from_ranges(meta_handle_ranges, + &cur_extent, + s_used_handles, + 3); if ((cur_extent.first == TROVE_HANDLE_NULL) && (cur_extent.last == TROVE_HANDLE_NULL)) @@ -543,16 +676,27 @@ int pvfs2_mkspace( extent_array.extent_count = 1; extent_array.extent_array = &cur_extent; - ret = trove_dspace_create( - coll_id, &extent_array, &lost_and_found_dirdata_handle, - PVFS_TYPE_DIRDATA, NULL, TROVE_SYNC, NULL, - trove_context, &op_id, NULL); + ret = trove_dspace_create(coll_id, + &extent_array, + &lost_and_found_dirdata_handle, + PVFS_TYPE_DIRDATA, + NULL, + TROVE_SYNC, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if ((ret != 1) && (state != 0)) @@ -571,16 +715,27 @@ int pvfs2_mkspace( val.buffer = &lost_and_found_dirdata_handle; val.buffer_sz = sizeof(TROVE_handle); - ret = trove_keyval_write( - coll_id, lost_and_found_handle, &key, &val, - TROVE_SYNC, - 0, NULL, trove_context, &op_id, NULL); + ret = trove_keyval_write(coll_id, + lost_and_found_handle, + &key, + &val, + TROVE_SYNC, + 0, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) @@ -603,17 +758,28 @@ int pvfs2_mkspace( val.buffer = &lost_and_found_handle; val.buffer_sz = sizeof(TROVE_handle); - ret = trove_keyval_write( - coll_id, root_dirdata_handle, &key, &val, - TROVE_SYNC | TROVE_NOOVERWRITE | TROVE_KEYVAL_HANDLE_COUNT, - 0, - NULL, trove_context, &op_id, NULL); + ret = trove_keyval_write(coll_id, + root_dirdata_handle, + &key, + &val, + TROVE_SYNC | TROVE_NOOVERWRITE | + TROVE_KEYVAL_HANDLE_COUNT, + 0, + NULL, + trove_context, + &op_id, + NULL); while (ret == 0) { - ret = trove_dspace_test( - coll_id, op_id, trove_context, &count, NULL, NULL, - &state, TROVE_DEFAULT_TEST_TIMEOUT); + ret = trove_dspace_test(coll_id, + op_id, + trove_context, + &count, + NULL, + NULL, + &state, + TROVE_DEFAULT_TEST_TIMEOUT); } if (ret < 0) diff --git a/src/common/misc/mkspace.h b/src/common/misc/mkspace.h index 76d36a5..6cdac7f 100644 --- a/src/common/misc/mkspace.h +++ b/src/common/misc/mkspace.h @@ -7,6 +7,7 @@ #ifndef __MKSPACE_H #define __MKSPACE_H +#include "pvfs2-internal.h" #include "trove.h" #define PVFS2_MKSPACE_GOSSIP_VERBOSE 1 diff --git a/src/common/misc/mmap-ra-cache.c b/src/common/misc/mmap-ra-cache.c index bfc447d..07c18df 100644 --- a/src/common/misc/mmap-ra-cache.c +++ b/src/common/misc/mmap-ra-cache.c @@ -3,6 +3,7 @@ * * See COPYING in top-level directory. */ + #include #include #include @@ -14,11 +15,11 @@ #include #endif +#include "pvfs2-internal.h" #include "pvfs2.h" #include "gossip.h" #include "gen-locks.h" #include "mmap-ra-cache.h" -#include "pvfs2-internal.h" static int hash_key(void *key, int table_size); static int hash_key_compare(void *key, struct qlist_head *link); diff --git a/src/common/misc/mmap-ra-cache.h b/src/common/misc/mmap-ra-cache.h index fb9c650..121bc5a 100644 --- a/src/common/misc/mmap-ra-cache.h +++ b/src/common/misc/mmap-ra-cache.h @@ -8,6 +8,7 @@ #define __MMAP_RA_CACHE_H #include "quickhash.h" +#include "pvfs2-internal.h" typedef struct { diff --git a/src/common/misc/module.mk.in b/src/common/misc/module.mk.in index 266c148..7b851e7 100644 --- a/src/common/misc/module.mk.in +++ b/src/common/misc/module.mk.in @@ -21,7 +21,7 @@ LIBSRC += $(DIR)/server-config.c \ $(DIR)/fsck-utils.c \ $(DIR)/pint-eattr.c \ $(DIR)/pint-hint.c \ - $(DIR)/pint-mem.c \ + $(DIR)/pint-malloc.c \ $(DIR)/pint-uid-mgmt.c SERVERSRC += $(DIR)/server-config.c \ $(DIR)/server-config-mgr.c \ @@ -40,14 +40,14 @@ SERVERSRC += $(DIR)/server-config.c \ $(DIR)/realpath.c \ $(DIR)/msgpairarray.c \ $(DIR)/pint-eattr.c \ - $(DIR)/pint-mem.c \ + $(DIR)/pint-malloc.c \ $(DIR)/pint-hint.c \ $(DIR)/pint-uid-mgmt.c LIBBMISRC += $(DIR)/str-utils.c \ $(DIR)/pint-event.c \ $(DIR)/errno-mapping.c \ - $(DIR)/pint-mem.c + $(DIR)/pint-malloc.c MODCFLAGS_$(DIR)/server-config.c = \ -I$(srcdir)/src/server diff --git a/src/common/misc/msgpairarray.h b/src/common/misc/msgpairarray.h index abbe0c4..29e1ba3 100644 --- a/src/common/misc/msgpairarray.h +++ b/src/common/misc/msgpairarray.h @@ -7,6 +7,7 @@ #ifndef __MSGPAIRARRAY_H #define __MSGPAIRARRAY_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-req-proto.h" #include "PINT-reqproto-encode.h" diff --git a/src/common/misc/msgpairarray.sm b/src/common/misc/msgpairarray.sm index 47f75e1..cee4613 100644 --- a/src/common/misc/msgpairarray.sm +++ b/src/common/misc/msgpairarray.sm @@ -10,6 +10,8 @@ * receive a collection of request/response pairs (msgpairs). */ +#include "pvfs2-internal.h" + #include #include @@ -22,7 +24,6 @@ #include "pvfs2-util.h" #include "pint-util.h" #include "server-config-mgr.h" -#include "pvfs2-internal.h" #include "state-machine.h" #ifdef WIN32 diff --git a/src/common/misc/pint-cached-config.c b/src/common/misc/pint-cached-config.c index eded023..8b3efb9 100644 --- a/src/common/misc/pint-cached-config.c +++ b/src/common/misc/pint-cached-config.c @@ -4,7 +4,9 @@ * See COPYING in top-level directory. */ -#include +/* need this for #ifdefs below */ +#include "pvfs2-config.h" + #include #include #include @@ -21,6 +23,7 @@ #include #endif +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-attr.h" #include "pint-sysint-utils.h" @@ -30,7 +33,6 @@ #include "quickhash.h" #include "extent-utils.h" #include "pint-cached-config.h" -#include "pvfs2-internal.h" #include "src/client/sysint/osd.h" /* really old linux distributions (jazz's RHEL 3) don't have this(!?) */ @@ -79,17 +81,16 @@ struct config_fs_cache_s struct qhash_table *PINT_fsid_config_cache_table = NULL; /* these are based on code from src/server/request-scheduler.c */ -static int hash_fsid( - void *fsid, int table_size); -static int hash_fsid_compare( - void *key, struct qlist_head *link); +static int hash_fsid(void *fsid, int table_size); +static int hash_fsid_compare(void *key, struct qlist_head *link); static int cache_server_array(PVFS_fs_id fsid); static int handle_lookup_entry_compare(const void *p1, const void *p2); const struct handle_lookup_entry* find_handle_lookup_entry( - PVFS_handle handle, PVFS_fs_id fsid); + PVFS_handle handle, + PVFS_fs_id fsid); static int load_handle_lookup_table( - struct config_fs_cache_s *cur_config_fs_cache); + struct config_fs_cache_s *cur_config_fs_cache); /* removed by WBL when selection algorithm rewritten static int meta_randomized = 0; @@ -115,8 +116,9 @@ int PINT_cached_config_initialize(void) if (!PINT_fsid_config_cache_table) { - PINT_fsid_config_cache_table = - qhash_init(hash_fsid_compare,hash_fsid,11); + PINT_fsid_config_cache_table = qhash_init(hash_fsid_compare, + hash_fsid, + 11); } /* include time, pid, and hostname in random seed in order to help avoid @@ -198,11 +200,13 @@ int PINT_cached_config_finalize(void) do { hash_link = qhash_search_and_remove_at_index( - PINT_fsid_config_cache_table, i); + PINT_fsid_config_cache_table, + i); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -243,8 +247,7 @@ int PINT_cached_config_finalize(void) return 0; } -int PINT_cached_config_reinitialize( - struct server_configuration_s *config) +int PINT_cached_config_reinitialize(struct server_configuration_s *config) { int ret = -PVFS_EINVAL; PINT_llist *cur = NULL; @@ -265,7 +268,7 @@ int PINT_cached_config_reinitialize( } ret = PINT_cached_config_handle_load_mapping(cur_fs, - config); + config); if (ret) { break; @@ -294,24 +297,25 @@ int PINT_cached_config_handle_load_mapping( if (fs) { cur_config_fs_cache = (struct config_fs_cache_s *) - malloc(sizeof(struct config_fs_cache_s)); + malloc(sizeof(struct config_fs_cache_s)); assert(cur_config_fs_cache); memset(cur_config_fs_cache, 0, sizeof(struct config_fs_cache_s)); cur_config_fs_cache->fs = (struct filesystem_configuration_s *)fs; cur_config_fs_cache->meta_server_cursor = - cur_config_fs_cache->fs->meta_handle_ranges; + cur_config_fs_cache->fs->meta_handle_ranges; cur_config_fs_cache->data_server_cursor = - cur_config_fs_cache->fs->data_handle_ranges; + cur_config_fs_cache->fs->data_handle_ranges; cur_config_fs_cache->data_local_alias = - config->host_id; + config->host_id; /* find handle mapping of local host */ if (cur_config_fs_cache->data_local_alias) { cur_config_fs_cache->data_local_mapping = - PINT_get_handle_mapping(fs->data_handle_ranges, - cur_config_fs_cache->data_local_alias); + PINT_get_handle_mapping( + fs->data_handle_ranges, + cur_config_fs_cache->data_local_alias); } else { @@ -337,8 +341,9 @@ int PINT_cached_config_handle_load_mapping( return 0; } -static struct host_handle_mapping_s * -PINT_cached_config_find_server(PINT_llist *handle_ranges, const char *addr) +static struct host_handle_mapping_s *PINT_cached_config_find_server( + PINT_llist *handle_ranges, + const char *addr) { host_handle_mapping_s *cur_mapping; PINT_llist *server_cursor = handle_ranges; @@ -361,11 +366,10 @@ PINT_cached_config_find_server(PINT_llist *handle_ranges, const char *addr) * * returns 0 on success, -errno on failure */ -int PINT_cached_config_get_server( - PVFS_fs_id fsid, - const char* host, - PVFS_ds_type type, - PVFS_handle_extent_array *ext_array) +int PINT_cached_config_get_server(PVFS_fs_id fsid, + const char* host, + PVFS_ds_type type, + PVFS_handle_extent_array *ext_array) { struct host_handle_mapping_s *cur_mapping = NULL; struct qlist_head *hash_link = NULL; @@ -388,21 +392,20 @@ int PINT_cached_config_get_server( return(-PVFS_EINVAL); } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); if((int)type == PINT_SERVER_TYPE_META) { - server_cursor = - cur_config_cache->fs->meta_handle_ranges; + server_cursor = cur_config_cache->fs->meta_handle_ranges; } else { - server_cursor = - cur_config_cache->fs->data_handle_ranges; + server_cursor = cur_config_cache->fs->data_handle_ranges; } cur_mapping = PINT_cached_config_find_server(server_cursor, host); @@ -412,14 +415,13 @@ int PINT_cached_config_get_server( return(-PVFS_ENOENT); } - ext_array->extent_count = - cur_mapping->handle_extent_array.extent_count; - ext_array->extent_array = - cur_mapping->handle_extent_array.extent_array; + ext_array->extent_count = cur_mapping->handle_extent_array.extent_count; + ext_array->extent_array = cur_mapping->handle_extent_array.extent_array; return(0); } + #ifndef __PVFS2_SERVER__ /* PINT_cached_config_get_next_meta() * @@ -436,11 +438,10 @@ int PINT_cached_config_get_server( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_get_next_meta( - PVFS_fs_id fsid, - PVFS_BMI_addr_t *meta_addr, - PVFS_handle_extent_array *ext_array, - int is_directory) +int PINT_cached_config_get_next_meta(PVFS_fs_id fsid, + PVFS_BMI_addr_t *meta_addr, + PVFS_handle_extent_array *ext_array, + int is_directory) { int ret = -PVFS_EINVAL, randsrv = 0, num_meta_servers = 0; char *meta_server_bmi_str = NULL; @@ -456,16 +457,16 @@ int PINT_cached_config_get_next_meta( "NULL ext_array.\n"); return -PVFS_EINVAL; } - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if (!hash_link) { gossip_err("Hash search failed to return configuration.\n"); return -PVFS_EINVAL; } - config = PINT_get_server_config_struct(fsid); - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -504,21 +505,21 @@ int PINT_cached_config_get_next_meta( } num_meta_servers = PINT_llist_count( - cur_config_cache->fs->meta_handle_ranges); + cur_config_cache->fs->meta_handle_ranges); randsrv = (rand() % num_meta_servers); /* set cursor at beginning of list */ cur_config_cache->meta_server_cursor = - cur_config_cache->fs->meta_handle_ranges; + cur_config_cache->fs->meta_handle_ranges; cur_mapping = PINT_llist_head( cur_config_cache->meta_server_cursor); while(randsrv > 0) { - cur_config_cache->meta_server_cursor = PINT_llist_next( - cur_config_cache->meta_server_cursor); + cur_config_cache->meta_server_cursor = + PINT_llist_next(cur_config_cache->meta_server_cursor); if (!cur_config_cache->meta_server_cursor) { /* found end of list before we should have */ @@ -527,12 +528,11 @@ int PINT_cached_config_get_next_meta( "PINT_cached_config_get_next_meta\n"); /* return first metaserver */ cur_config_cache->meta_server_cursor = - cur_config_cache->fs->meta_handle_ranges; + cur_config_cache->fs->meta_handle_ranges; break; } - cur_mapping = PINT_llist_head( - cur_config_cache->meta_server_cursor); + cur_mapping = PINT_llist_head(cur_config_cache->meta_server_cursor); /* first jitter across all, regardless of acceptability, then * keep looping until find one that matches */ @@ -547,30 +547,26 @@ int PINT_cached_config_get_next_meta( meta_server_bmi_str = cur_mapping->alias_mapping->bmi_address; - ext_array->extent_count = - cur_mapping->handle_extent_array.extent_count; - ext_array->extent_array = - cur_mapping->handle_extent_array.extent_array; + ext_array->extent_count = cur_mapping->handle_extent_array.extent_count; + ext_array->extent_array = cur_mapping->handle_extent_array.extent_array; if (meta_addr != NULL) { - ret = BMI_addr_lookup(meta_addr,meta_server_bmi_str); + ret = BMI_addr_lookup(meta_addr, meta_server_bmi_str); } else { ret = 0; } - PINT_put_server_config_struct(config); - return ret; } #endif static int PINT_cached_config_get_extents( - PVFS_fs_id fsid, - PVFS_BMI_addr_t *addr, - PVFS_handle_extent_array *handle_extents) + PVFS_fs_id fsid, + PVFS_BMI_addr_t *addr, + PVFS_handle_extent_array *handle_extents) { struct qhash_head *hash_link; struct PINT_llist *server_list; @@ -579,7 +575,7 @@ static int PINT_cached_config_get_extents( struct host_handle_mapping_s *cur_mapping = NULL; int ret; - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if(!hash_link) { gossip_err("Failed to find a file system matching fsid: %d\n", @@ -587,8 +583,9 @@ static int PINT_cached_config_get_extents( return -PVFS_EINVAL; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -601,8 +598,8 @@ static int PINT_cached_config_get_extents( assert(cur_mapping); server_list = PINT_llist_next(server_list); - ret = BMI_addr_lookup( - &tmp_addr, cur_mapping->alias_mapping->bmi_address); + ret = BMI_addr_lookup(&tmp_addr, + cur_mapping->alias_mapping->bmi_address); if(ret < 0) { return ret; @@ -611,9 +608,9 @@ static int PINT_cached_config_get_extents( if(tmp_addr == *addr) { handle_extents->extent_count = - cur_mapping->handle_extent_array.extent_count; + cur_mapping->handle_extent_array.extent_count; handle_extents->extent_array = - cur_mapping->handle_extent_array.extent_array; + cur_mapping->handle_extent_array.extent_array; return 0; } @@ -621,12 +618,14 @@ static int PINT_cached_config_get_extents( return -PVFS_ENOENT; } +/* + */ int PINT_cached_config_map_servers( - PVFS_fs_id fsid, - int *inout_num_datafiles, - PVFS_sys_layout *layout, - PVFS_BMI_addr_t *addr_array, - PVFS_handle_extent_array *handle_extent_array) + PVFS_fs_id fsid, + int *inout_num_datafiles, + PVFS_sys_layout *layout, + PVFS_BMI_addr_t *addr_array, + PVFS_handle_extent_array *handle_extent_array) { struct qhash_head *hash_link = NULL; struct PINT_llist *server_list = NULL; @@ -648,8 +647,9 @@ int PINT_cached_config_map_servers( return -PVFS_EINVAL; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -674,9 +674,9 @@ int PINT_cached_config_map_servers( if(handle_extent_array) { ret = PINT_cached_config_get_extents( - fsid, - &layout->server_list.servers[i], - &handle_extent_array[i]); + fsid, + &layout->server_list.servers[i], + &handle_extent_array[i]); if(ret < 0) { gossip_err("The address specified in the datafile " @@ -784,9 +784,9 @@ int PINT_cached_config_map_servers( if(handle_extent_array) { handle_extent_array[df].extent_count = - sv->handle_extent_array.extent_count; + sv->handle_extent_array.extent_count; handle_extent_array[df].extent_array = - sv->handle_extent_array.extent_array; + sv->handle_extent_array.extent_array; } /* go to next server in list */ server_list = PINT_llist_next(server_list); @@ -864,9 +864,9 @@ int PINT_cached_config_map_servers( if(handle_extent_array) { handle_extent_array[df].extent_count = - sv->handle_extent_array.extent_count; + sv->handle_extent_array.extent_count; handle_extent_array[df].extent_array = - sv->handle_extent_array.extent_array; + sv->handle_extent_array.extent_array; } } /* done with this so free it */ @@ -1003,10 +1003,9 @@ int PINT_cached_config_get_next_io( * * returns pointer to string on success, NULL on failure */ -const char *PINT_cached_config_map_addr( - PVFS_fs_id fsid, - PVFS_BMI_addr_t addr, - int *server_type) +const char *PINT_cached_config_map_addr(PVFS_fs_id fsid, + PVFS_BMI_addr_t addr, + int *server_type) { int ret = -PVFS_EINVAL, i = 0; struct qlist_head *hash_link = NULL; @@ -1017,8 +1016,9 @@ const char *PINT_cached_config_map_addr( { return NULL; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1050,10 +1050,9 @@ const char *PINT_cached_config_map_addr( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_check_type( - PVFS_fs_id fsid, - const char *server_addr_str, - int* server_type) +int PINT_cached_config_check_type(PVFS_fs_id fsid, + const char *server_addr_str, + int* server_type) { int ret = -PVFS_EINVAL, i = 0; struct qlist_head *hash_link = NULL; @@ -1064,8 +1063,9 @@ int PINT_cached_config_check_type( { return(-PVFS_EINVAL); } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1079,7 +1079,7 @@ int PINT_cached_config_check_type( for(i = 0; i < cur_config_cache->server_count; i++) { if (!(strcmp(cur_config_cache->server_array[i].addr_string, - server_addr_str))) + server_addr_str))) { *server_type = cur_config_cache->server_array[i].server_type; return(0); @@ -1095,10 +1095,9 @@ int PINT_cached_config_check_type( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_count_servers( - PVFS_fs_id fsid, - int server_type, - int *count) +int PINT_cached_config_count_servers(PVFS_fs_id fsid, + int server_type, + int *count) { int ret = -PVFS_EINVAL; struct qlist_head *hash_link = NULL; @@ -1114,8 +1113,9 @@ int PINT_cached_config_count_servers( { return ret; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1151,11 +1151,10 @@ int PINT_cached_config_count_servers( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_get_server_array( - PVFS_fs_id fsid, - int server_type, - PVFS_BMI_addr_t *addr_array, - int *inout_count_p) +int PINT_cached_config_get_server_array(PVFS_fs_id fsid, + int server_type, + PVFS_BMI_addr_t *addr_array, + int *inout_count_p) { int ret = -PVFS_EINVAL, i = 0; struct qlist_head *hash_link = NULL; @@ -1172,8 +1171,9 @@ int PINT_cached_config_get_server_array( { return ret; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1242,19 +1242,18 @@ int PINT_cached_config_get_server_array( * * returns 0 on success to -errno on failure */ -int PINT_cached_config_map_to_server( - PVFS_BMI_addr_t *server_addr, - PVFS_handle handle, - PVFS_fs_id fs_id) +int PINT_cached_config_map_to_server(PVFS_BMI_addr_t *server_addr, + PVFS_handle handle, + PVFS_fs_id fs_id) { - struct handle_lookup_entry* tmp_entry; + const struct handle_lookup_entry* tmp_entry; tmp_entry = find_handle_lookup_entry(handle, fs_id); if(!tmp_entry) { gossip_err("Error: failed to find handle %llu in fs configuration.\n", - llu(handle)); + llu(handle)); return(-PVFS_EINVAL); } @@ -1272,11 +1271,10 @@ int PINT_cached_config_map_to_server( * configuration is checked to find a hint there. The distribution will * choose a correct number of dfiles even if no hint is set. */ -int PINT_cached_config_get_num_dfiles( - PVFS_fs_id fsid, - PINT_dist *dist, - int num_dfiles_requested, - int *num_dfiles) +int PINT_cached_config_get_num_dfiles(PVFS_fs_id fsid, + PINT_dist *dist, + int num_dfiles_requested, + int *num_dfiles) { int rc; int num_io_servers; @@ -1289,11 +1287,12 @@ int PINT_cached_config_get_num_dfiles( struct config_fs_cache_s *cur_config_cache = NULL; /* Locate the filesystem configuration for this fs id */ - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); num_dfiles_requested = cur_config_cache->fs->default_num_dfiles; @@ -1314,13 +1313,17 @@ int PINT_cached_config_get_num_dfiles( num_dfiles_requested); if(*num_dfiles < 1) { - gossip_err("Error: distribution failure for %d servers and %d requested datafiles.\n", num_io_servers, num_dfiles_requested); + gossip_err("Error: distribution failure for %d servers " + "and %d requested datafiles.\n", num_io_servers, + num_dfiles_requested); return(-PVFS_EINVAL); } if (*num_dfiles > num_io_servers) { - gossip_err("%s: Distribution requires more datafiles(%d) than I/O servers(%d) currently defined in the system. Capping " + gossip_err("%s: Distribution requires more datafiles(%d) " + "than I/O servers(%d) currently defined in the " + "system. Capping " "number of datafiles to the number of I/O servers.\n" ,__func__ ,*num_dfiles @@ -1338,9 +1341,7 @@ int PINT_cached_config_get_num_dfiles( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_get_num_meta( - PVFS_fs_id fsid, - int *num_meta) +int PINT_cached_config_get_num_meta(PVFS_fs_id fsid, int *num_meta) { int ret = -PVFS_EINVAL; struct qlist_head *hash_link = NULL; @@ -1348,18 +1349,19 @@ int PINT_cached_config_get_num_meta( if (num_meta) { - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); assert(cur_config_cache->fs->meta_handle_ranges); *num_meta = PINT_llist_count( - cur_config_cache->fs->meta_handle_ranges); + cur_config_cache->fs->meta_handle_ranges); ret = 0; } } @@ -1381,18 +1383,19 @@ int PINT_cached_config_get_num_io(PVFS_fs_id fsid, int *num_io) if (num_io) { - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); assert(cur_config_cache->fs->data_handle_ranges); *num_io = PINT_llist_count( - cur_config_cache->fs->data_handle_ranges); + cur_config_cache->fs->data_handle_ranges); ret = 0; } } @@ -1405,10 +1408,9 @@ int PINT_cached_config_get_num_io(PVFS_fs_id fsid, int *num_io) * * returns 0 on success, -PVFS_error on failure */ -int PINT_cached_config_get_server_handle_count( - const char *server_addr_str, - PVFS_fs_id fs_id, - uint64_t *handle_count) +int PINT_cached_config_get_server_handle_count(const char *server_addr_str, + PVFS_fs_id fs_id, + uint64_t *handle_count) { struct qlist_head *hash_link = NULL; struct config_fs_cache_s *cur_config_cache = NULL; @@ -1419,29 +1421,32 @@ int PINT_cached_config_get_server_handle_count( assert(PINT_fsid_config_cache_table); /* for each fs find the right server */ - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fs_id)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fs_id)); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); server_mapping = PINT_cached_config_find_server( - cur_config_cache->fs->meta_handle_ranges, server_addr_str); + cur_config_cache->fs->meta_handle_ranges, + server_addr_str); if(server_mapping) { *handle_count += PINT_extent_array_count_total( - &server_mapping->handle_extent_array); + &server_mapping->handle_extent_array); } server_mapping = PINT_cached_config_find_server( - cur_config_cache->fs->data_handle_ranges, server_addr_str); + cur_config_cache->fs->data_handle_ranges, + server_addr_str); if(server_mapping) { *handle_count += PINT_extent_array_count_total( - &server_mapping->handle_extent_array); + &server_mapping->handle_extent_array); } } return 0; @@ -1454,13 +1459,12 @@ int PINT_cached_config_get_server_handle_count( * * returns 0 on success, -errno on failure */ -int PINT_cached_config_get_server_name( - char *server_name, - int max_server_name_len, - PVFS_handle handle, - PVFS_fs_id fsid) +int PINT_cached_config_get_server_name(char *server_name, + int max_server_name_len, + PVFS_handle handle, + PVFS_fs_id fsid) { - struct handle_lookup_entry* tmp_entry; + const struct handle_lookup_entry* tmp_entry; tmp_entry = find_handle_lookup_entry(handle, fsid); @@ -1482,9 +1486,8 @@ int PINT_cached_config_get_server_name( * returns 0 on success -errno on failure * */ -int PINT_cached_config_get_root_handle( - PVFS_fs_id fsid, - PVFS_handle *fh_root) +int PINT_cached_config_get_root_handle(PVFS_fs_id fsid, + PVFS_handle *fh_root) { int ret = -PVFS_EINVAL; struct qlist_head *hash_link = NULL; @@ -1492,11 +1495,12 @@ int PINT_cached_config_get_root_handle( if (fh_root) { - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if (hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1508,9 +1512,8 @@ int PINT_cached_config_get_root_handle( return ret; } -int PINT_cached_config_get_handle_timeout( - PVFS_fs_id fsid, - struct timeval *timeout) +int PINT_cached_config_get_handle_timeout(PVFS_fs_id fsid, + struct timeval *timeout) { int ret = -PVFS_EINVAL; struct qlist_head *hash_link = NULL; @@ -1519,41 +1522,38 @@ int PINT_cached_config_get_handle_timeout( hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if(hash_link) { - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); timeout->tv_sec = - cur_config_cache->fs->handle_recycle_timeout_sec.tv_sec; + cur_config_cache->fs->handle_recycle_timeout_sec.tv_sec; timeout->tv_usec = - cur_config_cache->fs->handle_recycle_timeout_sec.tv_usec; + cur_config_cache->fs->handle_recycle_timeout_sec.tv_usec; ret = 0; } return ret; } -int PINT_cached_config_get_server_list( - PVFS_fs_id fs_id, - PINT_dist *dist, - int num_dfiles_req, - int user_id, - int num_energy_nodes, - PVFS_sys_layout *layout, - const char ***server_names, - int *server_count) +int PINT_cached_config_get_server_list(PVFS_fs_id fs_id, + PINT_dist *dist, + int num_dfiles_req, + PVFS_sys_layout *layout, + const char ***server_names, + int *server_count) { int num_io_servers, ret, i; PVFS_BMI_addr_t *server_addrs; const char **servers; /* find the server list from the layout */ - ret = PINT_cached_config_get_num_dfiles( - fs_id, - dist, - num_dfiles_req, - &num_io_servers); + ret = PINT_cached_config_get_num_dfiles(fs_id, + dist, + num_dfiles_req, + &num_io_servers); if (ret < 0) { gossip_err("Failed to get number of data servers\n"); @@ -1574,25 +1574,18 @@ int PINT_cached_config_get_server_list( return -PVFS_ENOMEM; } - ret = PINT_cached_config_map_servers( - fs_id, - &num_io_servers, - layout, - server_addrs, - NULL); + ret = PINT_cached_config_map_servers(fs_id, + &num_io_servers, + layout, + server_addrs, + NULL); if(ret != 0) { gossip_err("Failed to get IO server addrs from layout\n"); return ret; } - if(num_energy_nodes) - { - servers = malloc(sizeof(*servers) * num_energy_nodes); - } else { - servers = malloc(sizeof(*servers) * num_io_servers); - } - + servers = malloc(sizeof(*servers) * num_io_servers); if(!servers) { gossip_err("Failed to allocate server address list\n"); @@ -1600,22 +1593,13 @@ int PINT_cached_config_get_server_list( return -PVFS_ENOMEM; } - if(num_energy_nodes) { - for(i = 0; i < num_energy_nodes; ++i) - { - servers[i] = BMI_addr_rev_lookup(server_addrs[(i+(user_id % num_io_servers)) % num_io_servers]); - } - *server_count = num_energy_nodes; - } else { - for(i = 0; i < num_io_servers; ++i) - { - servers[i] = BMI_addr_rev_lookup(server_addrs[i]); - } - *server_count = num_io_servers; + for(i = 0; i < num_io_servers; ++i) + { + servers[i] = BMI_addr_rev_lookup(server_addrs[i]); } - free(server_addrs); + *server_count = num_io_servers; *server_names = servers; return 0; @@ -1628,8 +1612,7 @@ int PINT_cached_config_get_server_list( * * returns 0 on success, -errno on failure */ -static int cache_server_array( - PVFS_fs_id fsid) +static int cache_server_array(PVFS_fs_id fsid) { int ret = -PVFS_EINVAL, i = 0, j = 0; char *server_bmi_str = NULL; @@ -1647,8 +1630,9 @@ static int cache_server_array( { return ret; } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1680,14 +1664,14 @@ static int cache_server_array( } cur_config_cache->meta_server_array = (phys_server_desc_s*)malloc( - (cur_config_cache->meta_server_count * - sizeof(phys_server_desc_s))); + (cur_config_cache->meta_server_count * + sizeof(phys_server_desc_s))); cur_config_cache->io_server_array = (phys_server_desc_s*)malloc( - (cur_config_cache->io_server_count* - sizeof(phys_server_desc_s))); + (cur_config_cache->io_server_count* + sizeof(phys_server_desc_s))); cur_config_cache->server_array = (phys_server_desc_s*)malloc( - (cur_config_cache->server_count* - sizeof(phys_server_desc_s))); + (cur_config_cache->server_count* + sizeof(phys_server_desc_s))); if ((cur_config_cache->meta_server_array == NULL) || (cur_config_cache->io_server_array == NULL) || @@ -1696,9 +1680,9 @@ static int cache_server_array( ret = -PVFS_ENOMEM; goto cleanup_allocations; } - memset(cur_config_cache->server_array, 0, - (cur_config_cache->server_count * - sizeof(phys_server_desc_s))); + memset(cur_config_cache->server_array, + 0, + (cur_config_cache->server_count * sizeof(phys_server_desc_s))); /* reset counts until we find out how many physical servers * are actually present @@ -1724,7 +1708,7 @@ static int cache_server_array( tmp_server = PINT_llist_next(tmp_server); server_bmi_str = cur_mapping->alias_mapping->bmi_address; - ret = BMI_addr_lookup(&tmp_bmi_addr,server_bmi_str); + ret = BMI_addr_lookup(&tmp_bmi_addr, server_bmi_str); if (ret < 0) { return(ret); @@ -1732,13 +1716,13 @@ static int cache_server_array( /* see if we have already listed this BMI address */ dup_flag = 0; - for (j=0; j < array_index; j++) + for (j = 0; j < array_index; j++) { if (cur_config_cache->server_array[j].addr == tmp_bmi_addr) { cur_config_cache->server_array[j].server_type - |= current; + |= current; dup_flag = 1; break; } @@ -1747,11 +1731,11 @@ static int cache_server_array( if (!dup_flag) { cur_config_cache->server_array[array_index].addr = - tmp_bmi_addr; + tmp_bmi_addr; cur_config_cache->server_array[ - array_index].addr_string = server_bmi_str; + array_index].addr_string = server_bmi_str; cur_config_cache->server_array[ - array_index].server_type = current; + array_index].server_type = current; array_index++; cur_config_cache->server_count = array_index; } @@ -1767,14 +1751,14 @@ static int cache_server_array( PINT_SERVER_TYPE_META) { cur_config_cache->meta_server_array[array_index] = - cur_config_cache->server_array[i]; + cur_config_cache->server_array[i]; array_index++; } if (cur_config_cache->server_array[i].server_type & PINT_SERVER_TYPE_IO) { cur_config_cache->io_server_array[array_index2] = - cur_config_cache->server_array[i]; + cur_config_cache->server_array[i]; array_index2++; } } @@ -1783,7 +1767,7 @@ static int cache_server_array( } return 0; - cleanup_allocations: +cleanup_allocations: if (cur_config_cache->meta_server_array) { free(cur_config_cache->meta_server_array); @@ -1841,18 +1825,22 @@ static int hash_fsid_compare(void *key, struct qlist_head *link) } /* handle_lookup_entry_compare() - * * - * * comparison function used by qsort() - * */ + * + * comparison function used by qsort() + */ static int handle_lookup_entry_compare(const void *p1, const void *p2) { const struct handle_lookup_entry* e1 = p1; const struct handle_lookup_entry* e2 = p2; if(e1->extent.first < e2->extent.first) + { return(-1); + } if(e1->extent.first > e2->extent.first) + { return(1); + } return(0); } @@ -1864,7 +1852,8 @@ static int handle_lookup_entry_compare(const void *p1, const void *p2) * returns pointer to table entry on success, NULL on failure */ const struct handle_lookup_entry* find_handle_lookup_entry( - PVFS_handle handle, PVFS_fs_id fsid) + PVFS_handle handle, + PVFS_fs_id fsid) { struct qlist_head *hash_link = NULL; struct config_fs_cache_s *cur_config_cache = NULL; @@ -1873,14 +1862,15 @@ const struct handle_lookup_entry* find_handle_lookup_entry( assert(PINT_fsid_config_cache_table); - hash_link = qhash_search(PINT_fsid_config_cache_table,&(fsid)); + hash_link = qhash_search(PINT_fsid_config_cache_table, &(fsid)); if(!hash_link) { return(NULL); } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); assert(cur_config_cache->fs); @@ -1894,9 +1884,13 @@ const struct handle_lookup_entry* find_handle_lookup_entry( { mid = (low + high)/2; if (cur_config_cache->handle_lookup_table[mid].extent.first < handle) + { low = mid + 1; + } else + { high = mid; + } } if ((low < cur_config_cache->handle_lookup_table_size) && (cur_config_cache->handle_lookup_table[low].extent.first == handle)) @@ -1912,8 +1906,8 @@ const struct handle_lookup_entry* find_handle_lookup_entry( /* confirm match */ if(PINT_handle_in_extent( - &cur_config_cache->handle_lookup_table[table_index].extent, - handle)) + &cur_config_cache->handle_lookup_table[table_index].extent, + handle)) { if(!strncmp(cur_config_cache->handle_lookup_table[table_index].server_name, "osd", 3)) { @@ -1938,9 +1932,8 @@ const struct handle_lookup_entry* find_handle_lookup_entry( * returns 0 on success, -PVFS_error on failure */ static int load_handle_lookup_table( - struct config_fs_cache_s *cur_config_fs_cache) + struct config_fs_cache_s *cur_config_fs_cache) { - int ret = -PVFS_EINVAL; host_handle_mapping_s *cur_mapping = NULL; int count = 0; int table_offset = 0; @@ -1955,14 +1948,14 @@ static int load_handle_lookup_table( /* count total number of extents */ /* loop through both meta and data ranges */ - for(j=0; j<2; j++) + for(j = 0; j < 2; j++) { server_cursor = range_list[j]; cur_mapping = PINT_llist_head(server_cursor); while(cur_mapping) { /* each server may have multiple extents */ - for(i=0; ihandle_extent_array.extent_count; i++) + for(i = 0; i < cur_mapping->handle_extent_array.extent_count; i++) { count += 1; } @@ -1977,7 +1970,7 @@ static int load_handle_lookup_table( free(cur_config_fs_cache->handle_lookup_table); } cur_config_fs_cache->handle_lookup_table = - malloc(sizeof(*cur_config_fs_cache->handle_lookup_table) * count); + malloc(sizeof(*cur_config_fs_cache->handle_lookup_table) * count); if(!cur_config_fs_cache->handle_lookup_table) { return(-PVFS_ENOMEM); @@ -1986,13 +1979,13 @@ static int load_handle_lookup_table( /* populate table */ /* loop through both meta and data ranges */ - for(j=0; j<2; j++) + for(j = 0; j < 2; j++) { server_cursor = range_list[j]; cur_mapping = PINT_llist_head(server_cursor); while(cur_mapping) { - for(i=0; ihandle_extent_array.extent_count; i++) + for(i = 0; i < cur_mapping->handle_extent_array.extent_count; i++) { cur_config_fs_cache->handle_lookup_table[table_offset].extent = cur_mapping->handle_extent_array.extent_array[i]; @@ -2000,7 +1993,7 @@ static int load_handle_lookup_table( = cur_mapping->alias_mapping->bmi_address; #ifndef __PVFS2_SERVER__ - ret = BMI_addr_lookup( + int ret = BMI_addr_lookup( &cur_config_fs_cache->handle_lookup_table[table_offset].server_addr, cur_config_fs_cache->handle_lookup_table[table_offset].server_name); if(ret < 0) @@ -2019,9 +2012,10 @@ static int load_handle_lookup_table( } /* sort table */ - qsort(cur_config_fs_cache->handle_lookup_table, table_offset, - sizeof(*cur_config_fs_cache->handle_lookup_table), - handle_lookup_entry_compare); + qsort(cur_config_fs_cache->handle_lookup_table, + table_offset, + sizeof(*cur_config_fs_cache->handle_lookup_table), + handle_lookup_entry_compare); return(0); } @@ -2033,9 +2027,9 @@ static int load_handle_lookup_table( * * returns 0 on success, -PVFS_error on failure */ -int PINT_cached_config_io_server_names( char ***list - , int *size - , PVFS_fs_id fsid) +int PINT_cached_config_io_server_names(char ***list, + int *size, + PVFS_fs_id fsid) { int i; struct qlist_head *hash_link = NULL; @@ -2049,8 +2043,9 @@ int PINT_cached_config_io_server_names( char ***list return(-PVFS_ENOENT); } - cur_config_cache = qlist_entry( - hash_link, struct config_fs_cache_s, hash_link); + cur_config_cache = qlist_entry(hash_link, + struct config_fs_cache_s, + hash_link); assert(cur_config_cache); @@ -2059,11 +2054,13 @@ int PINT_cached_config_io_server_names( char ***list *list = malloc(sizeof(char *) * (*size)); if (! (*list) ) + { return(-PVFS_ENOMEM); + } - memset(*list,0,sizeof(char *) * (*size)); + memset(*list, 0, sizeof(char *) * (*size)); - for (i=0; i<(*size); i++) + for (i = 0; i < (*size); i++) { /*addr_string originates from the alias mapping->bmi_address*/ (*list)[i] = cur_config_cache->io_server_array[i].addr_string; diff --git a/src/common/misc/pint-cached-config.h b/src/common/misc/pint-cached-config.h index e4e96bb..df46c20 100644 --- a/src/common/misc/pint-cached-config.h +++ b/src/common/misc/pint-cached-config.h @@ -7,6 +7,7 @@ #ifndef __PINT_CACHED_CONFIG_H #define __PINT_CACHED_CONFIG_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-storage.h" #include "pvfs2-mgmt.h" @@ -111,15 +112,6 @@ int PINT_cached_config_get_server_name( PVFS_handle handle, PVFS_fs_id fsid); -int PINT_cached_config_update_first_handle( - PVFS_handle handle, - PVFS_fs_id fsid); - -int PINT_cached_config_get_first_handle( - PVFS_handle initial_handle, - PVFS_fs_id fs_id, - PVFS_handle *new_handle); - int PINT_cached_config_get_server_handle_count( const char *server_addr_str, PVFS_fs_id fs_id, @@ -142,8 +134,6 @@ int PINT_cached_config_get_server_list( PVFS_fs_id fs_id, PINT_dist *dist, int num_dfiles_req, - int user_id, - int num_energy_nodes, PVFS_sys_layout *layout, const char ***server_names, int *server_count); @@ -156,11 +146,6 @@ int PINT_cached_config_io_server_names( int *size, PVFS_fs_id fsid); -int PINT_cached_config_store_new_oid( - PVFS_BMI_addr_t *addr, - PVFS_fs_id fs_id, - PVFS_handle new_oid); - #endif /* __PINT_CACHED_CONFIG_H */ /* diff --git a/src/common/misc/pint-clean-malloc.h b/src/common/misc/pint-clean-malloc.h new file mode 100644 index 0000000..ff10c1c --- /dev/null +++ b/src/common/misc/pint-clean-malloc.h @@ -0,0 +1,30 @@ +/* + * (C) 2013 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + * + */ + +#ifndef PINT_CLEAN_MALLOC_H +#define PINT_CLEAN_MALLOC_H + +extern void *clean_malloc(size_t size); +extern void *clean_calloc(size_t nmemb, size_t size); +extern int clean_posix_memalign(void **ptr, size_t alignment, size_t size); +extern void *clean_memalign(size_t alignment, size_t size); +extern void *clean_valloc(size_t size); +extern void *clean_realloc(void *ptr, size_t size); +extern char *clean_strdup(const char *str); +extern char *clean_strndup(const char *str, size_t n); +extern void clean_free(void *ptr); + +#endif + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=4 sts=4 sw=4 expandtab + */ diff --git a/src/common/misc/pint-eattr.c b/src/common/misc/pint-eattr.c index d7e5015..534b580 100644 --- a/src/common/misc/pint-eattr.c +++ b/src/common/misc/pint-eattr.c @@ -4,17 +4,18 @@ * See COPYING in top-level directory. */ + #include #include #include #include +#include "pvfs2-internal.h" #define __PINT_REQPROTO_ENCODE_FUNCS_C #include "endecode-funcs.h" #include "pvfs2.h" #include "pint-eattr.h" #include "pvfs2-req-proto.h" -#include "pvfs2-internal.h" #define PVFS_EATTR_SYSTEM_NS "system.pvfs2." diff --git a/src/common/misc/pint-eattr.h b/src/common/misc/pint-eattr.h index 747f321..ab99792 100644 --- a/src/common/misc/pint-eattr.h +++ b/src/common/misc/pint-eattr.h @@ -6,6 +6,7 @@ #ifndef PINT_EATTR_H #define PINT_EATTR_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" /* Extended Attributes diff --git a/src/common/misc/pint-event.c b/src/common/misc/pint-event.c index a6b3779..84fd2b6 100644 --- a/src/common/misc/pint-event.c +++ b/src/common/misc/pint-event.c @@ -20,6 +20,7 @@ #include #endif +#include "pvfs2-internal.h" #include "pint-event.h" #include "pvfs2-types.h" #include "pvfs2-mgmt.h" @@ -29,8 +30,6 @@ #include "id-generator.h" #include "str-utils.h" -#include "pvfs2-config.h" - #ifdef HAVE_TAU #include "pvfs_tau_api.h" #endif diff --git a/src/common/misc/pint-event.h b/src/common/misc/pint-event.h index 75d34d7..78dc94f 100644 --- a/src/common/misc/pint-event.h +++ b/src/common/misc/pint-event.h @@ -7,6 +7,7 @@ #ifndef __PINT_EVENT_H #define __PINT_EVENT_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "quickhash.h" diff --git a/src/common/misc/pint-hint.c b/src/common/misc/pint-hint.c index 8b533ff..6963d65 100644 --- a/src/common/misc/pint-hint.c +++ b/src/common/misc/pint-hint.c @@ -10,10 +10,12 @@ #include #include #include +#include + +#include "pvfs2-internal.h" #include "pint-hint.h" #include "gossip.h" -#include -#include +#include "pvfs2-debug.h" DEFINE_STATIC_ENDECODE_FUNCS(uint64_t, uint64_t); DEFINE_STATIC_ENDECODE_FUNCS(int64_t, int64_t); @@ -105,9 +107,9 @@ static const struct PINT_hint_info hint_types[] = { decode_func_uint32_t, sizeof(uint32_t)}, - {PINT_HINT_NOCACHE, + {PINT_HINT_CACHE, 0, - PVFS_HINT_NOCACHE_NAME, + PVFS_HINT_CACHE_NAME, encode_func_uint32_t, decode_func_uint32_t, sizeof(uint32_t)}, @@ -609,8 +611,9 @@ int PVFS_hint_import_env(PVFS_hint *out_hint) return 0; } -void *PINT_hint_get_value_by_type( - struct PVFS_hint_s *hint, enum PINT_hint_type type, int *length) +void *PINT_hint_get_value_by_type(struct PVFS_hint_s *hint, + enum PINT_hint_type type, + int *length) { PINT_hint *h; @@ -632,8 +635,9 @@ void *PINT_hint_get_value_by_type( return NULL; } -void *PINT_hint_get_value_by_name( - struct PVFS_hint_s *hint, const char *name, int *length) +void *PINT_hint_get_value_by_name(struct PVFS_hint_s *hint, + const char *name, + int *length) { PINT_hint *h; diff --git a/src/common/misc/pint-hint.h b/src/common/misc/pint-hint.h index 4b2ea0f..292831e 100644 --- a/src/common/misc/pint-hint.h +++ b/src/common/misc/pint-hint.h @@ -14,6 +14,7 @@ #define PINT_HINT_TRANSFER 0x01 +#include "pvfs2-internal.h" #include "pvfs2-hint.h" enum PINT_hint_type @@ -29,7 +30,7 @@ enum PINT_hint_type PINT_HINT_LAYOUT, PINT_HINT_DFILE_COUNT, PINT_HINT_SERVERLIST, - PINT_HINT_NOCACHE + PINT_HINT_CACHE }; typedef struct PVFS_hint_s diff --git a/src/common/misc/pint-malloc.c b/src/common/misc/pint-malloc.c new file mode 100644 index 0000000..98c452d --- /dev/null +++ b/src/common/misc/pint-malloc.c @@ -0,0 +1,583 @@ + +/* + * (C) 2013 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + * + */ + +/* These are standard declaration and must go before the undefs below */ +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef HAVE_MALLOC_H +#include +#endif + +/* locally configured options - must be edited here before compile */ +#if 0 +#define memdebug fprintf +#else +static inline void memdebug(FILE *stream, char *format, ...) +{ + /* this is just a dummy function to eat varargs */ + return; +} +#endif + +/* + * These functions call the default version of the various + * calls redefined here in case some code needs to call them - bypassing + * all that we have here. This is usually when mallocing memory that + * will be freed by the caller and the caller is not our code. Some + * routines in client/usrint/stdio.h do this. There may be others. + * + * These must go before pint-malloc.h which defines macros that will + * conflict here. There may be macros in std declareations we don't + * want to interfere with so we keep these before the lower includes + */ + +#include "pint-clean-malloc.h" + +void *clean_malloc(size_t size) +{ + return malloc(size); +} + +void *clean_calloc(size_t nmemb, size_t size) +{ + return calloc(nmemb, size); +} + +void *clean_realloc(void *ptr, size_t size) +{ + return realloc(ptr, size); +} + +void *clean_valloc(size_t size) +{ + return valloc(size); +} + +void *clean_memalign(size_t alignment, size_t size) +{ +#ifdef __DARWIN__ + void *ptr; + int rc; + rc = posix_memalign(&ptr, alignment, size); + if (rc) + { + return ptr; + } + else + { + return NULL; + } +#else + return memalign(alignment, size); +#endif +} + +int clean_posix_memalign(void **ptr, size_t alignment, size_t size) +{ + return posix_memalign(ptr, alignment, size); +} + +char *clean_strdup(const char *str) +{ + return strdup(str); +} + +char *clean_strndup(const char *str, size_t n) +{ + return strndup(str, n); +} + +void clean_free(void *ptr) +{ + return free(ptr); +} + +/* These need to be after the clean functions which should call whatever + * the default version is but before the undefs below that undo the + * macros set in pint-malloc.h so that the glibc functions can call + * correctly + */ + +#include "pvfs2-internal.h" +#include "pvfs2-types.h" +#include "pint-malloc.h" +#include "gen-locks.h" +#include "gossip.h" + +#if PVFS2_SIZEOF_VOIDP == 64 + typedef uint64_t ptrint_t; +#else + typedef uint32_t ptrint_t; +#endif + +/* we want to call real malloc below */ +#ifdef malloc +#undef malloc +#endif + +#ifdef calloc +#undef calloc +#endif + +#ifdef realloc +#undef realloc +#endif + +#ifdef valloc +#undef valloc +#endif + +#ifdef posix_memalign +#undef posix_memalign +#endif + +#ifdef memalign +#undef memalign +#endif + +#ifdef strdup +#undef strdup +#endif + +#ifdef strndup +#undef strndup +#endif + +#ifdef free +#undef free +#endif + +/* These routines call glibc version unless we don't have a pointer to + * one in which case it calls the default version which we hope is + * glibc. We don't want our own macros defined in pint-malloc.h here so + * these are after the undefs. + */ + +static struct glibc_malloc_ops_s glibc_malloc_ops = { + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL +}; + +static inline void *my_glibc_malloc(size_t size) +{ + if (glibc_malloc_ops.malloc) + { + return glibc_malloc_ops.malloc(size); + } + else + { + init_glibc_malloc(); + if (glibc_malloc_ops.malloc) + { + return glibc_malloc_ops.malloc(size); + } + else + { + return malloc(size); + } + } +} + +static inline void *my_glibc_realloc(void *mem, size_t size) +{ + if (glibc_malloc_ops.realloc) + { + return glibc_malloc_ops.realloc(mem, size); + } + else + { + init_glibc_malloc(); + if (glibc_malloc_ops.realloc) + { + return glibc_malloc_ops.realloc(mem, size); + } + else + { + return realloc(mem, size); + } + } +} + +static inline void my_glibc_free(void *mem) +{ + if (glibc_malloc_ops.free) + { + return glibc_malloc_ops.free(mem); + } + else + { + init_glibc_malloc(); + if (glibc_malloc_ops.free) + { + return glibc_malloc_ops.free(mem); + } + else + { + return free(mem); + } + } +} + +static inline int my_glibc_posix_memalign(void **mem, + size_t alignment, + size_t size) +{ + if (glibc_malloc_ops.posix_memalign) + { + return glibc_malloc_ops.posix_memalign(mem, alignment, size); + } + else + { + init_glibc_malloc(); + if (glibc_malloc_ops.posix_memalign) + { + return glibc_malloc_ops.posix_memalign(mem, alignment, size); + } + else + { + return posix_memalign(mem, alignment, size); + } + } +} + +typedef struct extra_s +{ + void *mem; +#if PVFS_MALLOC_MAGIC + uint32_t magic; +#endif +#if PVFS_MALLOC_FREE_ZERO + size_t size; +#endif +#if PVFS_MALLOC_CHECK_ALIGN + size_t align; +#endif +} extra_t; + +#define EXTRA_SIZE (sizeof(extra_t)) + +void *PINT_malloc(size_t size) +{ + void *mem; + size_t sizeplus; + extra_t *extra; + + sizeplus = size + EXTRA_SIZE; + + mem = my_glibc_malloc(sizeplus); + if (!mem) + { + return NULL; + } +#if PVFS_MALLOC_ZERO + memset(mem, 0, sizeplus); +#endif + extra = (extra_t *)mem; +#if !PVFS_MALLOC_ZERO + memset(extra, 0, EXTRA_SIZE); +#endif + extra->mem = mem; +#if PVFS_MALLOC_MAGIC + extra->magic = PVFS_MALLOC_MAGIC_NUM; +#endif +#if PVFS_MALLOC_ZERO + extra->size = sizeplus; +#endif +#if PVFS_MALLOC_CHECK_ALIGN + extra->align = 0; +#endif + + memdebug(stderr, "call to MALLOC size %d addr %p returning %p \n", + (int)size, mem, (void *)((ptrint_t)mem + EXTRA_SIZE)); + + return (void *)((ptrint_t)mem + EXTRA_SIZE); +} + +void *PINT_calloc(size_t nmemb, size_t size) +{ + return PINT_malloc(nmemb * size); +} + +int PINT_posix_memalign(void **mem, size_t alignment, size_t size) +{ + size_t sizeplus; + size_t alignplus; + extra_t *extra; + void *mem_orig; + void *aligned; + + /* make sure alignment is nonzero and a power of two */ + if (alignment == 0 || !((alignment & (~alignment + 1)) == alignment)) + { + *mem = NULL; + return EINVAL; + } + /* make sure alignment is at least the size of a pointere */ + alignplus = alignment; + if (alignment < sizeof(void *)) + { + alignplus = sizeof(void *); + } + + sizeplus = size + EXTRA_SIZE + alignplus; + + mem_orig = my_glibc_malloc(sizeplus); + if (mem_orig == NULL) + { + return errno; + } +#if PVFS_MALLOC_ZERO + memset(mem_orig, 0, sizeplus); +#endif + aligned = (void *)(((ptrint_t)mem_orig + EXTRA_SIZE + alignplus - 1) & + (~alignplus + 1)); + *mem = aligned; + + extra = (extra_t *)((ptrint_t)aligned - EXTRA_SIZE); +#if !PVFS_MALLOC_ZERO + memset(extra, 0, EXTRA_SIZE); +#endif + extra->mem = mem_orig; +#if PVFS_MALLOC_MAGIC + extra->magic = PVFS_MALLOC_MAGIC_NUM; +#endif +#if PVFS_MALLOC_FREE_ZERO + extra->size = sizeplus; +#endif +#if PVFS_MALLOC_CHECK_ALIGN + extra->align = alignment; +#endif + + memdebug(stderr, "call to MEMALIGN size %d addr %p " + "align %d returning %p \n", + (int)size, mem_orig, (int)alignment, *mem); + + return 0; +} + +void *PINT_memalign(size_t alignment, size_t size) +{ + int rc = 0; + void *mem = NULL; + + rc = PINT_posix_memalign(&mem, alignment, size); + if (rc) + { + errno = rc; + mem = NULL; + } + return mem; +} + +void *PINT_valloc(size_t size) +{ + size_t align; + align = sysconf(_SC_PAGESIZE); + if (align == -1) + { + align = sysconf(_SC_PAGE_SIZE); + if (align == -1) + { + /* can't get page size. assume 4K */ + align = 4096; + } + } + return PINT_memalign(align, size); +} + +void *PINT_realloc(void *mem, size_t size) +{ + void *ptr = NULL; + size_t newsize = 0; + extra_t *extra = NULL; + ptrint_t region_offset; + + if (mem == NULL) + { + return PINT_malloc(size); + } + + if (size == 0) + { + PINT_free(mem); + return NULL; + } + + extra = (void *)((ptrint_t)mem - EXTRA_SIZE); +#if PVFS_MALLOC_MAGIC + if (extra->magic != PVFS_MALLOC_MAGIC_NUM) + { + gossip_err("PINT_realloc: realloc fails magic number test\n"); + gossip_err("mem = %p size = %d, emem = %p, esize = %d\n", + mem, (int) size, extra->mem, (int)extra->size); + return NULL; + } +#endif + region_offset = (ptrint_t)mem - (ptrint_t)extra->mem; + newsize = region_offset + size; + if (newsize > extra->size) + { + extra->size = newsize; + /* glibc realloc will keep our extra structures in place */ + ptr = my_glibc_realloc(extra->mem, newsize); + extra = (extra_t *)(((ptrint_t)ptr + region_offset) - EXTRA_SIZE); + extra->mem = ptr; + } + + memdebug(stderr, "call to REALLOC size %d addr %p newaddr %p returned %p\n", + (int)size, mem, ptr, (void *)((ptrint_t)ptr + region_offset)); + + return (void *)((ptrint_t)ptr + region_offset); +} + +char *PINT_strdup(const char *str) +{ + int str_size = strlen(str); + char *new_str = NULL; + if (str_size < 0) + { + return NULL; + } + new_str = (char *)PINT_malloc(str_size + 1); + if (!new_str) + { + return NULL; + } + memcpy(new_str, str, str_size + 1); /* assume last byte is NULL */ + new_str[str_size] = 0; /* just to be sure */ + return new_str; +} + +char *PINT_strndup(const char *str, size_t size) +{ + int str_size = strlen(str); + char *new_str = NULL; + if (str_size > size) + { + str_size = size; + } + if (str_size < 0) + { + return NULL; + } + new_str = (char *)PINT_malloc(str_size + 1); + if (!new_str) + { + return NULL; + } + memcpy(new_str, str, str_size + 1); /* assume laste byte is NULL */ + new_str[str_size] = 0; /* just to be sure */ + return new_str; +} + +void PINT_free(void *mem) +{ + extra_t *extra; + void *orig_mem; /* so we can zero the mem before free */ + + if (!mem) + { + memdebug(stderr, "call to FREE addr %p \n", mem); + return; + } + + extra = (void *)((ptrint_t)mem - EXTRA_SIZE); + orig_mem = extra->mem; + + memdebug(stderr, "call to FREE addr %p real addr %p", mem, orig_mem); +#if PVFS_MALLOC_FREE_ZERO + memdebug(stderr, " size %d", (int)extra->size); +#endif +#if PVFS_MALLOC_CHECK_ALIGN + memdebug(stderr, " align %d", (int)extra->align); +#endif + memdebug(stderr, "\n"); + +#if PVFS_MALLOC_MAGIC + if (extra->magic != PVFS_MALLOC_MAGIC_NUM) + { + gossip_err("PINT_free: free fails magic number test\n"); + return; + } +#endif + +#if PVFS_MALLOC_FREE_ZERO + memset(orig_mem, 0, extra->size); +#endif + + my_glibc_free(orig_mem); +} + +/* initialize the redirect table for glibc malloc + * This expects you to pass a shared library handle that is already open + * for the library you want to use. + */ +void init_glibc_malloc(void) +{ + static int init_flag = 0; + static int recurse_flag = 0; + static gen_mutex_t init_mutex = + (gen_mutex_t)GEN_RECURSIVE_MUTEX_INITIALIZER_NP; + void *libc_handle; + + /* prevent multiple threads from running this */ + if (init_flag) + { + return; + } + gen_mutex_lock(&init_mutex); + if (init_flag || recurse_flag) + { + gen_mutex_unlock(&init_mutex); + return; + } + + /* running init_glibc_malloc */ + recurse_flag = 1; + memdebug(stderr, "init_glibc_malloc running\n"); + + libc_handle = dlopen("libc.so.6", RTLD_LAZY|RTLD_GLOBAL); + if (!libc_handle) + { + libc_handle = RTLD_DEFAULT; + } + /* this structure defined in common/misc/pint-malloc.h */ + glibc_malloc_ops.malloc = dlsym(libc_handle, "malloc"); + glibc_malloc_ops.calloc = dlsym(libc_handle, "calloc"); + glibc_malloc_ops.posix_memalign = dlsym(libc_handle, "posix_memalign"); + glibc_malloc_ops.memalign = dlsym(libc_handle, "memalign"); + glibc_malloc_ops.valloc = dlsym(libc_handle, "valloc"); + glibc_malloc_ops.realloc = dlsym(libc_handle, "realloc"); + glibc_malloc_ops.strdup = dlsym(libc_handle, "strdup"); + glibc_malloc_ops.strndup = dlsym(libc_handle, "strndup"); + glibc_malloc_ops.free = dlsym(libc_handle, "free"); + if (libc_handle != RTLD_DEFAULT) /* was NEXT but I think that was wrong */ + { + dlclose(libc_handle); + } + + /* Finished */ + init_flag = 1; + recurse_flag = 0; + gen_mutex_unlock(&init_mutex); +} + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=4 sts=4 sw=4 expandtab + */ diff --git a/src/common/misc/pint-malloc.h b/src/common/misc/pint-malloc.h new file mode 100644 index 0000000..f0f7c17 --- /dev/null +++ b/src/common/misc/pint-malloc.h @@ -0,0 +1,197 @@ +/* + * (C) 2013 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + * + */ + +#ifndef PINT_MALLOC_H +#define PINT_MALLOC_H + +#include +#include +#include + +#ifndef WIN32 +struct glibc_malloc_ops_s +{ + void *(*malloc)(size_t size); + void *(*calloc)(size_t nmemb, size_t size); + int (*posix_memalign)(void **mem, size_t alignment, size_t size); + void *(*memalign)(size_t alignment, size_t size); + void *(*valloc)(size_t size); + void *(*realloc)(void *mem, size_t size); + char *(*strdup)(const char *str); + char *(*strndup)(const char *str, size_t size); + void (*free)(void *mem); +}; + +extern void init_glibc_malloc(void) GCC_CONSTRUCTOR(INIT_PRIORITY_MALLOC); + +extern void *PINT_malloc(size_t size); +extern void *PINT_calloc(size_t nmemb, size_t size); +extern int PINT_posix_memalign(void **mem, size_t alignment, size_t size); +extern void *PINT_memalign(size_t alignment, size_t size); +extern void *PINT_valloc(size_t size); +extern void *PINT_realloc(void *mem, size_t size); +extern char *PINT_strdup(const char *str); +extern char *PINT_strndup(const char *str, size_t size); +extern void PINT_free(void *mem); + +#include "pint-clean-malloc.h" +#else +# define PVFS_MALLOC_REDEF 0 +# define PVFS_MALLOC_REDEF_OVERRIDE 1 +#endif + +/* Defaults if not defined in pvfs2-config.h */ + +#ifndef PVFS_MALLOC_REDEF +#define PVFS_MALLOC_REDEF 1 +#endif + +#ifndef PVFS_MALLOC_MAGIC +#define PVFS_MALLOC_MAGIC 1 +#endif + +#ifndef PVFS_MALLOC_CHECK_ALIGN +#define PVFS_MALLOC_CHECK_ALIGN 1 +#endif + +#ifndef PVFS_MALLOC_ZERO +#define PVFS_MALLOC_ZERO 1 +#endif + +#ifndef PVFS_MALLOC_FREE_ZERO +#define PVFS_MALLOC_FREE_ZERO 1 +#endif + +#define PVFS_MALLOC_MAGIC_NUM 0xFAE00000 + +#if PVFS_MALLOC_REDEF + +/* Make sure code that calls default malloc gets our version */ + +#ifdef malloc +#undef malloc +#endif +#define malloc PINT_malloc + +#ifdef calloc +#undef calloc +#endif +#define calloc PINT_calloc + +#ifdef posix_memalign +#undef posix_memalign +#endif +#define posix_memalign PINT_posix_memalign + +#ifdef memalign +#undef memalign +#endif +#define memalign PINT_memalign + +#ifdef valloc +#undef valloc +#endif +#define valloc PINT_valloc + +#ifdef realloc +#undef realloc +#endif +#define realloc PINT_realloc + +#ifdef strdup +#undef strdup +#endif +#define strdup PINT_strdup + +#ifdef strndup +#undef strndup +#endif +#define strndup PINT_strndup + +#ifdef free +#undef free +#endif +#define free PINT_free + +#ifdef cfree +#undef cfree +#endif +#define cfree PINT_free + +#else + +/* Make sure code that directly calls our malloc just gets the default */ + +#ifdef PINT_malloc +#undef PINT_malloc +#endif +#define PINT_malloc malloc + +#ifdef PINT_calloc +#undef PINT_calloc +#endif +#define PINT_calloc calloc + +#ifdef PINT_posix_memalign +#undef PINT_posix_memalign +#endif +#define PINT_posix_memalign posix_memalign + +#ifdef PINT_memalign +#undef PINT_memalign +#endif +#define PINT_memalign memalign + +#ifdef PINT_valloc +#undef PINT_valloc +#endif +#define PINT_valloc valloc + +#ifdef PINT_realloc +#undef PINT_realloc +#endif +#define PINT_realloc realloc + +#ifdef PINT_strdup +#undef PINT_strdup +#endif +#define PINT_strdup strdup + +#ifdef PINT_strndup +#undef PINT_strndup +#endif +#define PINT_strndup strndup + +#ifdef PINT_free +#undef PINT_free +#endif +#define PINT_free free + +#endif + +#if !PVFS_MALLOC_ZERO || !PVFS_MALLOC_REDEF +#define ZEROMEM(p,s) memset((p), 0, (s)) +#else +#define ZEROMEM(p,s) +#endif + +#if !PVFS_MALLOC_FREE_ZERO || !PVFS_MALLOC_REDEF +#define ZEROFREE(p,s) memset((p), 0, (s)) +#else +#define ZEROFREE(p,s) +#endif + +#endif + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=4 sts=4 sw=4 expandtab + */ diff --git a/src/common/misc/pint-mem.c b/src/common/misc/pint-mem.c index 246fdef..6d3ab85 100644 --- a/src/common/misc/pint-mem.c +++ b/src/common/misc/pint-mem.c @@ -7,6 +7,7 @@ #define _XOPEN_SOURCE 600 #include #include +#include #include #ifdef HAVE_MALLOC_H #include @@ -45,7 +46,11 @@ inline void* PINT_mem_aligned_alloc(size_t size, size_t alignment) ret = ENOMEM; } #else + /* bash uses its own malloc implementation without */ + /* posix_memalign - for the moment want to support bash */ ret = posix_memalign(&ptr, alignment, size); + /* ptr = memalign(alignment, size); */ + /* ptr = malloc(size); */ #endif if(ret != 0) { diff --git a/src/common/misc/pint-perf-counter.c b/src/common/misc/pint-perf-counter.c index 2cc4145..f9b2a85 100644 --- a/src/common/misc/pint-perf-counter.c +++ b/src/common/misc/pint-perf-counter.c @@ -19,9 +19,9 @@ #include #include +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-util.h" -#include "pvfs2-internal.h" #include "pint-perf-counter.h" #include "pint-util.h" #include "gossip.h" diff --git a/src/common/misc/pint-perf-counter.h b/src/common/misc/pint-perf-counter.h index 0a101ea..bf88917 100644 --- a/src/common/misc/pint-perf-counter.h +++ b/src/common/misc/pint-perf-counter.h @@ -7,6 +7,7 @@ #ifndef __PINT_PERF_COUNTER_H #define __PINT_PERF_COUNTER_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-mgmt.h" #include "gen-locks.h" diff --git a/src/common/misc/pint-uid-mgmt.c b/src/common/misc/pint-uid-mgmt.c index e1bb717..06909c5 100644 --- a/src/common/misc/pint-uid-mgmt.c +++ b/src/common/misc/pint-uid-mgmt.c @@ -1,3 +1,12 @@ + +/* + * (C) 2013 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + * + */ + +#include "pvfs2-internal.h" #include "pint-uid-mgmt.h" #include "pint-util.h" #include "gen-locks.h" @@ -196,3 +205,12 @@ void PINT_dump_all_uid_stats(PVFS_uid_info_s *uid_array) return; } + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=4 sts=4 sw=4 expandtab + */ diff --git a/src/common/misc/pint-uid-mgmt.h b/src/common/misc/pint-uid-mgmt.h index 9f95aa4..13367cf 100644 --- a/src/common/misc/pint-uid-mgmt.h +++ b/src/common/misc/pint-uid-mgmt.h @@ -1,6 +1,7 @@ #ifndef __PINT_UID_MGMT_H #define __PINT_UID_MGMT_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "quickhash.h" #include "pvfs2-types.h" diff --git a/src/common/misc/pint-util.c b/src/common/misc/pint-util.c index 8e37c78..1c4d26b 100644 --- a/src/common/misc/pint-util.c +++ b/src/common/misc/pint-util.c @@ -30,6 +30,7 @@ typedef unsigned int uid_t, gid_t; #include #endif +#include "pvfs2-internal.h" #define __PINT_REQPROTO_ENCODE_FUNCS_C #include "gen-locks.h" #include "pint-util.h" diff --git a/src/common/misc/pint-util.h b/src/common/misc/pint-util.h index 3fae703..85f9639 100644 --- a/src/common/misc/pint-util.h +++ b/src/common/misc/pint-util.h @@ -9,7 +9,7 @@ #ifndef __PINT_UTIL_H #define __PINT_UTIL_H -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-attr.h" diff --git a/src/common/misc/pvfs2-debug.c b/src/common/misc/pvfs2-debug.c index 6c3d507..ceb426d 100644 --- a/src/common/misc/pvfs2-debug.c +++ b/src/common/misc/pvfs2-debug.c @@ -9,6 +9,7 @@ #include #include +#include "pvfs2-internal.h" #include "pvfs2-debug.h" static uint64_t debug_to_mask(__keyword_mask_t *mask_map, diff --git a/src/common/misc/pvfs2-hint.c b/src/common/misc/pvfs2-hint.c index 9eb5f95..300fdc4 100644 --- a/src/common/misc/pvfs2-hint.c +++ b/src/common/misc/pvfs2-hint.c @@ -1,3 +1,10 @@ + +/* + * (C) 2001 Clemson University and The University of Chicago + * + * See COPYING in top-level directory. + */ + #include #define __PINT_REQPROTO_ENCODE_FUNCS_C @@ -6,6 +13,7 @@ #include #include +#include "pvfs2-internal.h" #include "pvfs2-hint.h" #include "gossip.h" diff --git a/src/common/misc/pvfs2-internal.h b/src/common/misc/pvfs2-internal.h index 13422ca..5a6ad46 100644 --- a/src/common/misc/pvfs2-internal.h +++ b/src/common/misc/pvfs2-internal.h @@ -7,8 +7,74 @@ #ifndef PVFS2_INTERNAL_H #define PVFS2_INTERNAL_H +#ifndef __KERNEL__ #include "pvfs2-config.h" +/* in special cases like the statecomp we want to override the config + * and force the malloc redirect off + */ + +#ifdef PVFS_MALLOC_REDEF_OVERRIDE +# ifdef PVFS_MALLOC_REDEF +# undef PVFS_MALLOC_REDEF +# endif +# define PVFS_MALLOC_REDEF 0 +#endif + +/* some compiler portability macros - used by gcc maybe not others */ +#if __GNUC__ +# if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 +# define GCC_CONSTRUCTOR(priority) __attribute__((constructor(priority))) +# define GCC_DESTRUCTOR(priority) __attribute__((destructor(priority))) +# define GCC_UNUSED __attribute__((unused)) +# define PVFS_INIT(f) +# else +# define GCC_CONSTRUCTOR(priority) __attribute__((constructor)) +# define GCC_DESTRUCTOR(priority) __attribute__((destructor)) +# define GCC_UNUSED __attribute__((unused)) +# define PVFS_INIT(f) +# endif +#else +# define GCC_CONSTRUCTOR(priority) +# define GCC_DESTRUCTOR(priority) +# define GCC_UNUSED __attribute__((unused)) +# define PVFS_INIT(f) f() +#endif + +/* Init priorities define the order of initialization - defined here so + * it is in one place - each init module should have one of these + * Init runs from low to high + */ +#define INIT_PRIORITY_MALLOC 1001 +#define INIT_PRIORITY_STDIO 1002 +#define INIT_PRIORITY_PVFSLIB 1003 + +/* Cleanup runs from high to low + * run cleanup stdio before pvfslib + */ +#define CLEANUP_PRIORITY_STDIO 1003 +#define CLEANUP_PRIORITY_PVFSLIB 1002 + +/* Temporarily turn PVFS_INIT on + * This macro is placed in various entry point routines in the library + * to ensure that the library is initialized before it is used. In + * theory we init the libs via GCC_CONSTRUCTOR above which runs the init + * before mains, BUT other libs may end up calling out lib during their + * own init routines and foil the plan. Until we find a way to + * guarantee our init is done first, we have to have these calls + * inserted in the code. The calls DO first make a quick check to see + * if the lib is initialized so they are not TOO slow (although probably + * should be inlined). + */ +#if 1 +#undef PVFS_INIT +#define PVFS_INIT(f) f() +#endif + +/* This should be included everywhere in the code */ +#include "pint-malloc.h" +#endif /* __KERNEL__ */ + /* Printf wrappers for 32- and 64-bit compatibility. Imagine trying * to print out a PVFS_handle, which is typedefed to a uint64_t. On * a 32-bit machine, you use format "%llu", while a 64-bit machine wants @@ -50,10 +116,12 @@ # define llu(x) (x) # define lld(x) (x) # define SCANF_lld "%lld" +# define SCANF_lld_type long #elif SIZEOF_LONG_INT == 8 # define llu(x) (unsigned long long)(x) # define lld(x) (long long)(x) # define SCANF_lld "%ld" +# define SCANF_lld_type long #else # error Unexpected sizeof(long int) #endif diff --git a/src/common/misc/pvfs2-util.c b/src/common/misc/pvfs2-util.c index 5f9817a..946ba78 100644 --- a/src/common/misc/pvfs2-util.c +++ b/src/common/misc/pvfs2-util.c @@ -21,7 +21,7 @@ #include #endif -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #include "pvfs2-sysint.h" #include "pvfs2-util.h" #include "pvfs2-debug.h" @@ -32,8 +32,8 @@ #include "gen-locks.h" #include "realpath.h" #include "pint-sysint-utils.h" -#include "pvfs2-internal.h" #include "pint-util.h" +#include "pvfs-path.h" #ifdef HAVE_MNTENT_H @@ -68,6 +68,7 @@ #define PINT_FSTAB_OPTS(_entry) (_entry)->fs_mntops #define DEFINE_MY_GET_NEXT_FSENT +#define PVFS_MY_GET_NEXT_FSENT_MAX_LINESIZE 2048 static struct fstab * PINT_util_my_get_next_fsent(PINT_fstab_t * tab); static void PINT_util_fsent_destroy(PINT_fstab_entry_t * entry); @@ -87,19 +88,20 @@ static PVFS_util_tab s_stat_tab_array[PVFS2_MAX_TABFILES]; static int s_stat_tab_count = 0; static gen_mutex_t s_stat_tab_mutex = GEN_MUTEX_INITIALIZER; -static int parse_flowproto_string( - const char *input, - enum PVFS_flowproto_type *flowproto); +static int parse_flowproto_string(const char *input, + enum PVFS_flowproto_type *flowproto); -static int parse_encoding_string( - const char *cp, - enum PVFS_encoding_type *et); +static int parse_encoding_string(const char *cp, + enum PVFS_encoding_type *et); static int parse_num_dfiles_string(const char* cp, int* num_dfiles); -struct PVFS_sys_mntent* PVFS_util_gen_mntent( - char* config_server, - char* fs_name) + +/** + * PVFS_util_gen_mntent + */ +struct PVFS_sys_mntent* PVFS_util_gen_mntent(char* config_server, + char* fs_name) { struct PVFS_sys_mntent* tmp_ent = NULL; @@ -447,17 +449,25 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( me->integrity_check = 1; /* comma-separated list of ways to contact a config server */ me->num_pvfs_config_servers = 1; - for (cp=PINT_FSTAB_NAME(tmp_ent); *cp; cp++) + for (cp = PINT_FSTAB_NAME(tmp_ent); *cp; cp++) + { if (*cp == ',') + { ++me->num_pvfs_config_servers; + } + } /* allocate room for our copies of the strings */ me->pvfs_config_servers = malloc(me->num_pvfs_config_servers - * sizeof(*me->pvfs_config_servers)); + * sizeof(*me->pvfs_config_servers)); if (!me->pvfs_config_servers) + { goto error_exit; - memset(me->pvfs_config_servers, 0, - me->num_pvfs_config_servers * sizeof(*me->pvfs_config_servers)); + } + memset(me->pvfs_config_servers, + 0, + me->num_pvfs_config_servers * + sizeof(*me->pvfs_config_servers)); me->mnt_dir = malloc(strlen(PINT_FSTAB_PATH(tmp_ent)) + 1); me->mnt_opts = malloc(strlen(PINT_FSTAB_OPTS(tmp_ent)) + 1); @@ -470,14 +480,18 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( /* parse server list and make sure fsname is same */ cp = PINT_FSTAB_NAME(tmp_ent); cur_server = 0; - for (;;) { + for (;;) + { char *tok; int slashcount; char *slash; char *last_slash; tok = strsep(&cp, ","); - if (!tok) break; + if (!tok) + { + break; + } slash = tok; slashcount = 0; @@ -514,24 +528,38 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( } /* find a reference point in the string */ + /* find the last slash in the string */ + /* should be between server name and fs_name */ last_slash = rindex(tok, '/'); - *last_slash = '\0'; /* config server and fs name are a special case, take one * string and split it in half on "/" delimiter */ + *last_slash = '\0'; me->pvfs_config_servers[cur_server] = strdup(tok); if (!me->pvfs_config_servers[cur_server]) + { goto error_exit; + } ++last_slash; - if (cur_server == 0) { + /* first time through the loop save the fs_name in me + * From then on make sure the fs_name in the entry is + * the same as the first one + */ + if (cur_server == 0) + { me->pvfs_fs_name = strdup(last_slash); if (!me->pvfs_fs_name) + { goto error_exit; - } else { - if (strcmp(last_slash, me->pvfs_fs_name) != 0) { + } + } + else + { + if (strcmp(last_slash, me->pvfs_fs_name) != 0) + { gossip_lerr( "Error: different fs names in server addresses: %s\n", PINT_FSTAB_NAME(tmp_ent)); @@ -551,10 +579,9 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( /* find out if a particular flow protocol was specified */ if ((PINT_fstab_entry_hasopt(tmp_ent, "flowproto"))) { - ret = parse_flowproto_string( - PINT_FSTAB_OPTS(tmp_ent), - &(current_tab-> - mntent_array[i].flowproto)); + ret = parse_flowproto_string(PINT_FSTAB_OPTS(tmp_ent), + &(current_tab-> + mntent_array[i].flowproto)); if (ret < 0) { goto error_exit; @@ -567,20 +594,20 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( } /* pick an encoding to use with the server */ - current_tab->mntent_array[i].encoding = - PVFS2_ENCODING_DEFAULT; + current_tab->mntent_array[i].encoding = PVFS2_ENCODING_DEFAULT; cp = PINT_fstab_entry_hasopt(tmp_ent, "encoding"); if (cp) { ret = parse_encoding_string( - cp, ¤t_tab->mntent_array[i].encoding); + cp, + ¤t_tab->mntent_array[i].encoding); if (ret < 0) { goto error_exit; } } - /* find out if a particular flow protocol was specified */ + /* find out if a particular num dfiles was specified */ current_tab->mntent_array[i].default_num_dfiles = 0; cp = PINT_fstab_entry_hasopt(tmp_ent, "num_dfiles"); if (cp) @@ -595,19 +622,19 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( } } - /* Loop counter increment */ + /* increment number of pvfs records found */ i++; PINT_fstab_entry_destroy(tmp_ent); } } s_stat_tab_count++; - strcpy(s_stat_tab_array[s_stat_tab_count-1].tabfile_name, targetfile); + strcpy(s_stat_tab_array[s_stat_tab_count - 1].tabfile_name, targetfile); PINT_fstab_close(mnt_fp); gen_mutex_unlock(&s_stat_tab_mutex); return (&s_stat_tab_array[s_stat_tab_count - 1]); - error_exit: +error_exit: for (; i > -1; i--) { struct PVFS_sys_mntent *me = ¤t_tab->mntent_array[i]; @@ -615,9 +642,13 @@ const PVFS_util_tab *PVFS_util_parse_pvfstab( if (me->pvfs_config_servers) { int j; - for (j=0; jnum_pvfs_config_servers; j++) + for (j = 0; jnum_pvfs_config_servers; j++) + { if (me->pvfs_config_servers[j]) + { free(me->pvfs_config_servers[j]); + } + } free(me->pvfs_config_servers); me->pvfs_config_servers = NULL; me->num_pvfs_config_servers = 0; @@ -771,6 +802,7 @@ int PVFS_util_add_dynamic_mntent(struct PVFS_sys_mntent *mntent) sizeof(struct PVFS_sys_mntent)); if (!s_stat_tab_array[PVFS2_DYNAMIC_TAB_INDEX].mntent_array) { + gen_mutex_unlock(&s_stat_tab_mutex); return -PVFS_ENOMEM; } strncpy(s_stat_tab_array[PVFS2_DYNAMIC_TAB_INDEX].tabfile_name, @@ -783,6 +815,7 @@ int PVFS_util_add_dynamic_mntent(struct PVFS_sys_mntent *mntent) ((new_index + 1) * sizeof(struct PVFS_sys_mntent))); if (!tmp_mnt_array) { + gen_mutex_unlock(&s_stat_tab_mutex); return -PVFS_ENOMEM; } @@ -877,6 +910,7 @@ int PVFS_util_remove_internal_mntent( mntent_found: if (!found) { + gen_mutex_unlock(&s_stat_tab_mutex); return -PVFS_EINVAL; } @@ -898,6 +932,7 @@ int PVFS_util_remove_internal_mntent( (new_count * sizeof(struct PVFS_sys_mntent))); if (!tmp_mnt_array) { + gen_mutex_unlock(&s_stat_tab_mutex); return -PVFS_ENOMEM; } @@ -910,7 +945,7 @@ int PVFS_util_remove_internal_mntent( i < s_stat_tab_array[found_index].mntent_count; i++) { current_mnt = &s_stat_tab_array[found_index].mntent_array[i]; - + if ((current_mnt->fs_id == mntent->fs_id) && (strcmp(current_mnt->mnt_dir, mntent->mnt_dir) == 0)) { @@ -984,6 +1019,11 @@ int PVFS_util_get_mntent_copy(PVFS_fs_id fs_id, } /* PVFS_util_resolve() + * + * This function is quasi-obsolete. It should still work and for now + * it is called by the pvfs2-xxx utils. Most everything else calls + * PVFS_util_resolve_absolute directly and uses the new PVFS_path + * structure to keep up with paths and their modifications/expansions * * given a local path of a file that resides on a pvfs2 volume, * determine what the fsid and fs relative path is. @@ -1000,6 +1040,8 @@ int PVFS_util_resolve( char* tmp_path = NULL; char* parent_path = NULL; int base_len = 0; + PVFS_path_t *Ppath; + int ppath_local = 0; if(strlen(local_path) > (PVFS_NAME_MAX-1)) { @@ -1007,14 +1049,36 @@ int PVFS_util_resolve( return(-PVFS_ENAMETOOLONG); } + Ppath = PVFS_path_from_expanded((char *)local_path); + if (!VALID_PATH_MAGIC(Ppath)) + { + /* this allocates a PVFS_path that must be freed before return */ + Ppath = PVFS_new_path(local_path); + local_path = Ppath->expanded_path; + ppath_local = 1; /* this Ppath created locally */ + } + + if (!(PATH_QUALIFIED(Ppath) || PATH_EXPANDED(Ppath))) + { + /* this saves a copy of the original path and returns */ + /* a pointer to the modified path */ + /* this will not allocated PVFS_path) */ + local_path = PVFS_qualify_path(local_path); + } + /* the most common case first; just try to resolve the path that we * were given */ - ret = PVFS_util_resolve_absolute(local_path, out_fs_id, out_fs_path, - out_fs_path_max); + ret = PVFS_util_resolve_absolute(local_path); if(ret == 0) { /* done */ + strncpy(out_fs_path, Ppath->pvfs_path, out_fs_path_max); + *out_fs_id = Ppath->fs_id; + if (ppath_local) + { + PVFS_free_path(Ppath); + } return(0); } if(ret == -PVFS_ENOENT) @@ -1068,8 +1132,17 @@ int PVFS_util_resolve( return(-PVFS_ENOENT); } - ret = PVFS_util_resolve_absolute(tmp_path, out_fs_id, out_fs_path, - out_fs_path_max); + ret = PVFS_util_resolve_absolute(tmp_path); + if (!ret) + { + /* done */ + strncpy(out_fs_path, Ppath->pvfs_path, out_fs_path_max); + *out_fs_id = Ppath->fs_id; + if (ppath_local) + { + PVFS_free_path(Ppath); + } + } free(tmp_path); /* fall through and preserve "ret" to be returned */ @@ -1091,6 +1164,9 @@ int PVFS_util_init_defaults(void) int ret = -1, i = 0, j = 0, found_one = 0; int failed_indices[PVFS2_MAX_INVALID_MNTENTS] = {0}; + /* first set up our malloc */ + init_glibc_malloc(); + /* use standard system tab files */ const PVFS_util_tab* tab = PVFS_util_parse_pvfstab(NULL); if (!tab) @@ -1118,6 +1194,12 @@ int PVFS_util_init_defaults(void) } else { + if (ret == -PVFS_EEXIST) + { + /* this mount already exists so count it as found */ + found_one = 1; + continue; + } failed_indices[j++] = i; if (j > (PVFS2_MAX_INVALID_MNTENTS - 1)) @@ -1141,7 +1223,7 @@ int PVFS_util_init_defaults(void) if (failed_indices[i]) { PVFS_util_remove_internal_mntent( - &tab->mntent_array[failed_indices[i]]); + &tab->mntent_array[failed_indices[i]]); } else { @@ -1769,31 +1851,46 @@ static int parse_num_dfiles_string(const char* cp, int* num_dfiles) * determine what the fsid and fs relative path is. Makes no attempt * to canonicalize the path. * + * result is returned through the PVFS_path type now + * * returns 0 on succees, -PVFS_error on failure */ -int PVFS_util_resolve_absolute( - const char* local_path, - PVFS_fs_id* out_fs_id, - char* out_fs_path, - int out_fs_path_max) +int PVFS_util_resolve_absolute(const char* local_path) { int i = 0, j = 0; int ret = -PVFS_EINVAL; + PVFS_path_t *Ppath; gen_mutex_lock(&s_stat_tab_mutex); + Ppath = PVFS_path_from_expanded((char *)local_path); + if (!VALID_PATH_MAGIC(Ppath)) + { + gen_mutex_unlock(&s_stat_tab_mutex); + return ret; + } + + if (!(PATH_QUALIFIED(Ppath) || PATH_EXPANDED(Ppath))) + { + gossip_err("Error: PVFS_util_resolve_absolute only" + " works on qualified or expanded paths\n"); + gen_mutex_unlock(&s_stat_tab_mutex); + return ret; + } + + CLEAR_RESOLVED(Ppath); + for(i=0; i < s_stat_tab_count; i++) { for(j=0; jfs_id = s_stat_tab_array[i].mntent_array[j].fs_id; + if(Ppath->fs_id == PVFS_FS_ID_NULL) { gossip_err("Error: %s resides on a PVFS2 file system " "that has not yet been initialized.\n", local_path); @@ -1801,6 +1898,7 @@ int PVFS_util_resolve_absolute( gen_mutex_unlock(&s_stat_tab_mutex); return(-PVFS_ENXIO); } + SET_RESOLVED(Ppath); gen_mutex_unlock(&s_stat_tab_mutex); return(0); } @@ -1812,14 +1910,13 @@ int PVFS_util_resolve_absolute( PVFS2_DYNAMIC_TAB_INDEX].mntent_count; j++) { ret = PINT_remove_dir_prefix( - local_path, s_stat_tab_array[ - PVFS2_DYNAMIC_TAB_INDEX].mntent_array[j].mnt_dir, - out_fs_path, out_fs_path_max); + local_path, s_stat_tab_array[ + PVFS2_DYNAMIC_TAB_INDEX].mntent_array[j].mnt_dir); if (ret == 0) { - *out_fs_id = s_stat_tab_array[ - PVFS2_DYNAMIC_TAB_INDEX].mntent_array[j].fs_id; - if(*out_fs_id == PVFS_FS_ID_NULL) + Ppath->fs_id = s_stat_tab_array[ + PVFS2_DYNAMIC_TAB_INDEX].mntent_array[j].fs_id; + if(Ppath->fs_id == PVFS_FS_ID_NULL) { gossip_err("Error: %s resides on a PVFS2 file system " "that has not yet been initialized.\n", @@ -1828,6 +1925,7 @@ int PVFS_util_resolve_absolute( gen_mutex_unlock(&s_stat_tab_mutex); return(-PVFS_ENXIO); } + SET_RESOLVED(Ppath); gen_mutex_unlock(&s_stat_tab_mutex); return(0); } @@ -1841,12 +1939,12 @@ int PVFS_util_resolve_absolute( static struct fstab * PINT_util_my_get_next_fsent(PINT_fstab_t * tab) { - char linestr[500]; + char linestr[PVFS_MY_GET_NEXT_FSENT_MAX_LINESIZE]; int linelen = 0; char * strtok_ctx; char * nexttok; PINT_fstab_entry_t * fsentry; - if(!fgets(linestr, 500, tab)) + if(!fgets(linestr, PVFS_MY_GET_NEXT_FSENT_MAX_LINESIZE, tab)) { return NULL; } diff --git a/src/common/misc/pvfs2-win-util.c b/src/common/misc/pvfs2-win-util.c index fb293ad..2e47dcb 100644 --- a/src/common/misc/pvfs2-win-util.c +++ b/src/common/misc/pvfs2-win-util.c @@ -19,7 +19,7 @@ #include #include -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #include "pvfs2-sysint.h" #include "pvfs2-util.h" #include "pvfs2-debug.h" @@ -30,7 +30,6 @@ #include "gen-locks.h" #include "realpath.h" #include "pint-sysint-utils.h" -#include "pvfs2-internal.h" #include "pint-util.h" #ifdef HAVE_MNTENT_H diff --git a/src/common/misc/realpath.c b/src/common/misc/realpath.c index 389ea7f..763e72f 100644 --- a/src/common/misc/realpath.c +++ b/src/common/misc/realpath.c @@ -37,8 +37,10 @@ #include #include #include + +#include "pvfs2-internal.h" #include "realpath.h" -#include +#include "pvfs2-types.h" #include "pvfs2-util.h" #define MAX_READLINKS 32 @@ -84,7 +86,6 @@ int PINT_realpath( char *resolved_path, int maxreslth) { - PVFS_fs_id fs_id; int readlinks = 0; char *npath; char link_path[PATH_MAX + 1]; @@ -158,8 +159,7 @@ int PINT_realpath( #ifndef BUILD_USRINT /* see if this part of the path has a PVFS mount point */ - ret = PVFS_util_resolve_absolute(resolved_path, &fs_id, - link_path, PATH_MAX); + ret = PVFS_util_resolve_absolute(resolved_path); /* we don't care about the output of resolve */ /* link_path was just a placeholder */ memset(link_path, 0, PATH_MAX); diff --git a/src/common/misc/server-config-mgr.c b/src/common/misc/server-config-mgr.c index 42fe030..c31f7ce 100644 --- a/src/common/misc/server-config-mgr.c +++ b/src/common/misc/server-config-mgr.c @@ -16,6 +16,7 @@ #include #include +#include "pvfs2-internal.h" #include "pvfs2.h" #include "server-config-mgr.h" #include "quickhash.h" @@ -72,8 +73,7 @@ int PINT_server_config_mgr_initialize(void) if (s_fsid_to_config_table == NULL) { - s_fsid_to_config_table = - qhash_init(hash_fsid_compare, hash_fsid, 17); + s_fsid_to_config_table = qhash_init(hash_fsid_compare, hash_fsid, 17); if (s_fsid_to_config_table) { s_min_handle_recycle_timeout_in_sec = -1; @@ -103,11 +103,11 @@ int PINT_server_config_mgr_finalize(void) do { hash_link = qhash_search_and_remove_at_index( - s_fsid_to_config_table, i); + s_fsid_to_config_table, + i); if (hash_link) { - config = qlist_entry( - hash_link, server_config_t, hash_link); + config = qlist_entry(hash_link, server_config_t, hash_link); assert(config); assert(config->server_config); @@ -161,8 +161,7 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) { qhash_for_each(hash_link, &s_fsid_to_config_table->array[i]) { - config = qlist_entry( - hash_link, server_config_t, hash_link); + config = qlist_entry(hash_link, server_config_t, hash_link); assert(config); assert(config->server_config); @@ -174,6 +173,7 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) cur_fs = PINT_llist_head(cur); assert(cur_fs); + /* should this be error handling instead? */ assert(cur_fs->handle_recycle_timeout_sec.tv_sec > -1); /* find the minimum handle recycle timeout here */ @@ -182,7 +182,7 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) (s_min_handle_recycle_timeout_in_sec == -1)) { s_min_handle_recycle_timeout_in_sec = - cur_fs->handle_recycle_timeout_sec.tv_sec; + cur_fs->handle_recycle_timeout_sec.tv_sec; gossip_debug(GOSSIP_CLIENT_DEBUG, "Set min handle " "recycle time to %d seconds\n", @@ -193,9 +193,9 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) "Reloading handle mappings for fs_id %d\n", cur_fs->coll_id); - ret = - PINT_cached_config_handle_load_mapping(cur_fs, - config->server_config); + ret = PINT_cached_config_handle_load_mapping( + cur_fs, + config->server_config); if (ret) { PVFS_perror( @@ -211,10 +211,9 @@ int PINT_server_config_mgr_reload_cached_config_interface(void) return ret; } -int PINT_server_config_mgr_add_config( - struct server_configuration_s *config_s, - PVFS_fs_id fs_id, - int* free_config_flag) +int PINT_server_config_mgr_add_config(struct server_configuration_s *config_s, + PVFS_fs_id fs_id, + int* free_config_flag) { int ret = -PVFS_EINVAL; server_config_t *config = NULL; @@ -260,8 +259,7 @@ int PINT_server_config_mgr_add_config( config->fs_id = fs_id; config->ref_count = 1; - qhash_add(s_fsid_to_config_table, &fs_id, - &config->hash_link); + qhash_add(s_fsid_to_config_table, &fs_id, &config->hash_link); gossip_debug(GOSSIP_CLIENT_DEBUG, "\tmapped fs_id %d => " "config %p\n", fs_id, config_s); @@ -272,7 +270,7 @@ int PINT_server_config_mgr_add_config( } return ret; - add_failure: +add_failure: gossip_debug(GOSSIP_CLIENT_DEBUG, "PINT_server_config_mgr_add_" "config: add_failure reached\n"); @@ -285,8 +283,7 @@ int PINT_server_config_mgr_add_config( return ret; } -int PINT_server_config_mgr_remove_config( - PVFS_fs_id fs_id) +int PINT_server_config_mgr_remove_config(PVFS_fs_id fs_id) { int ret = -PVFS_EINVAL; server_config_t *config = NULL; @@ -300,8 +297,7 @@ int PINT_server_config_mgr_remove_config( gen_mutex_lock(&s_server_config_mgr_mutex); SC_MGR_ASSERT_OK(ret); - hash_link = qhash_search( - s_fsid_to_config_table, &fs_id); + hash_link = qhash_search(s_fsid_to_config_table, &fs_id); if (hash_link) { config = qlist_entry(hash_link, server_config_t, hash_link); @@ -343,7 +339,7 @@ int PINT_server_config_mgr_remove_config( } struct server_configuration_s *__PINT_server_config_mgr_get_config( - PVFS_fs_id fs_id) + PVFS_fs_id fs_id) { struct server_configuration_s *ret = NULL; server_config_t *config = NULL; @@ -379,7 +375,7 @@ struct server_configuration_s *__PINT_server_config_mgr_get_config( } void __PINT_server_config_mgr_put_config( - struct server_configuration_s *config_s) + struct server_configuration_s *config_s) { PINT_llist *cur = NULL; struct filesystem_configuration_s *cur_fs = NULL; @@ -396,8 +392,7 @@ void __PINT_server_config_mgr_put_config( cur_fs = PINT_llist_head(cur); assert(cur_fs); - hash_link = qhash_search( - s_fsid_to_config_table, &cur_fs->coll_id); + hash_link = qhash_search(s_fsid_to_config_table, &cur_fs->coll_id); if (hash_link) { config = qlist_entry(hash_link, server_config_t, hash_link); diff --git a/src/common/misc/server-config-mgr.h b/src/common/misc/server-config-mgr.h index a36b1d4..1fae49d 100644 --- a/src/common/misc/server-config-mgr.h +++ b/src/common/misc/server-config-mgr.h @@ -7,6 +7,7 @@ #ifndef __SERVER_CONFIG_MGR_H #define __SERVER_CONFIG_MGR_H +#include "pvfs2-internal.h" #include "server-config.h" int PINT_server_config_mgr_initialize(void); diff --git a/src/common/misc/server-config.c b/src/common/misc/server-config.c index 65899aa..5d9fc8d 100644 --- a/src/common/misc/server-config.c +++ b/src/common/misc/server-config.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ + #include #include #include @@ -15,10 +16,13 @@ #include #include #include +#include #ifdef WIN32 #include #endif +#include "pvfs2-internal.h" + #include "src/common/dotconf/dotconf.h" #include "server-config.h" #include "pvfs2.h" @@ -28,9 +32,7 @@ #include "extent-utils.h" #include "mkspace.h" #include "pint-distribution.h" -#include "pvfs2-config.h" #include "pvfs2-server.h" -#include "pvfs2-internal.h" #ifdef WITH_OPENSSL #include "openssl/evp.h" @@ -126,8 +128,6 @@ static DOTCONF_CB(get_osd_dir_type); static DOTCONF_CB(get_create_type); static DOTCONF_CB(get_member_attr_type); static DOTCONF_CB(get_coll_object_type); -static DOTCONF_CB(get_eco_type); -static DOTCONF_CB(get_eco_num); static DOTCONF_CB(get_small_file_size); static DOTCONF_CB(directio_thread_num); static DOTCONF_CB(directio_ops_per_queue); @@ -145,38 +145,38 @@ static void free_host_handle_mapping(void *ptr); static void free_host_alias(void *ptr); static void free_filesystem(void *ptr); static void copy_filesystem( - struct filesystem_configuration_s *dest_fs, - struct filesystem_configuration_s *src_fs); + struct filesystem_configuration_s *dest_fs, + struct filesystem_configuration_s *src_fs); static int cache_config_files( - struct server_configuration_s *config_s, - char *global_config_filename); + struct server_configuration_s *config_s, + char *global_config_filename); static int is_populated_filesystem_configuration( - struct filesystem_configuration_s *fs); -static int is_root_handle_in_a_meta_range( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs); + struct filesystem_configuration_s *fs); +static int root_handle_in_meta_range( + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs); static int is_valid_filesystem_configuration( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs); + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs); static char *get_handle_range_str( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs, - int meta_handle_range); + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs, + int meta_handle_range); static host_alias_s *find_host_alias_ptr_by_alias( - struct server_configuration_s *config_s, - char *alias, - int *index); + struct server_configuration_s *config_s, + char *alias, + int *index); static struct host_handle_mapping_s *get_or_add_handle_mapping( - PINT_llist *list, - char *alias); + PINT_llist *list, + char *alias); static int build_extent_array( - char *handle_range_str, - PVFS_handle_extent_array *handle_extent_array); + char *handle_range_str, + PVFS_handle_extent_array *handle_extent_array); #ifdef __PVFS2_TROVE_SUPPORT__ static int is_root_handle_in_my_range( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs); + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs); #endif /* PVFS2 servers are deployed using configuration files that provide information @@ -1030,16 +1030,6 @@ static const configoption_t options[] = * Specifies if collection object should be used as a dir object or not */ { "CollectionObject", ARG_STR, get_coll_object_type, NULL, CTX_DEFAULTS, "no" }, - - /* - * Specifies if energy saving mode is enabled or not - */ - { "EnergySaving", ARG_STR, get_eco_type, NULL, CTX_DEFAULTS, "no" }, - - /* - * Specifies how many nodes are going to be used in energy saving mode - */ - { "NumECOnodes", ARG_INT, get_eco_num, NULL, CTX_DEFAULTS, 0 }, /* Specifies the size of the small file transition point */ {"SmallFileSize", ARG_INT, get_small_file_size, NULL, CTX_FILESYSTEM, NULL}, @@ -1084,11 +1074,10 @@ static const configoption_t options[] = * Returns: 0 on success; 1 on failure * */ -int PINT_parse_config( - struct server_configuration_s *config_obj, - char *global_config_filename, - char *server_alias_name, - int server_flag) +int PINT_parse_config(struct server_configuration_s *config_obj, + char *global_config_filename, + char *server_alias_name, + int server_flag) { struct server_configuration_s *config_s; configfile_t *configfile = (configfile_t *)0; @@ -1109,6 +1098,7 @@ int PINT_parse_config( return 1; } config_s->server_alias = server_alias_name; + /* set some global defaults for optional parameters */ config_s->logstamp_type = GOSSIP_LOGSTAMP_DEFAULT; config_s->server_job_bmi_timeout = PVFS2_SERVER_JOB_BMI_TIMEOUT_DEFAULT; @@ -1128,7 +1118,8 @@ int PINT_parse_config( /* read in the fs.conf defaults config file */ config_s->configuration_context = CTX_GLOBAL; configfile = PINT_dotconf_create(config_s->fs_config_filename, - options, (void *)config_s, + options, + (void *)config_s, CASE_INSENSITIVE); if (!configfile) { @@ -1139,7 +1130,7 @@ int PINT_parse_config( config_s->private_data = configfile; configfile->errorhandler = (dotconf_errorhandler_t)errorhandler; configfile->contextchecker = (dotconf_contextchecker_t)contextchecker; - + if(PINT_dotconf_command_loop(configfile) == 0) { /* NOTE: dotconf error handler will log message */ @@ -1150,14 +1141,16 @@ int PINT_parse_config( if (server_alias_name) { struct host_alias_s *halias; - halias = find_host_alias_ptr_by_alias( - config_s, server_alias_name, &config_s->host_index); + halias = find_host_alias_ptr_by_alias(config_s, + server_alias_name, + &config_s->host_index); if (!halias || !halias->bmi_address) { if (server_flag) { gossip_err("Configuration file error. " - "No host ID specified for alias %s.\n", server_alias_name); + "No host ID specified for alias %s.\n", + server_alias_name); return 1; } } @@ -1171,14 +1164,16 @@ int PINT_parse_config( if (server_flag && !config_s->data_path) { gossip_err("Configuration file error. " - "No data storage path specified for alias %s.\n", server_alias_name); + "No data storage path specified for alias %s.\n", + server_alias_name); return 1; } if (server_flag && !config_s->meta_path) { gossip_err("Configuration file error. " - "No metadata storage path specified for alias %s.\n", server_alias_name); + "No metadata storage path specified for alias %s.\n", + server_alias_name); return 1; } @@ -1223,14 +1218,14 @@ const char *contextchecker(command_t *cmd, unsigned long mask) FUNC_ERRORHANDLER(errorhandler) { gossip_err("Error: %s line %ld: %s", configfile->filename, - configfile->line, msg); + configfile->line, msg); return(1); } DOTCONF_CB(get_logstamp) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) @@ -1265,7 +1260,7 @@ DOTCONF_CB(get_logstamp) DOTCONF_CB(get_storage_path) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1282,17 +1277,16 @@ DOTCONF_CB(get_storage_path) free(config_s->meta_path); } - config_s->data_path = - (cmd->data.str ? strdup(cmd->data.str) : NULL); - config_s->meta_path = - (cmd->data.str ? strdup(cmd->data.str) : NULL); + config_s->data_path = (cmd->data.str ? strdup(cmd->data.str) : NULL); + config_s->meta_path = (cmd->data.str ? strdup(cmd->data.str) : NULL); return NULL; } DOTCONF_CB(get_data_path) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; + if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1303,15 +1297,16 @@ DOTCONF_CB(get_data_path) free(config_s->data_path); } - config_s->data_path = - (cmd->data.str ? strdup(cmd->data.str) : NULL); + config_s->data_path = (cmd->data.str ? strdup(cmd->data.str) : NULL); + return NULL; } DOTCONF_CB(get_meta_path) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; + if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1322,25 +1317,24 @@ DOTCONF_CB(get_meta_path) free(config_s->meta_path); } - config_s->meta_path = - (cmd->data.str ? strdup(cmd->data.str) : NULL); + config_s->meta_path = (cmd->data.str ? strdup(cmd->data.str) : NULL); + return NULL; } DOTCONF_CB(enter_defaults_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_DEFAULTS; - return PINT_dotconf_set_defaults( - cmd->configfile, CTX_DEFAULTS); + return PINT_dotconf_set_defaults(cmd->configfile, CTX_DEFAULTS); } DOTCONF_CB(exit_defaults_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_GLOBAL; return NULL; } @@ -1349,7 +1343,7 @@ DOTCONF_CB(exit_defaults_context) DOTCONF_CB(enter_security_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_SECURITY; return NULL; } @@ -1357,7 +1351,7 @@ DOTCONF_CB(enter_security_context) DOTCONF_CB(exit_security_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_GLOBAL; return NULL; } @@ -1366,7 +1360,7 @@ DOTCONF_CB(exit_security_context) DOTCONF_CB(enter_aliases_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_ALIASES; return NULL; } @@ -1374,7 +1368,7 @@ DOTCONF_CB(enter_aliases_context) DOTCONF_CB(exit_aliases_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_GLOBAL; return NULL; } @@ -1382,7 +1376,7 @@ DOTCONF_CB(exit_aliases_context) DOTCONF_CB(enter_filesystem_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; struct filesystem_configuration_s *fs_conf = NULL; if (config_s->host_aliases == NULL) @@ -1392,7 +1386,7 @@ DOTCONF_CB(enter_filesystem_context) } fs_conf = (struct filesystem_configuration_s *) - malloc(sizeof(struct filesystem_configuration_s)); + malloc(sizeof(struct filesystem_configuration_s)); assert(fs_conf); memset(fs_conf,0,sizeof(struct filesystem_configuration_s)); @@ -1413,19 +1407,17 @@ DOTCONF_CB(enter_filesystem_context) assert(PINT_llist_head(config_s->file_systems) == (void *)fs_conf); config_s->configuration_context = CTX_FILESYSTEM; - return PINT_dotconf_set_defaults( - cmd->configfile, - CTX_FILESYSTEM); + return PINT_dotconf_set_defaults(cmd->configfile, CTX_FILESYSTEM); } DOTCONF_CB(exit_filesystem_context) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); /* @@ -1446,17 +1438,16 @@ DOTCONF_CB(exit_filesystem_context) DOTCONF_CB(enter_storage_hints_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_STORAGEHINTS; - return PINT_dotconf_set_defaults( - cmd->configfile, CTX_STORAGEHINTS); + return PINT_dotconf_set_defaults(cmd->configfile, CTX_STORAGEHINTS); } DOTCONF_CB(exit_storage_hints_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_FILESYSTEM; return NULL; } @@ -1464,17 +1455,16 @@ DOTCONF_CB(exit_storage_hints_context) DOTCONF_CB(enter_export_options_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_EXPORT; - return PINT_dotconf_set_defaults( - cmd->configfile, CTX_EXPORT); + return PINT_dotconf_set_defaults(cmd->configfile, CTX_EXPORT); } DOTCONF_CB(exit_export_options_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_FILESYSTEM; return NULL; } @@ -1482,11 +1472,10 @@ DOTCONF_CB(exit_export_options_context) DOTCONF_CB(enter_server_options_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_SERVER_OPTIONS; - return PINT_dotconf_set_defaults( - cmd->configfile, CTX_SERVER_OPTIONS); + return PINT_dotconf_set_defaults(cmd->configfile, CTX_SERVER_OPTIONS); } DOTCONF_CB(exit_server_options_context) @@ -1501,7 +1490,7 @@ DOTCONF_CB(exit_server_options_context) DOTCONF_CB(check_this_server) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(is_valid_alias(config_s->host_aliases, cmd->data.str)) { @@ -1524,7 +1513,7 @@ DOTCONF_CB(check_this_server) DOTCONF_CB(enter_mhranges_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_METAHANDLERANGES; return NULL; } @@ -1532,11 +1521,11 @@ DOTCONF_CB(enter_mhranges_context) DOTCONF_CB(exit_mhranges_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; struct filesystem_configuration_s *fs_conf = NULL; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (!fs_conf->meta_handle_ranges) @@ -1550,7 +1539,7 @@ DOTCONF_CB(exit_mhranges_context) DOTCONF_CB(enter_dhranges_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_DATAHANDLERANGES; return NULL; } @@ -1558,11 +1547,11 @@ DOTCONF_CB(enter_dhranges_context) DOTCONF_CB(exit_dhranges_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; struct filesystem_configuration_s *fs_conf = NULL; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (!fs_conf->data_handle_ranges) @@ -1576,7 +1565,7 @@ DOTCONF_CB(exit_dhranges_context) DOTCONF_CB(enter_distribution_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_DISTRIBUTION; return NULL; } @@ -1584,7 +1573,7 @@ DOTCONF_CB(enter_distribution_context) DOTCONF_CB(exit_distribution_context) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->configuration_context = CTX_FILESYSTEM; return NULL; } @@ -1592,7 +1581,7 @@ DOTCONF_CB(exit_distribution_context) DOTCONF_CB(get_unexp_req) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1605,7 +1594,7 @@ DOTCONF_CB(get_unexp_req) DOTCONF_CB(get_tcp_buffer_receive) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->tcp_buffer_size_receive = cmd->data.value; return NULL; } @@ -1613,7 +1602,7 @@ DOTCONF_CB(get_tcp_buffer_receive) DOTCONF_CB(get_tcp_buffer_send) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->tcp_buffer_size_send = cmd->data.value; return NULL; } @@ -1624,7 +1613,7 @@ DOTCONF_CB(get_tcp_buffer_send) DOTCONF_CB(get_tcp_bind_specific) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) @@ -1650,7 +1639,7 @@ DOTCONF_CB(get_tcp_bind_specific) DOTCONF_CB(get_server_job_bmi_timeout) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1663,7 +1652,7 @@ DOTCONF_CB(get_server_job_bmi_timeout) DOTCONF_CB(get_precreate_batch_size) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; int i = 0, j = 0, token_count = 0, counts[7], count_count=0; char **tokens; @@ -1719,7 +1708,7 @@ DOTCONF_CB(get_precreate_batch_size) DOTCONF_CB(get_precreate_low_threshold) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; int i = 0, j = 0, token_count = 0, counts[7], count_count=0; char **tokens; @@ -1755,7 +1744,7 @@ DOTCONF_CB(get_precreate_low_threshold) } config_s->precreate_low_threshold = - calloc( PVFS_DS_TYPE_COUNT, sizeof(int)); + calloc( PVFS_DS_TYPE_COUNT, sizeof(int)); if( config_s->precreate_low_threshold == NULL ) { return "PrecreateLowThreshold malloc failure"; @@ -1772,7 +1761,7 @@ DOTCONF_CB(get_precreate_low_threshold) DOTCONF_CB(get_server_job_flow_timeout) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1785,7 +1774,7 @@ DOTCONF_CB(get_server_job_flow_timeout) DOTCONF_CB(get_client_job_bmi_timeout) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->client_job_bmi_timeout = cmd->data.value; return NULL; } @@ -1793,7 +1782,7 @@ DOTCONF_CB(get_client_job_bmi_timeout) DOTCONF_CB(get_client_job_flow_timeout) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->client_job_flow_timeout = cmd->data.value; return NULL; } @@ -1801,7 +1790,7 @@ DOTCONF_CB(get_client_job_flow_timeout) DOTCONF_CB(get_client_retry_limit) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->client_retry_limit = cmd->data.value; return NULL; } @@ -1809,7 +1798,7 @@ DOTCONF_CB(get_client_retry_limit) DOTCONF_CB(get_client_retry_delay) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->client_retry_delay_ms = cmd->data.value; return NULL; } @@ -1817,7 +1806,7 @@ DOTCONF_CB(get_client_retry_delay) DOTCONF_CB(get_perf_update_interval) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->perf_update_interval = cmd->data.value; return NULL; } @@ -1825,7 +1814,7 @@ DOTCONF_CB(get_perf_update_interval) DOTCONF_CB(get_logfile) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; /* free whatever was added in set_defaults phase */ if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) @@ -1833,7 +1822,9 @@ DOTCONF_CB(get_logfile) return NULL; } if (config_s->logfile) + { free(config_s->logfile); + } config_s->logfile = (cmd->data.str ? strdup(cmd->data.str) : NULL); return NULL; } @@ -1841,7 +1832,7 @@ DOTCONF_CB(get_logfile) DOTCONF_CB(get_logtype) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; /* free whatever was added in set_defaults phase */ if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) @@ -1849,7 +1840,9 @@ DOTCONF_CB(get_logtype) return NULL; } if (config_s->logtype) + { free(config_s->logtype); + } config_s->logtype = (cmd->data.str ? strdup(cmd->data.str) : NULL); return NULL; } @@ -1858,7 +1851,7 @@ DOTCONF_CB(get_logtype) DOTCONF_CB(get_event_logging_list) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; int i = 0, len = 0; char buf[512] = {0}; char *ptr = buf; @@ -1885,7 +1878,7 @@ DOTCONF_CB(get_event_logging_list) DOTCONF_CB(get_event_tracing) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) { @@ -1909,7 +1902,7 @@ DOTCONF_CB(get_flow_module_list) char *ptr = buf; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if (config_s->flow_modules != NULL) { @@ -1949,8 +1942,9 @@ static void free_list_of_strings(int list_count, char ***new_list) * Used as a helper function by all the routines/keywords that require a list * of strings as their options/arguments. */ -static int get_list_of_strings(int list_count, char **parsed_list, - char ***new_list) +static int get_list_of_strings(int list_count, + char **parsed_list, + char ***new_list) { int i; @@ -1988,7 +1982,8 @@ static int get_list_of_strings(int list_count, char **parsed_list, * Given a set/list of BMI addresses suffixed with @ and a netmask, * this function will populate a netmasks array that contains * the integer subsqeuent to the @ symbol. - * i.e given tcp://192.168.2.0@24 we will have tcp://192.168.2.0, 24 as the netmask + * i.e given tcp://192.168.2.0@24 we will have + * tcp://192.168.2.0, 24 as the netmask */ static int setup_netmasks(int count, char **bmi_address, int *netmasks) { @@ -2008,9 +2003,13 @@ static int setup_netmasks(int count, char **bmi_address, int *netmasks) { special_char = strchr(bmi_address[i], '*'); if (special_char == NULL) + { netmasks[i] = 32; + } else + { netmasks[i] = -1; + } } else { @@ -2018,9 +2017,12 @@ static int setup_netmasks(int count, char **bmi_address, int *netmasks) netmasks[i] = strtol(special_char + 1, &ptr, 10); if (*ptr != '\0' || netmasks[i] < 0 || netmasks[i] > 32) + { return -1; + } } - gossip_debug(GOSSIP_SERVER_DEBUG, "Parsed %s:%d\n", bmi_address[i], netmasks[i]); + gossip_debug(GOSSIP_SERVER_DEBUG, "Parsed %s:%d\n", + bmi_address[i], netmasks[i]); } return 0; } @@ -2029,10 +2031,10 @@ DOTCONF_CB(get_root_squash) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (cmd->arg_count == 0) @@ -2042,14 +2044,15 @@ DOTCONF_CB(get_root_squash) else { fs_conf->exp_flags |= TROVE_EXP_ROOT_SQUASH; - fs_conf->root_squash_netmasks = (int *) calloc(cmd->arg_count, sizeof(int)); + fs_conf->root_squash_netmasks = + (int *) calloc(cmd->arg_count, sizeof(int)); if (fs_conf->root_squash_netmasks == NULL) { fs_conf->root_squash_count = 0; return("Could not allocate memory for root_squash_netmasks\n"); } if (get_list_of_strings(cmd->arg_count, cmd->data.list, - &fs_conf->root_squash_hosts) < 0) + &fs_conf->root_squash_hosts) < 0) { free(fs_conf->root_squash_netmasks); fs_conf->root_squash_netmasks = NULL; @@ -2058,17 +2061,20 @@ DOTCONF_CB(get_root_squash) } fs_conf->root_squash_count = cmd->arg_count; /* Setup the netmasks */ - if (setup_netmasks(fs_conf->root_squash_count, fs_conf->root_squash_hosts, - fs_conf->root_squash_netmasks) < 0) + if (setup_netmasks(fs_conf->root_squash_count, + fs_conf->root_squash_hosts, + fs_conf->root_squash_netmasks) < 0) { free(fs_conf->root_squash_netmasks); fs_conf->root_squash_netmasks = NULL; - free_list_of_strings(fs_conf->root_squash_count, &fs_conf->root_squash_hosts); + free_list_of_strings(fs_conf->root_squash_count, + &fs_conf->root_squash_hosts); fs_conf->root_squash_count = 0; return("Could not setup netmasks for root_squash_hosts\n"); } - gossip_debug(GOSSIP_SERVER_DEBUG, "Parsed %d RootSquash wildcard entries\n", - cmd->arg_count); + gossip_debug(GOSSIP_SERVER_DEBUG, + "Parsed %d RootSquash wildcard entries\n", + cmd->arg_count); } return NULL; } @@ -2121,10 +2127,10 @@ DOTCONF_CB(get_read_only) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (cmd->arg_count == 0) @@ -2140,8 +2146,9 @@ DOTCONF_CB(get_read_only) fs_conf->ro_count = 0; return("Could not allocate memory for ro_netmasks\n"); } - if (get_list_of_strings(cmd->arg_count, cmd->data.list, - &fs_conf->ro_hosts) < 0) + if (get_list_of_strings(cmd->arg_count, + cmd->data.list, + &fs_conf->ro_hosts) < 0) { free(fs_conf->ro_netmasks); fs_conf->ro_netmasks = NULL; @@ -2149,7 +2156,9 @@ DOTCONF_CB(get_read_only) return("Could not allocate memory for ro_hosts\n"); } fs_conf->ro_count = cmd->arg_count; - if (setup_netmasks(fs_conf->ro_count, fs_conf->ro_hosts, fs_conf->ro_netmasks) < 0) + if (setup_netmasks(fs_conf->ro_count, + fs_conf->ro_hosts, + fs_conf->ro_netmasks) < 0) { free(fs_conf->ro_netmasks); fs_conf->ro_netmasks = NULL; @@ -2167,10 +2176,10 @@ DOTCONF_CB(get_all_squash) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (cmd->arg_count == 0) @@ -2180,14 +2189,16 @@ DOTCONF_CB(get_all_squash) else { fs_conf->exp_flags |= TROVE_EXP_ALL_SQUASH; - fs_conf->all_squash_netmasks = (int *) calloc(cmd->arg_count, sizeof(int)); + fs_conf->all_squash_netmasks = (int *) calloc(cmd->arg_count, + sizeof(int)); if (fs_conf->all_squash_netmasks == NULL) { fs_conf->all_squash_count = 0; return("Could not allocate memory for all_squash_netmasks\n"); } - if (get_list_of_strings(cmd->arg_count, cmd->data.list, - &fs_conf->all_squash_hosts) < 0) + if (get_list_of_strings(cmd->arg_count, + cmd->data.list, + &fs_conf->all_squash_hosts) < 0) { free(fs_conf->all_squash_netmasks); fs_conf->all_squash_netmasks = NULL; @@ -2195,17 +2206,20 @@ DOTCONF_CB(get_all_squash) return("Could not allocate memory for all_squash_hosts\n"); } fs_conf->all_squash_count = cmd->arg_count; - if (setup_netmasks(fs_conf->all_squash_count, fs_conf->all_squash_hosts, - fs_conf->all_squash_netmasks) < 0) + if (setup_netmasks(fs_conf->all_squash_count, + fs_conf->all_squash_hosts, + fs_conf->all_squash_netmasks) < 0) { free(fs_conf->all_squash_netmasks); fs_conf->all_squash_netmasks = NULL; - free_list_of_strings(fs_conf->all_squash_count, &fs_conf->all_squash_hosts); + free_list_of_strings(fs_conf->all_squash_count, + &fs_conf->all_squash_hosts); fs_conf->all_squash_count = 0; return("Could not setup netmasks for all_squash_hosts\n"); } - gossip_debug(GOSSIP_SERVER_DEBUG, "Parsed %d AllSquash wildcard entries\n", - cmd->arg_count); + gossip_debug(GOSSIP_SERVER_DEBUG, + "Parsed %d AllSquash wildcard entries\n", + cmd->arg_count); } return NULL; } @@ -2216,10 +2230,10 @@ DOTCONF_CB(get_anon_uid) unsigned int tmp_var; int ret = -1; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); ret = sscanf(cmd->data.str, "%u", &tmp_var); if(ret != 1) @@ -2236,10 +2250,10 @@ DOTCONF_CB(get_anon_gid) unsigned int tmp_var; int ret = -1; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); ret = sscanf(cmd->data.str, "%u", &tmp_var); if(ret != 1) @@ -2257,7 +2271,7 @@ DOTCONF_CB(get_bmi_module_list) char *ptr = buf; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if (config_s->bmi_modules != NULL) { @@ -2280,7 +2294,7 @@ DOTCONF_CB(get_trusted_portlist) long port1, port2; char *separator = NULL, *option = NULL, *endptr = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; option = strdup(cmd->data.str); if (option == NULL) @@ -2322,7 +2336,7 @@ DOTCONF_CB(get_trusted_portlist) DOTCONF_CB(get_trusted_network) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if (cmd->arg_count == 0) { @@ -2335,8 +2349,9 @@ DOTCONF_CB(get_trusted_network) config_s->allowed_networks_count = 0; return("Could not allocate memory for allowed netmasks\n"); } - if (get_list_of_strings(cmd->arg_count, cmd->data.list, - &config_s->allowed_networks) < 0) + if (get_list_of_strings(cmd->arg_count, + cmd->data.list, + &config_s->allowed_networks) < 0) { free(config_s->allowed_masks); config_s->allowed_masks = NULL; @@ -2345,12 +2360,14 @@ DOTCONF_CB(get_trusted_network) } config_s->allowed_networks_count = cmd->arg_count; /* Setup netmasks */ - if (setup_netmasks(config_s->allowed_networks_count, config_s->allowed_networks, - config_s->allowed_masks) < 0) + if (setup_netmasks(config_s->allowed_networks_count, + config_s->allowed_networks, + config_s->allowed_masks) < 0) { free(config_s->allowed_masks); config_s->allowed_masks = NULL; - free_list_of_strings(config_s->allowed_networks_count, &config_s->allowed_networks); + free_list_of_strings(config_s->allowed_networks_count, + &config_s->allowed_networks); config_s->allowed_networks_count = 0; return("Parse error in netmask specification\n"); } @@ -2366,10 +2383,10 @@ DOTCONF_CB(get_handle_recycle_timeout_seconds) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); fs_conf->handle_recycle_timeout_sec.tv_sec = (int)cmd->data.value; @@ -2406,10 +2423,10 @@ DOTCONF_CB(get_flow_buffer_size_bytes) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); fs_conf->fp_buffer_size = cmd->data.value; return NULL; } @@ -2418,10 +2435,10 @@ DOTCONF_CB(get_flow_buffers_per_flow) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); fs_conf->fp_buffers_per_flow = cmd->data.value; if(fs_conf->fp_buffers_per_flow < 2) { @@ -2440,10 +2457,10 @@ DOTCONF_CB(get_attr_cache_keywords_list) struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if (fs_conf->attr_cache_keywords != NULL) @@ -2451,8 +2468,8 @@ DOTCONF_CB(get_attr_cache_keywords_list) char ** tokens; int token_count, j; - token_count = PINT_split_string_list( - &tokens, fs_conf->attr_cache_keywords); + token_count = PINT_split_string_list(&tokens, + fs_conf->attr_cache_keywords); for(j = 0; j < token_count; ++j) { @@ -2475,8 +2492,7 @@ DOTCONF_CB(get_attr_cache_keywords_list) char ** tokens; int token_count, j; - token_count = PINT_split_string_list( - &tokens, cmd->data.list[i]); + token_count = PINT_split_string_list(&tokens, cmd->data.list[i]); for(j = 0; j < token_count; ++j) { @@ -2503,10 +2519,10 @@ DOTCONF_CB(get_attr_cache_size) struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); fs_conf->attr_cache_size = (int)cmd->data.value; @@ -2517,10 +2533,10 @@ DOTCONF_CB(get_attr_cache_max_num_elems) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); fs_conf->attr_cache_max_num_elems = (int)cmd->data.value; @@ -2531,10 +2547,10 @@ DOTCONF_CB(get_file_stuffing) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if(strcasecmp(cmd->data.str, "yes") == 0) @@ -2558,10 +2574,10 @@ DOTCONF_CB(get_trove_sync_meta) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if(strcasecmp(cmd->data.str, "yes") == 0) @@ -2594,10 +2610,10 @@ DOTCONF_CB(get_trove_sync_data) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); if(strcasecmp(cmd->data.str, "yes") == 0) @@ -2619,7 +2635,7 @@ DOTCONF_CB(get_trove_sync_data) DOTCONF_CB(get_db_cache_size_bytes) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; config_s->db_cache_size_bytes = cmd->data.value; return NULL; } @@ -2627,7 +2643,7 @@ DOTCONF_CB(get_db_cache_size_bytes) DOTCONF_CB(get_trove_max_concurrent_io) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(config_s->configuration_context == CTX_SERVER_OPTIONS && config_s->my_server_options == 0) @@ -2641,7 +2657,7 @@ DOTCONF_CB(get_trove_max_concurrent_io) DOTCONF_CB(get_db_cache_type) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if(strcmp(cmd->data.str, "sys") && strcmp(cmd->data.str, "mmap")) { @@ -2650,7 +2666,9 @@ DOTCONF_CB(get_db_cache_type) } if (config_s->db_cache_type) + { free(config_s->db_cache_type); + } config_s->db_cache_type = strdup(cmd->data.str); if(!config_s->db_cache_type) { @@ -2666,10 +2684,10 @@ DOTCONF_CB(get_root_handle) unsigned long long int tmp_var; int ret = -1; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); ret = sscanf(cmd->data.str, "%llu", &tmp_var); if(ret != 1) @@ -2683,13 +2701,13 @@ DOTCONF_CB(get_root_handle) DOTCONF_CB(get_name) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; if (config_s->configuration_context == CTX_FILESYSTEM) { struct filesystem_configuration_s *fs_conf = NULL; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); if (fs_conf->file_system_name) { gossip_err("WARNING: Overwriting %s with %s\n", @@ -2703,7 +2721,7 @@ DOTCONF_CB(get_name) if (0 == config_s->default_dist_config.name) { config_s->default_dist_config.name = - (cmd->data.str ? strdup(cmd->data.str) : NULL); + (cmd->data.str ? strdup(cmd->data.str) : NULL); config_s->default_dist_config.param_list = PINT_llist_new(); } else @@ -2718,10 +2736,10 @@ DOTCONF_CB(get_filesystem_collid) { struct filesystem_configuration_s *fs_conf = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); if (fs_conf->coll_id) { gossip_err("WARNING: Overwriting %d with %d\n", @@ -2743,7 +2761,7 @@ static int compare_aliases(void * vkey, DOTCONF_CB(get_alias_list) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; struct host_alias_s *cur_alias = NULL; int i = 0; int len = 0; @@ -2755,23 +2773,24 @@ DOTCONF_CB(get_alias_list) /* prevent users from adding the same alias twice */ if(config_s->host_aliases && - PINT_llist_search(config_s->host_aliases, - (void *)cmd->data.list[0], - compare_aliases)) + PINT_llist_search(config_s->host_aliases, + (void *)cmd->data.list[0], + compare_aliases)) { return "Error: alias already defined"; } - cur_alias = (host_alias_s *) - malloc(sizeof(host_alias_s)); + cur_alias = (host_alias_s *)malloc(sizeof(host_alias_s)); cur_alias->host_alias = strdup(cmd->data.list[0]); cur_alias->bmi_address = (char *)calloc(1, 2048); ptr = cur_alias->bmi_address; - for (i=1; i < cmd->arg_count; i++) { + for (i = 1; i < cmd->arg_count; i++) + { strncat(ptr, cmd->data.list[i], 2048 - len); len += strlen(cmd->data.list[i]); - if (i+1 < cmd->arg_count) { + if (i + 1 < cmd->arg_count) + { strncat(ptr, ",", 2048 - len); } len++; @@ -2793,10 +2812,10 @@ DOTCONF_CB(get_range_list) struct host_handle_mapping_s *handle_mapping = NULL; PINT_llist **handle_range_list = NULL; struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; fs_conf = (struct filesystem_configuration_s *) - PINT_llist_head(config_s->file_systems); + PINT_llist_head(config_s->file_systems); assert(fs_conf); handle_range_list = ((config_s->configuration_context == @@ -2818,8 +2837,8 @@ DOTCONF_CB(get_range_list) if (is_valid_handle_range_description(cmd->data.list[i])) { - handle_mapping = get_or_add_handle_mapping( - *handle_range_list, cmd->data.list[i-1]); + handle_mapping = get_or_add_handle_mapping(*handle_range_list, + cmd->data.list[i-1]); if (!handle_mapping) { return("Error: Alias allocation failed; " @@ -2830,29 +2849,30 @@ DOTCONF_CB(get_range_list) { is_new_handle_mapping = 1; handle_mapping->alias_mapping = - find_host_alias_ptr_by_alias( - config_s, cmd->data.list[i-1], NULL); + find_host_alias_ptr_by_alias(config_s, + cmd->data.list[i-1], + NULL); } assert(handle_mapping->alias_mapping == - find_host_alias_ptr_by_alias( - config_s, cmd->data.list[i-1], NULL)); + find_host_alias_ptr_by_alias(config_s, + cmd->data.list[i-1], + NULL)); if (!handle_mapping->handle_range && !handle_mapping->handle_extent_array.extent_array) { - handle_mapping->handle_range = - strdup(cmd->data.list[i]); + handle_mapping->handle_range = strdup(cmd->data.list[i]); /* build the extent array, based on range */ - build_extent_array( - handle_mapping->handle_range, - &handle_mapping->handle_extent_array); + build_extent_array(handle_mapping->handle_range, + &handle_mapping->handle_extent_array); } else { char *new_handle_range = PINT_merge_handle_range_strs( - handle_mapping->handle_range, cmd->data.list[i]); + handle_mapping->handle_range, + cmd->data.list[i]); free(handle_mapping->handle_range); handle_mapping->handle_range = new_handle_range; @@ -2865,7 +2885,7 @@ DOTCONF_CB(get_range_list) if (is_new_handle_mapping) { PINT_llist_add_to_tail(*handle_range_list, - (void *)handle_mapping); + (void *)handle_mapping); } } else @@ -2884,13 +2904,13 @@ DOTCONF_CB(get_range_list) DOTCONF_CB(get_param) { struct server_configuration_s *config_s = - (struct server_configuration_s *)cmd->context; + (struct server_configuration_s *)cmd->context; distribution_param_configuration* param = - malloc(sizeof(distribution_param_configuration)); + malloc(sizeof(distribution_param_configuration)); if (NULL != param) { - memset(param, 0, sizeof(param)); + memset(param, 0, sizeof(*param)); param->name = (cmd->data.str ? strdup(cmd->data.str) : NULL); PINT_llist_add_to_tail(config_s->default_dist_config.param_list, param); @@ -3083,30 +3103,6 @@ static DOTCONF_CB(get_coll_object_type) return ret; } -static DOTCONF_CB(get_eco_type) -{ - const char *str = cmd->data.str; - struct server_configuration_s *config = cmd->context; - const char *ret = NULL; - - if (!strcmp(str, "no")) - config->energysaving = NO_ENERGY_SAVING; - else if (!strcmp(str, "yes")) - config->energysaving = ENERGY_SAVING; - else - ret = "get_eco_type: unknown FileSystem EnergySaving option\n"; - return ret; -} - -static DOTCONF_CB(get_eco_num) -{ - struct server_configuration_s *config = cmd->context; - - config->econumnodes = cmd->data.value; - - return NULL; -} - static DOTCONF_CB(get_osd_type) { const char *str = cmd->data.str; @@ -3372,7 +3368,7 @@ static int is_valid_alias(PINT_llist * host_aliases, char *str) assert(cur_alias->host_alias); assert(cur_alias->bmi_address); - if (strcmp(str,cur_alias->host_alias) == 0) + if (strcmp(str, cur_alias->host_alias) == 0) { ret = 1; break; @@ -3412,16 +3408,15 @@ static int is_valid_handle_range_description(char *h_range) } static int is_populated_filesystem_configuration( - struct filesystem_configuration_s *fs) + struct filesystem_configuration_s *fs) { return ((fs && fs->coll_id && fs->file_system_name && fs->meta_handle_ranges && fs->data_handle_ranges && fs->root_handle) ? 1 : 0); } -static int is_root_handle_in_a_meta_range( - struct server_configuration_s *config, - struct filesystem_configuration_s *fs) +static int root_handle_in_meta_range(struct server_configuration_s *config, + struct filesystem_configuration_s *fs) { int ret = 0; PINT_llist *cur = NULL; @@ -3479,10 +3474,10 @@ static int is_root_handle_in_a_meta_range( } static int is_valid_filesystem_configuration( - struct server_configuration_s *config, - struct filesystem_configuration_s *fs) + struct server_configuration_s *config, + struct filesystem_configuration_s *fs) { - int ret = is_root_handle_in_a_meta_range(config,fs); + int ret = root_handle_in_meta_range(config,fs); if (ret == 0) { gossip_err("RootHandle (%llu) is NOT within the meta handle " @@ -3495,7 +3490,7 @@ static int is_valid_filesystem_configuration( static void free_host_handle_mapping(void *ptr) { struct host_handle_mapping_s *h_mapping = - (struct host_handle_mapping_s *)ptr; + (struct host_handle_mapping_s *)ptr; if (h_mapping) { /* @@ -3536,7 +3531,7 @@ static void free_host_alias(void *ptr) static void free_filesystem(void *ptr) { struct filesystem_configuration_s *fs = - (struct filesystem_configuration_s *)ptr; + (struct filesystem_configuration_s *)ptr; if (fs) { @@ -3571,7 +3566,8 @@ static void free_filesystem(void *ptr) /* free all root_squash_exception_hosts specifications */ if (fs->root_squash_exceptions_hosts) { - free_list_of_strings(fs->root_squash_exceptions_count, &fs->root_squash_exceptions_hosts); + free_list_of_strings(fs->root_squash_exceptions_count, + &fs->root_squash_exceptions_hosts); fs->root_squash_exceptions_count = 0; } if (fs->root_squash_exceptions_netmasks) @@ -3606,9 +3602,8 @@ static void free_filesystem(void *ptr) } } -static void copy_filesystem( - struct filesystem_configuration_s *dest_fs, - struct filesystem_configuration_s *src_fs) +static void copy_filesystem(struct filesystem_configuration_s *dest_fs, + struct filesystem_configuration_s *src_fs) { PINT_llist *cur = NULL; struct host_handle_mapping_s *cur_h_mapping = NULL; @@ -3779,9 +3774,9 @@ static void copy_filesystem( static host_alias_s *find_host_alias_ptr_by_alias( - struct server_configuration_s *config_s, - char *alias, - int *index) + struct server_configuration_s *config_s, + char *alias, + int *index) { PINT_llist *cur = NULL; struct host_alias_s *ret = NULL; @@ -3818,9 +3813,8 @@ static host_alias_s *find_host_alias_ptr_by_alias( * if one is not found. This wrapper removes it and returns * NULL if not found */ -struct host_handle_mapping_s *PINT_get_handle_mapping( - PINT_llist *list, - char *alias) +struct host_handle_mapping_s *PINT_get_handle_mapping(PINT_llist *list, + char *alias) { struct host_handle_mapping_s *mapping; mapping = get_or_add_handle_mapping(list, alias); @@ -3836,8 +3830,8 @@ struct host_handle_mapping_s *PINT_get_handle_mapping( } static struct host_handle_mapping_s *get_or_add_handle_mapping( - PINT_llist *list, - char *alias) + PINT_llist *list, + char *alias) { PINT_llist *cur = list; struct host_handle_mapping_s *ret = NULL; @@ -3875,9 +3869,8 @@ static struct host_handle_mapping_s *get_or_add_handle_mapping( return ret; } -static int build_extent_array( - char *handle_range_str, - PVFS_handle_extent_array *handle_extent_array) +static int build_extent_array(char *handle_range_str, + PVFS_handle_extent_array *handle_extent_array) { int i = 0, status = 0, num_extents = 0; PVFS_handle_extent cur_extent; @@ -3933,10 +3926,9 @@ static int build_extent_array( * * Synopsis: Retrieve the list of allowed ports (i.e. range) */ -int PINT_config_get_allowed_ports( - struct server_configuration_s *config_s, - int *enabled, - unsigned long *allowed_ports) +int PINT_config_get_allowed_ports(struct server_configuration_s *config_s, + int *enabled, + unsigned long *allowed_ports) { int ret = -1; @@ -3962,18 +3954,18 @@ int PINT_config_get_allowed_ports( * char **allowed_networks (OUT) * int *allowed_netmasks (OUT) * - * Returns: Fills up *allowed_network_count, *allowed_networks and *allowed_netmasks + * Returns: Fills up *allowed_network_count, *allowed_networks and + * *allowed_netmasks * and returns 0 on success and -1 on failure * * Synopsis: Retrieve the list of allowed network addresses and netmasks */ -int PINT_config_get_allowed_networks( - struct server_configuration_s *config_s, - int *enabled, - int *allowed_networks_count, - char ***allowed_networks, - int **allowed_masks) +int PINT_config_get_allowed_networks(struct server_configuration_s *config_s, + int *enabled, + int *allowed_networks_count, + char ***allowed_networks, + int **allowed_masks) { int ret = -1; @@ -4005,8 +3997,8 @@ int PINT_config_get_allowed_networks( * */ char *PINT_config_get_host_addr_ptr( - struct server_configuration_s *config_s, - char *alias) + struct server_configuration_s *config_s, + char *alias) { char *ret = (char *)0; PINT_llist *cur = NULL; @@ -4025,7 +4017,7 @@ char *PINT_config_get_host_addr_ptr( assert(cur_alias->host_alias); assert(cur_alias->bmi_address); - if (strcmp(cur_alias->host_alias,alias) == 0) + if (strcmp(cur_alias->host_alias, alias) == 0) { ret = cur_alias->bmi_address; break; @@ -4048,8 +4040,8 @@ char *PINT_config_get_host_addr_ptr( * */ char *PINT_config_get_host_alias_ptr( - struct server_configuration_s *config_s, - char *bmi_address) + struct server_configuration_s *config_s, + char *bmi_address) { char *ret = (char *)0; PINT_llist *cur = NULL; @@ -4068,7 +4060,7 @@ char *PINT_config_get_host_alias_ptr( assert(cur_alias->host_alias); assert(cur_alias->bmi_address); - if (strcmp(cur_alias->bmi_address,bmi_address) == 0) + if (strcmp(cur_alias->bmi_address, bmi_address) == 0) { ret = cur_alias->host_alias; break; @@ -4092,16 +4084,16 @@ char *PINT_config_get_host_alias_ptr( * */ char *PINT_config_get_meta_handle_range_str( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs) + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs) { return get_handle_range_str(config_s,fs,1); } int PINT_config_get_meta_handle_extent_array( - struct server_configuration_s *config_s, - PVFS_fs_id fs_id, - PVFS_handle_extent_array *extent_array) + struct server_configuration_s *config_s, + PVFS_fs_id fs_id, + PVFS_handle_extent_array *extent_array) { int ret = -1; PINT_llist *cur = NULL; @@ -4186,8 +4178,8 @@ int PINT_config_get_meta_handle_extent_array( * */ char *PINT_config_get_data_handle_range_str( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs) + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs) { return get_handle_range_str(config_s,fs,0); } @@ -4208,8 +4200,8 @@ char *PINT_config_get_data_handle_range_str( * */ char *PINT_config_get_merged_handle_range_str( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs) + struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs) { char *merged_range = NULL; char *mrange = get_handle_range_str(config_s,fs,1); @@ -4238,11 +4230,10 @@ char *PINT_config_get_merged_handle_range_str( even if this call fails half way into it, a PINT_config_release call should properly de-alloc all consumed memory. */ -static int cache_config_files( - struct server_configuration_s *config_s, - char *global_config_filename) +static int cache_config_files(struct server_configuration_s *config_s, + char *global_config_filename) { - int fd = 0, nread = 0; + int fd = 0, nread = 0, file_found = 0; struct stat statbuf; #ifdef WIN32 char working_dir[MAX_PATH+1]; @@ -4264,39 +4255,45 @@ static int cache_config_files( my_global_fn = ((global_config_filename != NULL) ? global_config_filename : "fs.conf"); -open_global_config: - memset(&statbuf, 0, sizeof(struct stat)); - if (stat(my_global_fn, &statbuf) == 0) + while(!file_found) { - if (statbuf.st_size == 0) + static int one_shot = 0; + memset(&statbuf, 0, sizeof(struct stat)); + if ((file_found = !stat(my_global_fn, &statbuf)) == 1) + { + if (statbuf.st_size == 0) + { + gossip_err("Invalid config file %s. This " + "file is 0 bytes in length!\n", my_global_fn); + goto error_exit; + } + config_s->fs_config_filename = strdup(my_global_fn); + config_s->fs_config_buflen = statbuf.st_size + 1; + } + else if (errno == ENOENT) { - gossip_err("Invalid config file %s. This " - "file is 0 bytes in length!\n", my_global_fn); + gossip_err("Failed to find global config file %s. This " + "file does not exist!\n", my_global_fn); goto error_exit; } - config_s->fs_config_filename = strdup(my_global_fn); - config_s->fs_config_buflen = statbuf.st_size + 1; - } - else if (errno == ENOENT) - { - gossip_err("Failed to find global config file %s. This " - "file does not exist!\n", my_global_fn); - goto error_exit; - } - else - { - assert(working_dir); + else /* I don't think this code ever runs - WBL */ + { + if (one_shot) + { + goto error_exit; + } + one_shot++; + assert(working_dir); #ifdef WIN32 - _snprintf(buf, 512, "%s\\%s",working_dir, my_global_fn); + _snprintf(buf, 512, "%s\\%s",working_dir, my_global_fn); #else - snprintf(buf, 512, "%s/%s",working_dir, my_global_fn); + snprintf(buf, 512, "%s/%s",working_dir, my_global_fn); #endif - my_global_fn = buf; - goto open_global_config; + my_global_fn = buf; + } } - if (!config_s->fs_config_filename || - (config_s->fs_config_buflen == 0)) + if (!config_s->fs_config_filename || (config_s->fs_config_buflen == 0)) { gossip_err("Failed to stat fs config file. Please make sure that "); gossip_err("the file %s\nexists, is not a zero file size, and has\n", @@ -4321,7 +4318,8 @@ open_global_config: } memset(config_s->fs_config_buf, 0, config_s->fs_config_buflen); - nread = read(fd, config_s->fs_config_buf, + nread = read(fd, + config_s->fs_config_buf, (config_s->fs_config_buflen - 1)); if (nread != (config_s->fs_config_buflen - 1)) { @@ -4334,17 +4332,16 @@ open_global_config: return 0; - close_fd_fail: +close_fd_fail: close(fd); - error_exit: +error_exit: return 1; } -static char *get_handle_range_str( - struct server_configuration_s *config_s, - struct filesystem_configuration_s *fs, - int meta_handle_range) +static char *get_handle_range_str(struct server_configuration_s *config_s, + struct filesystem_configuration_s *fs, + int meta_handle_range) { char *ret = NULL; char *my_alias = (char *)0; @@ -4370,7 +4367,7 @@ static char *get_handle_range_str( assert(cur_h_mapping->alias_mapping->host_alias); assert(cur_h_mapping->handle_range); - if (strcmp(cur_h_mapping->alias_mapping->host_alias, + if (strcmp(cur_h_mapping->alias_mapping->host_alias, my_alias) == 0 || !strncmp(cur_h_mapping->alias_mapping->bmi_address, "osd", 3)) { ret = PINT_merge_handle_range_strs(ret, cur_h_mapping->handle_range); @@ -4387,7 +4384,7 @@ static char *get_handle_range_str( (i.e. contains values that make sense); 0 otherwise */ int PINT_config_is_valid_configuration( - struct server_configuration_s *config_s) + struct server_configuration_s *config_s) { int ret = 0, fs_count = 0; PINT_llist *cur = NULL; @@ -4421,8 +4418,8 @@ int PINT_config_is_valid_configuration( the specified server_configuration struct; 0 otherwise */ int PINT_config_is_valid_collection_id( - struct server_configuration_s *config_s, - PVFS_fs_id fs_id) + struct server_configuration_s *config_s, + PVFS_fs_id fs_id) { int ret = 0; PINT_llist *cur = NULL; @@ -4454,8 +4451,8 @@ int PINT_config_is_valid_collection_id( the specified filesystem; NULL otherwise */ struct filesystem_configuration_s* PINT_config_find_fs_name( - struct server_configuration_s *config_s, - char *fs_name) + struct server_configuration_s *config_s, + char *fs_name) { PINT_llist *cur = NULL; struct filesystem_configuration_s *cur_fs = NULL; @@ -4489,8 +4486,8 @@ struct filesystem_configuration_s* PINT_config_find_fs_name( * returns pointer to file system config struct on success, NULL on failure */ struct filesystem_configuration_s* PINT_config_find_fs_id( - struct server_configuration_s* config_s, - PVFS_fs_id fs_id) + struct server_configuration_s* config_s, + PVFS_fs_id fs_id) { PINT_llist *cur = NULL; struct filesystem_configuration_s *cur_fs = NULL; @@ -4516,12 +4513,12 @@ struct filesystem_configuration_s* PINT_config_find_fs_id( } PVFS_fs_id PINT_config_get_fs_id_by_fs_name( - struct server_configuration_s *config_s, - char *fs_name) + struct server_configuration_s *config_s, + char *fs_name) { PVFS_fs_id fs_id = 0; struct filesystem_configuration_s *fs = - PINT_config_find_fs_name(config_s, fs_name); + PINT_config_find_fs_name(config_s, fs_name); if (fs) { fs_id = fs->coll_id; @@ -4537,8 +4534,7 @@ PVFS_fs_id PINT_config_get_fs_id_by_fs_name( * returns pointer to a list of file system config structs on success, * NULL on failure */ -PINT_llist *PINT_config_get_filesystems( - struct server_configuration_s *config_s) +PINT_llist *PINT_config_get_filesystems(struct server_configuration_s *config_s) { return (config_s ? config_s->file_systems : NULL); } @@ -4548,8 +4544,8 @@ PINT_llist *PINT_config_get_filesystems( filesystems if the fs_id does not match that of the specifed fs_id */ int PINT_config_trim_filesystems_except( - struct server_configuration_s *config_s, - PVFS_fs_id fs_id) + struct server_configuration_s *config_s, + PVFS_fs_id fs_id) { int ret = -PVFS_EINVAL; PINT_llist *cur = NULL, *new_fs_list = NULL; @@ -4575,10 +4571,11 @@ int PINT_config_trim_filesystems_except( if (cur_fs->coll_id == fs_id) { new_fs = (struct filesystem_configuration_s *)malloc( - sizeof(struct filesystem_configuration_s)); + sizeof(struct filesystem_configuration_s)); assert(new_fs); - memset(new_fs, 0, + memset(new_fs, + 0, sizeof(struct filesystem_configuration_s)); copy_filesystem(new_fs, cur_fs); @@ -4599,11 +4596,10 @@ int PINT_config_trim_filesystems_except( return ret; } -int PINT_config_get_fs_key( - struct server_configuration_s *config, - PVFS_fs_id fs_id, - char ** key, - int * length) +int PINT_config_get_fs_key(struct server_configuration_s *config, + PVFS_fs_id fs_id, + char ** key, + int * length) { #ifndef WITH_OPENSSL *key = NULL; @@ -4668,9 +4664,8 @@ int PINT_config_get_fs_key( } #ifdef __PVFS2_TROVE_SUPPORT__ -static int is_root_handle_in_my_range( - struct server_configuration_s *config, - struct filesystem_configuration_s *fs) +static int is_root_handle_in_my_range(struct server_configuration_s *config, + struct filesystem_configuration_s *fs) { int ret = 0; PINT_llist *cur = NULL; @@ -4735,8 +4730,7 @@ static int is_root_handle_in_my_range( create a storage space based on configuration settings object with the particular host settings local to the caller */ -int PINT_config_pvfs2_mkspace( - struct server_configuration_s *config) +int PINT_config_pvfs2_mkspace(struct server_configuration_s *config) { int ret = 1; PVFS_handle root_handle = 0; @@ -4795,10 +4789,15 @@ int PINT_config_pvfs2_mkspace( (create_collection_only ? "collection" : "storage space")); - ret = pvfs2_mkspace( - config->data_path, config->meta_path, cur_fs->file_system_name, - cur_fs->coll_id, root_handle, cur_meta_handle_range, - cur_data_handle_range, create_collection_only, 1); + ret = pvfs2_mkspace(config->data_path, + config->meta_path, + cur_fs->file_system_name, + cur_fs->coll_id, + root_handle, + cur_meta_handle_range, + cur_data_handle_range, + create_collection_only, + 1); gossip_debug( GOSSIP_SERVER_DEBUG,"\n*****************************\n"); @@ -4823,8 +4822,7 @@ int PINT_config_pvfs2_mkspace( remove a storage space based on configuration settings object with the particular host settings local to the caller */ -int PINT_config_pvfs2_rmspace( - struct server_configuration_s *config) +int PINT_config_pvfs2_rmspace(struct server_configuration_s *config) { int ret = 1; int remove_collection_only = 0; @@ -4868,9 +4866,8 @@ int PINT_config_pvfs2_rmspace( returns the metadata sync mode (storage hint) for the specified fs_id if valid; TROVE_SYNC otherwise */ -int PINT_config_get_trove_sync_meta( - struct server_configuration_s *config, - PVFS_fs_id fs_id) +int PINT_config_get_trove_sync_meta(struct server_configuration_s *config, + PVFS_fs_id fs_id) { struct filesystem_configuration_s *fs_conf = NULL; @@ -4885,9 +4882,8 @@ int PINT_config_get_trove_sync_meta( returns the data sync mode (storage hint) for the specified fs_id if valid; TROVE_SYNC otherwise */ -int PINT_config_get_trove_sync_data( - struct server_configuration_s *config, - PVFS_fs_id fs_id) +int PINT_config_get_trove_sync_data(struct server_configuration_s *config, + PVFS_fs_id fs_id) { struct filesystem_configuration_s *fs_conf = NULL; diff --git a/src/common/misc/server-config.h b/src/common/misc/server-config.h index f61a17b..7959fb4 100644 --- a/src/common/misc/server-config.h +++ b/src/common/misc/server-config.h @@ -7,6 +7,7 @@ #ifndef __SERVER_CONFIG_H #define __SERVER_CONFIG_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "src/common/llist/llist.h" #include "src/common/gossip/gossip.h" @@ -202,13 +203,13 @@ typedef struct server_configuration_s */ int trove_method; - enum { OSD_NONE, /* stock pvfs */ OSD_DATAFILE, /* datafiles stored on OSDs */ OSD_METAFILE, /* df and mf, with mf existing as attrs; but not dirs */ OSD_MDFILE, /* df and mf, with mf existing as attrs on first df */ } osd_type; + enum { OSD_DIR_PVFS, /* stock pvfs */ OSD_DIR_ATTR4, /* dirs in attrs, 4-step insert */ @@ -230,12 +231,6 @@ typedef struct server_configuration_s NO_COLL_OBJECT, /* do not use the collection objects as directories */ COLL_OBJECT, /* use the collection objects as directories */ } coll_object; - enum { - NO_ENERGY_SAVING, /* fetch attributes of a single object at once */ - ENERGY_SAVING, /* fetch attributes of all the objects that are members of a collection */ - } energysaving; - - int econumnodes; void *private_data; int32_t tree_width; diff --git a/src/common/misc/state-machine-fns.c b/src/common/misc/state-machine-fns.c index b316f61..49fb7a5 100644 --- a/src/common/misc/state-machine-fns.c +++ b/src/common/misc/state-machine-fns.c @@ -11,6 +11,7 @@ #include #include +#include "pvfs2-internal.h" #include "gossip.h" #include "pvfs2-debug.h" #include "state-machine.h" diff --git a/src/common/misc/state-machine.h b/src/common/misc/state-machine.h index 3de9ad2..7a435a2 100644 --- a/src/common/misc/state-machine.h +++ b/src/common/misc/state-machine.h @@ -7,6 +7,7 @@ #ifndef __STATE_MACHINE_H #define __STATE_MACHINE_H +#include "pvfs2-internal.h" #include "job.h" #include "quicklist.h" diff --git a/src/common/misc/str-utils.c b/src/common/misc/str-utils.c index 82560d1..29b626e 100644 --- a/src/common/misc/str-utils.c +++ b/src/common/misc/str-utils.c @@ -4,6 +4,7 @@ * See COPYING in top-level directory. */ + #include #include #include @@ -19,7 +20,59 @@ #define strdup(s) _strdup(s) #endif +#include "pvfs2-internal.h" #include "str-utils.h" +#include "pvfs-path.h" + +/* PINT_string_rm_extra_slashes() + * + * Remove extra slashes from the string pointed to by 's'. + * + */ +void PINT_string_rm_extra_slashes(char *s) +{ + PINT_string_rm_extra_slashes_rts(s, 0); +} + +/* PINT_string_rm_extra_slashes_rts() + * + * Remove extra slashes from the string pointed to by 's'. + * + * If rts is true, removes trailing slash. + * + */ +void PINT_string_rm_extra_slashes_rts(char *s, int rts) +{ + char *reader = (char *) NULL; + char *writer = (char *) NULL; + + if(!s) + { + return; + } + + /* Initially, reader and writer refer to the beginning of 's' */ + /* Loop until *reader is NULL */ + for(reader = s, writer = s; *reader; reader++) + { + if(*reader != '/' || *(reader + 1) != '/') + { + /* set char @ writer to char @ reader, then increment writer */ + *writer++ = *reader; + } + } + *writer-- = '\0'; /* set char @ writer to null, then decrement writer */ + + /* Strip trailing slash if: + * rts is true, and if + * the '/' isn't the only character in the string, and if + * the last char is a '/'. + */ + if(rts && (s != writer) && (*writer == '/')) + { + *writer = '\0'; + } +} /* PINT_string_count_segments() * @@ -389,7 +442,7 @@ int PINT_split_string_list(char ***tokens, const char *comma_list) /* if we don't find any commas, just set the entire string to the first * token and return */ - if(0 == tokencount) + if(tokencount == 0) { tokencount = 1; } @@ -402,12 +455,13 @@ int PINT_split_string_list(char ***tokens, const char *comma_list) return 0; } - if(1 == tokencount) + if(tokencount == 1) { (*tokens)[0] = strdup(comma_list); if(!(*tokens)[0]) { - tokencount = 0; + /* failure needs tokencount to know what to free */ + /* tokencount = 0; */ goto failure; } return tokencount; @@ -461,7 +515,7 @@ failure: * * Free the string list allocated by PINT_split_string_list() */ -void PINT_free_string_list(char ** list, int len) +void PINT_free_string_list(char** list, int len) { int i = 0; @@ -677,8 +731,7 @@ int PINT_remove_dir_prefix( * Parameters: * pathname - pointer to directory string (absolute) * prefix - pointer to prefix dir string (absolute) - * out_path - pointer to output dir string - * max_out_len - max length of out_base_dir buffer + * out_path_p - pointer to output dir string in pathname * * All incoming arguments must be valid and non-zero * @@ -708,27 +761,45 @@ int PINT_remove_dir_prefix( */ int PINT_remove_dir_prefix( const char *pathname, - const char *prefix, - char *out_path, - int out_max_len) + const char *prefix) { int ret = -PVFS_EINVAL; int prefix_len, pathname_len; int cut_index; + PVFS_path_t *Ppath; - if (!pathname || !prefix || !out_path || !out_max_len) + if (!pathname || !prefix) { return ret; } - /* make sure we are given absolute paths */ + /* see if this is a PVFS path if not make one */ + Ppath = PVFS_path_from_expanded((char *)pathname); + if (!VALID_PATH_MAGIC(Ppath)) + { + /* we only work on qualified or expanded paths */ + return ret; + } + + if (!(PATH_QUALIFIED(Ppath) || PATH_EXPANDED(Ppath))) + { + /* we only work on qualified or expanded paths */ + return ret; + } + + /* make sure we are given absolute paths - just to be sure */ if ((pathname[0] != '/') || (prefix[0] != '/')) { return ret; } + /* be sure we don't get confused with old results */ + Ppath->pvfs_path = NULL; + while (pathname[1] == '/') + { pathname++; + } prefix_len = strlen(prefix); pathname_len = strlen(pathname); @@ -751,7 +822,9 @@ int PINT_remove_dir_prefix( /* make sure prefix would fit in pathname */ if (prefix_len > (pathname_len + 1)) + { return (-PVFS_ENOENT); + } /* see if we can find prefix at beginning of path */ if (strncmp(prefix, pathname, prefix_len) == 0) @@ -759,7 +832,9 @@ int PINT_remove_dir_prefix( /* apparent match; see if next element is a slash */ if ((pathname[prefix_len] != '/') && (pathname[prefix_len] != '\0')) + { return (-PVFS_ENOENT); + } /* this was indeed a match */ /* in the case of no trailing slash cut_index will point to the end @@ -774,19 +849,22 @@ int PINT_remove_dir_prefix( /* if we hit this point, then we were successful */ - /* is the buffer large enough? */ - if ((1 + strlen(&(pathname[cut_index]))) > out_max_len) - return (-PVFS_ENAMETOOLONG); - /* try to handle the case of no trailing slash */ - if (pathname[cut_index] == '\0') + if (pathname[cut_index] == '\0' || + (pathname[cut_index] == '/' && pathname[cut_index + 1] == '\0')) { - out_path[0] = '/'; - out_path[1] = '\0'; + SET_MNTPOINT(Ppath); } else - /* copy out appropriate part of pathname */ - strcpy(out_path, &(pathname[cut_index])); + { + /* this flag indicates looked up string is exactly */ + /* the mount point - RESOLVED flag indicates mount */ + /* point is somewhere in the path */ + CLEAR_MNTPOINT(Ppath); + } + + /* this is the output of the function */ + Ppath->pvfs_path = (char *)&(pathname[cut_index]); return (0); } diff --git a/src/common/misc/str-utils.h b/src/common/misc/str-utils.h index e0f230a..d368665 100644 --- a/src/common/misc/str-utils.h +++ b/src/common/misc/str-utils.h @@ -7,9 +7,14 @@ #ifndef __STR_UTILS_H #define __STR_UTILS_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" -#include "pvfs2-config.h" +void PINT_string_rm_extra_slashes( + char *s); +void PINT_string_rm_extra_slashes_rts( + char *s, + int rts); int PINT_get_path_element( char *pathname, int segment_num, @@ -45,9 +50,7 @@ int PINT_remove_base_dir( int out_max_len); int PINT_remove_dir_prefix( const char *pathname, - const char *prefix, - char *out_path, - int out_max_len); + const char *prefix); char *PINT_merge_handle_range_strs( char *range1, char *range2); diff --git a/src/common/misc/tcache.c b/src/common/misc/tcache.c index 7e7d5f0..08881d6 100644 --- a/src/common/misc/tcache.c +++ b/src/common/misc/tcache.c @@ -6,6 +6,7 @@ #include +#include "pvfs2-internal.h" #include "tcache.h" #include "gossip.h" @@ -92,6 +93,12 @@ void PINT_tcache_finalize( /* TODO: simplify by iterating LRU list instead of hash table */ + if (!tcache) + { + gossip_err("PINT_tcache_finalize called with NULL pointer\n"); + return; + } + /* iterate through hash table and destroy all entries */ for(i = 0; i < tcache->h_table->table_size; i++) { diff --git a/src/common/misc/tcache.h b/src/common/misc/tcache.h index 2ebd820..8fbcea9 100644 --- a/src/common/misc/tcache.h +++ b/src/common/misc/tcache.h @@ -7,6 +7,7 @@ #ifndef __TCACHE_H #define __TCACHE_H +#include "pvfs2-internal.h" #ifndef WIN32 #include #else diff --git a/src/common/misc/xattr-utils.h b/src/common/misc/xattr-utils.h index fe41453..90a10b1 100644 --- a/src/common/misc/xattr-utils.h +++ b/src/common/misc/xattr-utils.h @@ -7,7 +7,7 @@ #ifndef __XATTR_UTILS_H #define __XATTR_UTILS_H -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #ifdef HAVE_SYS_XATTR_H #include diff --git a/src/common/quickhash/quickhash.h b/src/common/quickhash/quickhash.h index 312d34b..67dbf4c 100644 --- a/src/common/quickhash/quickhash.h +++ b/src/common/quickhash/quickhash.h @@ -27,6 +27,7 @@ #include #include #include "../quicklist/quicklist.h" +#include "../misc/pvfs2-internal.h" #define qhash_malloc(x) malloc(x) #define qhash_free(x) free(x) diff --git a/src/common/statecomp/codegen.c b/src/common/statecomp/codegen.c index bccdcb3..41117df 100644 --- a/src/common/statecomp/codegen.c +++ b/src/common/statecomp/codegen.c @@ -15,6 +15,8 @@ #include #include +#define PVFS_MALLOC_REDEF_OVERRIDE 1 +#include "pvfs2-internal.h" #include "../quicklist/quicklist.h" #include "../quickhash/quickhash.h" diff --git a/src/common/statecomp/module.mk.in b/src/common/statecomp/module.mk.in index 975e2b2..393d782 100644 --- a/src/common/statecomp/module.mk.in +++ b/src/common/statecomp/module.mk.in @@ -5,7 +5,7 @@ STATECOMPSRC := \ $(DIR)/statecomp.c \ $(DIR)/codegen.c \ $(DIR)/parser.c \ - $(DIR)/scanner.c + $(DIR)/scanner.c STATECOMPGEN := \ $(DIR)/scanner.c \ diff --git a/src/common/statecomp/statecomp.c b/src/common/statecomp/statecomp.c index 2a3e798..a444635 100644 --- a/src/common/statecomp/statecomp.c +++ b/src/common/statecomp/statecomp.c @@ -29,6 +29,9 @@ #include #endif +/* force malloc to not be redefined for statecomp */ +#define PVFS_MALLOC_REDEF_OVERRIDE 1 +#include "pvfs2-internal.h" #include "statecomp.h" #ifdef __GNUC__ diff --git a/src/common/windows/wincommon.h b/src/common/windows/wincommon.h old mode 100644 new mode 100755 index f0c7a6d..c2efa24 --- a/src/common/windows/wincommon.h +++ b/src/common/windows/wincommon.h @@ -18,6 +18,9 @@ #define inline _inline #define __func__ __FUNCTION__ +/* ignore the __attribute__ keyword */ +#define __attribute__(x) + /* * gettimeofday */ diff --git a/src/io/bmi/bmi-byteswap.h b/src/io/bmi/bmi-byteswap.h index a799484..3548726 100644 --- a/src/io/bmi/bmi-byteswap.h +++ b/src/io/bmi/bmi-byteswap.h @@ -26,7 +26,7 @@ #ifndef __BMI_BYTESWAP_H #define __BMI_BYTESWAP_H -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #ifndef __bswap_16 /* Swap bytes in 16 bit value. */ @@ -65,6 +65,7 @@ __bswap_32 (unsigned int __bsx) #ifndef __bswap_64 #if defined __GNUC__ && __GNUC__ >= 2 /* Swap bytes in 64 bit value. */ +#ifndef __bswap_constant_64 # define __bswap_constant_64(x) \ ((((x) & 0xff00000000000000ull) >> 56) \ | (((x) & 0x00ff000000000000ull) >> 40) \ @@ -74,7 +75,9 @@ __bswap_32 (unsigned int __bsx) | (((x) & 0x0000000000ff0000ull) << 24) \ | (((x) & 0x000000000000ff00ull) << 40) \ | (((x) & 0x00000000000000ffull) << 56)) +#endif +#ifndef BSWAP_64_IS_A_FUNC # define __bswap_64(x) \ (__extension__ \ ({ union { __extension__ unsigned long long int __ll; \ @@ -88,6 +91,7 @@ __bswap_32 (unsigned int __bsx) __r.__l[1] = __bswap_32 (__w.__l[0]); \ } \ __r.__ll; })) +#endif #else #ifdef WORDS_BIGENDIAN #error FIX ME: no 64 bit bswap routine for non GNUC preprocessor. diff --git a/src/io/bmi/bmi-method-callback.h b/src/io/bmi/bmi-method-callback.h index 29734a2..b994e90 100644 --- a/src/io/bmi/bmi-method-callback.h +++ b/src/io/bmi/bmi-method-callback.h @@ -7,6 +7,7 @@ #ifndef __BMI_METHOD_CALLBACK_H #define __BMI_METHOD_CALLBACK_H +#include "pvfs2-internal.h" #include "bmi-method-support.h" BMI_addr_t bmi_method_addr_reg_callback(bmi_method_addr_p map); diff --git a/src/io/bmi/bmi-method-support.c b/src/io/bmi/bmi-method-support.c index d00821e..fda8686 100644 --- a/src/io/bmi/bmi-method-support.c +++ b/src/io/bmi/bmi-method-support.c @@ -10,10 +10,12 @@ #include +#include "pvfs2-internal.h" #include "bmi-types.h" #include "bmi-method-support.h" #include "id-generator.h" #include "reference-list.h" +#include "gossip.h" /* @@ -133,76 +135,117 @@ void bmi_dealloc_method_addr(bmi_method_addr_p my_method_addr) * The function strips all whitespace, commas, and address fields which do * not match the key. * - * Boy, I sure do hate writing code to parse strings... + * Adding protocol sub-zones - networks using a given protocol that are + * not connected, thus tending to behave like distinct protocols running + * the same methods. string addr is now: + * + * [-]://: + * + * A subzone can be any string not including a colon. In this function, + * the key will be only the protocol (as it was before) but it will + * tolerate the presense of the subzone. + * + * Phil: Boy, I sure do hate writing code to parse strings... * - * returns a pointer to the new string on success, NULL on failure. + * returns a pointer to the new string containg everything after :// + * on success, NULL on failure. */ char *string_key(const char *key, const char *id_string) { - - const char *holder = NULL; - const char *end = NULL; - char *newkey = NULL; - char *retstring = NULL; - int keysize = 0; - int strsize = 0; - int retsize = 0; + char *retstr = NULL; + char *tmpstr = NULL; + int klen = 0; + int plen = 0; + int rlen = 0; if ((!id_string) || (!key)) { - return (NULL); + /* error */ + return NULL; } - keysize = strlen(key); - strsize = strlen(id_string); - /* create a new key of the form :// */ - if ((newkey = (char *) malloc(keysize + 4)) == NULL) + klen = strlen(key); + + while(*id_string && (tmpstr = strstr(id_string, key))) { - return (NULL); - } - strcpy(newkey, key); - strcat(newkey, "://"); + int len, len2; - holder = id_string; + /* first verify the key matches the protocol */ + len = strcspn(tmpstr, "-:"); + if (len != klen) + { + /* protocol was not found */ + goto keepsearching; + } + plen = len; + + /* skip the zone if there is one */ - holder = strstr(holder, newkey); - /* first match */ - if (holder) - { - end = strpbrk(holder, ", \t\n"); - if (end) - { - end = end; /* stop on terminator */ - } - else - { - end = id_string + strsize; /* go to the end of the id string (\0) */ - } - /* move holder so it doesn't include the opening key and deliminator */ - holder = holder + keysize + 3; + /* first check for and eat the dash */ + if (*(tmpstr + plen) == '-') + { + /* a zone is present */ + plen++; /* skip over dash */ + /* make sure zone looks valid */ + len2 = strcspn(tmpstr + plen, ":-/{}\n\t@$#&*^%! ;,.?"); + len = strcspn(tmpstr + plen, ":"); + if (len != len2) + { + /* malformed zone string */ + goto keepsearching; + } + plen += len; + } + + /* check for colon */ + if (*(tmpstr + plen) != ':') + { + /* malformed string */ + goto keepsearching; + } + plen++; /* skip over colon */ + + /* eat the slashes */ + len = strspn(tmpstr + plen, "/"); + if (len != 2) + { + /* malformed string */ + goto keepsearching; + } + plen += len; + + /* we found it jump out of the loop */ + break; + +keepsearching: + /* continue searching just past last substr we found */ + id_string = tmpstr + 1; + tmpstr = NULL; } - else + + if (!tmpstr) { - /* no match */ - free(newkey); - return (NULL); + /* returned NULL so not found */ + return NULL; } - /* figure out how long our substring is */ - retsize = (end - holder); - if ((retstring = (char *) malloc(retsize + 1)) == NULL) + /* tmpstr + plen now points just past :// */ + + /* find end of string, not including white space */ + rlen = strcspn(tmpstr + plen, ", \t\n"); + + /* malloc the string, copy it in and return it */ + retstr = (char *)malloc(rlen + 1); + if (!retstr) { - free(newkey); - return (NULL); + /* out of memory */ + return NULL; } + memcpy(retstr, tmpstr + plen, rlen); + retstr[rlen] = '\0'; - /* copy it out */ - strncpy(retstring, holder, retsize); - retstring[retsize] = '\0'; - - free(newkey); - return (retstring); + return (retstr); } /* diff --git a/src/io/bmi/bmi-method-support.h b/src/io/bmi/bmi-method-support.h index 0167b3a..44b333a 100644 --- a/src/io/bmi/bmi-method-support.h +++ b/src/io/bmi/bmi-method-support.h @@ -11,6 +11,7 @@ #ifndef __BMI_METHOD_SUPPORT_H #define __BMI_METHOD_SUPPORT_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "bmi-types.h" #include "pint-event.h" diff --git a/src/io/bmi/bmi-types.h b/src/io/bmi/bmi-types.h index 684752a..e5468ef 100644 --- a/src/io/bmi/bmi-types.h +++ b/src/io/bmi/bmi-types.h @@ -21,6 +21,7 @@ #ifndef __BMI_TYPES_H #define __BMI_TYPES_H +#include "pvfs2-internal.h" #include #include "pvfs2-debug.h" @@ -45,7 +46,10 @@ typedef int64_t BMI_addr_t; * error codes look like */ typedef int32_t bmi_error_code_t; /**< error code information */ -#define BMI_MAX_ADDR_LEN 256 +/* This is potentially constrained by limits hardcoded in the config + * file parser and/or the tab file parser + */ +#define BMI_MAX_ADDR_LEN 2048 /** BMI method initialization flags */ enum diff --git a/src/io/bmi/bmi.c b/src/io/bmi/bmi.c index de51f79..6e6d14b 100644 --- a/src/io/bmi/bmi.c +++ b/src/io/bmi/bmi.c @@ -12,7 +12,6 @@ #include #include -#include #include #ifndef WIN32 #include @@ -141,7 +140,8 @@ static gen_mutex_t active_method_count_mutex = GEN_MUTEX_INITIALIZER; static struct bmi_method_ops **active_method_table = NULL; -struct method_usage_t { +struct method_usage_t +{ int iters_polled; /* how many iterations since this method was polled */ int iters_active; /* how many iterations since this method had action */ int plan; @@ -174,8 +174,8 @@ static void bmi_check_addr_force_drop (void); * \return 0 on success, -errno on failure */ int BMI_initialize(const char *method_list, - const char *listen_addr, - int flags) + const char *listen_addr, + int flags) { int ret = -1; int i = 0, j = 0; @@ -189,8 +189,8 @@ int BMI_initialize(const char *method_list, if(bmi_initialized_count > 0) { /* Already initialized! Just increment ref count and return. */ - ++bmi_initialized_count; - gen_mutex_unlock(&bmi_initialize_mutex); + ++bmi_initialized_count; + gen_mutex_unlock(&bmi_initialize_mutex); return 0; } ++bmi_initialized_count; @@ -199,15 +199,23 @@ int BMI_initialize(const char *method_list, global_flags = flags; /* server must specify method list at startup, optional for client */ - if (flags & BMI_INIT_SERVER) { - if (!listen_addr || !method_list) - return bmi_errno_to_pvfs(-EINVAL); - } else { - if (listen_addr) - return bmi_errno_to_pvfs(-EINVAL); - if (flags) { - gossip_lerr("Warning: flags ignored on client.\n"); - } + if (flags & BMI_INIT_SERVER) + { + if (!listen_addr || !method_list) + { + return bmi_errno_to_pvfs(-EINVAL); + } + } + else + { + if (listen_addr) + { + return bmi_errno_to_pvfs(-EINVAL); + } + if (flags) + { + gossip_lerr("Warning: flags ignored on client.\n"); + } } /* make sure that id generator is initialized if not already */ @@ -221,150 +229,156 @@ int BMI_initialize(const char *method_list, cur_ref_list = ref_list_new(); if (!cur_ref_list) { - ret = bmi_errno_to_pvfs(-ENOMEM); - goto bmi_initialize_failure; + ret = bmi_errno_to_pvfs(-ENOMEM); + goto bmi_initialize_failure; } /* initialize the known method list from the null-terminated static list */ known_method_count = sizeof(static_methods) / sizeof(static_methods[0]) - 1; known_method_table = malloc( - known_method_count * sizeof(*known_method_table)); + known_method_count * sizeof(*known_method_table)); if (!known_method_table) - return bmi_errno_to_pvfs(-ENOMEM); + return bmi_errno_to_pvfs(-ENOMEM); memcpy(known_method_table, static_methods, - known_method_count * sizeof(*known_method_table)); + known_method_count * sizeof(*known_method_table)); gen_mutex_lock(&active_method_count_mutex); - if (!method_list) { - /* nothing active until lookup */ - active_method_count = 0; - } else { - /* split and initialize the requested method list */ - int numreq = PINT_split_string_list(&requested_methods, method_list); - if (numreq < 1) - { - gossip_lerr("Error: bad method list.\n"); - ret = bmi_errno_to_pvfs(-EINVAL); - gen_mutex_unlock(&active_method_count_mutex); - goto bmi_initialize_failure; - } + if (!method_list) + { + /* nothing active until lookup */ + active_method_count = 0; + } + else + { + /* split and initialize the requested method list */ + int numreq = PINT_split_string_list(&requested_methods, method_list); + if (numreq < 1) + { + gossip_lerr("Error: bad method list.\n"); + ret = bmi_errno_to_pvfs(-EINVAL); + gen_mutex_unlock(&active_method_count_mutex); + goto bmi_initialize_failure; + } gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_initialize: " - "method_list=%s\n", method_list); + "method_list=%s\n", method_list); - /* Today is that day! */ - addr_count = PINT_split_string_list(&listen_addrs, listen_addr); + /* Today is that day! */ + addr_count = PINT_split_string_list(&listen_addrs, listen_addr); gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_initialize: " - "listen_addr=%s\n", listen_addr); - - for (i=0; i, and find the - * part - */ - proto = strstr(requested_methods[i], "bmi_"); - if(!proto) - { - gossip_err("%s: Invalid method name: %s. Method names " - "must start with 'bmi_'\n", - __func__, requested_methods[i]); - ret = -EINVAL; - gen_mutex_unlock(&active_method_count_mutex); - goto bmi_initialize_failure; - } - proto += 4; - - /* match the proper listen addr to the method */ - for(j=0; j, and find the + * part + */ + proto = strstr(requested_methods[i], "bmi_"); + if(!proto) + { + gossip_err("%s: Invalid method name: %s. Method names " + "must start with 'bmi_'\n", + __func__, requested_methods[i]); + ret = -EINVAL; + gen_mutex_unlock(&active_method_count_mutex); + goto bmi_initialize_failure; + } + proto += 4; + + /* match the proper listen addr to the method */ + for(j = 0; j < addr_count; ++j) + { + /* we don't want a strstr here in case the addr has + * the proto as part of the hostname + */ + if(!strncmp(listen_addrs[j], proto, strlen(proto))) + { + /* found the right addr */ + this_addr = listen_addrs[j]; + break; + } + } + + if(!this_addr) + { + /* couldn't find the right listen addr */ + gossip_err("%s: Failed to find an appropriate listening " + "address for the bmi method: %s\n", + __func__, requested_methods[i]); + ret = -EINVAL; + gen_mutex_unlock(&active_method_count_mutex); + goto bmi_initialize_failure; + } gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_initialize: " "Activating %s with %s\n", requested_methods[i], this_addr); - ret = activate_method(requested_methods[i], this_addr, flags); - if (ret < 0) { - ret = bmi_errno_to_pvfs(ret); - gen_mutex_unlock(&active_method_count_mutex); - goto bmi_initialize_failure; - } - free(requested_methods[i]); - } - free(requested_methods); - if(listen_addrs) - { - PINT_free_string_list(listen_addrs, addr_count); - listen_addrs = NULL; - } + ret = activate_method(requested_methods[i], this_addr, flags); + if (ret < 0) + { + ret = bmi_errno_to_pvfs(ret); + gen_mutex_unlock(&active_method_count_mutex); + goto bmi_initialize_failure; + } + free(requested_methods[i]); + } + free(requested_methods); + if(listen_addrs) + { + PINT_free_string_list(listen_addrs, addr_count); + listen_addrs = NULL; + } } gen_mutex_unlock(&active_method_count_mutex); return (0); - bmi_initialize_failure: +bmi_initialize_failure: /* kill reference list */ if (cur_ref_list) { - ref_list_cleanup(cur_ref_list); + ref_list_cleanup(cur_ref_list); } gen_mutex_lock(&active_method_count_mutex); /* look for loaded methods and shut down */ if (active_method_table) { - for (i = 0; i < active_method_count; i++) - { - if (active_method_table[i]) - { - active_method_table[i]->finalize(); - } - } - free(active_method_table); + for (i = 0; i < active_method_count; i++) + { + if (active_method_table[i]) + { + active_method_table[i]->finalize(); + } + } + free(active_method_table); } - if (known_method_table) { - free(known_method_table); - known_method_count = 0; + if (known_method_table) + { + free(known_method_table); + known_method_count = 0; } /* get rid of method string list */ if (requested_methods) { - for (i = 0; i < active_method_count; i++) - { - if (requested_methods[i]) - { - free(requested_methods[i]); - } - } - free(requested_methods); + for (i = 0; i < active_method_count; i++) + { + if (requested_methods[i]) + { + free(requested_methods[i]); + } + } + free(requested_methods); } if(listen_addrs) { - PINT_free_string_list(listen_addrs, addr_count); + PINT_free_string_list(listen_addrs, addr_count); } active_method_count = 0; @@ -391,8 +405,8 @@ int BMI_initialize(const char *method_list, * returns 0 on success, -errno on failure */ int BMI_initialize(const char *module_string, - const char *listen_addr, - int flags) + const char *listen_addr, + int flags) { int ret = -1; @@ -411,7 +425,7 @@ int BMI_initialize(const char *module_string, if (((flags & BMI_INIT_SERVER) && (!listen_addr)) || !module_string) { - return (bmi_errno_to_pvfs(-EINVAL)); + return (bmi_errno_to_pvfs(-EINVAL)); } /* separate out the module list */ @@ -419,9 +433,9 @@ int BMI_initialize(const char *module_string, &modules, module_string); if (active_method_count < 1) { - gossip_lerr("Error: bad module list.\n"); - ret = bmi_errno_to_pvfs(-EINVAL); - goto bmi_initialize_failure; + gossip_lerr("Error: bad module list.\n"); + ret = bmi_errno_to_pvfs(-EINVAL); + goto bmi_initialize_failure; } /* create a table to keep up with the method modules */ @@ -429,70 +443,70 @@ int BMI_initialize(const char *module_string, active_method_count * sizeof(struct bmi_method_ops *)); if (!active_method_table) { - ret = bmi_errno_to_pvfs(-ENOMEM); - goto bmi_initialize_failure; + ret = bmi_errno_to_pvfs(-ENOMEM); + goto bmi_initialize_failure; } /* iterate through each method in the list and load its module */ for (i = 0; i < active_method_count; i++) { - meth_mod = dlopen(modules[i], RTLD_NOW); - if (!meth_mod) - { - gossip_lerr("Error: could not open module: %s\n", dlerror()); - ret = bmi_errno_to_pvfs(-EINVAL); - goto bmi_initialize_failure; - } - dlerror(); + meth_mod = dlopen(modules[i], RTLD_NOW); + if (!meth_mod) + { + gossip_lerr("Error: could not open module: %s\n", dlerror()); + ret = bmi_errno_to_pvfs(-EINVAL); + goto bmi_initialize_failure; + } + dlerror(); - active_method_table[i] = (struct bmi_method_ops *) + active_method_table[i] = (struct bmi_method_ops *) dlsym(meth_mod, "method_interface"); - mod_error = dlerror(); - if (mod_error) - { - gossip_lerr("Error: module load: %s\n", mod_error); - ret = bmi_errno_to_pvfs(-EINVAL); - goto bmi_initialize_failure; - } + mod_error = dlerror(); + if (mod_error) + { + gossip_lerr("Error: module load: %s\n", mod_error); + ret = bmi_errno_to_pvfs(-EINVAL); + goto bmi_initialize_failure; + } } /* make a new reference list */ cur_ref_list = ref_list_new(); if (!cur_ref_list) { - ret = bmi_errno_to_pvfs(-ENOMEM); - goto bmi_initialize_failure; + ret = bmi_errno_to_pvfs(-ENOMEM); + goto bmi_initialize_failure; } /* initialize methods */ for (i = 0; i < active_method_count; i++) { - if (flags & BMI_INIT_SERVER) - { - if ((new_addr = - active_method_table[i]-> - BMI_meth_method_addr_lookup(listen_addr)) != NULL) - { - /* this is a bit of a hack */ - new_addr->method_type = i; - ret = active_method_table[i]->BMI_meth_initialize( + if (flags & BMI_INIT_SERVER) + { + if ((new_addr = + active_method_table[i]-> + BMI_meth_method_addr_lookup(listen_addr)) != NULL) + { + /* this is a bit of a hack */ + new_addr->method_type = i; + ret = active_method_table[i]->BMI_meth_initialize( new_addr, i, flags); - } - else - { - ret = -1; - } - } - else - { - ret = active_method_table[i]->BMI_meth_initialize( + } + else + { + ret = -1; + } + } + else + { + ret = active_method_table[i]->BMI_meth_initialize( NULL, i, flags); - } - if (ret < 0) - { - gossip_lerr("Error: initializing module: %s\n", modules[i]); - goto bmi_initialize_failure; - } + } + if (ret < 0) + { + gossip_lerr("Error: initializing module: %s\n", modules[i]); + goto bmi_initialize_failure; + } } return (0); @@ -502,33 +516,33 @@ int BMI_initialize(const char *module_string, /* kill reference list */ if (cur_ref_list) { - ref_list_cleanup(cur_ref_list); + ref_list_cleanup(cur_ref_list); } /* look for loaded methods and shut down */ if (active_method_table) { - for (i = 0; i < active_method_count; i++) - { - if (active_method_table[i]) - { - active_method_table[i]->BMI_meth_finalize(); - } - } - free(active_method_table); + for (i = 0; i < active_method_count; i++) + { + if (active_method_table[i]) + { + active_method_table[i]->BMI_meth_finalize(); + } + } + free(active_method_table); } /* get rid of method string list */ if (modules) { - for (i = 0; i < active_method_count; i++) - { - if (modules[i]) - { - free(modules[i]); - } - } - free(modules); + for (i = 0; i < active_method_count; i++) + { + if (modules[i]) + { + free(modules[i]); + } + } + free(modules); } return (ret); @@ -556,7 +570,7 @@ int BMI_finalize(void) /* attempt to shut down active methods */ for (i = 0; i < active_method_count; i++) { - active_method_table[i]->finalize(); + active_method_table[i]->finalize(); } active_method_count = 0; free(active_method_table); @@ -566,10 +580,14 @@ int BMI_finalize(void) known_method_count = 0; if (expected_method_usage) + { free(expected_method_usage); + } if (unexpected_method_usage) + { free(unexpected_method_usage); + } /* destroy the reference list */ /* (side effect: destroys all method addresses as well) */ @@ -602,42 +620,40 @@ int BMI_open_context(bmi_context_id* context_id) gen_mutex_lock(&context_mutex); /* find an unused context id */ - for(context_index=0; context_index= BMI_MAX_CONTEXTS) { - /* we don't have any more available! */ - gen_mutex_unlock(&context_mutex); - return(bmi_errno_to_pvfs(-EBUSY)); + /* we don't have any more available! */ + gen_mutex_unlock(&context_mutex); + return(bmi_errno_to_pvfs(-EBUSY)); } gen_mutex_lock(&active_method_count_mutex); /* tell all of the modules about the new context */ for (i = 0; i < active_method_count; i++) { - ret = active_method_table[i]->open_context( - context_index); - if(ret < 0) - { - /* + ret = active_method_table[i]->open_context(context_index); + if(ret < 0) + { + /* one of them failed; kill this context in the previous modules */ --i; while (i >= 0) - { - active_method_table[i]->close_context( - context_index); + { + active_method_table[i]->close_context(context_index); --i; - } - goto out; - } + } + goto out; + } } gen_mutex_unlock(&active_method_count_mutex); @@ -661,15 +677,15 @@ void BMI_close_context(bmi_context_id context_id) if(!context_array[context_id]) { - gen_mutex_unlock(&context_mutex); - return; + gen_mutex_unlock(&context_mutex); + return; } /* tell all of the modules to get rid of this context */ gen_mutex_lock(&active_method_count_mutex); for (i = 0; i < active_method_count; i++) { - active_method_table[i]->close_context(context_id); + active_method_table[i]->close_context(context_id); } context_array[context_id] = 0; gen_mutex_unlock(&active_method_count_mutex); @@ -684,14 +700,14 @@ void BMI_close_context(bmi_context_id context_id) * \return 0 on success, -errno on failure. */ int BMI_post_recv(bmi_op_id_t * id, - BMI_addr_t src, - void *buffer, - bmi_size_t expected_size, - bmi_size_t * actual_size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t src, + void *buffer, + bmi_size_t expected_size, + bmi_size_t * actual_size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; @@ -707,14 +723,21 @@ int BMI_post_recv(bmi_op_id_t * id, tmp_ref = ref_list_search_addr(cur_ref_list, src); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EPROTO)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EPROTO)); } gen_mutex_unlock(&ref_mutex); - ret = tmp_ref->interface->post_recv( - id, tmp_ref->method_addr, buffer, expected_size, actual_size, - buffer_type, tag, user_ptr, context_id, (PVFS_hint)hints); + ret = tmp_ref->interface->post_recv(id, + tmp_ref->method_addr, + buffer, + expected_size, + actual_size, + buffer_type, + tag, + user_ptr, + context_id, + (PVFS_hint)hints); return (ret); } @@ -724,13 +747,13 @@ int BMI_post_recv(bmi_op_id_t * id, * \return 0 on success, -errno on failure. */ int BMI_post_send(bmi_op_id_t * id, - BMI_addr_t dest, - const void *buffer, - bmi_size_t size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t dest, + const void *buffer, + bmi_size_t size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; @@ -746,8 +769,8 @@ int BMI_post_send(bmi_op_id_t * id, tmp_ref = ref_list_search_addr(cur_ref_list, dest); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EPROTO)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EPROTO)); } gen_mutex_unlock(&ref_mutex); @@ -763,21 +786,21 @@ int BMI_post_send(bmi_op_id_t * id, * \return 0 on success, -errno on failure. */ int BMI_post_sendunexpected(bmi_op_id_t * id, - BMI_addr_t dest, - const void *buffer, - bmi_size_t size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t dest, + const void *buffer, + bmi_size_t size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; int ret = -1; gossip_debug(GOSSIP_BMI_DEBUG_OFFSETS, - "BMI_post_sendunexpected: addr: %ld, offset: 0x%lx, size: %ld, tag: %d\n", - (long)dest, (long)buffer, (long)size, (int)tag); + "BMI_post_sendunexpected: addr: %ld, offset: 0x%lx, size: %ld, tag: %d\n", + (long)dest, (long)buffer, (long)size, (int)tag); *id = 0; @@ -785,8 +808,8 @@ int BMI_post_sendunexpected(bmi_op_id_t * id, tmp_ref = ref_list_search_addr(cur_ref_list, dest); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EPROTO)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EPROTO)); } gen_mutex_unlock(&ref_mutex); @@ -802,23 +825,30 @@ int BMI_post_sendunexpected(bmi_op_id_t * id, * \return 0 on success, -errno on failure. */ int BMI_test(bmi_op_id_t id, - int *outcount, - bmi_error_code_t * error_code, - bmi_size_t * actual_size, - void **user_ptr, - int max_idle_time_ms, - bmi_context_id context_id) + int *outcount, + bmi_error_code_t * error_code, + bmi_size_t * actual_size, + void **user_ptr, + int max_idle_time_ms, + bmi_context_id context_id) { struct method_op *target_op = NULL; int ret = -1; if (max_idle_time_ms < 0) - return (bmi_errno_to_pvfs(-EINVAL)); + { + return (bmi_errno_to_pvfs(-EINVAL)); + } *outcount = 0; target_op = id_gen_fast_lookup(id); - assert(target_op->op_id == id); + if (target_op->op_id != id) + { + gossip_err("%s: target_op->op_id (%llu) != id (%llu)\n", + __func__, llu(target_op->op_id), llu(id)); + return ret; + } ret = active_method_table[ target_op->addr->method_type]->test( @@ -828,9 +858,9 @@ int BMI_test(bmi_op_id_t id, /* return 1 if anything completed */ if (ret == 0 && *outcount == 1) { - gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_test completing: %llu\n", llu(id)); - return (1); + return (1); } return (ret); } @@ -844,14 +874,14 @@ int BMI_test(bmi_op_id_t id, * if it becomes used again. */ int BMI_testsome(int incount, - bmi_op_id_t * id_array, - int *outcount, - int *index_array, - bmi_error_code_t * error_code_array, - bmi_size_t * actual_size_array, - void **user_ptr_array, - int max_idle_time_ms, - bmi_context_id context_id) + bmi_op_id_t * id_array, + int *outcount, + int *index_array, + bmi_error_code_t * error_code_array, + bmi_size_t * actual_size_array, + void **user_ptr_array, + int max_idle_time_ms, + bmi_context_id context_id) { int ret = 0; int idle_per_method = 0; @@ -867,87 +897,99 @@ int BMI_testsome(int incount, gen_mutex_unlock(&active_method_count_mutex); if (max_idle_time_ms < 0) - return (bmi_errno_to_pvfs(-EINVAL)); + return (bmi_errno_to_pvfs(-EINVAL)); *outcount = 0; if (tmp_active_method_count == 1) { - /* shortcircuit for perhaps common case of only one method */ - ret = active_method_table[0]->testsome( - incount, id_array, outcount, index_array, - error_code_array, actual_size_array, user_ptr_array, - max_idle_time_ms, context_id); + /* shortcircuit for perhaps common case of only one method */ + ret = active_method_table[0]->testsome( + incount, id_array, outcount, index_array, + error_code_array, actual_size_array, user_ptr_array, + max_idle_time_ms, context_id); - /* return 1 if anything completed */ - if (ret == 0 && *outcount > 0) - return (1); - else - return ret; + /* return 1 if anything completed */ + if (ret == 0 && *outcount > 0) + return (1); + else + return ret; } /* TODO: do something more clever here */ if (max_idle_time_ms) { - idle_per_method = max_idle_time_ms / tmp_active_method_count; - if (!idle_per_method) - idle_per_method = 1; + idle_per_method = max_idle_time_ms / tmp_active_method_count; + if (!idle_per_method) + idle_per_method = 1; } tmp_id_array = (bmi_op_id_t*)malloc(incount*sizeof(bmi_op_id_t)); if(!tmp_id_array) - return(bmi_errno_to_pvfs(-ENOMEM)); + return(bmi_errno_to_pvfs(-ENOMEM)); /* iterate over each active method */ for(i=0; iop_id == id_array[j]); - if(query_op->addr->method_type == i) - { - tmp_id_array[j] = id_array[j]; - need_to_test++; - } - } - } - - /* call testsome if we found any ops for this method */ - if(need_to_test) - { - tmp_outcount = 0; - ret = active_method_table[i]->testsome( - need_to_test, tmp_id_array, &tmp_outcount, - &(index_array[*outcount]), - &(error_code_array[*outcount]), - &(actual_size_array[*outcount]), - user_ptr_array ? &(user_ptr_array[*outcount]) : 0, - idle_per_method, - context_id); - if(ret < 0) - { - /* can't recover from this... */ - gossip_lerr("Error: critical BMI_testsome failure.\n"); - goto out; - } - *outcount += tmp_outcount; - } + if (!query_op) + { + gossip_err("%s: null query_op\n", __func__); + continue; + } + else if (query_op->op_id != id_array[j]) + { + gossip_err("%s: query_op->op_id (%llu) != " + "id_array[%d] (%llu)\n", + __func__, llu(query_op->op_id), + j, llu(id_array[j])); + continue; + } + if(query_op->addr->method_type == i) + { + tmp_id_array[j] = id_array[j]; + need_to_test++; + } + } + } + + /* call testsome if we found any ops for this method */ + if(need_to_test) + { + tmp_outcount = 0; + ret = active_method_table[i]->testsome( + need_to_test, tmp_id_array, &tmp_outcount, + &(index_array[*outcount]), + &(error_code_array[*outcount]), + &(actual_size_array[*outcount]), + user_ptr_array ? &(user_ptr_array[*outcount]) : 0, + idle_per_method, + context_id); + if(ret < 0) + { + /* can't recover from this... */ + gossip_lerr("Error: critical BMI_testsome failure.\n"); + goto out; + } + *outcount += tmp_outcount; + } } out: free(tmp_id_array); if(ret == 0 && *outcount > 0) - return(1); + return(1); else - return(0); + return(0); } @@ -970,7 +1012,7 @@ construct_poll_plan(struct method_usage_t * method_usage, if ((method_usage[i].iters_active <= usage_iters_active) && (!(method_usage[i].flags & BMI_METHOD_FLAG_NO_POLLING))){ /* recently busy, poll */ - if (0) gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + if (0) gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "%s: polling active meth %d: %d / %d\n", __func__, i, method_usage[i].iters_active, usage_iters_active); method_usage[i].plan = 1; @@ -978,7 +1020,7 @@ construct_poll_plan(struct method_usage_t * method_usage, *idle_time_ms = 0; /* busy polling */ } else if (method_usage[i].iters_polled >= usage_iters_starvation) { /* starving, time to poke this one */ - if (0) gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + if (0) gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "%s: polling starving meth %d: %d / %d\n", __func__, i, method_usage[i].iters_polled, usage_iters_starvation); method_usage[i].plan = 1; @@ -1011,9 +1053,9 @@ construct_poll_plan(struct method_usage_t * method_usage, * \return 0 on success, -errno on failure. */ int BMI_testunexpected(int incount, - int *outcount, - struct BMI_unexpected_info *info_array, - int max_idle_time_ms) + int *outcount, + struct BMI_unexpected_info *info_array, + int max_idle_time_ms) { int i = 0; int ret = -1; @@ -1042,7 +1084,7 @@ int BMI_testunexpected(int incount, #ifdef WIN32 free(sub_info); #endif - return (bmi_errno_to_pvfs(-EINVAL)); + return (bmi_errno_to_pvfs(-EINVAL)); } *outcount = 0; @@ -1071,34 +1113,34 @@ int BMI_testunexpected(int incount, if (ret) unexpected_method_usage[i].iters_active = 0; } - i++; + i++; } for (i = 0; i < (*outcount); i++) { - info_array[i].error_code = sub_info[i].error_code; - info_array[i].buffer = sub_info[i].buffer; - info_array[i].size = sub_info[i].size; - info_array[i].tag = sub_info[i].tag; - gen_mutex_lock(&ref_mutex); - tmp_ref = ref_list_search_method_addr( + info_array[i].error_code = sub_info[i].error_code; + info_array[i].buffer = sub_info[i].buffer; + info_array[i].size = sub_info[i].size; + info_array[i].tag = sub_info[i].tag; + gen_mutex_lock(&ref_mutex); + tmp_ref = ref_list_search_method_addr( cur_ref_list, sub_info[i].addr); - if (!tmp_ref) - { - /* yeah, right */ + if (!tmp_ref) + { + /* yeah, right */ #ifdef WIN32 free(sub_info); #endif - gossip_lerr("Error: critical BMI_testunexpected failure.\n"); - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EPROTO)); - } + gossip_lerr("Error: critical BMI_testunexpected failure.\n"); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EPROTO)); + } if(global_flags & BMI_AUTO_REF_COUNT) { tmp_ref->ref_count++; } - gen_mutex_unlock(&ref_mutex); - info_array[i].addr = tmp_ref->bmi_addr; + gen_mutex_unlock(&ref_mutex); + info_array[i].addr = tmp_ref->bmi_addr; } #ifdef WIN32 free(sub_info); @@ -1106,7 +1148,7 @@ int BMI_testunexpected(int incount, /* return 1 if anything completed */ if (ret == 0 && *outcount > 0) { - return (1); + return (1); } return (0); } @@ -1118,13 +1160,13 @@ int BMI_testunexpected(int incount, * \returns 0 on success, -errno on failure. */ int BMI_testcontext(int incount, - bmi_op_id_t* out_id_array, - int *outcount, - bmi_error_code_t * error_code_array, - bmi_size_t * actual_size_array, - void **user_ptr_array, - int max_idle_time_ms, - bmi_context_id context_id) + bmi_op_id_t* out_id_array, + int *outcount, + bmi_error_code_t * error_code_array, + bmi_size_t * actual_size_array, + void **user_ptr_array, + int max_idle_time_ms, + bmi_context_id context_id) { int i = 0; int ret = -1; @@ -1141,25 +1183,25 @@ int BMI_testcontext(int incount, if (max_idle_time_ms < 0) { - return (bmi_errno_to_pvfs(-EINVAL)); + return (bmi_errno_to_pvfs(-EINVAL)); } *outcount = 0; if (tmp_active_method_count < 1) { - /* nothing active yet, just snooze and return */ - if (max_idle_time_ms > 0) - { + /* nothing active yet, just snooze and return */ + if (max_idle_time_ms > 0) + { #ifdef WIN32 Sleep(2); #else ts.tv_sec = 0; - ts.tv_nsec = 2000; - nanosleep(&ts, NULL); + ts.tv_nsec = 2000; + nanosleep(&ts, NULL); #endif - } - return(0); + } + return(0); } construct_poll_plan(expected_method_usage, @@ -1190,18 +1232,18 @@ int BMI_testcontext(int incount, if (ret) expected_method_usage[i].iters_active = 0; } - i++; + i++; } /* return 1 if anything completed */ if (ret == 0 && *outcount > 0) { - for (i = 0; i < *outcount; i++) - { - gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, - "BMI_testcontext completing: %llu\n", llu(out_id_array[i])); - } - return (1); + for (i = 0; i < *outcount; i++) + { + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + "BMI_testcontext completing: %llu\n", llu(out_id_array[i])); + } + return (1); } return (0); @@ -1225,8 +1267,8 @@ const char* BMI_addr_rev_lookup(BMI_addr_t addr) tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (NULL); + gen_mutex_unlock(&ref_mutex); + return (NULL); } gen_mutex_unlock(&ref_mutex); @@ -1253,8 +1295,8 @@ const char* BMI_addr_rev_lookup_unexpected(BMI_addr_t addr) tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return ("UNKNOWN"); + gen_mutex_unlock(&ref_mutex); + return ("UNKNOWN"); } gen_mutex_unlock(&ref_mutex); @@ -1273,8 +1315,8 @@ const char* BMI_addr_rev_lookup_unexpected(BMI_addr_t addr) * \return Pointer to buffer on success, NULL on failure. */ void *BMI_memalloc(BMI_addr_t addr, - bmi_size_t size, - enum bmi_op_type send_recv) + bmi_size_t size, + enum bmi_op_type send_recv) { void *new_buffer = NULL; ref_st_p tmp_ref = NULL; @@ -1284,8 +1326,8 @@ void *BMI_memalloc(BMI_addr_t addr, tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (NULL); + gen_mutex_unlock(&ref_mutex); + return (NULL); } gen_mutex_unlock(&ref_mutex); @@ -1305,9 +1347,9 @@ void *BMI_memalloc(BMI_addr_t addr, * \return 0 on success, -errno on failure. */ int BMI_memfree(BMI_addr_t addr, - void *buffer, - bmi_size_t size, - enum bmi_op_type send_recv) + void *buffer, + bmi_size_t size, + enum bmi_op_type send_recv) { ref_st_p tmp_ref = NULL; int ret = -1; @@ -1317,8 +1359,8 @@ int BMI_memfree(BMI_addr_t addr, tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EINVAL)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EINVAL)); } gen_mutex_unlock(&ref_mutex); @@ -1334,7 +1376,7 @@ int BMI_memfree(BMI_addr_t addr, * \return 0 on success, -errno on failure. */ int BMI_unexpected_free(BMI_addr_t addr, - void *buffer) + void *buffer) { ref_st_p tmp_ref = NULL; int ret = -1; @@ -1344,8 +1386,8 @@ int BMI_unexpected_free(BMI_addr_t addr, tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EINVAL)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EINVAL)); } gen_mutex_unlock(&ref_mutex); @@ -1365,8 +1407,8 @@ int BMI_unexpected_free(BMI_addr_t addr, * \return 0 on success, -errno on failure. */ int BMI_set_info(BMI_addr_t addr, - int option, - void *inout_parameter) + int option, + void *inout_parameter) { int ret = -1; int i = 0; @@ -1380,26 +1422,26 @@ int BMI_set_info(BMI_addr_t addr, */ if (!addr) { - if (!active_method_table) - { - return (bmi_errno_to_pvfs(-EINVAL)); - } - gen_mutex_lock(&active_method_count_mutex); - for (i = 0; i < active_method_count; i++) - { - ret = active_method_table[i]->set_info( + if (!active_method_table) + { + return (bmi_errno_to_pvfs(-EINVAL)); + } + gen_mutex_lock(&active_method_count_mutex); + for (i = 0; i < active_method_count; i++) + { + ret = active_method_table[i]->set_info( option, inout_parameter); - /* we bail out if even a single set_info fails */ - if (ret < 0) - { - gossip_lerr( + /* we bail out if even a single set_info fails */ + if (ret < 0) + { + gossip_lerr( "Error: failure on set_info to method: %d\n", i); - gen_mutex_unlock(&active_method_count_mutex); - return (ret); - } - } - gen_mutex_unlock(&active_method_count_mutex); - return (0); + gen_mutex_unlock(&active_method_count_mutex); + return (ret); + } + } + gen_mutex_unlock(&active_method_count_mutex); + return (0); } gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, @@ -1410,34 +1452,39 @@ int BMI_set_info(BMI_addr_t addr, tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EINVAL)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EINVAL)); } /* shortcut address reference counting */ if(option == BMI_INC_ADDR_REF) { - tmp_ref->ref_count++; + tmp_ref->ref_count++; gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "[BMI CONTROL]: %s: incremented ref %llu to: %d\n", __func__, llu(addr), tmp_ref->ref_count); - gen_mutex_unlock(&ref_mutex); - return(0); + gen_mutex_unlock(&ref_mutex); + return(0); } if(option == BMI_DEC_ADDR_REF) { - tmp_ref->ref_count--; + tmp_ref->ref_count--; gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "[BMI CONTROL]: %s: decremented ref %llu to: %d\n", __func__, llu(addr), tmp_ref->ref_count); - assert(tmp_ref->ref_count >= 0); + if (tmp_ref->ref_count < 0) + { + gossip_err( "%s: tmp_ref->ref_count < 0", __func__); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EINVAL)); + } - if(tmp_ref->ref_count == 0) - { + if(tmp_ref->ref_count == 0) + { bmi_addr_drop(tmp_ref); - } - gen_mutex_unlock(&ref_mutex); - return(0); + } + gen_mutex_unlock(&ref_mutex); + return(0); } /* if the caller requests a TCP specific close socket action */ @@ -1450,7 +1497,7 @@ int BMI_set_info(BMI_addr_t addr, * out the entire address structure and anything linked to it so * that the next addr_lookup starts from scratch */ - gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "[BMI CONTROL]: %s: Closing bmi_tcp " "connection at caller's request.\n", __func__); @@ -1473,8 +1520,8 @@ int BMI_set_info(BMI_addr_t addr, * \return 0 on success, -errno on failure. */ int BMI_get_info(BMI_addr_t addr, - int option, - void *inout_parameter) + int option, + void *inout_parameter) { int i = 0; int maxsize = 0; @@ -1484,53 +1531,53 @@ int BMI_get_info(BMI_addr_t addr, switch (option) { - /* check to see if the interface is initialized */ + /* check to see if the interface is initialized */ case BMI_CHECK_INIT: - gen_mutex_lock(&active_method_count_mutex); - if (active_method_count > 0) - { - gen_mutex_unlock(&active_method_count_mutex); - return (0); - } - else - { - gen_mutex_unlock(&active_method_count_mutex); - return (bmi_errno_to_pvfs(-ENETDOWN)); - } + gen_mutex_lock(&active_method_count_mutex); + if (active_method_count > 0) + { + gen_mutex_unlock(&active_method_count_mutex); + return (0); + } + else + { + gen_mutex_unlock(&active_method_count_mutex); + return (bmi_errno_to_pvfs(-ENETDOWN)); + } case BMI_CHECK_MAXSIZE: - gen_mutex_lock(&active_method_count_mutex); - for (i = 0; i < active_method_count; i++) - { - ret = active_method_table[i]->get_info( + gen_mutex_lock(&active_method_count_mutex); + for (i = 0; i < active_method_count; i++) + { + ret = active_method_table[i]->get_info( option, &tmp_maxsize); - if (ret < 0) - { - return (ret); - } - if (i == 0) - { - maxsize = tmp_maxsize; - } - else - { - if (tmp_maxsize < maxsize) - maxsize = tmp_maxsize; - } - *((int *) inout_parameter) = maxsize; - } - gen_mutex_unlock(&active_method_count_mutex); - break; + if (ret < 0) + { + return (ret); + } + if (i == 0) + { + maxsize = tmp_maxsize; + } + else + { + if (tmp_maxsize < maxsize) + maxsize = tmp_maxsize; + } + *((int *) inout_parameter) = maxsize; + } + gen_mutex_unlock(&active_method_count_mutex); + break; case BMI_GET_METH_ADDR: - gen_mutex_lock(&ref_mutex); - tmp_ref = ref_list_search_addr(cur_ref_list, addr); - if(!tmp_ref) - { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EINVAL)); - } - gen_mutex_unlock(&ref_mutex); - *((void**) inout_parameter) = tmp_ref->method_addr; - break; + gen_mutex_lock(&ref_mutex); + tmp_ref = ref_list_search_addr(cur_ref_list, addr); + if(!tmp_ref) + { + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EINVAL)); + } + gen_mutex_unlock(&ref_mutex); + *((void**) inout_parameter) = tmp_ref->method_addr; + break; case BMI_GET_UNEXP_SIZE: gen_mutex_lock(&ref_mutex); tmp_ref = ref_list_search_addr(cur_ref_list, addr); @@ -1549,7 +1596,7 @@ int BMI_get_info(BMI_addr_t addr, break; default: - return (bmi_errno_to_pvfs(-ENOSYS)); + return (bmi_errno_to_pvfs(-ENOSYS)); } return (0); } @@ -1570,15 +1617,15 @@ int BMI_query_addr_range (BMI_addr_t addr, const char *id_string, int netmask) if((strlen(id_string)+1) > BMI_MAX_ADDR_LEN) { - return(bmi_errno_to_pvfs(-ENAMETOOLONG)); + return(bmi_errno_to_pvfs(-ENAMETOOLONG)); } /* lookup the provided address */ gen_mutex_lock(&ref_mutex); tmp_ref = ref_list_search_addr(cur_ref_list, addr); if (!tmp_ref) { - gen_mutex_unlock(&ref_mutex); - return (bmi_errno_to_pvfs(-EPROTO)); + gen_mutex_unlock(&ref_mutex); + return (bmi_errno_to_pvfs(-EPROTO)); } gen_mutex_unlock(&ref_mutex); @@ -1622,7 +1669,7 @@ int BMI_query_addr_range (BMI_addr_t addr, const char *id_string, int netmask) failed = 1; break; } - i++; + i++; } gen_mutex_unlock(&active_method_count_mutex); free(provided_method_name); @@ -1639,15 +1686,18 @@ int BMI_query_addr_range (BMI_addr_t addr, const char *id_string, int netmask) int BMI_addr_lookup(BMI_addr_t * new_addr, const char *id_string) { + ref_st_p new_ref = NULL; bmi_method_addr_p meth_addr = NULL; int ret = -1; int i = 0; int failed; + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "BMI_addr_lookup: %s\n", id_string); + if((strlen(id_string)+1) > BMI_MAX_ADDR_LEN) { - return(bmi_errno_to_pvfs(-ENAMETOOLONG)); + return(bmi_errno_to_pvfs(-ENAMETOOLONG)); } /* set the addr to zero in case we fail */ @@ -1661,10 +1711,11 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, if (new_ref) { - /* we found it. */ - *new_addr = new_ref->bmi_addr; - return (0); + /* we found it. */ + *new_addr = new_ref->bmi_addr; + return (0); } + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "\taddr not found, go to methods\n"); /* Now we will run through each method looking for one that * responds successfully. It is assumed that they are already @@ -1675,36 +1726,49 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, while ((i < active_method_count) && !(meth_addr = active_method_table[i]->method_addr_lookup(id_string))) { - i++; + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "\tLooking up in active method\n"); + i++; } /* if not found, try to bring it up now */ failed = 0; - if (!meth_addr) { - for (i=0; i "bmi_x" */ - name = known_method_table[i]->method_name + 4; - if (!strncmp(id_string, name, strlen(name))) { - ret = activate_method(known_method_table[i]->method_name, 0, 0); - if (ret < 0) { + if (!meth_addr) + { + for (i = 0; i < known_method_count; i++) + { + const char *name; + /* only bother with those not active */ + int j; + for (j=0; j "bmi_x" */ + name = known_method_table[i]->method_name + 4; + if (!strncmp(id_string, name, strlen(name))) + { + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "\tActivating method\n"); + ret = activate_method(known_method_table[i]->method_name, 0, 0); + if (ret < 0) + { failed = 1; break; } - meth_addr = known_method_table[i]-> - method_addr_lookup(id_string); - i = active_method_count - 1; /* point at the new one */ - break; - } - } + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "\tLooking up in method\n"); + meth_addr = known_method_table[i]-> + method_addr_lookup(id_string); + i = active_method_count - 1; /* point at the new one */ + break; + } + } } gen_mutex_unlock(&active_method_count_mutex); if (failed) @@ -1720,8 +1784,8 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, new_ref = alloc_ref_st(); if (!new_ref) { - ret = bmi_errno_to_pvfs(-ENOMEM); - goto bmi_addr_lookup_failure; + ret = bmi_errno_to_pvfs(-ENOMEM); + goto bmi_addr_lookup_failure; } /* fill in the details */ @@ -1730,8 +1794,8 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, new_ref->id_string = (char *) malloc(strlen(id_string) + 1); if (!new_ref->id_string) { - ret = bmi_errno_to_pvfs(errno); - goto bmi_addr_lookup_failure; + ret = bmi_errno_to_pvfs(errno); + goto bmi_addr_lookup_failure; } strcpy(new_ref->id_string, id_string); new_ref->interface = active_method_table[i]; @@ -1748,13 +1812,13 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, if (meth_addr) { - active_method_table[i]->set_info( + active_method_table[i]->set_info( BMI_DROP_ADDR, meth_addr); } if (new_ref) { - dealloc_ref_st(new_ref); + dealloc_ref_st(new_ref); } return (ret); @@ -1768,16 +1832,16 @@ int BMI_addr_lookup(BMI_addr_t * new_addr, * -errno on failure. */ int BMI_post_send_list(bmi_op_id_t * id, - BMI_addr_t dest, - const void *const *buffer_list, - const bmi_size_t *size_list, - int list_count, - /* "total_size" is the sum of the size list */ - bmi_size_t total_size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t dest, + const void *const *buffer_list, + const bmi_size_t *size_list, + int list_count, + /* "total_size" is the sum of the size list */ + bmi_size_t total_size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; @@ -1787,14 +1851,14 @@ int BMI_post_send_list(bmi_op_id_t * id, int i; gossip_debug(GOSSIP_BMI_DEBUG_OFFSETS, - "BMI_post_send_list: addr: %ld, count: %d, total_size: %ld, tag: %d\n", - (long)dest, list_count, (long)total_size, (int)tag); + "BMI_post_send_list: addr: %ld, count: %d, total_size: %ld, tag: %d\n", + (long)dest, list_count, (long)total_size, (int)tag); for(i=0; iinterface->post_send_list) { - ret = tmp_ref->interface->post_send_list( + ret = tmp_ref->interface->post_send_list( id, tmp_ref->method_addr, buffer_list, size_list, list_count, total_size, buffer_type, tag, user_ptr, context_id, (PVFS_hint)hints); - return (ret); + return (ret); } gossip_lerr("Error: method doesn't implement send_list.\n"); @@ -1836,16 +1900,16 @@ int BMI_post_send_list(bmi_op_id_t * id, * -errno on failure. */ int BMI_post_recv_list(bmi_op_id_t * id, - BMI_addr_t src, - void *const *buffer_list, - const bmi_size_t *size_list, - int list_count, - bmi_size_t total_expected_size, - bmi_size_t * total_actual_size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t src, + void *const *buffer_list, + const bmi_size_t *size_list, + int list_count, + bmi_size_t total_expected_size, + bmi_size_t * total_actual_size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; @@ -1855,14 +1919,14 @@ int BMI_post_recv_list(bmi_op_id_t * id, int i; gossip_debug(GOSSIP_BMI_DEBUG_OFFSETS, - "BMI_post_recv_list: addr: %ld, count: %d, total_size: %ld, tag: %d\n", - (long)src, list_count, (long)total_expected_size, (int)tag); + "BMI_post_recv_list: addr: %ld, count: %d, total_size: %ld, tag: %d\n", + (long)src, list_count, (long)total_expected_size, (int)tag); for(i=0; iinterface->post_recv_list) { - ret = tmp_ref->interface->post_recv_list( + ret = tmp_ref->interface->post_recv_list( id, tmp_ref->method_addr, buffer_list, size_list, list_count, total_expected_size, total_actual_size, buffer_type, tag, user_ptr, context_id, (PVFS_hint)hints); - return (ret); + return (ret); } gossip_lerr("Error: method doesn't implement recv_list.\n"); @@ -1903,15 +1967,15 @@ int BMI_post_recv_list(bmi_op_id_t * id, * -errno on failure. */ int BMI_post_sendunexpected_list(bmi_op_id_t * id, - BMI_addr_t dest, - const void *const *buffer_list, - const bmi_size_t *size_list, - int list_count, - bmi_size_t total_size, - enum bmi_buffer_type buffer_type, - bmi_msg_tag_t tag, - void *user_ptr, - bmi_context_id context_id, + BMI_addr_t dest, + const void *const *buffer_list, + const bmi_size_t *size_list, + int list_count, + bmi_size_t total_size, + enum bmi_buffer_type buffer_type, + bmi_msg_tag_t tag, + void *user_ptr, + bmi_context_id context_id, bmi_hint hints) { ref_st_p tmp_ref = NULL; @@ -1921,15 +1985,15 @@ int BMI_post_sendunexpected_list(bmi_op_id_t * id, int i; gossip_debug(GOSSIP_BMI_DEBUG_OFFSETS, - "BMI_post_sendunexpected_list: addr: %ld, count: %d, " + "BMI_post_sendunexpected_list: addr: %ld, count: %d, " "total_size: %ld, tag: %d\n", (long)dest, list_count, (long)total_size, (int)tag); for(i=0; iinterface->post_send_list) { - ret = tmp_ref->interface->post_sendunexpected_list( + ret = tmp_ref->interface->post_sendunexpected_list( id, tmp_ref->method_addr, buffer_list, size_list, list_count, total_size, buffer_type, tag, user_ptr, context_id, (PVFS_hint)hints); - return (ret); + return (ret); } gossip_lerr("Error: method doesn't implement sendunexpected_list.\n"); @@ -1968,7 +2032,7 @@ int BMI_post_sendunexpected_list(bmi_op_id_t * id, * \return 0 on success, -errno on failure. */ int BMI_cancel(bmi_op_id_t id, - bmi_context_id context_id) + bmi_context_id context_id) { struct method_op *target_op = NULL; int ret = -1; @@ -1985,19 +2049,24 @@ int BMI_cancel(bmi_op_id_t id, return(0); } - assert(target_op->op_id == id); + if (target_op->op_id != id) + { + gossip_err("%s: target_op->op_id (%llu) != id (%llu)\n", + __func__, llu(target_op->op_id), llu(id)); + ret = bmi_errno_to_pvfs(-EINVAL); + } if(active_method_table[target_op->addr->method_type]->cancel) { - ret = active_method_table[ + ret = active_method_table[ target_op->addr->method_type]->cancel( id, context_id); } else { - gossip_err("Error: BMI_cancel() unimplemented " + gossip_err("Error: BMI_cancel() unimplemented " "for this module.\n"); - ret = bmi_errno_to_pvfs(-ENOSYS); + ret = bmi_errno_to_pvfs(-ENOSYS); } return (ret); @@ -2032,7 +2101,7 @@ BMI_addr_t bmi_method_addr_reg_callback(bmi_method_addr_p map) new_ref = alloc_ref_st(); if (!new_ref) { - return 0; + return 0; } /* @@ -2134,18 +2203,18 @@ activate_method(const char *name, const char *listen_addr, int flags) /* already active? */ for (i=0; imethod_name, name)) break; + if (!strcmp(active_method_table[i]->method_name, name)) break; if (i < active_method_count) { - return 0; + return 0; } /* is the method known? */ for (i=0; imethod_name, name)) break; + if (!strcmp(known_method_table[i]->method_name, name)) break; if (i == known_method_count) { - gossip_lerr("Error: no method available for %s.\n", name); - return -ENOPROTOOPT; + gossip_lerr("Error: no method available for %s.\n", name); + return -ENOPROTOOPT; } meth = known_method_table[i]; @@ -2157,15 +2226,15 @@ activate_method(const char *name, const char *listen_addr, int flags) /* toss it into the active table */ x = active_method_table; active_method_table = malloc( - (active_method_count + 1) * sizeof(*active_method_table)); + (active_method_count + 1) * sizeof(*active_method_table)); if (!active_method_table) { - active_method_table = x; - return -ENOMEM; + active_method_table = x; + return -ENOMEM; } if (active_method_count) { - memcpy(active_method_table, x, - active_method_count * sizeof(*active_method_table)); - free(x); + memcpy(active_method_table, x, + active_method_count * sizeof(*active_method_table)); + free(x); } active_method_table[active_method_count] = meth; @@ -2185,16 +2254,16 @@ activate_method(const char *name, const char *listen_addr, int flags) /* initialize it */ new_addr = 0; if (listen_addr) { - new_addr = meth->method_addr_lookup(listen_addr); - if (!new_addr) { - gossip_err( - "Error: failed to lookup listen address %s for method %s.\n", - listen_addr, name); - --active_method_count; - return -EINVAL; - } - /* this is a bit of a hack */ - new_addr->method_type = active_method_count - 1; + new_addr = meth->method_addr_lookup(listen_addr); + if (!new_addr) { + gossip_err( + "Error: failed to lookup listen address %s for method %s.\n", + listen_addr, name); + --active_method_count; + return -EINVAL; + } + /* this is a bit of a hack */ + new_addr->method_type = active_method_count - 1; } gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "activate_method: " @@ -2203,19 +2272,19 @@ activate_method(const char *name, const char *listen_addr, int flags) ret = meth->initialize(new_addr, active_method_count - 1, flags); if (ret < 0) { - gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, + gossip_debug(GOSSIP_BMI_DEBUG_CONTROL, "failed to initialize method %s.\n", name); - --active_method_count; - return ret; + --active_method_count; + return ret; } /* tell it about any open contexts */ for (i=0; iopen_context(i); - if (ret < 0) - break; - } + if (context_array[i]) { + ret = meth->open_context(i); + if (ret < 0) + break; + } return ret; } diff --git a/src/io/bmi/bmi.h b/src/io/bmi/bmi.h index c918221..8d6743a 100644 --- a/src/io/bmi/bmi.h +++ b/src/io/bmi/bmi.h @@ -20,6 +20,7 @@ #ifndef __BMI_H #define __BMI_H +#include "pvfs2-internal.h" #include "bmi-types.h" /** used to describe unexpected message arrivals. */ diff --git a/src/io/bmi/bmi_gm/bmi-gm-addr-list.c b/src/io/bmi/bmi_gm/bmi-gm-addr-list.c index f0665a1..5bc53c7 100644 --- a/src/io/bmi/bmi_gm/bmi-gm-addr-list.c +++ b/src/io/bmi/bmi_gm/bmi-gm-addr-list.c @@ -11,6 +11,7 @@ #include "bmi-gm-addressing.h" #include "bmi-gm-addr-list.h" #include "gossip.h" +#include "pvfs2-internal.h" #include diff --git a/src/io/bmi/bmi_gm/bmi-gm-bufferpool.c b/src/io/bmi/bmi_gm/bmi-gm-bufferpool.c index 57e490a..80e9d43 100644 --- a/src/io/bmi/bmi_gm/bmi-gm-bufferpool.c +++ b/src/io/bmi/bmi_gm/bmi-gm-bufferpool.c @@ -10,6 +10,7 @@ #include #include +#include "pvfs2-internal.h" #include "gossip.h" #include "quicklist.h" #include "bmi-gm-bufferpool.h" diff --git a/src/io/bmi/bmi_gm/bmi-gm.c b/src/io/bmi/bmi_gm/bmi-gm.c index 8fd9866..0a6a439 100644 --- a/src/io/bmi/bmi_gm/bmi-gm.c +++ b/src/io/bmi/bmi_gm/bmi-gm.c @@ -29,6 +29,7 @@ #ifdef ENABLE_GM_REGCACHE #include "bmi-gm-regcache.h" #endif +#include "pvfs2-internal.h" #include "pvfs2-debug.h" static gen_mutex_t interface_mutex = GEN_MUTEX_INITIALIZER; diff --git a/src/io/bmi/bmi_ib/ib.c b/src/io/bmi/bmi_ib/ib.c index 0808797..947fab6 100644 --- a/src/io/bmi/bmi_ib/ib.c +++ b/src/io/bmi/bmi_ib/ib.c @@ -22,6 +22,7 @@ #include /* bmi_method_addr_reg_callback */ #include /* gen_mutex_t ... */ #include +#include #include "pint-hint.h" #ifdef HAVE_VALGRIND_H @@ -44,6 +45,15 @@ static int bmi_ib_method_id; * vapi and one for openib */ ib_device_t *ib_device __hidden = NULL; +/* TCP listen backlog */ +static int listen_backlog = 16384; + +/* accept thread variables */ +static gen_mutex_t accept_thread_mutex = GEN_MUTEX_INITIALIZER; +int accept_thread_shutdown = 0; +pthread_t accept_thread_id; +int accept_timeout_ms = 2000; + /* these all vector through the ib_device */ #define new_connection ib_device->func.new_connection #define close_connection ib_device->func.close_connection @@ -84,9 +94,21 @@ static int send_cts(struct ib_work *rq); static void ib_close_connection(ib_connection_t *c); static int ib_tcp_client_connect(ib_method_addr_t *ibmap, struct bmi_method_addr *remote_map); -static int ib_tcp_server_check_new_connections(void); static int ib_block_for_activity(int timeout_ms); +void *ib_tcp_server_accept_thread(void *arg); +void *ib_tcp_server_process_client_thread(void *arg); + + +/* structure to hold TCP info passed to the accept thread */ +struct tcp_conn { + int port; + char *hostname; + char peername[2048]; + int s; +}; + + /* * Return string form of work completion opcode field. */ @@ -111,19 +133,25 @@ static const char *wc_opcode_string(int opcode) static int ib_check_cq(void) { int ret = 0; + struct buf_head *bh = NULL; + struct ib_work *sq = NULL; for (;;) { struct bmi_ib_wc wc; int vret; + bh = NULL; + sq = NULL; + vret = check_cq(&wc); - if (vret == 0) + if (vret == 0 || wc.id == 0) break; /* empty */ debug(4, "%s: found something", __func__); - ++ret; + if (wc.status != 0) { - struct buf_head *bh = ptr_from_int64(wc.id); + bh = ptr_from_int64(wc.id); + /* opcode is not necessarily valid; only wr_id, status, qp_num, * and vendor_err can be relied upon */ if (wc.opcode == BMI_IB_OP_SEND) { @@ -137,13 +165,14 @@ static int ib_check_cq(void) __func__, bh->c->peername); } } - } else { + } + else { warning("%s: entry id 0x%llx opcode %s error %s from %s", __func__, llu(wc.id), wc_opcode_string(wc.opcode), wc_status_string(wc.status), bh->c->peername); - continue; } + continue; } if (wc.opcode == BMI_IB_OP_RECV) { @@ -151,9 +180,14 @@ static int ib_check_cq(void) * Remote side did a send to us. */ msg_header_common_t mh_common; - struct buf_head *bh = ptr_from_int64(wc.id); - char *ptr = bh->buf; u_int32_t byte_len = wc.byte_len; + char *ptr = NULL; + + bh = ptr_from_int64(wc.id); + if (!bh) { + continue; + } + ptr = bh->buf; VALGRIND_MAKE_MEM_DEFINED(ptr, byte_len); decode_msg_header_common_t(&ptr, &mh_common); @@ -165,23 +199,17 @@ static int ib_check_cq(void) if (mh_common.type == MSG_CTS) { /* incoming CTS messages go to the send engine */ encourage_send_incoming_cts(bh, byte_len); - } else { + } + else { /* something for the recv side, no known rq yet */ encourage_recv_incoming(bh, mh_common.type, byte_len); } - - } else if (wc.opcode == BMI_IB_OP_RDMA_WRITE) { + } + else if (wc.opcode == BMI_IB_OP_RDMA_WRITE) { /* completion event for the rdma write we initiated, used * to signal memory unpin etc. */ - struct ib_work *sq = ptr_from_int64(wc.id); - - debug(3, "%s: sq %p %s", __func__, sq, - sq_state_name(sq->state.send)); - - bmi_ib_assert(sq->state.send == SQ_WAITING_DATA_SEND_COMPLETION, - "%s: wrong send state %s", __func__, - sq_state_name(sq->state.send)); + sq = ptr_from_int64(wc.id); sq->state.send = SQ_WAITING_RTS_DONE_BUFFER; @@ -192,17 +220,21 @@ static int ib_check_cq(void) sq_state_name(sq->state.send)); encourage_rts_done_waiting_buffer(sq); + } + else if (wc.opcode == BMI_IB_OP_SEND) { - } else if (wc.opcode == BMI_IB_OP_SEND) { - - struct buf_head *bh = ptr_from_int64(wc.id); - struct ib_work *sq = bh->sq; + bh = ptr_from_int64(wc.id); + if (!bh) { + continue; + } + sq = bh->sq; if (sq == NULL) { /* MSG_BYE or MSG_CREDIT */ debug(2, "%s: MSG_BYE or MSG_CREDIT completed locally", __func__); - } else if (sq->type == BMI_SEND) { + } + else if (sq->type == BMI_SEND) { sq_state_t state = sq->state.send; if (state == SQ_WAITING_EAGER_SEND_COMPLETION) @@ -215,15 +247,17 @@ static int ib_check_cq(void) sq->state.send = SQ_WAITING_USER_TEST; else if (state == SQ_CANCELLED) ; - else - bmi_ib_assert(0, "%s: unknown send state %s (%d) of sq %p", + else { + warning("%s: unknown send state %s (%d) of sq %p", __func__, sq_state_name(sq->state.send), sq->state.send, sq); + continue; + } debug(2, "%s: send to %s completed locally: sq %p -> %s", __func__, bh->c->peername, sq, sq_state_name(sq->state.send)); - - } else { + } + else { struct ib_work *rq = sq; /* rename */ rq_state_t state = rq->state.recv; @@ -231,18 +265,20 @@ static int ib_check_cq(void) rq->state.recv = RQ_RTS_WAITING_RTS_DONE; else if (state == RQ_CANCELLED) ; - else - bmi_ib_assert(0, "%s: unknown recv state %s of rq %p", + else { + warning("%s: unknown recv state %s of rq %p", __func__, rq_state_name(rq->state.recv), rq); + continue; + } debug(2, "%s: send to %s completed locally: rq %p -> %s", __func__, bh->c->peername, rq, rq_state_name(rq->state.recv)); } - + ++ret; qlist_add_tail(&bh->list, &bh->c->eager_send_buf_free); - - } else { - error("%s: cq entry id 0x%llx opcode %d unexpected", __func__, + } + else { + warning("%s: cq entry id 0x%llx opcode %d unexpected", __func__, llu(wc.id), wc.opcode); } } @@ -270,8 +306,13 @@ static struct buf_head *get_eager_buf(ib_connection_t *c) if (c->send_credit > 0) { --c->send_credit; bh = qlist_try_del_head(&c->eager_send_buf_free); - bmi_ib_assert(bh, "%s: empty eager_send_buf_free list, peer %s", - __func__, c->peername); + if (!bh) + { + error("%s: empty eager_send_buf_free list, peer %s", + __func__, c->peername); + c->send_credit++; + return NULL; + } } return bh; } @@ -292,7 +333,12 @@ static void post_rr(ib_connection_t *c, struct buf_head *bh) /* one credit saved back for just this situation, do not check */ --c->send_credit; bh = qlist_try_del_head(&c->eager_send_buf_free); - bmi_ib_assert(bh, "%s: empty eager_send_buf_free list", __func__); + if (!bh) + { + error("%s: empty eager_send_buf_free list", __func__); + c->send_credit++; + return; + } bh->sq = NULL; debug(2, "%s: return %d credits to %s", __func__, c->return_credit, c->peername); @@ -311,10 +357,20 @@ static void encourage_send_waiting_buffer(struct ib_work *sq) struct buf_head *bh; ib_connection_t *c = sq->c; + if (!sq) + { + error("%s: no sq", __func__); + return; + } + debug(3, "%s: sq %p", __func__, sq); - bmi_ib_assert(sq->state.send == SQ_WAITING_BUFFER, - "%s: wrong send state %s", __func__, - sq_state_name(sq->state.send)); + + if (sq->state.send != SQ_WAITING_BUFFER) + { + error("%s: wrong send state %s", + __func__, sq_state_name(sq->state.send)); + return; + } bh = get_eager_buf(c); if (!bh) { @@ -332,6 +388,7 @@ static void encourage_send_waiting_buffer(struct ib_work *sq) msg_header_eager_t mh_eager; char *ptr = bh->buf; + memset(&mh_eager, 0, sizeof(msg_header_eager_t)); msg_header_init(&mh_eager.c, c, sq->is_unexpected ? MSG_EAGER_SENDUNEXPECTED : MSG_EAGER_SEND); mh_eager.bmi_tag = sq->bmi_tag; @@ -356,6 +413,7 @@ static void encourage_send_waiting_buffer(struct ib_work *sq) msg_header_rts_t mh_rts; char *ptr = bh->buf; + memset(&mh_rts, 0, sizeof(msg_header_rts_t)); msg_header_init(&mh_rts.c, c, MSG_RTS); mh_rts.bmi_tag = sq->bmi_tag; mh_rts.mop_id = sq->mop->op_id; @@ -406,22 +464,30 @@ encourage_send_incoming_cts(struct buf_head *bh, u_int32_t byte_len) } } if (!sq) + { error("%s: mop_id %llx in CTS message not found", __func__, llu(mh_cts.rts_mop_id)); + return; + } debug(2, "%s: sq %p %s mopid %llx len %u", __func__, sq, sq_state_name(sq->state.send), llu(mh_cts.rts_mop_id), byte_len); - bmi_ib_assert(sq->state.send == SQ_WAITING_CTS || - sq->state.send == SQ_WAITING_RTS_SEND_COMPLETION, - "%s: wrong send state %s", __func__, - sq_state_name(sq->state.send)); + if (sq->state.send != SQ_WAITING_CTS && + sq->state.send != SQ_WAITING_RTS_SEND_COMPLETION) + { + error("%s: wrong send state %s", __func__, + sq_state_name(sq->state.send)); + return; + } /* message; cts content; list of buffers, lengths, and keys */ want = sizeof(mh_cts) + mh_cts.buflist_num * MSG_HEADER_CTS_BUFLIST_ENTRY_SIZE; - if (bmi_ib_unlikely(byte_len != want)) + if (bmi_ib_unlikely(byte_len != want)) { error("%s: wrong message size for CTS, got %u, want %u", __func__, byte_len, want); + return; + } /* start the big tranfser */ post_sr_rdmaw(sq, &mh_cts, (msg_header_cts_t *) bh->buf + 1); @@ -429,11 +495,13 @@ encourage_send_incoming_cts(struct buf_head *bh, u_int32_t byte_len) /* re-post our recv buf now that we have all the information from CTS */ post_rr(sq->c, bh); - if (sq->state.send == SQ_WAITING_CTS) + if (sq->state.send == SQ_WAITING_CTS) { sq->state.send = SQ_WAITING_DATA_SEND_COMPLETION; - else + } + else { sq->state.send = SQ_WAITING_RTS_SEND_COMPLETION_GOT_CTS; - debug(3, "%s: sq %p now %s", __func__, sq, sq_state_name(sq->state.send)); + } + debug(0, "%s: sq %p now %s", __func__, sq, sq_state_name(sq->state.send)); } @@ -487,7 +555,6 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len debug(4, "%s: incoming msg type %s", __func__, msg_type_name(type)); if (type == MSG_EAGER_SEND) { - msg_header_eager_t mh_eager; ptr = bh->buf; @@ -498,9 +565,11 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len rq = find_matching_recv(RQ_WAITING_INCOMING, c, mh_eager.bmi_tag); if (rq) { bmi_size_t len = byte_len - sizeof(mh_eager); - if (len > rq->buflist.tot_len) + if (len > rq->buflist.tot_len) { error("%s: EAGER received %lld too small for buffer %lld", __func__, lld(len), lld(rq->buflist.tot_len)); + return; + } memcpy_to_buflist(&rq->buflist, (msg_header_eager_t *) bh->buf + 1, @@ -522,7 +591,8 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len } #endif - } else { + } + else { rq = alloc_new_recv(c, bh); /* return value for when user does post_recv for this one */ rq->bmi_tag = mh_eager.bmi_tag; @@ -533,8 +603,8 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len } rq->actual_len = byte_len - sizeof(mh_eager); - } else if (type == MSG_EAGER_SENDUNEXPECTED) { - + } + else if (type == MSG_EAGER_SENDUNEXPECTED) { msg_header_eager_t mh_eager; ptr = bh->buf; @@ -550,8 +620,8 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len /* do not repost, keeping bh until user test */ debug(2, "%s: new rq %p now %s", __func__, rq, rq_state_name(rq->state.recv)); - - } else if (type == MSG_RTS) { + } + else if (type == MSG_RTS) { /* * Sender wants to send a big message, initiates rts/cts protocol. * Has the user posted a matching receive for it yet? @@ -569,11 +639,13 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len if ((int)mh_rts.tot_len > rq->buflist.tot_len) { error("%s: RTS received %llu too small for buffer %llu", __func__, llu(mh_rts.tot_len), llu(rq->buflist.tot_len)); + return; } rq->state.recv = RQ_RTS_WAITING_CTS_BUFFER; debug(2, "%s: matched rq %p MSG_RTS now %s", __func__, rq, rq_state_name(rq->state.recv)); - } else { + } + else { rq = alloc_new_recv(c, bh); /* return value for when user does post_recv for this one */ rq->bmi_tag = mh_rts.bmi_tag; @@ -593,9 +665,8 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len rq->state.recv = RQ_RTS_WAITING_CTS_SEND_COMPLETION; /* else keep waiting until we can send that cts */ } - - } else if (type == MSG_RTS_DONE) { - + } + else if (type == MSG_RTS_DONE) { msg_header_rts_done_t mh_rts_done; struct ib_work *rqt; @@ -633,7 +704,8 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len rq->state.recv = RQ_RTS_WAITING_USER_TEST; } - } else if (type == MSG_BYE) { + } + else if (type == MSG_BYE) { /* * Other side requests connection close. Do it. */ @@ -641,15 +713,17 @@ encourage_recv_incoming(struct buf_head *bh, msg_type_t type, u_int32_t byte_len post_rr(c, bh); ib_close_connection(c); - } else if (type == MSG_CREDIT) { - + } + else if (type == MSG_CREDIT) { /* already added the credit in check_cq */ debug(2, "%s: recv CREDIT", __func__); post_rr(c, bh); - } else { + } + else { error("%s: unknown message header type %d len %u", __func__, type, byte_len); + return; } } @@ -746,9 +820,11 @@ send_cts(struct ib_work *rq) reg_recv_buflist_buf = bmi_ib_malloc(reg_recv_buflist_len); memcache_register(ib_device->memcache, ®_recv_buflist); } - if (rq->buflist.tot_len > reg_recv_buflist_len) + if (rq->buflist.tot_len > reg_recv_buflist_len) { error("%s: recv prereg buflist too small, need %lld", __func__, lld(rq->buflist.tot_len)); + return 1; + } ib_buflist_t save_buflist = rq->buflist; rq->buflist = reg_recv_buflist; @@ -771,9 +847,11 @@ send_cts(struct ib_work *rq) lenp = (u_int32_t *)(bufp + rq->buflist.num); keyp = (u_int32_t *)(lenp + rq->buflist.num); post_len = (char *)(keyp + rq->buflist.num) - (char *)bh->buf; - if (post_len > ib_device->eager_buf_size) + if (post_len > ib_device->eager_buf_size) { error("%s: too many (%d) recv buflist entries for buf", __func__, rq->buflist.num); + return 1; + } for (i=0; ibuflist.num; i++) { bufp[i] = htobmi64(int64_from_ptr(rq->buflist.buf.recv[i])); lenp[i] = htobmi32(rq->buflist.len[i]); @@ -799,12 +877,15 @@ ensure_connected(struct bmi_method_addr *remote_map) int ret = 0; ib_method_addr_t *ibmap = remote_map->method_data; - if (!ibmap->c && ibmap->reconnect_flag) + if (!ibmap->c && ibmap->reconnect_flag) { ret = ib_tcp_client_connect(ibmap, remote_map); - else if(!ibmap->c && !ibmap->reconnect_flag) + } + else if(!ibmap->c && !ibmap->reconnect_flag) { ret = 1; /* cannot actively connect */ - else + } + else { ret = 0; + } return ret; } @@ -826,8 +907,9 @@ post_send(bmi_op_id_t *id, struct bmi_method_addr *remote_map, gen_mutex_lock(&interface_mutex); ret = ensure_connected(remote_map); - if (ret) + if (ret) { goto out; + } ibmap = remote_map->method_data; /* alloc and build new sendq structure */ @@ -850,23 +932,28 @@ post_send(bmi_op_id_t *id, struct bmi_method_addr *remote_map, sq->buflist.num = 1; sq->buflist.buf.send = &sq->buflist_one_buf.send; sq->buflist.len = &sq->buflist_one_len; - } else { + } + else { sq->buflist.num = numbufs; sq->buflist.buf.send = buffers; sq->buflist.len = sizes; } sq->buflist.tot_len = 0; - for (i=0; ibuflist.num; i++) + for (i=0; ibuflist.num; i++) { sq->buflist.tot_len += sizes[i]; + } /* * This passed-in total length field does not make much sense * to me, but I'll at least check it for accuracy. */ - if (sq->buflist.tot_len != total_size) + if (sq->buflist.tot_len != total_size) { error("%s: user-provided tot len %lld" " does not match buffer list tot len %lld", __func__, lld(total_size), lld(sq->buflist.tot_len)); + ret = -EINVAL; + goto out; + } /* unexpected messages must fit inside an eager message */ if (is_unexpected && sq->buflist.tot_len > ib_device->eager_buf_payload) { @@ -979,7 +1066,8 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, if (rq) { debug(2, "%s: rq %p matches %s", __func__, rq, rq_state_name(rq->state.recv)); - } else { + } + else { /* alloc and build new recvq structure */ rq = alloc_new_recv(c, NULL); rq->state.recv = RQ_WAITING_INCOMING; @@ -993,23 +1081,28 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, rq->buflist.num = 1; rq->buflist.buf.recv = &rq->buflist_one_buf.recv; rq->buflist.len = &rq->buflist_one_len; - } else { + } + else { rq->buflist.num = numbufs; rq->buflist.buf.recv = buffers; rq->buflist.len = sizes; } rq->buflist.tot_len = 0; - for (i=0; ibuflist.num; i++) + for (i=0; ibuflist.num; i++) { rq->buflist.tot_len += sizes[i]; + } /* * This passed-in total length field does not make much sense * to me, but I'll at least check it for accuracy. */ - if (rq->buflist.tot_len != tot_expected_len) + if (rq->buflist.tot_len != tot_expected_len) { error("%s: user-provided tot len %lld" " does not match buffer list tot len %lld", __func__, lld(tot_expected_len), lld(rq->buflist.tot_len)); + ret = -EINVAL; + goto out; + } /* generate identifier used by caller to test for message later */ mop = bmi_ib_malloc(sizeof(*mop)); @@ -1023,7 +1116,6 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, /* handle the two "waiting for a local user post" states */ if (rq->state.recv == RQ_EAGER_WAITING_USER_POST) { - msg_header_eager_t mh_eager; char *ptr = rq->bh->buf; @@ -1034,6 +1126,8 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, if (rq->actual_len > tot_expected_len) { error("%s: received %lld matches too-small buffer %lld", __func__, lld(rq->actual_len), lld(rq->buflist.tot_len)); + ret = -EINVAL; + goto out; } memcpy_to_buflist(&rq->buflist, @@ -1046,8 +1140,8 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, /* now just wait for user to test, never do "immediate completion" */ rq->state.recv = RQ_EAGER_WAITING_USER_TEST; goto out; - - } else if (rq->state.recv == RQ_RTS_WAITING_USER_POST) { + } + else if (rq->state.recv == RQ_RTS_WAITING_USER_POST) { int sret; debug(2, "%s: rq %p %s send cts", __func__, rq, rq_state_name(rq->state.recv)); @@ -1057,8 +1151,9 @@ post_recv(bmi_op_id_t *id, struct bmi_method_addr *remote_map, memcache_register(ib_device->memcache, &rq->buflist); #endif sret = send_cts(rq); - if (sret == 0) + if (sret == 0) { rq->state.recv = RQ_RTS_WAITING_CTS_SEND_COMPLETION; + } goto out; } @@ -1115,44 +1210,52 @@ test_sq(struct ib_work *sq, bmi_op_id_t *outid, bmi_error_code_t *err, *outid = sq->mop->op_id; *err = 0; *size = sq->buflist.tot_len; - if (user_ptr) + if (user_ptr) { *user_ptr = sq->mop->user_ptr; + } qlist_del(&sq->list); id_gen_fast_unregister(sq->mop->op_id); c = sq->c; free(sq->mop); free(sq); --c->refcnt; - if (c->closed || c->cancelled) + if (c->closed || c->cancelled) { ib_close_connection(c); + } return 1; } /* this state needs help, push it (ideally would be triggered * when the resource is freed... XXX */ - } else if (sq->state.send == SQ_WAITING_BUFFER) { + } + else if (sq->state.send == SQ_WAITING_BUFFER) { debug(2, "%s: sq %p %s, encouraging", __func__, sq, sq_state_name(sq->state.send)); encourage_send_waiting_buffer(sq); - } else if (sq->state.send == SQ_WAITING_RTS_DONE_BUFFER) { + } + else if (sq->state.send == SQ_WAITING_RTS_DONE_BUFFER) { debug(2, "%s: sq %p %s, encouraging", __func__, sq, sq_state_name(sq->state.send)); encourage_rts_done_waiting_buffer(sq); - } else if (sq->state.send == SQ_CANCELLED && complete) { + } + else if (sq->state.send == SQ_CANCELLED && complete) { debug(2, "%s: sq %p cancelled", __func__, sq); *outid = sq->mop->op_id; *err = -PVFS_ETIMEDOUT; - if (user_ptr) + if (user_ptr) { *user_ptr = sq->mop->user_ptr; + } qlist_del(&sq->list); id_gen_fast_unregister(sq->mop->op_id); c = sq->c; free(sq->mop); free(sq); --c->refcnt; - if (c->closed || c->cancelled) + if (c->closed || c->cancelled) { ib_close_connection(c); + } return 1; - } else { + } + else { debug(9, "%s: sq %p found, not done, state %s", __func__, sq, sq_state_name(sq->state.send)); } @@ -1182,8 +1285,9 @@ test_rq(struct ib_work *rq, bmi_op_id_t *outid, bmi_error_code_t *err, *size = rq->actual_len; if (rq->mop) { *outid = rq->mop->op_id; - if (user_ptr) + if (user_ptr) { *user_ptr = rq->mop->user_ptr; + } id_gen_fast_unregister(rq->mop->op_id); free(rq->mop); } @@ -1191,28 +1295,34 @@ test_rq(struct ib_work *rq, bmi_op_id_t *outid, bmi_error_code_t *err, c = rq->c; free(rq); --c->refcnt; - if (c->closed || c->cancelled) + if (c->closed || c->cancelled) { ib_close_connection(c); + } return 1; } /* this state needs help, push it (ideally would be triggered * when the resource is freed...) XXX */ - } else if (rq->state.recv == RQ_RTS_WAITING_CTS_BUFFER) { + } + else if (rq->state.recv == RQ_RTS_WAITING_CTS_BUFFER) { int ret; debug(2, "%s: rq %p %s, encouraging", __func__, rq, rq_state_name(rq->state.recv)); ret = send_cts(rq); - if (ret == 0) + if (ret == 0) { rq->state.recv = RQ_RTS_WAITING_CTS_SEND_COMPLETION; + } /* else keep waiting until we can send that cts */ - debug(2, "%s: rq %p now %s", __func__, rq, rq_state_name(rq->state.recv)); - } else if (rq->state.recv == RQ_CANCELLED && complete) { + debug(2, "%s: rq %p now %s", __func__, rq, + rq_state_name(rq->state.recv)); + } + else if (rq->state.recv == RQ_CANCELLED && complete) { debug(2, "%s: rq %p cancelled", __func__, rq); *err = -PVFS_ETIMEDOUT; if (rq->mop) { *outid = rq->mop->op_id; - if (user_ptr) + if (user_ptr) { *user_ptr = rq->mop->user_ptr; + } id_gen_fast_unregister(rq->mop->op_id); free(rq->mop); } @@ -1220,10 +1330,12 @@ test_rq(struct ib_work *rq, bmi_op_id_t *outid, bmi_error_code_t *err, c = rq->c; free(rq); --c->refcnt; - if (c->closed || c->cancelled) + if (c->closed || c->cancelled) { ib_close_connection(c); + } return 1; - } else { + } + else { debug(9, "%s: rq %p found, not done, state %s", __func__, rq, rq_state_name(rq->state.recv)); } @@ -1250,13 +1362,16 @@ BMI_ib_test(bmi_op_id_t id, int *outcount, bmi_error_code_t *err, sq = mop->method_data; n = 0; if (sq->type == BMI_SEND) { - if (test_sq(sq, &id, err, size, user_ptr, 1)) + if (test_sq(sq, &id, err, size, user_ptr, 1)) { n = 1; - } else { + } + } + else { /* actually a recv */ struct ib_work *rq = mop->method_data; - if (test_rq(rq, &id, err, size, user_ptr, 1)) + if (test_rq(rq, &id, err, size, user_ptr, 1)) { n = 1; + } } *outcount = n; gen_mutex_unlock(&interface_mutex); @@ -1281,8 +1396,9 @@ static int BMI_ib_testsome(int incount, bmi_op_id_t *ids, int *outcount, n = 0; for (i=0; imethod_data; @@ -1291,7 +1407,8 @@ static int BMI_ib_testsome(int incount, bmi_op_id_t *ids, int *outcount, index_array[n] = i; ++n; } - } else { + } + else { /* actually a recv */ struct ib_work *rq = mop->method_data; if (test_rq(rq, &tid, &errs[n], &sizes[n], &user_ptrs[n], 1)) { @@ -1334,8 +1451,9 @@ restart: lnext = l->next; /* test them all, even if can't reap them, just to encourage */ complete = (sq->mop->context_id == context_id) && (n < incount); - if (user_ptrs) + if (user_ptrs) { up = &user_ptrs[n]; + } n += test_sq(sq, &outids[n], &errs[n], &sizes[n], up, complete); } @@ -1346,8 +1464,9 @@ restart: /* some receives have no mops: unexpected */ complete = rq->mop && (rq->mop->context_id == context_id) && (n < incount); - if (user_ptrs) + if (user_ptrs) { up = &user_ptrs[n]; + } n += test_rq(rq, &outids[n], &errs[n], &sizes[n], up, complete); } @@ -1410,13 +1529,15 @@ restart: (size_t) ui->size); ui->tag = rq->bmi_tag; /* re-post the buffer in which it was sitting, just unexpecteds */ + debug(2, "%s: calling post_rr", __func__); post_rr(c, rq->bh); n = 1; qlist_del(&rq->list); free(rq); --c->refcnt; - if (c->closed || c->cancelled) + if (c->closed || c->cancelled) { ib_close_connection(c); + } goto out; } } @@ -1476,14 +1597,17 @@ BMI_ib_cancel(bmi_op_id_t id, bmi_context_id context_id __unused) * tested later. Any others trigger full shutdown of the * connection. */ - if (tsq->state.send != SQ_WAITING_USER_TEST) + if (tsq->state.send != SQ_WAITING_USER_TEST) { c = tsq->c; - } else { + } + } + else { /* actually a recv */ struct ib_work *rq = mop->method_data; - if (!(rq->state.recv == RQ_EAGER_WAITING_USER_TEST - || rq->state.recv == RQ_RTS_WAITING_USER_TEST)) + if (!(rq->state.recv == RQ_EAGER_WAITING_USER_TEST + || rq->state.recv == RQ_RTS_WAITING_USER_TEST)) { c = rq->c; + } } if (c && !c->cancelled) { @@ -1501,37 +1625,44 @@ BMI_ib_cancel(bmi_op_id_t id, bmi_context_id context_id __unused) struct ib_work *sq = qlist_upcast(l); if (sq->c != c) continue; #if !MEMCACHE_BOUNCEBUF - if (sq->state.send == SQ_WAITING_DATA_SEND_COMPLETION) + if (sq->state.send == SQ_WAITING_DATA_SEND_COMPLETION) { memcache_deregister(ib_device->memcache, &sq->buflist); + } # if MEMCACHE_EARLY_REG /* pin when sending rts, so also must dereg in this state */ if (sq->state.send == SQ_WAITING_RTS_SEND_COMPLETION || sq->state.send == SQ_WAITING_RTS_SEND_COMPLETION_GOT_CTS || - sq->state.send == SQ_WAITING_CTS) + sq->state.send == SQ_WAITING_CTS) { memcache_deregister(ib_device->memcache, &sq->buflist); + } # endif #endif - if (sq->state.send != SQ_WAITING_USER_TEST) + if (sq->state.send != SQ_WAITING_USER_TEST) { sq->state.send = SQ_CANCELLED; + } } qlist_for_each(l, &ib_device->recvq) { struct ib_work *rq = qlist_upcast(l); if (rq->c != c) continue; #if !MEMCACHE_BOUNCEBUF - if (rq->state.recv == RQ_RTS_WAITING_RTS_DONE) + if (rq->state.recv == RQ_RTS_WAITING_RTS_DONE) { memcache_deregister(ib_device->memcache, &rq->buflist); + } # if MEMCACHE_EARLY_REG /* pin on post, dereg all these */ - if (rq->state.recv == RQ_RTS_WAITING_CTS_SEND_COMPLETION) + if (rq->state.recv == RQ_RTS_WAITING_CTS_SEND_COMPLETION) { memcache_deregister(ib_device->memcache, &rq->buflist); + } if (rq->state.recv == RQ_WAITING_INCOMING - && rq->buflist.tot_len > ib_device->eager_buf_payload) + && rq->buflist.tot_len > ib_device->eager_buf_payload) { memcache_deregister(ib_device->memcache, &rq->buflist); + } # endif #endif if (!(rq->state.recv == RQ_EAGER_WAITING_USER_TEST - || rq->state.recv == RQ_RTS_WAITING_USER_TEST)) + || rq->state.recv == RQ_RTS_WAITING_USER_TEST)) { rq->state.recv = RQ_CANCELLED; + } } } @@ -1543,10 +1674,12 @@ static const char * BMI_ib_rev_lookup(struct bmi_method_addr *meth) { ib_method_addr_t *ibmap = meth->method_data; - if (!ibmap->c) + if (!ibmap->c) { return "(unconnected)"; - else + } + else { return ibmap->c->peername; + } } /* @@ -1586,11 +1719,15 @@ static struct bmi_method_addr *BMI_ib_method_addr_lookup(const char *id) /* parse hostname */ s = string_key("ib", id); /* allocs a string */ - if (!s) + if (!s) { return 0; + } cp = strchr(s, ':'); - if (!cp) + if (!cp) { error("%s: no ':' found", __func__); + free(s); + return NULL; + } /* copy to permanent storage */ hostname = bmi_ib_malloc((unsigned long) (cp - s + 1)); @@ -1600,13 +1737,20 @@ static struct bmi_method_addr *BMI_ib_method_addr_lookup(const char *id) /* strip /filesystem */ ++cp; cq = strchr(cp, '/'); - if (cq) + if (cq) { *cq = 0; + } port = strtoul(cp, &cq, 10); - if (cq == cp) + if (cq == cp) { error("%s: invalid port number", __func__); - if (*cq != '\0') + free(s); + return NULL; + } + if (*cq != '\0') { error("%s: extra characters after port number", __func__); + free(s); + return NULL; + } free(s); /* lookup in known connections, if there are any */ @@ -1625,8 +1769,9 @@ static struct bmi_method_addr *BMI_ib_method_addr_lookup(const char *id) } gen_mutex_unlock(&interface_mutex); - if (map) + if (map) { free(hostname); /* found it */ + } else { /* set reconnect flag on this addr; we will be acting as a client @@ -1646,6 +1791,12 @@ static ib_connection_t *ib_new_connection(int sock, const char *peername, ib_connection_t *c; int i, ret; + if (is_server) { + debug(4, "%s: [SERVER] starting, peername=%s", __func__, peername); + } + else { + debug(4, "%s: [CLIENT] starting, peername=%s", __func__, peername); + } c = bmi_ib_malloc(sizeof(*c)); c->peername = strdup(peername); @@ -1690,12 +1841,19 @@ static ib_connection_t *ib_new_connection(int sock, const char *peername, c->send_credit = ib_device->eager_buf_num - 1; c->return_credit = 0; + if (is_server) { + debug(4, "%s: [SERVER SIDE] calling new_connection, sock=%d", + __func__, sock); + } + else { + debug(4, "%s: [CLIENT SIDE] calling new_connection, sock=%d", + __func__, sock); + } ret = new_connection(c, sock, is_server); if (ret) { ib_close_connection(c); c = NULL; } - return c; } @@ -1741,6 +1899,7 @@ static int ib_tcp_client_connect(ib_method_addr_t *ibmap, struct hostent *hp; struct sockaddr_in skin; + debug(4, "%s: starting", __func__); s = socket(AF_INET, SOCK_STREAM, 0); if (s < 0) { warning("%s: create tcp socket: %m", __func__); @@ -1749,27 +1908,39 @@ static int ib_tcp_client_connect(ib_method_addr_t *ibmap, hp = gethostbyname(ibmap->hostname); if (!hp) { warning("%s: cannot resolve server %s", __func__, ibmap->hostname); + close(s); return -1; } memset(&skin, 0, sizeof(skin)); skin.sin_family = hp->h_addrtype; memcpy(&skin.sin_addr, hp->h_addr_list[0], (size_t) hp->h_length); skin.sin_port = htons(ibmap->port); - sprintf(peername, "%s:%d", ibmap->hostname, ibmap->port); + sprintf(peername, "%s:%d", inet_ntoa(skin.sin_addr), ibmap->port); + + debug(4, "%s: connecting to peername=%s, s=%d", __func__, peername, s); + retry: if (connect(s, (struct sockaddr *) &skin, sizeof(skin)) < 0) { - if (errno == EINTR) + if (errno == EINTR) { goto retry; + } else { warning("%s: connect to server %s: %m", __func__, peername); return bmi_errno_to_pvfs(-errno); } } + + debug(4, "%s: connected, now calling ib_new_connection for peername=%s, " + "s=%d", __func__, peername, s); ibmap->c = ib_new_connection(s, peername, 0); - if (!ibmap->c) + if (!ibmap->c) { + close(s); error("%s: ib_new_connection failed", __func__); + return -EINVAL; + } ibmap->c->remote_map = remote_map; + debug(4, "%s: connection complete", __func__); if (close(s) < 0) { warning("%s: close sock: %m", __func__); return bmi_errno_to_pvfs(-errno); @@ -1785,88 +1956,206 @@ static void ib_tcp_server_init_listen_socket(struct bmi_method_addr *addr) int flags; struct sockaddr_in skin; ib_method_addr_t *ibc = addr->method_data; + int *timeout_ms; ib_device->listen_sock = socket(AF_INET, SOCK_STREAM, 0); - if (ib_device->listen_sock < 0) + if (ib_device->listen_sock < 0) { error_errno("%s: create tcp socket", __func__); + exit(1); + } flags = 1; if (setsockopt(ib_device->listen_sock, SOL_SOCKET, SO_REUSEADDR, &flags, - sizeof(flags)) < 0) + sizeof(flags)) < 0) { error_errno("%s: setsockopt REUSEADDR", __func__); + exit(1); + } memset(&skin, 0, sizeof(skin)); skin.sin_family = AF_INET; skin.sin_port = htons(ibc->port); + retry: - if (bind(ib_device->listen_sock, (struct sockaddr *) &skin, sizeof(skin)) < 0) { - if (errno == EINTR) + if (bind(ib_device->listen_sock, (struct sockaddr *) &skin, + sizeof(skin)) < 0) { + if (errno == EINTR) { goto retry; - else + } + else { error_errno("%s: bind tcp socket", __func__); + exit(1); + } } - if (listen(ib_device->listen_sock, 1024) < 0) + debug(4, "%s: binding on tcp port %d", __func__, ibc->port); + + if (listen(ib_device->listen_sock, listen_backlog) < 0) { error_errno("%s: listen tcp socket", __func__); + exit(1); + } + flags = fcntl(ib_device->listen_sock, F_GETFL); - if (flags < 0) + if (flags < 0) { error_errno("%s: fcntl getfl listen sock", __func__); + exit(1); + } flags |= O_NONBLOCK; - if (fcntl(ib_device->listen_sock, F_SETFL, flags) < 0) + if (fcntl(ib_device->listen_sock, F_SETFL, flags) < 0) + { error_errno("%s: fcntl setfl nonblock listen sock", __func__); + exit(1); + } + + timeout_ms = (int *) bmi_ib_malloc(sizeof(int)); + if (timeout_ms) { + *timeout_ms = accept_timeout_ms; + /* start the accept thread */ + debug(0, "%s: starting ib_tcp_server_accept_thread", __func__); + if (pthread_create(&accept_thread_id, NULL, + &ib_tcp_server_accept_thread, timeout_ms)) { + error("%s: unable to start accept thread, errno=%d", + __func__, errno); + exit(1); + } + } + else { + error("%s: unable to malloc memory for timeout_ms, errno=%d", + __func__, errno); + exit(1); + } } -/* - * Check for new connections. The listening socket is left nonblocking - * so this test can be quick; but accept is not really that quick compared - * to polling an IB interface, for instance. Returns >0 if an accept worked. - */ -static int ib_tcp_server_check_new_connections(void) + +void *ib_tcp_server_accept_thread(void *arg) { + struct pollfd pfd; struct sockaddr_in ssin; socklen_t len; - int s, ret = 0; + int ret = 0; + int timeout_ms = 10000; + struct tcp_conn *tc ; + pthread_t thread; - len = sizeof(ssin); - s = accept(ib_device->listen_sock, (struct sockaddr *) &ssin, &len); - if (s < 0) { - if (!(errno == EAGAIN)) - error_errno("%s: accept listen sock", __func__); - } else { - char peername[2048]; - ib_connection_t *c; + if (arg) { + timeout_ms = *(int *) arg; + free(arg); + } - char *hostname = strdup(inet_ntoa(ssin.sin_addr)); - int port = ntohs(ssin.sin_port); - sprintf(peername, "%s:%d", hostname, port); + debug(0, "%s: starting, timeout_ms=%d", __func__, timeout_ms); - gen_mutex_lock(&interface_mutex); + for (;;) { + /* check for shutdown */ + gen_mutex_lock(&accept_thread_mutex); + if (accept_thread_shutdown) { + gen_mutex_unlock(&accept_thread_mutex); + break; + } + gen_mutex_unlock(&accept_thread_mutex); + + /* poll for activity on the listen socket */ + pfd.fd = ib_device->listen_sock; + pfd.events = POLLIN; + ret = poll(&pfd, 1, timeout_ms); + if (ret < 0) { + warning("%s: poll error, errno=%d", __func__, errno); + continue; + } + else if (ret == 0) { + continue; + } + + debug(4, "%s: poll ret %d rev0 %x", __func__, ret, pfd.revents); + + len = sizeof(ssin); + tc = (struct tcp_conn *) bmi_ib_malloc(sizeof(struct tcp_conn)); + if (!tc) { + warning("%s: unable to malloc tc, errno=%d", + __func__, errno); + sleep(30); + continue; + } - c = ib_new_connection(s, peername, 1); - if (!c) { - free(hostname); - goto out_unlock; - } + /* accept a client connection */ + tc->s = accept(ib_device->listen_sock, + (struct sockaddr *) &ssin, &len); + if (tc->s < 0) { + warning("%s: accept listen sock, errno=%d", + __func__, errno); + free(tc); + continue; + } + tc->hostname = strdup(inet_ntoa(ssin.sin_addr)); + tc->port = ntohs(ssin.sin_port); + sprintf(tc->peername, "%s:%d", tc->hostname, tc->port); + + debug(0, "%s: starting ib_tcp_server_process_client_thread " + "for socket=%d", __func__, tc->s); + + /* start the client thread */ + if (pthread_create(&thread, NULL, + &ib_tcp_server_process_client_thread, tc)) { + warning("%s: unable to create accept_client thread, " + "errno=%d", __func__, errno); + free(tc); + } + } + + pthread_exit(0); +} - /* don't set reconnect flag on this addr; we are a server in this - * case and the peer will be responsible for maintaining the - * connection - */ - c->remote_map = ib_alloc_method_addr(c, hostname, port, 0); - /* register this address with the method control layer */ - c->bmi_addr = bmi_method_addr_reg_callback(c->remote_map); - if (c->bmi_addr == 0) - error_xerrno(ENOMEM, "%s: bmi_method_addr_reg_callback", __func__); - debug(2, "%s: accepted new connection %s at server", __func__, - c->peername); - ret = 1; +void *ib_tcp_server_process_client_thread(void *arg) +{ + ib_connection_t *c; + struct tcp_conn *tc; + int ret; -out_unlock: - gen_mutex_unlock(&interface_mutex); - if (close(s) < 0) - error_errno("%s: close new sock", __func__); + debug(0, "%s: starting", __func__); + if (!arg) { + error("%s: no socket passed", __func__); + return NULL; } - return ret; + tc = (struct tcp_conn *) arg; + + gen_mutex_lock(&interface_mutex); + + debug(0, "%s: calling ib_new_connection for peername=%s on socket=%d", + __func__, tc->peername, tc->s); + c = ib_new_connection(tc->s, tc->peername, 1); + if (!c) { + error_xerrno(EINVAL, "%s: new ib connection failed", __func__); + goto out; + } + debug(0, "%s: returned from ib_new_connection", __func__); + + /* don't set reconnect flag on this addr; we are a server in this + * case and the peer will be responsible for maintaining the + * connection + */ + c->remote_map = ib_alloc_method_addr(c, tc->hostname, tc->port, 0); + /* register this address with the method control layer */ + c->bmi_addr = bmi_method_addr_reg_callback(c->remote_map); + if (c->bmi_addr == 0) { + error_xerrno(ENOMEM, "%s: bmi_method_addr_reg_callback", __func__); + goto out; + } + + debug(0, "%s: accepted new connection %s at server", + __func__, c->peername); + ret = 1; + +out: + gen_mutex_unlock(&interface_mutex); + if (close(tc->s) < 0) { + error_errno("%s: close new sock", __func__); + } + if (tc) { + if (tc->hostname) { + free(tc->hostname); + } + free(tc); + } + return NULL; } + /* * Ask the device to write to its FD if a CQ event happens, and poll on it * as well as the listen_sock for activity, but do not actually respond to @@ -1878,21 +2167,14 @@ static int ib_block_for_activity(int timeout_ms) { struct pollfd pfd[3]; /* cq fd, async fd, accept socket */ int numfd; - int ret; + int ret = 0; prepare_cq_block(&pfd[0].fd, &pfd[1].fd); pfd[0].events = POLLIN; pfd[1].events = POLLIN; numfd = 2; - if (ib_device->listen_sock >= 0) { - pfd[2].fd = ib_device->listen_sock; - pfd[2].events = POLLIN; - numfd = 3; - } ret = poll(pfd, numfd, timeout_ms); - debug(4, "%s: ret %d rev0 %x rev1 %x", __func__, ret, - pfd[0].revents, pfd[1].revents); if (ret > 0) { if (pfd[0].revents == POLLIN) { ack_cq_completion_event(); @@ -1900,15 +2182,18 @@ static int ib_block_for_activity(int timeout_ms) } /* check others only if CQ was empty */ ret = 2; - if (pfd[1].revents == POLLIN) + if (pfd[1].revents == POLLIN) { check_async_events(); - if (pfd[2].revents == POLLIN) - ib_tcp_server_check_new_connections(); - } else if (ret < 0) { - if (errno == EINTR) /* normal, ignore but break */ + } + } + else if (ret < 0) { + if (errno == EINTR) { /* normal, ignore but break */ ret = 0; - else + } + else { error_errno("%s: poll listen sock", __func__); + return -EINVAL; + } } return ret; } @@ -2000,14 +2285,15 @@ static int BMI_ib_initialize(struct bmi_method_addr *listen_addr, int method_id, { int ret; - debug(0, "%s: init", __func__); - + debug(0, "Initializing IB module"); gen_mutex_lock(&interface_mutex); /* check params */ - if (!!listen_addr ^ (init_flags & BMI_INIT_SERVER)) + if (!!listen_addr ^ (init_flags & BMI_INIT_SERVER)) { error("%s: error: BMI_INIT_SERVER requires non-null listen_addr" " and v.v", __func__); + exit(1); + } bmi_ib_method_id = method_id; @@ -2019,11 +2305,14 @@ static int BMI_ib_initialize(struct bmi_method_addr *listen_addr, int method_id, ret = openib_ib_initialize(); #endif #ifdef VAPI - if (ret) + if (ret) { ret = vapi_ib_initialize(); + } #endif - if (ret) + if (ret) { + gen_mutex_unlock(&interface_mutex); return -ENODEV; /* neither found */ + } /* initialize memcache */ ib_device->memcache = memcache_init(mem_register, mem_deregister); @@ -2045,7 +2334,8 @@ static int BMI_ib_initialize(struct bmi_method_addr *listen_addr, int method_id, if (init_flags & BMI_INIT_SERVER) { ib_tcp_server_init_listen_socket(listen_addr); ib_device->listen_addr = listen_addr; - } else { + } + else { ib_device->listen_sock = -1; ib_device->listen_addr = NULL; } @@ -2063,7 +2353,7 @@ static int BMI_ib_initialize(struct bmi_method_addr *listen_addr, int method_id, gen_mutex_unlock(&interface_mutex); - debug(0, "%s: done", __func__); + debug(0, "IB module successfully initialized"); return ret; } @@ -2079,16 +2369,24 @@ static int BMI_ib_finalize(void) struct qlist_head *l; qlist_for_each(l, &ib_device->connection) { ib_connection_t *c = qlist_upcast(l); - if (c->cancelled) + if (c->cancelled) { continue; /* already closed */ + } /* Send BYE message to servers, transition QP to drain state */ send_bye(c); drain_qp(c); } } + /* if server, stop listening */ if (ib_device->listen_sock >= 0) { ib_method_addr_t *ibmap = ib_device->listen_addr->method_data; + /* tell the accept thread to terminate */ + gen_mutex_lock(&accept_thread_mutex); + accept_thread_shutdown = 1; + gen_mutex_unlock(&accept_thread_mutex); + /* wait for the accept thread to end */ + pthread_join(accept_thread_id, NULL); close(ib_device->listen_sock); free(ibmap->hostname); free(ib_device->listen_addr); @@ -2121,6 +2419,7 @@ static int BMI_ib_finalize(void) ib_device = NULL; gen_mutex_unlock(&interface_mutex); + debug(0, "BMI_tcp_finalize: IB module finalized."); return 0; } @@ -2153,3 +2452,11 @@ const struct bmi_method_ops bmi_ib_ops = .query_addr_range = NULL, }; +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/io/bmi/bmi_ib/ib.h b/src/io/bmi/bmi_ib/ib.h index 0f17e74..a89a7df 100644 --- a/src/io/bmi/bmi_ib/ib.h +++ b/src/io/bmi/bmi_ib/ib.h @@ -393,17 +393,15 @@ extern ib_device_t *ib_device; /* * Internal functions in util.c. */ -void error(const char *fmt, ...) __attribute__((noreturn,format(printf,1,2))); -void error_errno(const char *fmt, ...) - __attribute__((noreturn,format(printf,1,2))); -void error_xerrno(int errnum, const char *fmt, ...) - __attribute__((noreturn,format(printf,2,3))); +void error(const char *fmt, ...); +void error_errno(const char *fmt, ...); +void error_xerrno(int errnum, const char *fmt, ...); void warning(const char *fmt, ...) __attribute__((format(printf,1,2))); void warning_errno(const char *fmt, ...) __attribute__((format(printf,1,2))); void warning_xerrno(int errnum, const char *fmt, ...) __attribute__((format(printf,2,3))); void info(const char *fmt, ...) __attribute__((format(printf,1,2))); -void *bmi_ib_malloc(unsigned long n) __attribute__((malloc)); +void *bmi_ib_malloc(unsigned long n); void *qlist_del_head(struct qlist_head *list); void *qlist_try_del_head(struct qlist_head *list); const char *sq_state_name(sq_state_t num); @@ -483,3 +481,12 @@ void memcache_cache_flush(void *md); #endif #endif /* __ib_h */ + +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/io/bmi/bmi_ib/mem.c b/src/io/bmi/bmi_ib/mem.c index 1fc8159..3ab9362 100644 --- a/src/io/bmi/bmi_ib/mem.c +++ b/src/io/bmi/bmi_ib/mem.c @@ -144,6 +144,9 @@ memcache_memalloc(void *md, bmi_size_t len, int eager_limit) qlist_del(&c->list); qlist_add_tail(&c->list, &memcache_device->list); ++c->count; + if (c->count == 1) { + memcache_device->mem_register(c); + } buf = c->buf; gen_mutex_unlock(&memcache_device->mutex); goto out; @@ -166,6 +169,9 @@ memcache_memalloc(void *md, bmi_size_t len, int eager_limit) c = memcache_lookup_cover(memcache_device, buf, len); if (c) { ++c->count; + if (c->count == 1) { + memcache_device->mem_register(c); + } debug(4, "%s: reuse reg, buf %p, count %d", __func__, c->buf, c->count); } else { @@ -203,10 +209,18 @@ memcache_memfree(void *md, void *buf, bmi_size_t len) if (c) { debug(4, "%s: cache free buf %p len %lld", __func__, c->buf, lld(c->len)); - bmi_ib_assert(c->count == 1, "%s: buf %p len %lld count %d, expected 1", - __func__, c->buf, lld(c->len), c->count); + if (c->count != 1) + { + error("%s: buf %p len %lld count %d, expected 1", + __func__, c->buf, lld(c->len), c->count); + gen_mutex_unlock(&memcache_device->mutex); + return EINVAL; + } /* cache it */ --c->count; + if (c->count == 0) { + memcache_device->mem_deregister(c); + } qlist_del(&c->list); qlist_add(&c->list, &memcache_device->free_chunk_list); gen_mutex_unlock(&memcache_device->mutex); @@ -230,6 +244,12 @@ memcache_register(void *md, ib_buflist_t *buflist) buflist->memcache = bmi_ib_malloc(buflist->num * sizeof(*buflist->memcache)); + if (!buflist->memcache) + { + error("%s: bmi_ib_malloc failed for %lld bytes", + __func__, buflist->num * sizeof(*buflist->memcache)); + return; + } gen_mutex_lock(&memcache_device->mutex); for (i=0; inum; i++) { #if ENABLE_MEMCACHE @@ -238,6 +258,9 @@ memcache_register(void *md, ib_buflist_t *buflist) buflist->len[i]); if (c) { ++c->count; + if (c->count == 1) { + memcache_device->mem_register(c); + } debug(2, "%s: hit [%d] %p len %lld (via %p len %lld) refcnt now %d", __func__, i, buflist->buf.send[i], lld(buflist->len[i]), c->buf, lld(c->len), c->count); @@ -247,20 +270,23 @@ memcache_register(void *md, ib_buflist_t *buflist) c = memcache_add(memcache_device, buflist->buf.recv[i], buflist->len[i]); /* XXX: replace error with return values, let caller deal */ - if (!c) + if (!c) + { error("%s: no memory for cache entry", __func__); + goto out; + } ret = memcache_device->mem_register(c); if (ret) { memcache_del(memcache_device, c); error("%s: could not register memory", __func__); + goto out; } } buflist->memcache[i] = c; #else - memcache_entry_t cp = bmi_ib_malloc(sizeof(*cp)); + memcache_entry_t *cp = bmi_ib_malloc(sizeof(*cp)); cp->buf = buflist->buf.recv[i]; cp->len = buflist->len[i]; - cp->type = type; ret = memcache_device->mem_register(cp); if (ret) { free(cp); @@ -269,6 +295,8 @@ memcache_register(void *md, ib_buflist_t *buflist) buflist->memcache[i] = cp; #endif } + +out: gen_mutex_unlock(&memcache_device->mutex); } @@ -284,6 +312,8 @@ void memcache_preregister(void *md, const void *buf, bmi_size_t len, memcache_device_t *memcache_device = md; memcache_entry_t *c; + return; /* cannot do this any more */ + gen_mutex_lock(&memcache_device->mutex); c = memcache_lookup_cover(memcache_device, buf, len); if (c) { @@ -316,6 +346,9 @@ memcache_deregister(void *md, ib_buflist_t *buflist) #if ENABLE_MEMCACHE memcache_entry_t *c = buflist->memcache[i]; --c->count; + if (c->count == 0) { + memcache_device->mem_deregister(c); + } debug(2, "%s: dec refcount [%d] %p len %lld (via %p len %lld) refcnt now %d", __func__, i, buflist->buf.send[i], lld(buflist->len[i]), @@ -357,12 +390,16 @@ void memcache_shutdown(void *md) gen_mutex_lock(&memcache_device->mutex); qlist_for_each_entry_safe(c, cn, &memcache_device->list, list) { - memcache_device->mem_deregister(c); + if (c->count > 0) { + memcache_device->mem_deregister(c); + } qlist_del(&c->list); free(c); } qlist_for_each_entry_safe(c, cn, &memcache_device->free_chunk_list, list) { - memcache_device->mem_deregister(c); + if (c->count > 0) { + memcache_device->mem_deregister(c); + } qlist_del(&c->list); free(c->buf); free(c); @@ -384,7 +421,6 @@ void memcache_cache_flush(void *md) qlist_for_each_entry_safe(c, cn, &memcache_device->list, list) { debug(4, "%s: list c->count %x c->buf %p", __func__, c->count, c->buf); if (c->count == 0) { - memcache_device->mem_deregister(c); qlist_del(&c->list); free(c); } @@ -393,7 +429,6 @@ void memcache_cache_flush(void *md) debug(4, "%s: free list c->count %x c->buf %p", __func__, c->count, c->buf); if (c->count == 0) { - memcache_device->mem_deregister(c); qlist_del(&c->list); free(c->buf); free(c); @@ -401,3 +436,11 @@ void memcache_cache_flush(void *md) } } +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/io/bmi/bmi_ib/openib.c b/src/io/bmi/bmi_ib/openib.c index 94f1fe3..7f58298 100644 --- a/src/io/bmi/bmi_ib/openib.c +++ b/src/io/bmi/bmi_ib/openib.c @@ -38,8 +38,9 @@ struct openib_device_priv { int nic_max_sge; int nic_max_wr; - /* max MTU reported by NIC port */ + /* MTU values as reported by NIC */ int max_mtu; + int active_mtu; /* * Temp array for filling scatter/gather lists to pass to IB functions, @@ -107,6 +108,12 @@ static int openib_new_connection(ib_connection_t *c, int sock, int is_server) size_t len; struct ibv_qp_init_attr att; + if (is_server) { + debug(0, "%s: [SERVER] starting, sock=%d", __func__, sock); + } + else { + debug(0, "%s: [CLIENT] starting, sock=%d", __func__, sock); + } /* * Values passed through TCP to permit IB connection. These * are transformed to appear in network byte order (big endian) @@ -124,28 +131,35 @@ static int openib_new_connection(ib_connection_t *c, int sock, int is_server) /* register memory region, Recv side */ len = ib_device->eager_buf_num * ib_device->eager_buf_size; - + + debug(0, "%s: calling ibv_reg_mr recv side", __func__); oc->eager_recv_mr = ibv_reg_mr(od->nic_pd, c->eager_recv_buf_contig, len, IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ); - if (!oc->eager_recv_mr) + if (!oc->eager_recv_mr) { error("%s: register_mr eager recv", __func__); - + return -ENOMEM; + } /* register memory region, Send side */ + debug(0, "%s: calling ibv_reg_mr send side", __func__); oc->eager_send_mr = ibv_reg_mr(od->nic_pd, c->eager_send_buf_contig, len, IBV_ACCESS_LOCAL_WRITE | IBV_ACCESS_REMOTE_WRITE | IBV_ACCESS_REMOTE_READ); - if (!oc->eager_send_mr) + if (!oc->eager_send_mr) { error("%s: register_mr eager send", __func__); + return -ENOMEM; + } /* create the main queue pair */ + debug(0, "%s: creating main queue pair", __func__); memset(&att, 0, sizeof(att)); att.send_cq = od->nic_cq; att.recv_cq = od->nic_cq; num_wr = ib_device->eager_buf_num + 50; /* plus some rdmaw */ - if (num_wr > od->nic_max_wr) + if (num_wr > od->nic_max_wr) { num_wr = od->nic_max_wr; + } att.cap.max_recv_wr = num_wr; att.cap.max_send_wr = num_wr; att.cap.max_recv_sge = 16; @@ -156,63 +170,87 @@ static int openib_new_connection(ib_connection_t *c, int sock, int is_server) att.cap.max_send_sge = od->nic_max_sge - 1; } att.qp_type = IBV_QPT_RC; + debug(0, "%s: calling ibv_create qp", __func__); oc->qp = ibv_create_qp(od->nic_pd, &att); - if (!oc->qp) + if (!oc->qp) { error("%s: create QP", __func__); + return -EINVAL; + } VALGRIND_MAKE_MEM_DEFINED(&att, sizeof(att)); VALGRIND_MAKE_MEM_DEFINED(&oc->qp->qp_num, sizeof(oc->qp->qp_num)); /* compare the caps that came back against what we already have */ if (od->sg_max_len == 0) { od->sg_max_len = att.cap.max_send_sge; - if (att.cap.max_recv_sge < od->sg_max_len) + if (att.cap.max_recv_sge < od->sg_max_len) { od->sg_max_len = att.cap.max_recv_sge; + } od->sg_tmp_array = bmi_ib_malloc(od->sg_max_len * sizeof(*od->sg_tmp_array)); } else { - if (att.cap.max_send_sge < od->sg_max_len) + if (att.cap.max_send_sge < od->sg_max_len) { error("%s: new conn has smaller send SG array size %d vs %d", __func__, att.cap.max_send_sge, od->sg_max_len); - if (att.cap.max_recv_sge < od->sg_max_len) + return -EINVAL; + } + if (att.cap.max_recv_sge < od->sg_max_len) { error("%s: new conn has smaller recv SG array size %d vs %d", __func__, att.cap.max_recv_sge, od->sg_max_len); + return -EINVAL; + } } - if (od->max_unsignaled_sends == 0) + if (od->max_unsignaled_sends == 0) { od->max_unsignaled_sends = att.cap.max_send_wr; - else - if (att.cap.max_send_wr < od->max_unsignaled_sends) + } + else { + if (att.cap.max_send_wr < od->max_unsignaled_sends) { error("%s: new connection has smaller max_send_wr, %d vs %d", __func__, att.cap.max_send_wr, od->max_unsignaled_sends); + return -EINVAL; + } + } /* verify we got what we asked for */ - if ((int) att.cap.max_recv_wr < num_wr) + if ((int) att.cap.max_recv_wr < num_wr) { error("%s: asked for %d recv WRs on QP, got %d", __func__, num_wr, att.cap.max_recv_wr); - if ((int) att.cap.max_send_wr < num_wr) + return -EINVAL; + } + if ((int) att.cap.max_send_wr < num_wr) { error("%s: asked for %d send WRs on QP, got %d", __func__, num_wr, att.cap.max_send_wr); + return -EINVAL; + } /* exchange data, converting info to network order and back */ ch_out.lid = htobmi32(od->nic_lid); ch_out.qp_num = htobmi32(oc->qp->qp_num); + debug(0, "%s: calling exchange data", __func__); ret = exchange_data(sock, is_server, &ch_in, &ch_out, sizeof(ch_in)); - if (ret) + debug(0, "%s: returning from exchange data, ret=%d", __func__, ret); + if (ret) { goto out; + } oc->remote_lid = bmitoh32(ch_in.lid); oc->remote_qp_num = bmitoh32(ch_in.qp_num); /* bring the two QPs up to RTR */ + debug(0, "%s: calling init_connection_modify_qp", __func__); init_connection_modify_qp(oc->qp, oc->remote_qp_num, oc->remote_lid); /* post initial RRs and RRs for acks */ - for (i=0; ieager_buf_num; i++) + debug(0, "%s: entering for loop for openib_post_rr", __func__); + for (i=0; ieager_buf_num; i++) { openib_post_rr(c, &c->eager_recv_buf_head_contig[i]); + } /* final sychronization to ensure both sides have posted RRs */ + debug(0, "%s: calling exchange data (final sync)", __func__); ret = exchange_data(sock, is_server, &ret, &ret, sizeof(ret)); + debug(0, "%s: returning from exchange data (final sync), ret=%d", __func__, ret); out: return ret; @@ -224,11 +262,10 @@ static int openib_new_connection(ib_connection_t *c, int sock, int is_server) static int exchange_data(int sock, int is_server, void *xin, void *xout, size_t len) { - int i; int ret; - for (i=0; i<2; i++) { - if (i ^ is_server) { + /* server reads then writes */ + if (is_server) { ret = read_full(sock, xin, len); if (ret < 0) { warning_errno("%s: read", __func__); @@ -240,14 +277,31 @@ static int exchange_data(int sock, int is_server, void *xin, void *xout, (int) len); goto out; } - } else { ret = write_full(sock, xout, len); if (ret < 0) { warning_errno("%s: write", __func__); goto out; } + } + /* client writes then reads */ + else { + ret = write_full(sock, xout, len); + if (ret < 0) { + warning_errno("%s: write", __func__); + goto out; + } + ret = read_full(sock, xin, len); + if (ret < 0) { + warning_errno("%s: read", __func__); + goto out; + } + if (ret != (int) len) { + ret = 1; + warning("%s: partial read, %d/%d bytes", __func__, ret, + (int) len); + goto out; + } } - } ret = 0; @@ -288,8 +342,10 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.pkey_index = 0; attr.port_num = od->nic_port; ret = ibv_modify_qp(qp, &attr, mask); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_modify_qp -> INIT", __func__); + return; + } /* Transition QP to Ready-to-Receive (RTR) */ mask = @@ -305,8 +361,8 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.max_dest_rd_atomic = 1; attr.ah_attr.dlid = remote_lid; attr.ah_attr.port_num = od->nic_port; - if (od->max_mtu > IBV_MTU) { - attr.path_mtu = od->max_mtu; + if (od->active_mtu > IBV_MTU) { + attr.path_mtu = od->active_mtu; } else { attr.path_mtu = IBV_MTU; @@ -316,8 +372,10 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.min_rnr_timer = 31; debug(1, "%s: attr.path_mtu=%d", __func__, attr.path_mtu); ret = ibv_modify_qp(qp, &attr, mask); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_modify_qp INIT -> RTR", __func__); + return; + } /* transition qp to ready-to-send */ mask = @@ -331,15 +389,16 @@ static void init_connection_modify_qp(struct ibv_qp *qp, uint32_t remote_qp_num, attr.qp_state = IBV_QPS_RTS; attr.sq_psn = 0; attr.max_rd_atomic = 1; - attr.timeout = 26; /* 4.096us * 2^26 = 5 min */ + /*attr.timeout = 26;*/ /* 4.096us * 2^26 = 5 min */ + attr.timeout = 22; /* 4.096us * 2^22 = 17.1 secs */ attr.retry_cnt = 7; attr.rnr_retry = 7; debug(1, "%s: attr.timeout=%d, attr.retry_cnt=%d, attr.rnr_retry=%d", __func__, attr.timeout, attr.retry_cnt, attr.rnr_retry); ret = ibv_modify_qp(qp, &attr, mask); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_modify_qp RTR -> RTS", __func__); - + } } /* @@ -358,8 +417,9 @@ static void openib_drain_qp(ib_connection_t *c) memset(&attr, 0, sizeof(attr)); attr.qp_state = IBV_QPS_SQD; ret = ibv_modify_qp(qp, &attr, mask); - if (ret < 0) + if (ret < 0) { error_xerrno(ret, "%s: ibv_modify_qp RTS -> SQD", __func__); + } } /* @@ -375,22 +435,29 @@ static void openib_close_connection(ib_connection_t *c) /* destroy the queue pair */ if (oc->qp) { ret = ibv_destroy_qp(oc->qp); - if (ret < 0) + if (ret < 0) { error_xerrno(ret, "%s: ibv_destroy_qp", __func__); + goto out; + } } /* destroy the memory regions */ if (oc->eager_send_mr) { ret = ibv_dereg_mr(oc->eager_send_mr); - if (ret < 0) + if (ret < 0) { error_xerrno(ret, "%s: ibv_deregister_mr eager send", __func__); + goto out; + } } if (oc->eager_recv_mr) { ret = ibv_dereg_mr(oc->eager_recv_mr); - if (ret < 0) + if (ret < 0) { error_xerrno(ret, "%s: ibv_deregister_mr eager recv", __func__); + goto out; + } } +out: free(oc); } @@ -422,14 +489,17 @@ static void openib_post_sr(const struct buf_head *bh, u_int32_t len) debug(4, "%s: %s bh %d len %u wr %d/%d", __func__, c->peername, bh->num, len, od->num_unsignaled_sends, od->max_unsignaled_sends); - if (od->num_unsignaled_sends + 10 == od->max_unsignaled_sends) + if (od->num_unsignaled_sends + 10 == od->max_unsignaled_sends) { od->num_unsignaled_sends = 0; - else + } + else { ++od->num_unsignaled_sends; + } ret = ibv_post_send(oc->qp, &sr, &bad_wr); - if (ret < 0) + if (ret < 0) { error("%s: ibv_post_send (%d)", __func__, ret); + } } /* @@ -454,8 +524,9 @@ static void openib_post_rr(const ib_connection_t *c, struct buf_head *bh) debug(4, "%s: %s bh %d", __func__, c->peername, bh->num); ret = ibv_post_recv(oc->qp, &rr, &bad_wr); - if (ret) + if (ret) { error("%s: ibv_post_recv", __func__); + } } /* @@ -474,7 +545,6 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, struct ibv_send_wr sr; int done; - int send_index = 0, recv_index = 0; /* working entry in buflist */ int send_offset = 0; /* byte offset in working send entry */ u_int64_t *recv_bufp = (u_int64_t *) mh_cts_buf; @@ -493,9 +563,11 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, reg_send_buflist_buf = bmi_ib_malloc(reg_send_buflist_len); memcache_register(ib_device->memcache, ®_send_buflist, BMI_SEND); } - if (sq->buflist.tot_len > reg_send_buflist_len) + if (sq->buflist.tot_len > reg_send_buflist_len) { error("%s: send prereg buflist too small, need %lld", __func__, lld(sq->buflist.tot_len)); + return; + } memcpy_from_buflist(&sq->buflist, reg_send_buflist_buf); ib_buflist_t save_buflist = sq->buflist; @@ -522,7 +594,8 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, /* new one, fresh numbers */ sr.wr.rdma.remote_addr = bmitoh64(recv_bufp[recv_index]); recv_bytes_needed = bmitoh32(recv_lenp[recv_index]); - } else { + } + else { /* continuing into unfinished remote receive index */ sr.wr.rdma.remote_addr += bmitoh32(recv_lenp[recv_index]) - recv_bytes_needed; @@ -531,7 +604,7 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, sr.wr.rdma.rkey = bmitoh32(recv_rkey[recv_index]); sr.num_sge = 0; - debug(4, "%s: chunk to %s remote addr %llx rkey %x", + debug(0, "%s: chunk to %s remote addr %llx rkey %x", __func__, c->peername, llu(sr.wr.rdma.remote_addr), sr.wr.rdma.rkey); @@ -543,8 +616,9 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, u_int32_t send_bytes_offered = sq->buflist.len[send_index] - send_offset; u_int32_t this_bytes = send_bytes_offered; - if (this_bytes > recv_bytes_needed) + if (this_bytes > recv_bytes_needed) { this_bytes = recv_bytes_needed; + } od->sg_tmp_array[sr.num_sge].addr = int64_from_ptr(sq->buflist.buf.send[send_index]) + send_offset; @@ -552,7 +626,7 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, od->sg_tmp_array[sr.num_sge].lkey = sq->buflist.memcache[send_index]->memkeys.lkey; - debug(4, "%s: chunk %d local addr %llx len %d lkey %x", + debug(0, "%s: chunk %d local addr %llx len %d lkey %x", __func__, sr.num_sge, (unsigned long long) od->sg_tmp_array[sr.num_sge]. addr, od->sg_tmp_array[sr.num_sge].length, @@ -574,22 +648,26 @@ static void openib_post_sr_rdmaw(struct ib_work *sq, msg_header_cts_t *mh_cts, /* done with the one we were just working on, is this the last recv? */ if (recv_bytes_needed == 0) { ++recv_index; - if (recv_index == (int) mh_cts->buflist_num) + if (recv_index == (int) mh_cts->buflist_num) { done = 1; + } } /* either filled the recv or exhausted the send */ if (done) { sr.wr_id = int64_from_ptr(sq); /* used to match in completion */ sr.send_flags = IBV_SEND_SIGNALED; /* completion drives the unpin */ - } else { + } + else { sr.wr_id = 0; sr.send_flags = 0; } ret = ibv_post_send(oc->qp, &sr, &bad_wr); - if (ret < 0) + if (ret < 0) { error("%s: ibv_post_send (%d)", __func__, ret); + return; + } } #if MEMCACHE_BOUNCEBUF @@ -603,10 +681,14 @@ static int openib_check_cq(struct bmi_ib_wc *wc) struct ibv_wc desc; int ret; + memset(&desc, 0, sizeof(struct ibv_wc)); + ret = ibv_poll_cq(od->nic_cq, 1, &desc); - if (ret < 0) + if (ret < 0) { error("%s: ibv_poll_cq (%d)", __func__, ret); - if (ret == 0) { /* empty */ + return -EINVAL; + } + else if (ret == 0) { /* empty */ return 0; } @@ -614,23 +696,75 @@ static int openib_check_cq(struct bmi_ib_wc *wc) wc->id = desc.wr_id; wc->status = desc.status; wc->byte_len = desc.byte_len; - if (desc.opcode == IBV_WC_SEND) + switch (desc.opcode) { + case IBV_WC_SEND: wc->opcode = BMI_IB_OP_SEND; - else if (desc.opcode == (IBV_WC_SEND | IBV_WC_RECV)) + break; + case IBV_WC_RECV: wc->opcode = BMI_IB_OP_RECV; - else if (desc.opcode == IBV_WC_RDMA_WRITE) + break; + case IBV_WC_RDMA_WRITE: wc->opcode = BMI_IB_OP_RDMA_WRITE; - else { - debug(0, "%s: unknown opcode, id %llx status %d opcode %d", + break; + case IBV_WC_RDMA_READ: + warning("%s: unhandeld IBV_WC_RDMA_READ opcode, id %llx status %d \ + opcode %d", __func__, llu(desc.wr_id), desc.status, + desc.opcode); + warning("%s: vendor_err %d byte_len %d imm_data %d qp_num %d", + __func__, desc.vendor_err, desc.byte_len, desc.imm_data, + desc.qp_num); + warning("%s: src_qp %d wc_flags %d pkey_index %d slid %d", + __func__, desc.src_qp, desc.wc_flags, desc.pkey_index, desc.slid); + warning("%s: sl %d dlid_path_bits %d", + __func__, desc.sl, desc.dlid_path_bits); + return 0; + case IBV_WC_COMP_SWAP: + warning("%s: unhandeld IBV_WC_COMP_SWAP opcode, id %llx status %d \ + opcode %d", __func__, llu(desc.wr_id), desc.status, + desc.opcode); + warning("%s: vendor_err %d byte_len %d imm_data %d qp_num %d", + __func__, desc.vendor_err, desc.byte_len, desc.imm_data, + desc.qp_num); + warning("%s: src_qp %d wc_flags %d pkey_index %d slid %d", + __func__, desc.src_qp, desc.wc_flags, desc.pkey_index, desc.slid); + warning("%s: sl %d dlid_path_bits %d", + __func__, desc.sl, desc.dlid_path_bits); + return 0; + case IBV_WC_FETCH_ADD: + warning("%s: unhandeld IBV_WC_FETCH_ADD opcode, id %llx status %d \ + opcode %d", __func__, llu(desc.wr_id), desc.status, + desc.opcode); + warning("%s: vendor_err %d byte_len %d imm_data %d qp_num %d", + __func__, desc.vendor_err, desc.byte_len, desc.imm_data, + desc.qp_num); + warning("%s: src_qp %d wc_flags %d pkey_index %d slid %d", + __func__, desc.src_qp, desc.wc_flags, desc.pkey_index, desc.slid); + warning("%s: sl %d dlid_path_bits %d", + __func__, desc.sl, desc.dlid_path_bits); + return 0; + case IBV_WC_BIND_MW: + warning("%s: unhandeld IBV_WC_BIND_MW opcode, id %llx status %d \ + opcode %d", __func__, llu(desc.wr_id), desc.status, + desc.opcode); + warning("%s: vendor_err %d byte_len %d imm_data %d qp_num %d", + __func__, desc.vendor_err, desc.byte_len, desc.imm_data, + desc.qp_num); + warning("%s: src_qp %d wc_flags %d pkey_index %d slid %d", + __func__, desc.src_qp, desc.wc_flags, desc.pkey_index, desc.slid); + warning("%s: sl %d dlid_path_bits %d", + __func__, desc.sl, desc.dlid_path_bits); + return 0; + default: + warning("%s: unknown wc opcode, id %llx status %d opcode %d", __func__, llu(desc.wr_id), desc.status, desc.opcode); - debug(0, "%s: vendor_err %d byte_len %d imm_data %d qp_num %d", + warning("%s: vendor_err %d byte_len %d imm_data %d qp_num %d", __func__, desc.vendor_err, desc.byte_len, desc.imm_data, desc.qp_num); - debug(0, "%s: src_qp %d wc_flags %d pkey_index %d slid %d", + warning("%s: src_qp %d wc_flags %d pkey_index %d slid %d", __func__, desc.src_qp, desc.wc_flags, desc.pkey_index, desc.slid); - debug(0, "%s: sl %d dlid_path_bits %d", + warning("%s: sl %d dlid_path_bits %d", __func__, desc.sl, desc.dlid_path_bits); - error("%s: unknown opcode %d", __func__, desc.opcode); + return 0; } VALGRIND_MAKE_MEM_DEFINED(wc, sizeof(*wc)); @@ -644,9 +778,10 @@ static void openib_prepare_cq_block(int *cq_fd, int *async_fd) /* ask for the next notfication */ ret = ibv_req_notify_cq(od->nic_cq, 0); - if (ret < 0) + if (ret < 0) { error_xerrno(ret, "%s: ibv_req_notify_cq", __func__); - + return; + } /* return the fd that can be fed to poll() */ *cq_fd = od->channel->fd; *async_fd = od->ctx->async_fd; @@ -665,14 +800,16 @@ static void openib_ack_cq_completion_event(void) int ret; ret = ibv_get_cq_event(od->channel, &cq, &cq_context); - if (ret == 0) + if (ret == 0) { ibv_ack_cq_events(cq, 1); + } + debug(0, "%s: ibv_get_cq_event ret=%d", __func__, ret); } /* * Return string form of work completion status field. */ -#define CASE(e) case e: s = #e; break +#define CASE(e) case e: s = #e; break static const char *openib_wc_status_string(int status) { const char *s = "(UNKNOWN)"; @@ -698,6 +835,7 @@ static const char *openib_wc_status_string(int status) CASE(IBV_WC_INV_EECN_ERR); CASE(IBV_WC_INV_EEC_STATE_ERR); CASE(IBV_WC_FATAL_ERR); + CASE(IBV_WC_RESP_TIMEOUT_ERR); CASE(IBV_WC_GENERAL_ERR); } return s; @@ -742,9 +880,7 @@ static const char *async_event_type_string(enum ibv_event_type event_type) CASE(IBV_EVENT_SRQ_ERR); CASE(IBV_EVENT_SRQ_LIMIT_REACHED); CASE(IBV_EVENT_QP_LAST_WQE_REACHED); -#ifdef HAVE_IBV_EVENT_CLIENT_REREGISTER CASE(IBV_EVENT_CLIENT_REREGISTER); -#endif CASE(IBV_EVENT_GID_CHANGE); } return s; @@ -805,8 +941,10 @@ static void openib_mem_deregister(memcache_entry_t *c) mrh = ptr_from_int64(c->memkeys.mrh); /* convert 64-bit int to pointer */ ret = ibv_dereg_mr(mrh); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_dereg_mr", __func__); + return; + } debug(4, "%s: buf %p len %lld lkey %x rkey %x", __func__, c->buf, lld(c->len), c->memkeys.lkey, c->memkeys.rkey); } @@ -821,25 +959,30 @@ static struct ibv_device *get_nic_handle(void) struct dlist *dev_list; dev_list = ibv_get_devices(); - if (!dev_list) + if (!dev_list) { return NULL; + } /* just pick first nic */ dlist_start(dev_list); nic_handle = dlist_next(dev_list); - if (!nic_handle) + if (!nic_handle) { return NULL; - if (dlist_next(dev_list) != NULL) + } + if (dlist_next(dev_list) != NULL) { warning("%s: found multiple HCAs, choosing the first", __func__); + } #else struct ibv_device **hca_list; int num_devs; hca_list = ibv_get_device_list(&num_devs); - if (num_devs == 0) + if (num_devs == 0) { return NULL; - if (num_devs > 1) + } + if (num_devs > 1) { warning("%s: found %d HCAs, choosing the first", __func__, num_devs); + } nic_handle = hca_list[0]; ibv_free_device_list(hca_list); #endif @@ -856,11 +999,13 @@ static int openib_check_async_events(void) ret = ibv_get_async_event(od->ctx, &ev); if (ret < 0) { - if (errno == EAGAIN) + if (errno == EAGAIN) { return 0; + } error_errno("%s: ibv_get_async_event", __func__); + return -EINVAL; } - warning("%s: %s", __func__, async_event_type_string(ev.event_type)); + debug(0, "%s: %s", __func__, async_event_type_string(ev.event_type)); ibv_ack_async_event(&ev); return 1; } @@ -897,16 +1042,17 @@ static int return_active_nic_handle (struct openib_device_priv* od, struct ibv_p hca_list = ibv_get_device_list(&num_devs); - if(num_devs <= 0) // FATAL!! + if(num_devs <= 0) /* FATAL!! */ { error("%s : NO IB DEVICES FOUND ", __func__); + return -ENOSYS; } else - { // return a device which is active + { /* return a device which is active */ for(i=0;ictx=ctx; @@ -916,22 +1062,26 @@ static int return_active_nic_handle (struct openib_device_priv* od, struct ibv_p } ret = ibv_query_port(ctx, od->nic_port, hca_port ); -// ret = ibv_query_port(od->ctx, od->nic_port, hca_port ); if(ret) + { error_xerrno(ret, "%s: ibv_query_port", __func__); + return -ENOSYS; + } if(hca_port->state != IBV_PORT_ACTIVE) { - // in this case, continue, delete old hca_port info - ret = ibv_close_device(od->ctx); // not sure if this breaks - if(ret) + /* in this case, continue, delete old hca_port info */ + ret = ibv_close_device(od->ctx); /* not sure if this breaks */ + if(ret) { error_xerrno(ret,"%s: couldnt close device",__func__); + return -ENOSYS; + } memset(hca_port,0,sizeof(struct ibv_port_attr)); warning("%s: found an inactive device/port",__func__); - // if we get to num_devs, no valid devices found - if(i == (num_devs-1)) // FATAL + /* if we get to num_devs, no valid devices found */ + if(i == (num_devs-1)) /* FATAL */ { warning("%s: No Active IB ports/devices found", __func__); return -ENOSYS; @@ -939,9 +1089,10 @@ static int return_active_nic_handle (struct openib_device_priv* od, struct ibv_p continue; } - // if we get here, we had a valid device found, done searching + /* if we get here, we had a valid device found, done searching */ else { od->max_mtu = hca_port->max_mtu; + od->active_mtu = hca_port->active_mtu; break; } } @@ -949,7 +1100,7 @@ static int return_active_nic_handle (struct openib_device_priv* od, struct ibv_p } VALGRIND_MAKE_MEM_DEFINED(ctx, sizeof(*ctx)); - // cleanup + /* cleanup */ ibv_free_device_list(hca_list); return 0; } @@ -969,8 +1120,6 @@ int openib_ib_initialize(void) struct ibv_port_attr hca_port; struct ibv_device_attr hca_cap; - debug(1, "%s: init", __func__); - od = bmi_ib_malloc(sizeof(*od)); ib_device->priv = od; @@ -991,38 +1140,48 @@ int openib_ib_initialize(void) od->ctx = ctx; od->nic_port = IBV_PORT; /* maybe let this be configurable */ - if(!od->ctx) warning("%s: CTX=0",__func__); + if (!od->ctx) { + warning("%s: CTX=0",__func__); + } /* get the lid and verify port state */ ret = ibv_query_port(od->ctx, od->nic_port, &hca_port); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_query_port", __func__); + return -ENOSYS; + } VALGRIND_MAKE_MEM_DEFINED(&hca_port, sizeof(hca_port)); od->nic_lid = hca_port.lid; - if (hca_port.state != IBV_PORT_ACTIVE) + if (hca_port.state != IBV_PORT_ACTIVE) { error("%s: port state is %s but should be ACTIVE; check subnet manager", __func__, openib_port_state_string(hca_port.state)); + return -EINVAL; + } /* Query the device for the max_ requests and such */ ret = ibv_query_device(od->ctx, &hca_cap); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_query_device", __func__); + return -ENOSYS; + } VALGRIND_MAKE_MEM_DEFINED(&hca_cap, sizeof(hca_cap)); #else ret = return_active_nic_handle(od, &hca_port); - if(ret) + if(ret) { return -ENOSYS; + } #endif - //od->ctx = ctx; od->nic_lid = hca_port.lid; /* Query the device for the max_ requests and such */ ret = ibv_query_device(od->ctx, &hca_cap); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_query_device", __func__); + return -ENOSYS; + } VALGRIND_MAKE_MEM_DEFINED(&hca_cap, sizeof(hca_cap)); @@ -1043,8 +1202,6 @@ int openib_ib_initialize(void) ib_device->func.mem_deregister = openib_mem_deregister; ib_device->func.check_async_events = openib_check_async_events; - - debug(1, "%s: max %d completion queue entries", __func__, hca_cap.max_cq); cqe_num = IBV_NUM_CQ_ENTRIES; od->nic_max_sge = hca_cap.max_sge; @@ -1058,31 +1215,45 @@ int openib_ib_initialize(void) /* Allocate a Protection Domain (global) */ od->nic_pd = ibv_alloc_pd(od->ctx); - if (!od->nic_pd) + if (!od->nic_pd) { error("%s: ibv_alloc_pd", __func__); + return -ENOMEM; + } /* create completion channel for blocking on CQ events */ od->channel = ibv_create_comp_channel(od->ctx); - if (!od->channel) + if (!od->channel) { error("%s: ibv_create_comp_channel failed", __func__); + return -EINVAL; + } /* build a CQ (global), connected to this channel */ od->nic_cq = ibv_create_cq(od->ctx, cqe_num, NULL, od->channel, 0); - if (!od->nic_cq) + if (!od->nic_cq) { error("%s: ibv_create_cq failed", __func__); + return -EINVAL; + } /* use non-blocking IO on the async fd and completion fd */ flags = fcntl(od->ctx->async_fd, F_GETFL); - if (flags < 0) + if (flags < 0) { error_errno("%s: get async fd flags", __func__); - if (fcntl(od->ctx->async_fd, F_SETFL, flags | O_NONBLOCK) < 0) + return -EINVAL; + } + if (fcntl(od->ctx->async_fd, F_SETFL, flags | O_NONBLOCK) < 0) { error_errno("%s: set async fd nonblocking", __func__); + return -EINVAL; + } flags = fcntl(od->channel->fd, F_GETFL); - if (flags < 0) + if (flags < 0) { error_errno("%s: get completion fd flags", __func__); - if (fcntl(od->channel->fd, F_SETFL, flags | O_NONBLOCK) < 0) + return -EINVAL; + } + if (fcntl(od->channel->fd, F_SETFL, flags | O_NONBLOCK) < 0) { error_errno("%s: set completion fd nonblocking", __func__); + return -EINVAL; + } /* will be set on first connection */ od->sg_tmp_array = 0; @@ -1101,25 +1272,40 @@ static void openib_ib_finalize(void) struct openib_device_priv *od = ib_device->priv; int ret; - if (od->sg_tmp_array) + if (od->sg_tmp_array) { free(od->sg_tmp_array); + } ret = ibv_destroy_cq(od->nic_cq); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_destroy_cq", __func__); + goto out; + } ret = ibv_destroy_comp_channel(od->channel); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_destroy_comp_channel", __func__); + goto out; + } ret = ibv_dealloc_pd(od->nic_pd); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_dealloc_pd", __func__); + goto out; + } ret = ibv_close_device(od->ctx); - if (ret) + if (ret) { error_xerrno(ret, "%s: ibv_close_device", __func__); + goto out; + } +out: free(od); ib_device->priv = NULL; } - - - +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/io/bmi/bmi_ib/util.c b/src/io/bmi/bmi_ib/util.c index 00cfe98..2d17cbf 100644 --- a/src/io/bmi/bmi_ib/util.c +++ b/src/io/bmi/bmi_ib/util.c @@ -13,11 +13,12 @@ #define __util_c #include "ib.h" +#include "pvfs2-internal.h" /* * Utility functions. */ -void __attribute__((noreturn,format(printf,1,2))) __hidden +void error(const char *fmt, ...) { char s[2048]; @@ -28,10 +29,10 @@ error(const char *fmt, ...) va_end(ap); gossip_err("Error: %s.\n", s); gossip_backtrace(); - exit(1); + /*exit(1);*/ } -void __attribute__((noreturn,format(printf,1,2))) __hidden +void error_errno(const char *fmt, ...) { char s[2048]; @@ -41,10 +42,10 @@ error_errno(const char *fmt, ...) vsprintf(s, fmt, ap); va_end(ap); gossip_err("Error: %s: %s.\n", s, strerror(errno)); - exit(1); + /*exit(1);*/ } -void __attribute__((noreturn,format(printf,2,3))) __hidden +void error_xerrno(int errnum, const char *fmt, ...) { char s[2048]; @@ -54,7 +55,7 @@ error_xerrno(int errnum, const char *fmt, ...) vsprintf(s, fmt, ap); va_end(ap); gossip_err("Error: %s: %s.\n", s, strerror(errnum)); - exit(1); + /*exit(1);*/ } void __attribute__((format(printf,1,2))) __hidden @@ -93,16 +94,21 @@ warning_xerrno(int errnum, const char *fmt, ...) gossip_err("Warning: %s: %s.\n", s, strerror(errnum)); } -void * __attribute__((malloc)) __hidden +void * bmi_ib_malloc(unsigned long n) { char *x; if (n == 0) - error("%s: alloc 0 bytes", __func__); + { + error("%s: alloc 0 bytes", __func__); + return NULL; + } x = malloc(n); if (!x) - error("%s: malloc %ld bytes failed", __func__, n); + { + error("%s: malloc %ld bytes failed", __func__, n); + } return x; } @@ -113,7 +119,12 @@ void * __hidden qlist_del_head(struct qlist_head *list) { struct qlist_head *h; - bmi_ib_assert(!qlist_empty(list), "%s: empty list %p", __func__, list); + + if (qlist_empty(list)) + { + error("%s: empty list %p", __func__, list); + return NULL; + } h = list->next; qlist_del(h); return h; @@ -136,9 +147,11 @@ static const char * name_lookup(name_t *a, int num) { while (a->num) { - if (a->num == num) - return a->name; - ++a; + if (a->num == num) + { + return a->name; + } + ++a; } return "(unknown)"; } @@ -148,11 +161,13 @@ sq_state_name(sq_state_t num) { return name_lookup(sq_state_names, (int) num); } + const char * rq_state_name(rq_state_t num) { return name_lookup(rq_state_names, (int) num); } + const char * msg_type_name(msg_type_t num) { @@ -170,12 +185,14 @@ memcpy_to_buflist(ib_buflist_t *buflist, const void *buf, bmi_size_t len) const char *cp = buf; for (i=0; inum && len > 0; i++) { - bmi_size_t bytes = buflist->len[i]; - if (bytes > len) - bytes = len; - memcpy(buflist->buf.recv[i], cp, bytes); - cp += bytes; - len -= bytes; + bmi_size_t bytes = buflist->len[i]; + if (bytes > len) + { + bytes = len; + } + memcpy(buflist->buf.recv[i], cp, bytes); + cp += bytes; + len -= bytes; } } @@ -186,8 +203,8 @@ memcpy_from_buflist(ib_buflist_t *buflist, void *buf) char *cp = buf; for (i=0; inum; i++) { - memcpy(cp, buflist->buf.send[i], (size_t) buflist->len[i]); - cp += buflist->len[i]; + memcpy(cp, buflist->buf.send[i], (size_t) buflist->len[i]); + cp += buflist->len[i]; } } @@ -201,13 +218,17 @@ read_full(int fd, void *buf, size_t num) int i, offset = 0; while (num > 0) { - i = read(fd, (char *)buf + offset, num); - if (i < 0) - return i; - if (i == 0) - break; - num -= i; - offset += i; + i = read(fd, (char *)buf + offset, num); + if (i < 0) + { + return i; + } + if (i == 0) + { + break; + } + num -= i; + offset += i; } return offset; } @@ -222,11 +243,13 @@ write_full(int fd, const void *buf, size_t num) int total = num; while (num > 0) { - i = write(fd, (const char *)buf + offset, num); - if (i < 0) - return i; - num -= i; - offset += i; + i = write(fd, (const char *)buf + offset, num); + if (i < 0) + { + return i; + } + num -= i; + offset += i; } return total; } diff --git a/src/io/bmi/bmi_ib/vapi.c b/src/io/bmi/bmi_ib/vapi.c index 2c4746d..cd1bd03 100644 --- a/src/io/bmi/bmi_ib/vapi.c +++ b/src/io/bmi/bmi_ib/vapi.c @@ -1055,3 +1055,11 @@ static void vapi_ib_finalize(void) ib_device->priv = NULL; } +/* + * Local variables: + * c-indent-level: 4 + * c-basic-offset: 4 + * End: + * + * vim: ts=8 sts=4 sw=4 expandtab + */ diff --git a/src/io/bmi/bmi_mx/mx.c b/src/io/bmi/bmi_mx/mx.c index ff7bcf0..a43bac9 100644 --- a/src/io/bmi/bmi_mx/mx.c +++ b/src/io/bmi/bmi_mx/mx.c @@ -10,6 +10,7 @@ #include "mx.h" #include "pint-hint.h" #include "pint-event.h" +#include "pvfs2-internal.h" #include "pvfs2-debug.h" @@ -24,11 +25,11 @@ gen_mutex_t mem_used_lock; /* lock */ #endif /* statics for event logging */ -static PINT_event_type bmi_mx_send_event_id __attribute__ ((unused)); -static PINT_event_type bmi_mx_recv_event_id __attribute__ ((unused)); +static PINT_event_type bmi_mx_send_event_id GCC_UNUSED; +static PINT_event_type bmi_mx_recv_event_id GCC_UNUSED; -static PINT_event_group bmi_mx_event_group __attribute__ ((unused)); -static pid_t bmi_mx_pid __attribute__ ((unused)); +static PINT_event_group bmi_mx_event_group GCC_UNUSED; +static pid_t bmi_mx_pid GCC_UNUSED; mx_unexp_handler_action_t bmx_unexpected_recv(void *context, mx_endpoint_addr_t source, @@ -43,7 +44,7 @@ void * BMI_mx_memalloc(bmi_size_t size, enum bmi_op_type send_recv); static int -bmx_peer_init_state(struct bmx_peer *peer) __attribute__ ((unused)); +bmx_peer_init_state(struct bmx_peer *peer) GCC_UNUSED; /**** Completion function token handling ****************************/ /* We should not hold any locks when calling mx_test[_any](), diff --git a/src/io/bmi/bmi_tcp/bmi-tcp-addressing.h b/src/io/bmi/bmi_tcp/bmi-tcp-addressing.h index 151e0ce..dc1f806 100644 --- a/src/io/bmi/bmi_tcp/bmi-tcp-addressing.h +++ b/src/io/bmi/bmi_tcp/bmi-tcp-addressing.h @@ -51,11 +51,12 @@ struct tcp_allowed_connection_s { * connections are made */ struct tcp_addr { - bmi_method_addr_p map; /* points back to generic address */ \ + bmi_method_addr_p map; /* points back to generic address */ BMI_addr_t bmi_addr; /* stores error code for addresses that are broken for some reason */ int addr_error; char *hostname; + char *zone; int port; int socket; /* flag that indicates this address represents a diff --git a/src/io/bmi/bmi_tcp/bmi-tcp.c b/src/io/bmi/bmi_tcp/bmi-tcp.c index 551bf84..f3d060e 100644 --- a/src/io/bmi/bmi_tcp/bmi-tcp.c +++ b/src/io/bmi/bmi_tcp/bmi-tcp.c @@ -6,6 +6,10 @@ /* TCP/IP implementation of a BMI method */ +#define BMI_TCP_ZONE 1 + +#include "pvfs2-internal.h" + #include #include #include @@ -19,9 +23,8 @@ #include #include #include -#include "pint-mem.h" +/* #include "pint-mem.h" obsolete */ -#include "pvfs2-config.h" #ifdef HAVE_NETDB_H #include #endif @@ -57,17 +60,24 @@ static int sc_test_busy = 0; int BMI_tcp_initialize(bmi_method_addr_p listen_addr, int method_id, int init_flags); + int BMI_tcp_finalize(void); + int BMI_tcp_set_info(int option, void *inout_parameter); + int BMI_tcp_get_info(int option, void *inout_parameter); + void *BMI_tcp_memalloc(bmi_size_t size, enum bmi_op_type send_recv); + int BMI_tcp_memfree(void *buffer, bmi_size_t size, enum bmi_op_type send_recv); + int BMI_tcp_unexpected_free(void *buffer); + int BMI_tcp_post_send(bmi_op_id_t * id, bmi_method_addr_p dest, const void *buffer, @@ -77,6 +87,7 @@ int BMI_tcp_post_send(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_post_sendunexpected(bmi_op_id_t * id, bmi_method_addr_p dest, const void *buffer, @@ -86,6 +97,7 @@ int BMI_tcp_post_sendunexpected(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_post_recv(bmi_op_id_t * id, bmi_method_addr_p src, void *buffer, @@ -96,6 +108,7 @@ int BMI_tcp_post_recv(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_test(bmi_op_id_t id, int *outcount, bmi_error_code_t * error_code, @@ -103,6 +116,7 @@ int BMI_tcp_test(bmi_op_id_t id, void **user_ptr, int max_idle_time_ms, bmi_context_id context_id); + int BMI_tcp_testsome(int incount, bmi_op_id_t * id_array, int *outcount, @@ -112,10 +126,12 @@ int BMI_tcp_testsome(int incount, void **user_ptr_array, int max_idle_time_ms, bmi_context_id context_id); + int BMI_tcp_testunexpected(int incount, int *outcount, struct bmi_method_unexpected_info *info, int max_idle_time_ms); + int BMI_tcp_testcontext(int incount, bmi_op_id_t * out_id_array, int *outcount, @@ -124,9 +140,13 @@ int BMI_tcp_testcontext(int incount, void **user_ptr_array, int max_idle_time_ms, bmi_context_id context_id); + bmi_method_addr_p BMI_tcp_method_addr_lookup(const char *id_string); + const char* BMI_tcp_addr_rev_lookup_unexpected(bmi_method_addr_p map); + int BMI_tcp_query_addr_range(bmi_method_addr_p, const char *, int); + int BMI_tcp_post_send_list(bmi_op_id_t * id, bmi_method_addr_p dest, const void *const *buffer_list, @@ -138,6 +158,7 @@ int BMI_tcp_post_send_list(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_post_recv_list(bmi_op_id_t * id, bmi_method_addr_p src, void *const *buffer_list, @@ -150,6 +171,7 @@ int BMI_tcp_post_recv_list(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_post_sendunexpected_list(bmi_op_id_t * id, bmi_method_addr_p dest, const void *const *buffer_list, @@ -161,8 +183,11 @@ int BMI_tcp_post_sendunexpected_list(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + int BMI_tcp_open_context(bmi_context_id context_id); + void BMI_tcp_close_context(bmi_context_id context_id); + int BMI_tcp_cancel(bmi_op_id_t id, bmi_context_id context_id); char BMI_tcp_method_name[] = "bmi_tcp"; @@ -180,25 +205,33 @@ struct tcp_msg_header char enc_hdr[TCP_ENC_HDR_SIZE]; /* encoded version of header info */ }; -#define BMI_TCP_ENC_HDR(hdr) \ - do { \ - uint32_t *tmp32; \ - tmp32 = (uint32_t *)&(hdr).enc_hdr[0]; \ - *(tmp32) = htobmi32((hdr).magic_nr); \ - *((uint32_t*)&((hdr).enc_hdr[4])) = htobmi32((hdr).mode); \ - *((uint64_t*)&((hdr).enc_hdr[8])) = htobmi64((hdr).tag); \ - *((uint64_t*)&((hdr).enc_hdr[16])) = htobmi64((hdr).size); \ - } while(0) - -#define BMI_TCP_DEC_HDR(hdr) \ - do { \ - uint32_t tmp32; \ - memcpy(&tmp32,&(hdr).enc_hdr[0],sizeof(uint32_t)); \ - (hdr).magic_nr = bmitoh32(tmp32); \ - (hdr).mode = bmitoh32(*((uint32_t*)&((hdr).enc_hdr[4]))); \ - (hdr).tag = bmitoh64(*((uint64_t*)&((hdr).enc_hdr[8]))); \ - (hdr).size = bmitoh64(*((uint64_t*)&((hdr).enc_hdr[16]))); \ - } while(0) +#define BMI_TCP_ENC_HDR(hdr) \ + do { \ + uint32_t *tmp32; \ + uint64_t *tmp64; \ + tmp32 = (uint32_t *) &(hdr).enc_hdr[0]; \ + *(tmp32) = htobmi32((hdr).magic_nr); \ + tmp32 = (uint32_t *) &(hdr).enc_hdr[4]; \ + *(tmp32) = htobmi32((hdr).mode); \ + tmp64 = (uint64_t *) &(hdr).enc_hdr[8]; \ + *(tmp64) = htobmi64((hdr).tag); \ + tmp64 = (uint64_t *) &(hdr).enc_hdr[16]; \ + *(tmp64) = htobmi64((hdr).size); \ + } while(0) + +#define BMI_TCP_DEC_HDR(hdr) \ + do { \ + uint64_t tmp64; \ + uint32_t tmp32; \ + memcpy(&tmp32, &(hdr).enc_hdr[0], sizeof(uint32_t)); \ + (hdr).magic_nr = bmitoh32(tmp32); \ + memcpy(&tmp32, &(hdr).enc_hdr[4], sizeof(uint32_t)); \ + (hdr).mode = bmitoh32(tmp32); \ + memcpy(&tmp64, &(hdr).enc_hdr[8], sizeof(uint64_t)); \ + (hdr).tag = bmitoh64(tmp64); \ + memcpy(&tmp64, &(hdr).enc_hdr[16], sizeof(uint64_t)); \ + (hdr).size = bmitoh64(tmp64); \ + } while(0) /* enumerate states that we care about */ @@ -231,8 +264,11 @@ static struct iovec stat_io_vector[BMI_TCP_IOV_COUNT+1]; /* internal utility functions */ static int tcp_server_init(void); + static void dealloc_tcp_method_addr(bmi_method_addr_p map); + static int tcp_sock_init(bmi_method_addr_p my_method_addr); + static int enqueue_operation(op_list_p target_list, enum bmi_op_type send_recv, bmi_method_addr_p map, @@ -249,20 +285,33 @@ static int enqueue_operation(op_list_p target_list, bmi_size_t expected_size, bmi_context_id context_id, int32_t event_id); + static int tcp_cleanse_addr(bmi_method_addr_p map, int error_code); + static int tcp_shutdown_addr(bmi_method_addr_p map); + static int tcp_do_work(int max_idle_time); + static int tcp_do_work_error(bmi_method_addr_p map); + static int tcp_do_work_recv(bmi_method_addr_p map, int* stall_flag); + static int tcp_do_work_send(bmi_method_addr_p map, int* stall_flag); + static int work_on_recv_op(method_op_p my_method_op, int *stall_flag); + static int work_on_send_op(method_op_p my_method_op, int *blocked_flag, int* stall_flag); + static int tcp_accept_init(int *socket, char** peer); + static method_op_p alloc_tcp_method_op(void); + static void dealloc_tcp_method_op(method_op_p old_op); + static int handle_new_connection(bmi_method_addr_p map); + static int tcp_post_send_generic(bmi_op_id_t * id, bmi_method_addr_p dest, const void *const *buffer_list, @@ -273,6 +322,7 @@ static int tcp_post_send_generic(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); + static int tcp_post_recv_generic(bmi_op_id_t * id, bmi_method_addr_p src, void *const *buffer_list, @@ -285,10 +335,17 @@ static int tcp_post_recv_generic(bmi_op_id_t * id, void *user_ptr, bmi_context_id context_id, PVFS_hint hints); -static int payload_progress(int s, void *const *buffer_list, const bmi_size_t* - size_list, int list_count, bmi_size_t total_size, int* list_index, - bmi_size_t* current_index_complete, enum bmi_op_type send_recv, - char* enc_hdr, bmi_size_t* env_amt_complete); + +static int payload_progress(int s, + void *const *buffer_list, + const bmi_size_t* size_list, + int list_count, + bmi_size_t total_size, + int* list_index, + bmi_size_t* current_index_complete, + enum bmi_op_type send_recv, + char* enc_hdr, + bmi_size_t* env_amt_complete); #if defined(USE_TRUSTED) && defined(__PVFS2_CLIENT__) static int tcp_enable_trusted(struct tcp_addr *tcp_addr_data); @@ -331,6 +388,7 @@ const struct bmi_method_ops bmi_tcp_ops = { static struct { int method_flags; + int connect_test; int method_id; bmi_method_addr_p listen_addr; } tcp_method_params; @@ -396,6 +454,14 @@ enum */ static int forceful_cancel_mode = 0; +#ifdef BMI_TCP_ZONE +/* hangs on to the zone when connecting to config server + * for later checking against server addresses + */ +static char *tcp_zone = NULL; +static int tcp_zone_len = 0; +#endif + /* Socket buffer sizes, currently these default values will be used for the clients... (TODO) @@ -430,7 +496,7 @@ int BMI_tcp_initialize(bmi_method_addr_p listen_addr, struct tcp_addr *tcp_addr_data = NULL; int i = 0; - gossip_ldebug(GOSSIP_BMI_DEBUG_TCP, "Initializing TCP/IP module.\n"); + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "Initializing TCP/IP module.\n"); /* check args */ if ((init_flags & BMI_INIT_SERVER) && !listen_addr) @@ -444,6 +510,7 @@ int BMI_tcp_initialize(bmi_method_addr_p listen_addr, /* zero out our parameter structure and fill it in */ memset(&tcp_method_params, 0, sizeof(tcp_method_params)); tcp_method_params.method_id = method_id; + tcp_method_params.connect_test = 1; tcp_method_params.method_flags = init_flags; if (init_flags & BMI_INIT_SERVER) @@ -520,7 +587,7 @@ int BMI_tcp_initialize(bmi_method_addr_p listen_addr, "%d", &bmi_tcp_recv_event_id); gen_mutex_unlock(&interface_mutex); - gossip_ldebug(GOSSIP_BMI_DEBUG_TCP, + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "TCP/IP module successfully initialized.\n"); return (0); @@ -582,11 +649,13 @@ int BMI_tcp_finalize(void) /* NOTE: we are trusting the calling BMI layer to deallocate * all of the method addresses (this will close any open sockets) */ - gossip_ldebug(GOSSIP_BMI_DEBUG_TCP, "TCP/IP module finalized.\n"); + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "TCP/IP module finalized.\n"); gen_mutex_unlock(&interface_mutex); return (0); } +/* temp def for now */ +#define TCP_DEFAULT_CONNECT_TRYS 50 /* * BMI_tcp_method_addr_lookup() @@ -600,58 +669,184 @@ bmi_method_addr_p BMI_tcp_method_addr_lookup(const char *id_string) { char *tcp_string = NULL; char *delim = NULL; +#ifdef BMI_TCP_ZONE + char *zone = NULL; + int zone_len = 0; +#endif char *hostname = NULL; bmi_method_addr_p new_addr = NULL; struct tcp_addr *tcp_addr_data = NULL; int ret = -1; - tcp_string = string_key("tcp", id_string); - if (!tcp_string) + /* Loop over available tcp addresses in id_string to find + * the right one + */ + while(id_string) { - /* the string doesn't even have our info */ - return (NULL); - } + tcp_string = string_key("tcp", id_string); + if (!tcp_string) + { + /* the string doesn't even have our info */ + return (NULL); + } - /* start breaking up the method information */ - /* for normal tcp, it is simply hostname:port */ - if ((delim = index(tcp_string, ':')) == NULL) - { - gossip_lerr("Error: malformed tcp address.\n"); - free(tcp_string); - return (NULL); - } + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "Method matched\n"); - /* looks ok, so let's build the method addr structure */ - new_addr = alloc_tcp_method_addr(); - if (!new_addr) - { - free(tcp_string); - return (NULL); - } - tcp_addr_data = new_addr->method_data; + /* looks ok, so let's build the method addr structure */ + new_addr = alloc_tcp_method_addr(); + if (!new_addr) + { + goto errorout; + } + tcp_addr_data = new_addr->method_data; - ret = sscanf((delim + 1), "%d", &(tcp_addr_data->port)); - if (ret != 1) - { - gossip_lerr("Error: malformed tcp address.\n"); - dealloc_tcp_method_addr(new_addr); - free(tcp_string); - return (NULL); - } +#ifdef BMI_TCP_ZONE + /* check for network zone */ + if ( ((delim = strpbrk(id_string, "-:/")) == NULL) || + (*delim != '-') ) + { + /* no zone found so carry on */ + zone = NULL; + } + else + { + char *delim2; - hostname = (char *) malloc((delim - tcp_string + 1)); - if (!hostname) - { - dealloc_tcp_method_addr(new_addr); - free(tcp_string); - return (NULL); - } - strncpy(hostname, tcp_string, (delim - tcp_string)); - hostname[delim - tcp_string] = '\0'; + if ( ((delim2 = strpbrk(delim, ":/")) == NULL) || + (*delim2 != ':') ) + { + /* incorrect string format */ + goto errorout; + } + zone_len = delim2 - delim; + zone = (char *)malloc(zone_len + 1); + strncpy(zone, delim, zone_len); + zone[zone_len + 1] = '\0'; + } +#endif + + /* start breaking up the method information */ + /* for normal tcp, it is simply hostname:port */ + if ((delim = index(tcp_string, ':')) == NULL) + { + gossip_lerr("Error: malformed tcp address.\n"); + goto errorout; + } + + ret = sscanf((delim + 1), "%d", &(tcp_addr_data->port)); + if (ret != 1) + { + gossip_lerr("Error: malformed tcp address.\n"); + goto errorout; + } + + hostname = (char *) malloc((delim - tcp_string + 1)); + if (!hostname) + { + goto errorout; + } + strncpy(hostname, tcp_string, (delim - tcp_string)); + hostname[delim - tcp_string] = '\0'; - tcp_addr_data->hostname = hostname; + tcp_addr_data->hostname = hostname; + +#ifdef BMI_TCP_ZONE + if (tcp_method_params.method_flags & BMI_INIT_SERVER) + { + tcp_addr_data->zone = zone; + } + else if (tcp_method_params.connect_test) + { + /* make sure we can actually talk to this addresss */ + int connect_cnt = TCP_DEFAULT_CONNECT_TRYS; - free(tcp_string); + do + { + if (connect_cnt-- <= 0) + { + /* failure - never responded */ + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "connect timed out\n"); + goto errorout; + } + ret = tcp_sock_init(new_addr); + if (ret < 0) + { + /* error - connect returned a tcp error */ + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "tcp_sock_init returned error\n"); + goto errorout; + } + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "connect test started\n"); + } while (tcp_addr_data->not_connected); + + /* save the successful zone info */ + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "connect test successful for zone %s\n", zone); + tcp_method_params.connect_test = 0; + tcp_addr_data->zone = zone; + tcp_zone = zone; + tcp_zone_len = zone_len; + + /* we could drop the connection here if we wanted to */ + } + else /* client && !connect_test */ + { + /* zone passed in must match saved zone if there is one */ + if (tcp_zone) + { + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "testing for zone match %s %s\n", zone, tcp_zone); + if ((tcp_zone_len != zone_len) || + (strncmp(tcp_zone, zone, tcp_zone_len))) + { + /* does not match zone */ + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "does not match\n"); + goto errorout; + } + gossip_debug(GOSSIP_BMI_DEBUG_TCP, "zone match\n"); + /* zone matches ... */ + } + /* or no zone set so we assume any zone is OK */ + } /* else */ +#endif + + /* we have success */ + break; + +errorout: + + /* frees hostname and zone if they are present */ + if (new_addr) + { + dealloc_tcp_method_addr(new_addr); + new_addr = NULL; + } + if (tcp_string) + { + free(tcp_string); + tcp_string = NULL; + } + + hostname = NULL; + zone = NULL; + zone_len = 0; + delim = NULL; + + /* this might skip several non-tcp addrs */ + /* it mimics what is done at the top of the loop */ + id_string = strstr(id_string, "tcp"); + id_string = index(id_string, ','); + /* at the top of the loop we'll look for more tcp addrs */ + if (id_string) + { + /* found a comma, there are more addresses in the string */ + id_string++; /* skip the comma */ + } + + } /* while loop */ + + /* either success or not found (new_addr == NULL) */ + if (tcp_string) + { + free(tcp_string); + } return (new_addr); } @@ -665,12 +860,15 @@ bmi_method_addr_p BMI_tcp_method_addr_lookup(const char *id_string) void *BMI_tcp_memalloc(bmi_size_t size, enum bmi_op_type send_recv) { + void *ptr; /* we really don't care what flags the caller uses, TCP/IP has no * preferences about how the memory should be configured. */ -/* return (calloc(1,(size_t) size)); */ - return PINT_mem_aligned_alloc(size, 4096); + /* return (calloc(1,(size_t) size)); */ + /* return PINT_mem_aligned_alloc(size, 4096); */ + posix_memalign(&ptr, 4096, size); + return ptr; } @@ -684,7 +882,8 @@ int BMI_tcp_memfree(void *buffer, bmi_size_t size, enum bmi_op_type send_recv) { - PINT_mem_aligned_free(buffer); + /*PINT_mem_aligned_free(buffer);*/ + free(buffer); return (0); } @@ -1872,6 +2071,13 @@ const char* BMI_tcp_addr_rev_lookup_unexpected(bmi_method_addr_p map) * operations that use the address. If the * dealloc_flag is set, the memory used by the address will be * deallocated as well. + * This function can be called with a 0 dealloc_flag, which can cause + * bmi_method_addr_forget_callback to put it on the forget list, causing + * it to be called again this time with a 1 dealloc_flag. In the mean + * time the socket gets set to -1 by tcp_shutdown_addr which is cause + * for an error from BMI_socket_collection_remove. Thus I have added + * the check for a valid socket. Other causes of invalid sockets might + * be masked. * * no return value */ @@ -1879,13 +2085,16 @@ void tcp_forget_addr(bmi_method_addr_p map, int dealloc_flag, int error_code) { + /* this assumes map is NOT NULL, I can only assume that is + * guaranteed by the caller + */ struct tcp_addr* tcp_addr_data = map->method_data; BMI_addr_t bmi_addr = tcp_addr_data->bmi_addr; int tmp_outcount; bmi_method_addr_p tmp_addr; int tmp_status; - if (tcp_socket_collection_p) + if (tcp_socket_collection_p && tcp_addr_data->socket >= 0) { BMI_socket_collection_remove(tcp_socket_collection_p, map); /* perform a test to force the socket collection to act on the remove @@ -1946,6 +2155,8 @@ static void dealloc_tcp_method_addr(bmi_method_addr_p map) if (tcp_addr_data->hostname) free(tcp_addr_data->hostname); + if (tcp_addr_data->zone) + free(tcp_addr_data->zone); if (tcp_addr_data->peer) free(tcp_addr_data->peer); diff --git a/src/io/bmi/bmi_tcp/socket-collection-epoll.c b/src/io/bmi/bmi_tcp/socket-collection-epoll.c index 05f78d4..297440d 100644 --- a/src/io/bmi/bmi_tcp/socket-collection-epoll.c +++ b/src/io/bmi/bmi_tcp/socket-collection-epoll.c @@ -21,6 +21,7 @@ #include #include +#include "pvfs2-internal.h" #include "gossip.h" #include "socket-collection-epoll.h" #include "bmi-method-support.h" @@ -148,6 +149,7 @@ int BMI_socket_collection_testglobal(socket_collection_p scp, if(ret < 0) { + perror("error returned from epoll_wait "); return(-old_errno); } diff --git a/src/io/bmi/bmi_tcp/socket-collection-epoll.h b/src/io/bmi/bmi_tcp/socket-collection-epoll.h index 3795310..e195d99 100644 --- a/src/io/bmi/bmi_tcp/socket-collection-epoll.h +++ b/src/io/bmi/bmi_tcp/socket-collection-epoll.h @@ -54,28 +54,53 @@ socket_collection_p BMI_socket_collection_init(int new_server_socket); do { \ struct tcp_addr* tcp_data = (m)->method_data; \ if(tcp_data->socket > -1){ \ + int rc; \ struct epoll_event event;\ memset(&event, 0, sizeof(event));\ event.events = EPOLLIN|EPOLLERR|EPOLLHUP;\ event.data.ptr = tcp_data->map;\ - epoll_ctl(s->epfd, EPOLL_CTL_ADD, tcp_data->socket, &event);\ + rc = epoll_ctl(s->epfd, EPOLL_CTL_ADD, tcp_data->socket, &event);\ + if (rc == -1) \ + { \ + if (errno != EEXIST) \ + { \ + gossip_err("BMI_socket_collection_add returns error\n"); \ + } \ + else \ + { \ + errno = 0; \ + } \ + } \ } \ } while(0) #define BMI_socket_collection_remove(s, m) \ do { \ + int rc; \ struct epoll_event event;\ struct tcp_addr* tcp_data = (m)->method_data; \ tcp_data->write_ref_count = 0; \ memset(&event, 0, sizeof(event));\ event.events = 0;\ event.data.ptr = tcp_data->map;\ - epoll_ctl(s->epfd, EPOLL_CTL_DEL, tcp_data->socket, &event);\ + rc = epoll_ctl(s->epfd, EPOLL_CTL_DEL, tcp_data->socket, &event);\ + if (rc == -1) \ + { \ + if (errno != ENOENT) \ + { \ + gossip_err("BMI_socket_collection_remove returns error\n"); \ + } \ + else \ + { \ + errno = 0; \ + } \ + } \ } while(0) /* we _must_ have a valid socket at this point if we want to write data */ #define BMI_socket_collection_add_write_bit(s, m) \ do { \ + int rc; \ struct tcp_addr* tcp_data = (m)->method_data; \ struct epoll_event event;\ assert(tcp_data->socket > -1); \ @@ -83,7 +108,11 @@ do { \ memset(&event, 0, sizeof(event));\ event.events = EPOLLIN|EPOLLERR|EPOLLHUP|EPOLLOUT;\ event.data.ptr = tcp_data->map;\ - epoll_ctl(s->epfd, EPOLL_CTL_MOD, tcp_data->socket, &event);\ + rc = epoll_ctl(s->epfd, EPOLL_CTL_MOD, tcp_data->socket, &event);\ + if (rc == -1) \ + { \ + gossip_err("BMI_socket_collection_add_write_bit returns error\n"); \ + } \ } while(0) #define BMI_socket_collection_remove_write_bit(s, m) \ @@ -93,10 +122,15 @@ do { \ tcp_data->write_ref_count--; \ assert(tcp_data->write_ref_count > -1); \ if (tcp_data->write_ref_count == 0) { \ + int rc; \ memset(&event, 0, sizeof(event));\ event.events = EPOLLIN|EPOLLERR|EPOLLHUP;\ event.data.ptr = tcp_data->map;\ - epoll_ctl(s->epfd, EPOLL_CTL_MOD, tcp_data->socket, &event);\ + rc = epoll_ctl(s->epfd, EPOLL_CTL_MOD, tcp_data->socket, &event);\ + if (rc == -1) \ + { \ + gossip_err("BMI_socket_collection_remove_write_bit returns error\n"); \ + } \ }\ } while(0) diff --git a/src/io/bmi/bmi_tcp/socket-collection.c b/src/io/bmi/bmi_tcp/socket-collection.c index 87a3939..3cefaf4 100644 --- a/src/io/bmi/bmi_tcp/socket-collection.c +++ b/src/io/bmi/bmi_tcp/socket-collection.c @@ -20,6 +20,7 @@ #include #include +#include "pvfs2-internal.h" #include "gossip.h" #include "socket-collection.h" #include "bmi-method-support.h" diff --git a/src/io/bmi/bmi_tcp/sockio.c b/src/io/bmi/bmi_tcp/sockio.c old mode 100644 new mode 100755 index 8245d94..d31d3e0 --- a/src/io/bmi/bmi_tcp/sockio.c +++ b/src/io/bmi/bmi_tcp/sockio.c @@ -4,7 +4,7 @@ * See COPYING in top-level directory. */ -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #include #include diff --git a/src/io/bmi/bmi_tcp/sockio.h b/src/io/bmi/bmi_tcp/sockio.h old mode 100644 new mode 100755 diff --git a/src/io/bmi/op-list.c b/src/io/bmi/op-list.c index a45545b..84c1780 100644 --- a/src/io/bmi/op-list.c +++ b/src/io/bmi/op-list.c @@ -22,6 +22,7 @@ #include "bmi-method-support.h" #include "op-list.h" +#include "pvfs2-internal.h" #include "gossip.h" diff --git a/src/io/bmi/op-list.h b/src/io/bmi/op-list.h index 47a9977..e31b99b 100644 --- a/src/io/bmi/op-list.h +++ b/src/io/bmi/op-list.h @@ -13,6 +13,7 @@ #ifndef __OP_LIST_H #define __OP_LIST_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "bmi-types.h" #include "bmi-method-support.h" diff --git a/src/io/bmi/reference-list.c b/src/io/bmi/reference-list.c old mode 100644 new mode 100755 index 0cef773..5a9e3c1 --- a/src/io/bmi/reference-list.c +++ b/src/io/bmi/reference-list.c @@ -14,8 +14,8 @@ #include #include #include -#include +#include "pvfs2-internal.h" #include "reference-list.h" #include "gossip.h" #include "id-generator.h" @@ -46,7 +46,10 @@ ref_list_p ref_list_new(void) * ever have a need for more, then this hash table should be moved from * a static global to actually be part of the ref_list_p. */ - assert(str_table == NULL); + if (str_table != NULL) + { + return NULL; + } str_table = qhash_init( ref_list_compare_key_entry, @@ -259,7 +262,10 @@ static int ref_list_compare_key_entry(void* key, struct qhash_head* link) ref_st_p tmp_entry = NULL; tmp_entry = qhash_entry(link, ref_st, hash_link); - assert(tmp_entry); + if (tmp_entry == NULL) + { + return 0; + } if(strcmp(tmp_entry->id_string, key_string) == 0) { diff --git a/src/io/bmi/reference-list.h b/src/io/bmi/reference-list.h index 1bd63fd..01b37bb 100644 --- a/src/io/bmi/reference-list.h +++ b/src/io/bmi/reference-list.h @@ -14,6 +14,7 @@ #ifndef __REFERENCE_LIST_H #define __REFERENCE_LIST_H +#include "pvfs2-internal.h" #include "bmi-types.h" #include "bmi-method-support.h" #include "quicklist.h" diff --git a/src/io/buffer/cache.c b/src/io/buffer/cache.c index 9fb03bf..c521ada 100644 --- a/src/io/buffer/cache.c +++ b/src/io/buffer/cache.c @@ -4,6 +4,7 @@ #include #include +#include "pvfs2-internal.h" #include "internal.h" #include "state.h" #include "flags.h" diff --git a/src/io/buffer/internal.h b/src/io/buffer/internal.h index f0d0c15..b3f813f 100644 --- a/src/io/buffer/internal.h +++ b/src/io/buffer/internal.h @@ -2,7 +2,9 @@ #define CACHE_INTERNAL_H #include +#ifndef WIN32 #include +#endif #include "ncac-interface.h" #include "ncac-list.h" #include "radix.h" @@ -325,16 +327,27 @@ del_page_from_lru(struct cache_stack *cache_stack, struct extent *page) #if defined(DEBUG) +#ifdef WIN32 +#define DPRINT(fmt, args, ...) { fprintf(stderr, "[%s:%d]", __FILE__, __LINE__ ); fprintf(stderr, fmt, __VA_ARGS__); fprintf(stderr, "\n"); } +#else #define DPRINT(fmt, args...) { fprintf(stderr, "[%s:%d]", __FILE__, __LINE__ ); fprintf(stderr, fmt, ## args); fprintf(stderr, "\n"); } +#endif #else +#ifdef WIN32 +#define DPRINT(fmt, args, ...) +#else #define DPRINT(fmt, args...) - #endif +#endif +#ifdef WIN32 +#define NCAC_error(fmt, args, ...) { fprintf(stderr, "[%s:%d]", __FILE__, __LINE__); fprintf(stderr, fmt, __VA_ARGS__); fprintf(stderr, "\n");} +#else #define NCAC_error(fmt, args...) { fprintf(stderr, "[%s:%d]", __FILE__, __LINE__); fprintf(stderr, fmt, ## args); fprintf(stderr, "\n");} +#endif /* gets defined in internal.c. This needs a declaration so * that tests can call it without warnings. diff --git a/src/io/buffer/ncac-buf-job.c b/src/io/buffer/ncac-buf-job.c index 07500ba..b7bda33 100644 --- a/src/io/buffer/ncac-buf-job.c +++ b/src/io/buffer/ncac-buf-job.c @@ -11,6 +11,7 @@ #include #include +#include "pvfs2-internal.h" #include "internal.h" #include "state.h" #include "ncac-job.h" diff --git a/src/io/buffer/ncac-init.c b/src/io/buffer/ncac-init.c index 8c49b74..b3aaab8 100644 --- a/src/io/buffer/ncac-init.c +++ b/src/io/buffer/ncac-init.c @@ -8,6 +8,7 @@ #include "ncac-list.h" +#include "pvfs2-internal.h" #include "internal.h" #include "radix.h" diff --git a/src/io/buffer/ncac-interface.c b/src/io/buffer/ncac-interface.c index 3901454..aa3ca50 100644 --- a/src/io/buffer/ncac-interface.c +++ b/src/io/buffer/ncac-interface.c @@ -3,6 +3,7 @@ #include #include "ncac-interface.h" +#include "pvfs2-internal.h" #include "internal.h" /* cache_read_post() diff --git a/src/io/buffer/radix.c b/src/io/buffer/radix.c index 33c9ae7..ff5cce1 100644 --- a/src/io/buffer/radix.c +++ b/src/io/buffer/radix.c @@ -1,5 +1,6 @@ #include #include +#include "pvfs2-internal.h" #include "radix.h" /* diff --git a/src/io/buffer/state.c b/src/io/buffer/state.c index a77f547..b0dcdea 100644 --- a/src/io/buffer/state.c +++ b/src/io/buffer/state.c @@ -1,6 +1,7 @@ #include #include +#include "pvfs2-internal.h" #include "internal.h" #include "state.h" #include "cache.h" diff --git a/src/io/description/dist-basic.c b/src/io/description/dist-basic.c index 2129705..5988766 100644 --- a/src/io/description/dist-basic.c +++ b/src/io/description/dist-basic.c @@ -10,6 +10,7 @@ #include "pint-distribution.h" #include "pint-dist-utils.h" #include "pvfs2-types.h" +#include "pvfs2-internal.h" #include "pvfs2-dist-basic.h" #define CONTIGBLOCKSZ 65536 diff --git a/src/io/description/dist-varstrip-parser.c b/src/io/description/dist-varstrip-parser.c index 142d676..4bf0f8b 100644 --- a/src/io/description/dist-varstrip-parser.c +++ b/src/io/description/dist-varstrip-parser.c @@ -7,6 +7,7 @@ #include "dist-varstrip-parser.h" #include "pvfs2-dist-varstrip.h" +#include "pvfs2-internal.h" #include "gossip.h" #include diff --git a/src/io/description/dist-varstrip-parser.h b/src/io/description/dist-varstrip-parser.h index 3afb346..abfb7b5 100644 --- a/src/io/description/dist-varstrip-parser.h +++ b/src/io/description/dist-varstrip-parser.h @@ -7,6 +7,7 @@ #ifndef PVFS_DIST_VARSTRIP_PARSER_H #define PVFS_DIST_VARSTRIP_PARSER_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" struct PINT_dist_strips_s diff --git a/src/io/description/dist-varstrip.c b/src/io/description/dist-varstrip.c index 347bf91..0a3b43d 100644 --- a/src/io/description/dist-varstrip.c +++ b/src/io/description/dist-varstrip.c @@ -13,6 +13,7 @@ #include "pvfs2-dist-varstrip.h" #include "dist-varstrip-parser.h" +#include "pvfs2-internal.h" #include "pvfs2-debug.h" #include "gossip.h" diff --git a/src/io/description/pint-dist-utils.c b/src/io/description/pint-dist-utils.c index eb3ab97..994adca 100644 --- a/src/io/description/pint-dist-utils.c +++ b/src/io/description/pint-dist-utils.c @@ -11,6 +11,7 @@ #include "pvfs2-dist-varstrip.h" #include "pvfs2-dist-twod-stripe.h" #include "pint-dist-utils.h" +#include "pvfs2-internal.h" /* Default distributions */ extern PINT_dist basic_dist; diff --git a/src/io/description/pint-dist-utils.h b/src/io/description/pint-dist-utils.h index df93bb4..b39ee07 100644 --- a/src/io/description/pint-dist-utils.h +++ b/src/io/description/pint-dist-utils.h @@ -7,6 +7,7 @@ #ifndef __PINT_DIST_UTILS_H #define __PINT_DIST_UTILS_H +#include "pvfs2-internal.h" #include "pint-distribution.h" #include "server-config.h" diff --git a/src/io/description/pint-distribution.c b/src/io/description/pint-distribution.c index 832f179..91f546f 100644 --- a/src/io/description/pint-distribution.c +++ b/src/io/description/pint-distribution.c @@ -13,6 +13,7 @@ #include "pvfs2-types.h" #include "pvfs2-debug.h" #include "gossip.h" +#include "internal.h" #include "pint-distribution.h" diff --git a/src/io/description/pint-distribution.h b/src/io/description/pint-distribution.h index b373467..91fbbca 100644 --- a/src/io/description/pint-distribution.h +++ b/src/io/description/pint-distribution.h @@ -7,6 +7,7 @@ #ifndef __PINT_DISTRIBUTION_H #define __PINT_DISTRIBUTION_H +#include "pvfs2-internal.h" #include "pint-request.h" #include "pvfs2-types.h" diff --git a/src/io/description/pint-request-encode.h b/src/io/description/pint-request-encode.h index 25987c0..95d3b74 100644 --- a/src/io/description/pint-request-encode.h +++ b/src/io/description/pint-request-encode.h @@ -2,6 +2,8 @@ #ifndef _PINT_REQUEST_ENCODE_H_ #define _PINT_REQUEST_ENCODE_H_ +#include "pvfs2-internal.h" + /* max depth of a PINT_Request used in anything, just servreq IO now */ #define PVFS_REQ_LIMIT_PINT_REQUEST_NUM 100 diff --git a/src/io/description/pint-request.c b/src/io/description/pint-request.c index 6b68eba..13bbba5 100644 --- a/src/io/description/pint-request.c +++ b/src/io/description/pint-request.c @@ -104,7 +104,6 @@ int PINT_process_request(PINT_Request_state *req, gossip_lerr("PINT_process_request: NULL offset or size array!\n"); return -PVFS_EINVAL; } - /* initialize some variables */ retval = 0; if (PINT_EQ_CKSIZE(mode)) /* be must be exact here */ @@ -316,7 +315,7 @@ int PINT_process_request(PINT_Request_state *req, { sz = result->bytemax - result->bytes; } - PINT_ADD_SEGMENT(result, contig_offset, sz, mode); + PINT_ADD_SEGMENT(result, contig_offset, sz, mode); retval = sz; } else diff --git a/src/io/description/pint-request.h b/src/io/description/pint-request.h index e2d2be2..9976b6c 100644 --- a/src/io/description/pint-request.h +++ b/src/io/description/pint-request.h @@ -7,6 +7,7 @@ #ifndef __PINT_REQUEST_H #define __PINT_REQUEST_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" /* Forward declarations */ diff --git a/src/io/description/pvfs-request.c b/src/io/description/pvfs-request.c index 4db4530..be8dc4a 100644 --- a/src/io/description/pvfs-request.c +++ b/src/io/description/pvfs-request.c @@ -11,6 +11,7 @@ #include #endif #include "string.h" +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pint-request.h" #include "pvfs2-request.h" diff --git a/src/io/dev/pint-dev.c b/src/io/dev/pint-dev.c index a7181f6..cdf70c3 100644 --- a/src/io/dev/pint-dev.c +++ b/src/io/dev/pint-dev.c @@ -38,7 +38,8 @@ struct iovec { }; #endif -#include "pint-mem.h" +#include "pvfs2-internal.h" +/* #include "pint-mem.h" obsolete */ #include "pvfs2-types.h" #include "pvfs2-debug.h" #include "gossip.h" @@ -46,7 +47,6 @@ struct iovec { #ifndef WIN32 #include "pvfs2-dev-proto.h" #endif -#include "pvfs2-internal.h" #ifdef WITH_LINUX_KMOD static int setup_dev_entry( @@ -246,7 +246,8 @@ int PINT_dev_get_mapped_regions(int ndesc, struct PVFS_dev_map_desc *desc, /* we would like to use a memaligned region that is a multiple * of the system page size */ - ptr = PINT_mem_aligned_alloc(total_size, page_size); + /* ptr = PINT_mem_aligned_alloc(total_size, page_size); */ + posix_memalign(&ptr, page_size, total_size); if (!ptr) { desc[i].ptr = NULL; @@ -291,7 +292,8 @@ int PINT_dev_get_mapped_regions(int ndesc, struct PVFS_dev_map_desc *desc, int j; for (j = 0; j < i; j++) { if (desc[j].ptr) { - PINT_mem_aligned_free(desc[j].ptr); + /* PINT_mem_aligned_free(desc[j].ptr); */ + free(desc[j].ptr); desc[j].ptr = NULL; } } @@ -328,7 +330,8 @@ void PINT_dev_put_mapped_regions(int ndesc, struct PVFS_dev_map_desc *desc) gossip_err("Error: FAILED to munlock shared buffer\n"); } #endif - PINT_mem_aligned_free(ptr); + /* PINT_mem_aligned_free(ptr); */ + free(ptr); } } diff --git a/src/io/dev/pint-dev.h b/src/io/dev/pint-dev.h index 516928c..9311451 100644 --- a/src/io/dev/pint-dev.h +++ b/src/io/dev/pint-dev.h @@ -6,6 +6,7 @@ #ifndef __PINT_DEV_H #define __PINT_DEV_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pint-dev-shared.h" diff --git a/src/io/flow/flow-queue.c b/src/io/flow/flow-queue.c index 19627fa..db9003c 100644 --- a/src/io/flow/flow-queue.c +++ b/src/io/flow/flow-queue.c @@ -9,6 +9,7 @@ */ #include "gossip.h" +#include "pvfs2-internal.h" #include "quicklist.h" #include "flow-queue.h" #include diff --git a/src/io/flow/flow-queue.h b/src/io/flow/flow-queue.h index e993585..d47f59d 100644 --- a/src/io/flow/flow-queue.h +++ b/src/io/flow/flow-queue.h @@ -11,6 +11,7 @@ #ifndef __FLOW_QUEUE_H #define __FLOW_QUEUE_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "flow.h" diff --git a/src/io/flow/flow-ref.c b/src/io/flow/flow-ref.c index d67d3d6..785da85 100644 --- a/src/io/flow/flow-ref.c +++ b/src/io/flow/flow-ref.c @@ -9,6 +9,7 @@ #include #include "flow-ref.h" +#include "pvfs2-internal.h" /* flow_ref_new() * diff --git a/src/io/flow/flow-ref.h b/src/io/flow/flow-ref.h index cae4a94..2db2273 100644 --- a/src/io/flow/flow-ref.h +++ b/src/io/flow/flow-ref.h @@ -12,6 +12,7 @@ #ifndef __FLOW_REF_H #define __FLOW_REF_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "flow.h" diff --git a/src/io/flow/flow.c b/src/io/flow/flow.c index 54726f5..88c52b4 100644 --- a/src/io/flow/flow.c +++ b/src/io/flow/flow.c @@ -22,6 +22,7 @@ #include "flow.h" #include "flowproto-support.h" #include "flow-ref.h" +#include "pvfs2-internal.h" /* mutex lock used to prevent more than one process from entering the * interface at a time diff --git a/src/io/flow/flow.h b/src/io/flow/flow.h index f283ec3..1a31de2 100644 --- a/src/io/flow/flow.h +++ b/src/io/flow/flow.h @@ -11,6 +11,8 @@ #ifndef __FLOW_H #define __FLOW_H +#include "pvfs2-internal.h" + #include "gen-locks.h" #include "quicklist.h" #include "pvfs2-types.h" diff --git a/src/io/flow/flowproto-dump-offsets/flowproto-dump-offsets.c b/src/io/flow/flowproto-dump-offsets/flowproto-dump-offsets.c index 1b83b9d..1a4a6e8 100644 --- a/src/io/flow/flowproto-dump-offsets/flowproto-dump-offsets.c +++ b/src/io/flow/flowproto-dump-offsets/flowproto-dump-offsets.c @@ -12,6 +12,7 @@ #include "src/io/flow/flowproto-support.h" #include "quicklist.h" #include "pvfs2-request.h" +#include "pvfs2-internal.h" /********************************************************** * interface prototypes diff --git a/src/io/flow/flowproto-support.h b/src/io/flow/flowproto-support.h index bec2abe..e605f93 100644 --- a/src/io/flow/flowproto-support.h +++ b/src/io/flow/flowproto-support.h @@ -11,6 +11,7 @@ #ifndef __FLOWPROTO_SUPPORT_H #define __FLOWPROTO_SUPPORT_H +#include "pvfs2-internal.h" #include "src/io/flow/flow.h" /* flow protocol interface */ diff --git a/src/io/flow/flowproto-template/flowproto-template.c b/src/io/flow/flowproto-template/flowproto-template.c index b0e1671..67847ef 100644 --- a/src/io/flow/flowproto-template/flowproto-template.c +++ b/src/io/flow/flowproto-template/flowproto-template.c @@ -9,6 +9,7 @@ #include #include "gossip.h" +#include "pvfs2-internal.h" #include "src/io/flow/flowproto-support.h" /* interface prototypes */ diff --git a/src/io/job/job-desc-queue.c b/src/io/job/job-desc-queue.c index fcf0f72..505eacf 100644 --- a/src/io/job/job-desc-queue.c +++ b/src/io/job/job-desc-queue.c @@ -17,6 +17,7 @@ #include "gossip.h" #include "id-generator.h" #include "pint-util.h" +#include "pvfs2-internal.h" #ifdef WIN32 typedef enum job_type job_type_t; diff --git a/src/io/job/job-desc-queue.h b/src/io/job/job-desc-queue.h index e796031..bd536bc 100644 --- a/src/io/job/job-desc-queue.h +++ b/src/io/job/job-desc-queue.h @@ -11,6 +11,7 @@ #ifndef __JOB_DESC_QUEUE_H #define __JOB_DESC_QUEUE_H +#include "pvfs2-internal.h" #include "quicklist.h" #include "job.h" #include "pvfs2-types.h" diff --git a/src/io/job/job-time-mgr.h b/src/io/job/job-time-mgr.h index 131996f..7a62a68 100644 --- a/src/io/job/job-time-mgr.h +++ b/src/io/job/job-time-mgr.h @@ -7,6 +7,7 @@ #ifndef __JOB_TIME_MGR_H #define __JOB_TIME_MGR_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "job-desc-queue.h" #include "job.h" diff --git a/src/io/job/job.c b/src/io/job/job.c index e95057d..bc62419 100644 --- a/src/io/job/job.c +++ b/src/io/job/job.c @@ -1472,7 +1472,7 @@ int job_trove_bstream_write_list(TROVE_coll_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1565,7 +1565,7 @@ int job_trove_bstream_read_list(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1652,7 +1652,7 @@ int job_trove_bstream_flush(PVFS_fs_id coll_id, { int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1731,7 +1731,7 @@ int job_trove_keyval_read(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1818,7 +1818,7 @@ int job_trove_keyval_read_list(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1904,7 +1904,7 @@ int job_trove_keyval_write(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -1991,7 +1991,7 @@ int job_trove_keyval_write_list(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2071,7 +2071,7 @@ int job_trove_keyval_remove_list(PVFS_fs_id coll_id, { int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2153,7 +2153,7 @@ int job_trove_keyval_flush(PVFS_fs_id coll_id, { int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2227,7 +2227,7 @@ int job_trove_keyval_get_handle_info(PVFS_fs_id coll_id, int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2316,7 +2316,7 @@ int job_trove_dspace_getattr(PVFS_fs_id coll_id, int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2402,7 +2402,7 @@ int job_trove_dspace_getattr_list(PVFS_fs_id coll_id, int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2491,7 +2491,7 @@ int job_trove_dspace_setattr(PVFS_fs_id coll_id, int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2575,7 +2575,7 @@ int job_trove_bstream_resize(PVFS_fs_id coll_id, int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2680,7 +2680,7 @@ int job_trove_keyval_remove(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2789,7 +2789,7 @@ int job_trove_keyval_iterate(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2881,7 +2881,7 @@ int job_trove_keyval_iterate_keys(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -2970,7 +2970,7 @@ int job_trove_dspace_iterate_handles(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3060,7 +3060,7 @@ int job_trove_dspace_create(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3152,7 +3152,7 @@ int job_trove_dspace_create_list(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3240,7 +3240,7 @@ int job_trove_dspace_remove_list(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3326,7 +3326,7 @@ int job_trove_dspace_remove(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3408,7 +3408,7 @@ int job_trove_dspace_verify(PVFS_fs_id coll_id, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3525,7 +3525,7 @@ int job_trove_fs_create(char *collname, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3619,7 +3619,7 @@ int job_trove_fs_lookup(char *collname, */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3699,7 +3699,7 @@ int job_trove_fs_seteattr(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3780,7 +3780,7 @@ int job_trove_fs_geteattr(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr @@ -3860,7 +3860,7 @@ int job_trove_fs_deleattr(PVFS_fs_id coll_id, * up a job_desc structure. */ int ret = -1; struct job_desc *jd = NULL; - void* user_ptr_internal; + void* user_ptr_internal __attribute__((unused)); /* create the job desc first, even though we may not use it. This * gives us somewhere to store the BMI id and user ptr diff --git a/src/io/job/job.h b/src/io/job/job.h index 5b8ac9e..c445368 100644 --- a/src/io/job/job.h +++ b/src/io/job/job.h @@ -9,6 +9,8 @@ #ifndef __JOB_H #define __JOB_H +#include "pvfs2-internal.h" + #ifdef WIN32 #include "wincommon.h" #else diff --git a/src/io/job/thread-mgr.c b/src/io/job/thread-mgr.c index 5e8761f..ea9c3f7 100644 --- a/src/io/job/thread-mgr.c +++ b/src/io/job/thread-mgr.c @@ -86,7 +86,7 @@ static void *trove_thread_function(void *ptr) int ret = -1; int i=0; struct PINT_thread_mgr_trove_callback *tmp_callback; - int timeout = thread_mgr_test_timeout; + int timeout __attribute__((unused)) = thread_mgr_test_timeout; #ifdef __PVFS2_JOB_THREADED__ PINT_event_thread_start("TROVE"); @@ -167,7 +167,7 @@ static void *bmi_thread_function(void *ptr) int i=0; int test_timeout = thread_mgr_test_timeout; struct PINT_thread_mgr_bmi_callback *tmp_callback; - int thread_running=0; + int thread_running __attribute__((unused)) = 0; gen_mutex_lock(&bmi_thread_running_mutex); thread_running = bmi_thread_running; @@ -419,7 +419,7 @@ out: */ int PINT_thread_mgr_trove_start(void) { - int ret; + int ret __attribute__((unused)); gen_mutex_lock(&trove_mutex); if(trove_thread_ref_count > 0) diff --git a/src/io/job/thread-mgr.h b/src/io/job/thread-mgr.h index 24a5732..fb39f56 100644 --- a/src/io/job/thread-mgr.h +++ b/src/io/job/thread-mgr.h @@ -7,6 +7,7 @@ #ifndef __THREAD_MGR_H #define __THREAD_MGR_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "bmi.h" #include "pint-dev.h" diff --git a/src/io/trove/pvfs2-storage.h b/src/io/trove/pvfs2-storage.h index 3eb163c..19eebb3 100644 --- a/src/io/trove/pvfs2-storage.h +++ b/src/io/trove/pvfs2-storage.h @@ -7,6 +7,7 @@ #ifndef __PVFS2_STORAGE_H #define __PVFS2_STORAGE_H +#include "pvfs2-internal.h" #include #include "pvfs2-types.h" diff --git a/src/io/trove/trove-dbpf/dbpf-alt-aio.c b/src/io/trove/trove-dbpf/dbpf-alt-aio.c index b6bf260..3ba40a1 100644 --- a/src/io/trove/trove-dbpf/dbpf-alt-aio.c +++ b/src/io/trove/trove-dbpf/dbpf-alt-aio.c @@ -1,4 +1,5 @@ +#include "pvfs2-internal.h" #include "quicklist.h" #include "dbpf-alt-aio.h" #include "pthread.h" diff --git a/src/io/trove/trove-dbpf/dbpf-alt-aio.h b/src/io/trove/trove-dbpf/dbpf-alt-aio.h index ebee488..4359a00 100644 --- a/src/io/trove/trove-dbpf/dbpf-alt-aio.h +++ b/src/io/trove/trove-dbpf/dbpf-alt-aio.h @@ -7,6 +7,8 @@ #ifndef __DBPF_ALT_AIO_H__ #define __DBPF_ALT_AIO_H__ +#include "trove-internal.h" + #if defined(__cplusplus) extern "C" { #endif @@ -26,7 +28,6 @@ extern "C" { #include "gossip.h" #include "pvfs2-debug.h" #include "trove.h" -#include "trove-internal.h" #include "dbpf.h" #include "aio.h" diff --git a/src/io/trove/trove-dbpf/dbpf-attr-cache.h b/src/io/trove/trove-dbpf/dbpf-attr-cache.h index b87ca18..b226d5b 100644 --- a/src/io/trove/trove-dbpf/dbpf-attr-cache.h +++ b/src/io/trove/trove-dbpf/dbpf-attr-cache.h @@ -7,6 +7,7 @@ #ifndef __DBPF_ATTR_CACHE_H #define __DBPF_ATTR_CACHE_H +#include "pvfs2-internal.h" #include "dbpf.h" #include "trove-types.h" #include "quickhash.h" diff --git a/src/io/trove/trove-dbpf/dbpf-bstream-direct.c b/src/io/trove/trove-dbpf/dbpf-bstream-direct.c index dc9b782..dfc5cfa 100644 --- a/src/io/trove/trove-dbpf/dbpf-bstream-direct.c +++ b/src/io/trove/trove-dbpf/dbpf-bstream-direct.c @@ -18,6 +18,7 @@ #include #include +#include "pvfs2-internal.h" #include "gossip.h" #include "pvfs2-debug.h" #include "trove.h" @@ -28,7 +29,7 @@ #include "dbpf-attr-cache.h" #include "dbpf-bstream.h" #include "dbpf-sync.h" -#include "pint-mem.h" +/* #include "pint-mem.h" obsolete */ #include "pint-mgmt.h" #include "pint-context.h" #include "pint-op.h" @@ -459,7 +460,8 @@ static size_t direct_write(int fd, llu(write_offset), llu(stream_size)); - aligned_buf = PINT_mem_aligned_alloc(aligned_size, BLOCK_SIZE); + /* aligned_buf = PINT_mem_aligned_alloc(aligned_size, BLOCK_SIZE); */ + posix_memalign(&aligned_buf, BLOCK_SIZE, aligned_size); if(!aligned_buf) { return -ENOMEM; @@ -482,7 +484,8 @@ static size_t direct_write(int fd, gossip_err( "direct_memcpy_write: RMW failed at " "beginning of request\n"); - PINT_mem_aligned_free(aligned_buf); + /* PINT_mem_aligned_free(aligned_buf); */ + free(aligned_buf); return -trove_errno_to_trove_error(pread_errno); } @@ -512,7 +515,8 @@ static size_t direct_write(int fd, int pread_errno = errno; gossip_err( "direct_memcpy_write: RMW failed at end of request\n"); - PINT_mem_aligned_free(aligned_buf); + /* PINT_mem_aligned_free(aligned_buf); */ + free(aligned_buf); return -trove_errno_to_trove_error(pread_errno); } @@ -533,7 +537,8 @@ static size_t direct_write(int fd, ret = direct_aligned_write(fd, aligned_buf, 0, aligned_size, aligned_offset, stream_size); - PINT_mem_aligned_free(aligned_buf); + /* PINT_mem_aligned_free(aligned_buf); */ + free(aligned_buf); return (ret < 0) ? ret : size; } @@ -675,7 +680,8 @@ static size_t direct_read(int fd, file_offset, stream_size); } - aligned_buf = PINT_mem_aligned_alloc(aligned_size, BLOCK_SIZE); + /* aligned_buf = PINT_mem_aligned_alloc(aligned_size, BLOCK_SIZE); */ + posix_memalign(&aligned_buf, BLOCK_SIZE, aligned_size); if(!aligned_buf) { return -ENOMEM; @@ -685,7 +691,8 @@ static size_t direct_read(int fd, aligned_offset, stream_size); if(ret < 0) { - PINT_mem_aligned_free(aligned_buf); + /* PINT_mem_aligned_free(aligned_buf); */ + free(aligned_buf); return ret; } @@ -694,7 +701,8 @@ static size_t direct_read(int fd, ((char *)aligned_buf) + (file_offset - aligned_offset), read_size); - PINT_mem_aligned_free(aligned_buf); + /* PINT_mem_aligned_free(aligned_buf); */ + free(aligned_buf); return ret; } diff --git a/src/io/trove/trove-dbpf/dbpf-bstream-direct.h b/src/io/trove/trove-dbpf/dbpf-bstream-direct.h index fd8a065..07ce29f 100644 --- a/src/io/trove/trove-dbpf/dbpf-bstream-direct.h +++ b/src/io/trove/trove-dbpf/dbpf-bstream-direct.h @@ -7,6 +7,7 @@ #ifndef __DBPF_BSTREAM_DIRECT_H #define __DBPF_BSTREAM_DIRECT_H +#include "pvfs2-internal.h" #include "trove-types.h" int dbpf_bstream_direct_read_op_svc(void *ptr, TROVE_hint *hints); diff --git a/src/io/trove/trove-dbpf/dbpf-bstream.h b/src/io/trove/trove-dbpf/dbpf-bstream.h index 420c6da..479a621 100644 --- a/src/io/trove/trove-dbpf/dbpf-bstream.h +++ b/src/io/trove/trove-dbpf/dbpf-bstream.h @@ -7,6 +7,8 @@ #ifndef __DBPF_BSTREAM_H__ #define __DBPF_BSTREAM_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf-context.h b/src/io/trove/trove-dbpf/dbpf-context.h index ee7b3d5..fc18627 100644 --- a/src/io/trove/trove-dbpf/dbpf-context.h +++ b/src/io/trove/trove-dbpf/dbpf-context.h @@ -7,6 +7,8 @@ #ifndef __DBPF_CONTEXT_H__ #define __DBPF_CONTEXT_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf-dspace.c b/src/io/trove/trove-dbpf/dbpf-dspace.c index 23c7afa..83a7ebf 100644 --- a/src/io/trove/trove-dbpf/dbpf-dspace.c +++ b/src/io/trove/trove-dbpf/dbpf-dspace.c @@ -16,10 +16,12 @@ #endif #include +#include "pvfs2-internal.h" #include "gossip.h" #include "pint-perf-counter.h" #include "pint-event.h" -#include "pint-mem.h" +/* #include "pint-mem.h" obsolete */ +#include "trove.h" #include "trove-internal.h" #include "trove-ledger.h" #include "trove-handle-mgmt.h" @@ -36,7 +38,6 @@ #ifdef __PVFS2_TROVE_THREADED__ #include #include "dbpf-thread.h" -#include "pvfs2-internal.h" #include "pint-perf-counter.h" #include @@ -716,7 +717,7 @@ static int dbpf_dspace_iterate_handles_op_svc(struct dbpf_op *op_p) int start_size; void *tmp_ptr; void *tmp_handle; - void *tmp_attr; + void *tmp_attr __attribute__((unused)); uint32_t dbpagesize = TROVE_DEFAULT_DB_PAGESIZE; TROVE_ds_attributes attr; @@ -815,7 +816,8 @@ static int dbpf_dspace_iterate_handles_op_svc(struct dbpf_op *op_p) ret = op_p->coll_p->ds_db->get_pagesize(op_p->coll_p->ds_db, &dbpagesize); #endif - multiples_buffer = PINT_mem_aligned_alloc(start_size, dbpagesize); + /* multiples_buffer = PINT_mem_aligned_alloc(start_size, * dbpagesize); */ + posix_memalign(&multiples_buffer, dbpagesize, start_size); if(!multiples_buffer) { ret = -TROVE_ENOMEM; @@ -843,7 +845,10 @@ static int dbpf_dspace_iterate_handles_op_svc(struct dbpf_op *op_p) { /* need to allocate more and try again */ free(multiples_buffer); - multiples_buffer = PINT_mem_aligned_alloc(data.size, dbpagesize); + /* multiples_buffer = PINT_mem_aligned_alloc(data.size, + * dbpagesize); + */ + posix_memalign(&multiples_buffer, dbpagesize, start_size); if(!multiples_buffer) { ret = -TROVE_ENOMEM; @@ -1005,7 +1010,9 @@ return_ok: if(multiples_buffer) { - PINT_mem_aligned_free(multiples_buffer); + /* PINT_mem_aligned_free(multiples_buffer); */ + free(multiples_buffer); + } return 1; @@ -1021,7 +1028,8 @@ return_error: if(multiples_buffer) { - PINT_mem_aligned_free(multiples_buffer); + /* PINT_mem_aligned_free(multiples_buffer); */ + free(multiples_buffer); } return ret; diff --git a/src/io/trove/trove-dbpf/dbpf-keyval-pcache.h b/src/io/trove/trove-dbpf/dbpf-keyval-pcache.h index 1679d30..19b7fd5 100644 --- a/src/io/trove/trove-dbpf/dbpf-keyval-pcache.h +++ b/src/io/trove/trove-dbpf/dbpf-keyval-pcache.h @@ -7,6 +7,8 @@ #ifndef __DBPF_KEYVAL_PCACHE_H #define __DBPF_KEYVAL_PCACHE_H +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf-op-queue.c b/src/io/trove/trove-dbpf/dbpf-op-queue.c index cbbb878..69e388a 100644 --- a/src/io/trove/trove-dbpf/dbpf-op-queue.c +++ b/src/io/trove/trove-dbpf/dbpf-op-queue.c @@ -5,6 +5,7 @@ */ #include "dbpf-op-queue.h" +#include "pvfs2-internal.h" #include "gossip.h" #include "pint-perf-counter.h" #include "dbpf-sync.h" diff --git a/src/io/trove/trove-dbpf/dbpf-op-queue.h b/src/io/trove/trove-dbpf/dbpf-op-queue.h index c78444b..c5be218 100644 --- a/src/io/trove/trove-dbpf/dbpf-op-queue.h +++ b/src/io/trove/trove-dbpf/dbpf-op-queue.h @@ -7,6 +7,8 @@ #ifndef __DBPF_OP_QUEUE_H__ #define __DBPF_OP_QUEUE_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf-op.c b/src/io/trove/trove-dbpf/dbpf-op.c index 0dfd36a..3782c6f 100644 --- a/src/io/trove/trove-dbpf/dbpf-op.c +++ b/src/io/trove/trove-dbpf/dbpf-op.c @@ -7,6 +7,7 @@ #include #include +#include "pvfs2-internal.h" #include "dbpf-op.h" #include "dbpf-bstream.h" #include "gossip.h" diff --git a/src/io/trove/trove-dbpf/dbpf-op.h b/src/io/trove/trove-dbpf/dbpf-op.h index b5c8647..2f7a9cb 100644 --- a/src/io/trove/trove-dbpf/dbpf-op.h +++ b/src/io/trove/trove-dbpf/dbpf-op.h @@ -7,6 +7,8 @@ #ifndef __DBPF_OP_H__ #define __DBPF_OP_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf-open-cache.h b/src/io/trove/trove-dbpf/dbpf-open-cache.h index 120844a..6cce178 100644 --- a/src/io/trove/trove-dbpf/dbpf-open-cache.h +++ b/src/io/trove/trove-dbpf/dbpf-open-cache.h @@ -7,6 +7,8 @@ #ifndef __DBPF_OPEN_CACHE_H__ #define __DBPF_OPEN_CACHE_H__ +#include "pvfs2-internal.h" + #include #include "trove.h" diff --git a/src/io/trove/trove-dbpf/dbpf-sync.c b/src/io/trove/trove-dbpf/dbpf-sync.c index e28f196..87ceee4 100644 --- a/src/io/trove/trove-dbpf/dbpf-sync.c +++ b/src/io/trove/trove-dbpf/dbpf-sync.c @@ -5,6 +5,7 @@ */ #include "dbpf-op-queue.h" +#include "pvfs2-internal.h" #include "gossip.h" #include "pint-perf-counter.h" #include "dbpf-sync.h" diff --git a/src/io/trove/trove-dbpf/dbpf-sync.h b/src/io/trove/trove-dbpf/dbpf-sync.h index b2faf21..d27fcc4 100644 --- a/src/io/trove/trove-dbpf/dbpf-sync.h +++ b/src/io/trove/trove-dbpf/dbpf-sync.h @@ -3,6 +3,7 @@ * * See COPYING in top-level directory. */ +#include "pvfs2-internal.h" #include "dbpf-op-queue.h" #include "gossip.h" diff --git a/src/io/trove/trove-dbpf/dbpf-thread.h b/src/io/trove/trove-dbpf/dbpf-thread.h index b499461..5239f5c 100644 --- a/src/io/trove/trove-dbpf/dbpf-thread.h +++ b/src/io/trove/trove-dbpf/dbpf-thread.h @@ -7,6 +7,8 @@ #ifndef __DBPF_THREAD_H__ #define __DBPF_THREAD_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-dbpf/dbpf.h b/src/io/trove/trove-dbpf/dbpf.h index 2e254bd..b6cafba 100644 --- a/src/io/trove/trove-dbpf/dbpf.h +++ b/src/io/trove/trove-dbpf/dbpf.h @@ -7,6 +7,8 @@ #ifndef __DBPF_H__ #define __DBPF_H__ +#include "pvfs2-internal.h" + #if defined(__cplusplus) extern "C" { #endif diff --git a/src/io/trove/trove-handle-mgmt/avltree.c b/src/io/trove/trove-handle-mgmt/avltree.c index 96c8f17..5a5d94c 100644 --- a/src/io/trove/trove-handle-mgmt/avltree.c +++ b/src/io/trove/trove-handle-mgmt/avltree.c @@ -5,6 +5,7 @@ #include #include "trove-extentlist.h" /* declares the AVL types */ #include "avltree.h" +#include "pvfs2-internal.h" /* * avlrotleft: perform counterclockwise rotation diff --git a/src/io/trove/trove-handle-mgmt/trove-extentlist.h b/src/io/trove/trove-handle-mgmt/trove-extentlist.h index ca9caf7..f11fd72 100644 --- a/src/io/trove/trove-handle-mgmt/trove-extentlist.h +++ b/src/io/trove/trove-handle-mgmt/trove-extentlist.h @@ -7,6 +7,8 @@ #ifndef EXTENTLIST_H #define EXTENTLIST_H +#include + #include #include diff --git a/src/io/trove/trove-handle-mgmt/trove-ledger.h b/src/io/trove/trove-handle-mgmt/trove-ledger.h index a145b27..6c34b68 100644 --- a/src/io/trove/trove-handle-mgmt/trove-ledger.h +++ b/src/io/trove/trove-handle-mgmt/trove-ledger.h @@ -7,6 +7,8 @@ #ifndef TROVE_LEDGER_H #define TROVE_LEDGER_H +#include "pvfs2-internal.h" + #include #include "trove-types.h" diff --git a/src/io/trove/trove-internal.h b/src/io/trove/trove-internal.h index b0a3938..3a2f2b3 100644 --- a/src/io/trove/trove-internal.h +++ b/src/io/trove/trove-internal.h @@ -7,6 +7,7 @@ #ifndef __TROVE_INTERNAL_H #define __TROVE_INTERNAL_H +#include "pvfs2-internal.h" #include "trove-types.h" PVFS_error trove_errno_to_trove_error(int errno_value); diff --git a/src/io/trove/trove-types.h b/src/io/trove/trove-types.h index 5c983dd..356454c 100644 --- a/src/io/trove/trove-types.h +++ b/src/io/trove/trove-types.h @@ -22,6 +22,7 @@ #define __TROVE_TYPES_H /* PVFS type mappings */ +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-storage.h" diff --git a/src/io/trove/trove.h b/src/io/trove/trove.h index 9f62a9f..5dbcdaa 100644 --- a/src/io/trove/trove.h +++ b/src/io/trove/trove.h @@ -21,10 +21,11 @@ #ifndef __TROVE_H #define __TROVE_H +#include "pvfs2-internal.h" + #include #include -#include "pvfs2-config.h" #include "pvfs2-debug.h" #include "pvfs2-req-proto.h" diff --git a/src/kernel/linux-2.6/.pvfs-request.o.d b/src/kernel/linux-2.6/.pvfs-request.o.d deleted file mode 100644 index e69de29..0000000 diff --git a/src/kernel/linux-2.6/Makefile.in b/src/kernel/linux-2.6/Makefile.in index 0280a46..917a2f6 100644 --- a/src/kernel/linux-2.6/Makefile.in +++ b/src/kernel/linux-2.6/Makefile.in @@ -49,16 +49,14 @@ csrc = \ xattr-trusted.c \ xattr-default.c \ waitqueue.c \ - pvfs2-proc.c \ - osd.c + pvfs2-proc.c hsrc = \ pvfs2-kernel.h \ pvfs2-dev-proto.h \ pvfs2-bufmap.h \ upcall.h \ downcall.h \ - pvfs2-proc.h \ - osd.h + pvfs2-proc.h objs = $(csrc:.c=.o) othergen = pvfs2.o pvfs2.ko pvfs2.mod.c pvfs2.mod.o diff --git a/src/kernel/linux-2.6/Module.symvers b/src/kernel/linux-2.6/Module.symvers deleted file mode 100644 index e69de29..0000000 diff --git a/src/kernel/linux-2.6/acl.c b/src/kernel/linux-2.6/acl.c index aed8f2a..8197711 100644 --- a/src/kernel/linux-2.6/acl.c +++ b/src/kernel/linux-2.6/acl.c @@ -40,11 +40,11 @@ * Probably not in the fast-path though... */ +#ifdef PVFS_USE_OLD_ACL_FORMAT /* * PVFS2 ACL decode */ -static struct posix_acl * -pvfs2_acl_decode(const void *value, size_t size) +static struct posix_acl *pvfs2_acl_decode(const void *value, size_t size) { int n, count; struct posix_acl *acl; @@ -59,8 +59,9 @@ pvfs2_acl_decode(const void *value, size_t size) /* even more badness */ if (size < 0 || (size % sizeof(pvfs2_acl_entry)) != 0) { - gossip_err("pvfs2_acl_decode: Invalid value of size %d [should be a multiple of %d]\n", - (int) size, (int) sizeof(pvfs2_acl_entry)); + gossip_err("pvfs2_acl_decode: Invalid value of size %d " + "[should be a multiple of %d]\n", + (int) size, (int) sizeof(pvfs2_acl_entry)); return ERR_PTR(-EINVAL); } count = size / sizeof(pvfs2_acl_entry); @@ -78,7 +79,7 @@ pvfs2_acl_decode(const void *value, size_t size) return ERR_PTR(-ENOMEM); } gossip_debug(GOSSIP_ACL_DEBUG, "acl decoded %zd bytes (%d acl entries)\n", - size, count); + size, count); for (n = 0; n < count; n++) { pvfs2_acl_entry *entry = (pvfs2_acl_entry *)value; @@ -131,20 +132,19 @@ fail: * into little-endian bytefirst using the htobmi* macros * and stuffs it into a buffer for storage. */ -static void * -pvfs2_acl_encode(const struct posix_acl *acl, size_t *size) +static void *pvfs2_acl_encode(const struct posix_acl *acl, size_t *size) { char *e, *ptr; size_t n; *size = acl->a_count * sizeof(pvfs2_acl_entry); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_encode: acl encoded %ld bytes " - " (%d entries)\n", (long) *size, acl->a_count); + " (%d entries)\n", (long) *size, acl->a_count); e = (char *)kmalloc(*size, GFP_KERNEL); if (!e) { gossip_err("pvfs2_acl_encode: Could not allocate %d bytes " - "for acl encode\n", (int) *size); + "for acl encode\n", (int) *size); return ERR_PTR(-ENOMEM); } ptr = e; @@ -185,12 +185,12 @@ fail: gossip_err("pvfs2_acl_encode: returning EINVAL\n"); return ERR_PTR(-EINVAL); } +#endif /* PVFS_USE_OLD_ACL_FORMAT */ /** * Routines that retrieve and/or set ACLs for PVFS2 files. */ -static struct posix_acl * -pvfs2_get_acl(struct inode *inode, int type) +struct posix_acl *pvfs2_get_acl(struct inode *inode, int type) { struct posix_acl *acl; int ret; @@ -199,8 +199,8 @@ pvfs2_get_acl(struct inode *inode, int type) /* Won't work if you don't mount with the right set of options */ if (get_acl_flag(inode) == 0) { - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_get_acl: ACL options disabled on " - "this FS!\n"); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_get_acl: ACL options disabled on this FS!\n"); return NULL; } switch (type) @@ -216,9 +216,11 @@ pvfs2_get_acl(struct inode *inode, int type) return ERR_PTR(-EINVAL); } /* - * Rather than incurring a network call just to determine the exact length of + * Rather than incurring a network call just to determine + * the exact length of * the attribute, I just allocate a max length to save on the network call - * Conceivably, we could pass NULL to pvfs2_inode_getxattr() to probe the length + * Conceivably, we could pass NULL to pvfs2_inode_getxattr() + * to probe the length * of the value, but I don't do that for now. */ value = (char *) kmalloc(PVFS_MAX_XATTR_VALUELEN, GFP_KERNEL); @@ -228,30 +230,39 @@ pvfs2_get_acl(struct inode *inode, int type) return ERR_PTR(-ENOMEM); } gossip_debug(GOSSIP_ACL_DEBUG, "inode %llu, key %s, type %d\n", - llu(get_handle_from_ino(inode)), key, type); + llu(get_handle_from_ino(inode)), key, type); ret = pvfs2_inode_getxattr(inode, "", key, value, PVFS_MAX_XATTR_VALUELEN); /* if the key exists, convert it to an in-memory rep */ if (ret > 0) { +#ifdef PVFS_USE_OLD_ACL_FORMAT acl = pvfs2_acl_decode(value, ret); +#else +#ifdef HAVE_POSIX_ACL_USER_NAMESPACE + acl = posix_acl_from_xattr(&init_user_ns, value, ret); +#else + acl = posix_acl_from_xattr(value, ret); +#endif +#endif } else if (ret == -ENODATA || ret == -ENOSYS) { acl = NULL; } - else { + else + { gossip_err("inode %llu retrieving acl's failed with error %d\n", - llu(get_handle_from_ino(inode)), ret); + llu(get_handle_from_ino(inode)), ret); acl = ERR_PTR(ret); } - if (value) { + if (value) + { kfree(value); } return acl; } -static int -pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) +static int pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) { int error = 0; void *value = NULL; @@ -296,11 +307,15 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) else /* okay, go ahead and do just that */ { if (inode->i_mode != mode) + { SetModeFlag(pvfs2_inode); + } inode->i_mode = mode; mark_inode_dirty_sync(inode); if (error == 0) /* equivalent. so dont set acl! */ + { acl = NULL; + } } } break; @@ -312,8 +327,8 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) if (!S_ISDIR(inode->i_mode)) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl: setting default " - "ACLs on non-dir object? %s\n", - acl ? "disallowed" : "ok"); + "ACLs on non-dir object? %s\n", + acl ? "disallowed" : "ok"); return acl ? -EACCES : 0; } break; @@ -324,19 +339,42 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) return -EINVAL; } } - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl: inode %llu, key %s type %d\n", - llu(get_handle_from_ino(inode)), name, type); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_set_acl: inode %llu, key %s type %d\n", + llu(get_handle_from_ino(inode)), name, type); /* If we do have an access control list, then we need to encode that! */ if (acl) { +#ifdef PVFS_USE_OLD_ACL_FORMAT value = pvfs2_acl_encode(acl, &size); if (IS_ERR(value)) { return (int) PTR_ERR(value); } +#else + value = (char *) kmalloc(PVFS_MAX_XATTR_VALUELEN, GFP_KERNEL); + if (IS_ERR(value)) + { + return (int) PTR_ERR(value); + } +#ifdef HAVE_POSIX_ACL_USER_NAMESPACE + size = posix_acl_to_xattr(&init_user_ns, + acl, + value, + PVFS_MAX_XATTR_VALUELEN); +#else + size = posix_acl_to_xattr(acl, value, PVFS_MAX_XATTR_VALUELEN); +#endif + if (size < 0) + { + error = size; + goto errorout; + } +#endif } - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_set_acl: name %s, value %p, size %zd, " - " acl %p\n", name, value, size, acl); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_set_acl: name %s, value %p, size %zd, " + " acl %p\n", name, value, size, acl); /* Go ahead and set the extended attribute now * NOTE: Suppose acl was NULL, then value will be NULL and * size will be 0 and that will xlate to a removexattr. @@ -344,6 +382,8 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) * does not exist. */ error = pvfs2_inode_setxattr(inode, "", name, value, size, 0); + +errorout: if (value) { kfree(value); @@ -351,8 +391,10 @@ pvfs2_set_acl(struct inode *inode, int type, struct posix_acl *acl) return error; } -static int -pvfs2_xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size) +static int pvfs2_xattr_get_acl(struct inode *inode, + int type, + void *buffer, + size_t size) { struct posix_acl *acl; int error; @@ -361,7 +403,7 @@ pvfs2_xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size) if (get_acl_flag(inode) == 0) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_xattr_get_acl: ACL options " - "disabled on this FS!\n"); + "disabled on this FS!\n"); return -EOPNOTSUPP; } acl = pvfs2_get_acl(inode, type); @@ -376,27 +418,31 @@ pvfs2_xattr_get_acl(struct inode *inode, int type, void *buffer, size_t size) error = -ENODATA; goto out; } +#ifdef HAVE_POSIX_ACL_USER_NAMESPACE + error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); +#else error = posix_acl_to_xattr(acl, buffer, size); +#endif posix_acl_release(acl); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_xattr_get_acl: posix_acl_to_xattr " - "returned %d\n", error); + "returned %d\n", error); out: return error; } static int pvfs2_xattr_get_acl_access( #ifdef HAVE_XATTR_HANDLER_GET_FIVE_PARAM - struct dentry *dentry, + struct dentry *dentry, #else - struct inode *inode, + struct inode *inode, #endif /* HAVE_XATTR_HANDLER_GET_FIVE_PARAM */ - const char *name, - void *buffer, - size_t size + const char *name, + void *buffer, + size_t size #ifdef HAVE_XATTR_HANDLER_GET_FIVE_PARAM - , int handler_flag + , int handler_flag #endif /* HAVE_XATTR_HANDLER_GET_FIVE_PARAM */ - ) + ) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_xattr_get_acl_access %s\n", name); if (strcmp(name, "") != 0) @@ -413,17 +459,17 @@ static int pvfs2_xattr_get_acl_access( static int pvfs2_xattr_get_acl_default( #ifdef HAVE_XATTR_HANDLER_GET_FIVE_PARAM - struct dentry *dentry, + struct dentry *dentry, #else - struct inode *inode, + struct inode *inode, #endif /* HAVE_XATTR_HANDLER_GET_FIVE_PARAM */ - const char *name, - void *buffer, - size_t size + const char *name, + void *buffer, + size_t size #ifdef HAVE_XATTR_HANDLER_GET_FIVE_PARAM - , int handler_flags + , int handler_flags #endif /* HAVE_XATTR_HANDLER_GET_FIVE_PARAM */ - ) + ) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_xattr_get_acl_default %s\n", name); if (strcmp(name, "") != 0) @@ -438,9 +484,10 @@ static int pvfs2_xattr_get_acl_default( #endif /* HAVE_XATTR_HANDLER_GET_FIVE_PARAM */ } -static int pvfs2_xattr_set_acl( -struct inode *inode, int type, const void *value, - size_t size) +static int pvfs2_xattr_set_acl(struct inode *inode, + int type, + const void *value, + size_t size) { struct posix_acl *acl; int error; @@ -469,7 +516,11 @@ struct inode *inode, int type, const void *value, } if (value) { +#ifdef HAVE_POSIX_ACL_USER_NAMESPACE + acl = posix_acl_from_xattr(&init_user_ns, value, size); +#else acl = posix_acl_from_xattr(value, size); +#endif if (IS_ERR(acl)) { error = PTR_ERR(acl); @@ -488,7 +539,8 @@ struct inode *inode, int type, const void *value, } } } - else { + else + { acl = NULL; } error = pvfs2_set_acl(inode, type, acl); @@ -750,7 +802,7 @@ int pvfs2_acl_chmod(struct inode *inode) { error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, acl); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_chmod: pvfs2 set acl " - "(access) returned %d\n", error); + "(access) returned %d\n", error); } #elif defined(HAVE_POSIX_ACL_CLONE) error = posix_acl_chmod_masq(clone, inode->i_mode); @@ -758,7 +810,7 @@ int pvfs2_acl_chmod(struct inode *inode) { error = pvfs2_set_acl(inode, ACL_TYPE_ACCESS, clone); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_acl_chmod: pvfs2 set acl " - "(access) returned %d\n", error); + "(access) returned %d\n", error); } posix_acl_release(clone); #else @@ -773,22 +825,24 @@ out: #if defined(HAVE_THREE_PARAM_GENERIC_PERMISSION) || \ defined(HAVE_FOUR_PARAM_GENERIC_PERMISSION) static int pvfs2_check_acl(struct inode *inode, int mask -#ifdef HAVE_THREE_PARAM_ACL_CHECK +# ifdef HAVE_THREE_PARAM_ACL_CHECK , unsigned int flags -#endif /* HAVE_THREE_PARAM_ACL_CHECK */ - ) +# endif /* HAVE_THREE_PARAM_ACL_CHECK */ + ) { struct posix_acl *acl = NULL; gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl: called on inode %llu\n", - llu(get_handle_from_ino(inode))); + llu(get_handle_from_ino(inode))); acl = pvfs2_get_acl(inode, ACL_TYPE_ACCESS); - if (IS_ERR(acl)) { + if (IS_ERR(acl)) + { int error = PTR_ERR(acl); - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl: pvfs2_get_acl returned error %d\n", - error); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_check_acl: pvfs2_get_acl returned error %d\n", + error); return error; } if (acl) @@ -796,8 +850,8 @@ static int pvfs2_check_acl(struct inode *inode, int mask int error = posix_acl_permission(inode, acl, mask); posix_acl_release(acl); gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl: posix_acl_permission " - " (inode %llu, acl %p, mask %x) returned %d\n", - llu(get_handle_from_ino(inode)), acl, mask, error); + " (inode %llu, acl %p, mask %x) returned %d\n", + llu(get_handle_from_ino(inode)), acl, mask, error); return error; } gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_check_acl returning EAGAIN\n"); @@ -809,12 +863,13 @@ static int pvfs2_check_acl(struct inode *inode, int mask #ifdef HAVE_TWO_PARAM_PERMISSION int pvfs2_permission(struct inode *inode, int mask) #else -int pvfs2_permission(struct inode *inode, int mask, -#ifdef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG -unsigned int flags) -#else -struct nameidata *nd) -#endif /* HAVE_THREE_PARAM_PERMISSION_WITH_FLAG */ +int pvfs2_permission(struct inode *inode, + int mask, +# ifdef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG + unsigned int flags) +# else + struct nameidata *nd) +# endif /* HAVE_THREE_PARAM_PERMISSION_WITH_FLAG */ #endif /* HAVE_TWO_PARAM_PERMISSION */ { #ifdef HAVE_CURRENT_FSUID @@ -826,36 +881,42 @@ struct nameidata *nd) #ifdef HAVE_GENERIC_PERMISSION int ret; -#if defined(HAVE_TWO_PARAM_GENERIC_PERMISSION) +# if defined(HAVE_TWO_PARAM_GENERIC_PERMISSION) ret = generic_permission(inode, mask); -#elif defined(HAVE_THREE_PARAM_GENERIC_PERMISSION) +# elif defined(HAVE_THREE_PARAM_GENERIC_PERMISSION) ret = generic_permission(inode, mask, pvfs2_check_acl); -#elif defined(HAVE_FOUR_PARAM_GENERIC_PERMISSION) +# elif defined(HAVE_FOUR_PARAM_GENERIC_PERMISSION) ret = generic_permission(inode, mask, 0, pvfs2_check_acl); -#else +# else #error generic_permission has an unknown number of parameters -#endif +# endif if (ret != 0) { - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission failed: inode: %llu mask = %o" - "mode = %o current->fsuid = %d " - "inode->i_uid = %d, inode->i_gid = %d " - "in_group_p = %d " - "(ret = %d)\n", - llu(get_handle_from_ino(inode)), mask, inode->i_mode, fsuid, - inode->i_uid, inode->i_gid, - in_group_p(inode->i_gid), - ret); - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mode [%o] & mask [%o] " - " & S_IRWXO [%o] = %o == mask [%o]?\n", - inode->i_mode, mask, S_IRWXO, - (inode->i_mode & mask & S_IRWXO), mask); - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: did we check ACL's? (mode & S_IRWXG = %d)\n", - inode->i_mode & S_IRWXG); - } - else { - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission succeeded on inode %llu\n", - llu(get_handle_from_ino(inode))); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission failed: inode: %llu mask = %o" + "mode = %o current->fsuid = %d " + "inode->i_uid = %d, inode->i_gid = %d " + "in_group_p = %d " + "(ret = %d)\n", + llu(get_handle_from_ino(inode)), mask, inode->i_mode, + fsuid, inode->i_uid, inode->i_gid, + in_group_p(inode->i_gid), + ret); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission: mode [%o] & mask [%o] " + " & S_IRWXO [%o] = %o == mask [%o]?\n", + inode->i_mode, mask, S_IRWXO, + (inode->i_mode & mask & S_IRWXO), mask); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission: did we check ACL's? " + "(mode & S_IRWXG = %d)\n", + inode->i_mode & S_IRWXG); + } + else + { + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission succeeded on inode %llu\n", + llu(get_handle_from_ino(inode))); } return ret; #else @@ -864,19 +925,19 @@ struct nameidata *nd) int error; gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: inode: %llu mask = %o" - "mode = %o current->fsuid = %d " - "inode->i_uid = %d, inode->i_gid = %d" - "in_group_p = %d\n", - llu(get_handle_from_ino(inode)), mask, mode, fsuid, - inode->i_uid, inode->i_gid, - in_group_p(inode->i_gid)); + "mode = %o current->fsuid = %d " + "inode->i_uid = %d, inode->i_gid = %d" + "in_group_p = %d\n", + llu(get_handle_from_ino(inode)), mask, mode, fsuid, + inode->i_uid, inode->i_gid, + in_group_p(inode->i_gid)); /* No write access on a rdonly FS */ if ((mask & MAY_WRITE) && IS_RDONLY(inode) && (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode))) { gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: cannot write to a " - "read-only-file-system!\n"); + "read-only-file-system!\n"); return -EROFS; } /* No write access to any immutable files */ @@ -905,8 +966,9 @@ struct nameidata *nd) /* ACL disallows access */ if (error == -EACCES) { - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: acl disallowing " - "access to file\n"); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission: acl disallowing " + "access to file\n"); goto check_capabilities; } /* No ACLs present? */ @@ -914,24 +976,30 @@ struct nameidata *nd) { goto check_groups; } - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: returning %d\n", - error); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission: returning %d\n", + error); /* Any other error */ return error; } check_groups: if (in_group_p(inode->i_gid)) + { mode >>= 3; + } } if ((mode & mask & S_IRWXO) == mask) { return 0; } - gossip_debug(GOSSIP_ACL_DEBUG, "pvfs2_permission: mode (%o) & mask (%o) & S_IRWXO (%o) = %o == mask (%o)?\n", - mode, mask, S_IRWXO, mode & mask & S_IRWXO, mask); + gossip_debug(GOSSIP_ACL_DEBUG, + "pvfs2_permission: mode (%o) & mask (%o) " + "& S_IRWXO (%o) = %o == mask (%o)?\n", + mode, mask, S_IRWXO, mode & mask & S_IRWXO, mask); check_capabilities: /* Are we allowed to override DAC */ - if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode)) + if (!(mask & MAY_EXEC) || (inode->i_mode & S_IXUGO) || + S_ISDIR(inode->i_mode)) { if(capable(CAP_DAC_OVERRIDE)) { diff --git a/src/kernel/linux-2.6/dcache.c b/src/kernel/linux-2.6/dcache.c index c1966a5..e5599cd 100644 --- a/src/kernel/linux-2.6/dcache.c +++ b/src/kernel/linux-2.6/dcache.c @@ -74,19 +74,20 @@ static int pvfs2_d_revalidate_common(struct dentry* dentry) goto invalid_exit; #endif new_op->upcall.req.lookup.parent_refn.handle = - get_handle_from_ino(parent_inode); + get_handle_from_ino(parent_inode); new_op->upcall.req.lookup.parent_refn.fs_id = - PVFS2_SB(parent_inode->i_sb)->fs_id; + PVFS2_SB(parent_inode->i_sb)->fs_id; } strncpy(new_op->upcall.req.lookup.d_name, - dentry->d_name.name, PVFS2_NAME_LEN); + dentry->d_name.name, + PVFS2_NAME_LEN); gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d interrupt flag [%d]\n", __FILE__, __func__, __LINE__, get_interruptible_flag(parent_inode)); - ret = service_operation( - new_op, "pvfs2_lookup", - get_interruptible_flag(parent_inode)); + ret = service_operation(new_op, + "pvfs2_lookup", + get_interruptible_flag(parent_inode)); if((new_op->downcall.status != 0) || !match_handle(new_op->downcall.resp.lookup.refn.handle, inode)) @@ -96,7 +97,8 @@ static int pvfs2_d_revalidate_common(struct dentry* dentry) "%s:%s:%d lookup failure |%s| or no match |%s|.\n", __FILE__, __func__, __LINE__, (new_op->downcall.status != 0) ? "true" : "false", - (!match_handle(new_op->downcall.resp.lookup.refn.handle, inode)) ? "true" : "false"); + (!match_handle(new_op->downcall.resp.lookup.refn.handle, inode)) + ? "true" : "false"); op_release(new_op); /* Avoid calling make_bad_inode() in this situation. On 2.4 @@ -111,7 +113,9 @@ static int pvfs2_d_revalidate_common(struct dentry* dentry) */ pvfs2_make_bad_inode(inode); #endif - gossip_debug(GOSSIP_DCACHE_DEBUG, "%s:%s:%d setting revalidate_failed = 1\n", __FILE__, __func__, __LINE__); + gossip_debug(GOSSIP_DCACHE_DEBUG, + "%s:%s:%d setting revalidate_failed = 1\n", + __FILE__, __func__, __LINE__); /* set a flag that we can detect later in d_delete() */ PVFS2_I(inode)->revalidate_failed = 1; d_drop(dentry); @@ -153,10 +157,9 @@ invalid_exit: static int pvfs2_d_delete ( #ifdef HAVE_D_DELETE_CONST -const + const #endif /* HAVE_D_DELETE_CONST */ -struct dentry * dentry -) + struct dentry * dentry) { gossip_debug(GOSSIP_DCACHE_DEBUG, "%s: called on dentry %p.\n", __func__, dentry); @@ -177,36 +180,50 @@ struct dentry * dentry } } -/* should return 1 if dentry can still be trusted, else 0 */ +/** Verify that dentry is valid. + * + * should return 1 if dentry can still be trusted, else 0 + */ #ifdef PVFS2_LINUX_KERNEL_2_4 -static int pvfs2_d_revalidate( - struct dentry *dentry, - int flags) +static int pvfs2_d_revalidate(struct dentry *dentry, + int flags) { - return(pvfs2_d_revalidate_common(dentry)); -} - -#else +# ifdef LOOKUP_RCU + if (flags & LOOKUP_RCU) + { + return -ECHILD; + } +# endif -/** Verify that dentry is valid. - */ -static int pvfs2_d_revalidate( - struct dentry *dentry, - struct nameidata *nd) +#elif defined(PVFS_KMOD_D_REVALIDATE_TAKES_NAMEIDATA) +static int pvfs2_d_revalidate(struct dentry *dentry, + struct nameidata *nd) { +# ifdef LOOKUP_RCU + if (nd->flags & LOOKUP_RCU) + { + return -ECHILD; + } +# endif - if (nd && (nd->flags & LOOKUP_FOLLOW) && - ((!nd->flags) & (LOOKUP_CREATE)) ) +#else +static int pvfs2_d_revalidate(struct dentry *dentry, + unsigned int flags) +{ +# ifdef LOOKUP_RCU + if (flags & LOOKUP_RCU) { - gossip_debug(GOSSIP_DCACHE_DEBUG, - "\n%s: Trusting intent; skipping getattr\n", __func__); - return 1; + return -ECHILD; } +# endif +#endif + /* All 3 implementations call this */ + /* NOTE: We should ALWAYS revalidate a directory entry. If we don't, then stale information is kept in + * Linux's directory cache, and, in some cases, causing the inode to be marked as "bad", resulting in an EIO error. + */ return(pvfs2_d_revalidate_common(dentry)); } -#endif /* PVFS2_LINUX_KERNEL_2_4 */ - /* to propagate an error, return a value < 0, as this causes link_path_walk to pass our error up @@ -216,6 +233,9 @@ static int pvfs2_d_hash( const struct dentry *parent, const struct inode *inode, struct qstr *hash +#elif defined(HAVE_TWO_PARAM_D_HASH_WITH_CONST) + const struct dentry *parent, + struct qstr *hash #else struct dentry *parent, struct qstr *hash @@ -228,15 +248,22 @@ static int pvfs2_d_hash( return 0; } -#ifdef HAVE_SEVEN_PARAM_D_COMPARE -static int pvfs2_d_compare( - const struct dentry *parent, - const struct inode * pinode, - const struct dentry *dentry, - const struct inode *inode, - unsigned int len, - const char *str, - const struct qstr *name) +#if defined HAVE_SEVEN_PARAM_D_COMPARE || defined HAVE_FIVE_PARAM_D_COMPARE +#if defined HAVE_SEVEN_PARAM_D_COMPARE +static int pvfs2_d_compare(const struct dentry *parent, + const struct inode * pinode, + const struct dentry *dentry, + const struct inode *inode, + unsigned int len, + const char *str, + const struct qstr *name) +#else /* HAVE_FIVE_PARAM_D_COMPARE */ +static int pvfs2_d_compare(const struct dentry *parent, + const struct dentry *dentry, + unsigned int len, + const char *str, + const struct qstr *name) +#endif /* HAVE_SEVEN_PARAM_D_COMPARE */ { int i = 0; gossip_debug(GOSSIP_DCACHE_DEBUG, "pvfs2_d_compare: " @@ -267,7 +294,7 @@ static int pvfs2_d_compare( (d_name->hash == name->hash) && (memcmp(d_name->name, name->name, d_name->len) == 0)); } -#endif /* HAVE_SEVEN_PARAM_D_COMPARE */ +#endif /* HAVE_SEVEN_PARAM_D_COMPARE || HAVE_FIVE_PARAM_D_COMPARE */ /** PVFS2 implementation of VFS dentry operations */ @@ -309,7 +336,11 @@ static void __attribute__ ((unused)) print_dentry(struct dentry *entry, int ret) local_count = atomic_read(&entry->d_count); #else spin_lock(&entry->d_lock); +#ifdef HAVE_DENTRY_LOCKREF_STRUCT + local_count = entry->d_lockref.count; +#else local_count = entry->d_count; +#endif /* HAVE_DENTRY_LOCKREF_STRUCT */ spin_unlock(&entry->d_lock); #endif /* HAVE_DENTRY_D_COUNT_ATOMIC */ diff --git a/src/kernel/linux-2.6/devpvfs2-req.c b/src/kernel/linux-2.6/devpvfs2-req.c index fd01139..921c2ff 100644 --- a/src/kernel/linux-2.6/devpvfs2-req.c +++ b/src/kernel/linux-2.6/devpvfs2-req.c @@ -121,7 +121,7 @@ static ssize_t pvfs2_devreq_read( /* Check if this op's fsid is known and needs remounting */ if (fsid != PVFS_FS_ID_NULL && fs_mount_pending(fsid) == 1) { - gossip_debug(GOSSIP_DEV_DEBUG, "Skipping op tag %lld %s\n", lld(op->tag), get_opname_string(op)); + gossip_debug(GOSSIP_DEV_DEBUG, "Skipping op tag %llu %s\n", llu(op->tag), get_opname_string(op)); continue; } /* op does not belong to any particular fsid or already @@ -154,7 +154,7 @@ static ssize_t pvfs2_devreq_read( { spin_lock(&cur_op->lock); - gossip_debug(GOSSIP_DEV_DEBUG, "client-core: reading op tag %lld %s\n", lld(cur_op->tag), get_opname_string(cur_op)); + gossip_debug(GOSSIP_DEV_DEBUG, "client-core: reading op tag %llu %s\n", llu(cur_op->tag), get_opname_string(cur_op)); if (op_state_in_progress(cur_op) || op_state_serviced(cur_op)) { if (cur_op->op_linger == 1) @@ -1121,13 +1121,8 @@ static unsigned int pvfs2_devreq_poll( { int poll_revent_mask = 0; - gossip_debug(GOSSIP_WAIT_DEBUG,"%s:Is daemon in service(%d).\n" - ,__func__ - ,is_daemon_in_service()); - if (open_access_count == 1) { - gossip_debug(GOSSIP_WAIT_DEBUG,"%s:About to call poll_wait.\n",__func__); poll_wait(file, &pvfs2_request_list_waitq, poll_table); spin_lock(&pvfs2_request_list_lock); diff --git a/src/kernel/linux-2.6/dir.c b/src/kernel/linux-2.6/dir.c index 6342513..da3dfd8 100644 --- a/src/kernel/linux-2.6/dir.c +++ b/src/kernel/linux-2.6/dir.c @@ -114,8 +114,12 @@ static void readdir_handle_dtor(readdir_handle_t *rhandle) */ static int pvfs2_readdir( struct file *file, +#ifdef HAVE_READDIR_FILE_OPERATIONS void *dirent, filldir_t filldir) +#else + struct dir_context *ctx) +#endif { int ret = 0, buffer_index, token_set = 0; PVFS_ds_position pos = 0; @@ -265,13 +269,21 @@ get_new_buffer_index: gossip_debug(GOSSIP_DIR_DEBUG,"%s: calling filldir of \".\" with pos = %llu\n" ,__func__ ,llu(pos)); +#ifdef HAVE_READDIR_FILE_OPERATIONS if ( (ret=filldir(dirent,".",1,pos,ino,DT_DIR)) < 0) +#else + if ( (ret=dir_emit(ctx,".",1,ino,DT_DIR)) < 0) +#endif { readdir_handle_dtor(&rhandle); op_release(new_op); return(ret); } +#ifdef HAVE_READDIR_FILE_OPERATIONS file->f_pos++; +#else + ctx->pos++; +#endif gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->f_pos:%lld\n",__func__,lld(file->f_pos)); pos++; } @@ -283,13 +295,21 @@ get_new_buffer_index: gossip_debug(GOSSIP_DIR_DEBUG,"%s: calling filldir of \"..\" with pos = %llu\n" ,__func__ ,llu(pos)); +#ifdef HAVE_READDIR_FILE_OPERATIONS if ( (ret=filldir(dirent,"..",2,pos,ino,DT_DIR)) < 0) +#else + if ( (ret=dir_emit(ctx,"..",2,ino,DT_DIR)) < 0) +#endif { readdir_handle_dtor(&rhandle); op_release(new_op); return(ret); } +#ifdef HAVE_READDIR_FILE_OPERATIONS file->f_pos++; +#else + ctx->pos++; +#endif gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->pos:%lld\n",__func__,lld(file->f_pos)); pos++; } @@ -303,7 +323,11 @@ get_new_buffer_index: gossip_debug(GOSSIP_DIR_DEBUG, "calling filldir for %s with len %d, pos %ld\n", current_entry, len, (unsigned long) pos); +#ifdef HAVE_READDIR_FILE_OPERATIONS if ( (ret=filldir(dirent, current_entry, len, pos, current_ino, DT_UNKNOWN)) < 0) +#else + if ( (ret=dir_emit(ctx,current_entry,len,current_ino,DT_UNKNOWN)) < 0) +#endif { gossip_debug(GOSSIP_DIR_DEBUG, "filldir() failed. ret:%d\n",ret); if (token_set && (i < 2)) @@ -314,7 +338,11 @@ get_new_buffer_index: buffer_full = 1; break; } - file->f_pos++; +#ifdef HAVE_READDIR_FILE_OPERATIONS + file->f_pos++; +#else + ctx->pos++; +#endif gossip_ldebug(GOSSIP_DIR_DEBUG,"%s: file->pos:%lld\n",__func__,lld(file->f_pos)); pos++; @@ -960,7 +988,11 @@ struct file_operations pvfs2_dir_operations = release : pvfs2_file_release, #else .read = generic_read_dir, +#ifdef HAVE_READDIR_FILE_OPERATIONS .readdir = pvfs2_readdir, +#else + .iterate = pvfs2_readdir, +#endif #ifdef HAVE_READDIRPLUS_FILE_OPERATIONS .readdirplus = pvfs2_readdirplus, #endif diff --git a/src/kernel/linux-2.6/downcall.h b/src/kernel/linux-2.6/downcall.h index 1a9eda2..a097618 100644 --- a/src/kernel/linux-2.6/downcall.h +++ b/src/kernel/linux-2.6/downcall.h @@ -115,15 +115,11 @@ typedef struct { } pvfs2_truncate_response_t; -#define PVFS_MAX_OSD_ADDRS (16) typedef struct { PVFS_fs_id fs_id; int32_t id; PVFS_handle root_handle; - int32_t num_osd; - int32_t __pad1; - uint32_t osd_addrs[PVFS_MAX_OSD_ADDRS][4]; /* 16 * 4 * 4 = 256 bytes */ } pvfs2_fs_mount_response_t; /* the umount response is a blank downcall */ diff --git a/src/kernel/linux-2.6/file.c b/src/kernel/linux-2.6/file.c index 767d1ff..385530a 100644 --- a/src/kernel/linux-2.6/file.c +++ b/src/kernel/linux-2.6/file.c @@ -16,7 +16,6 @@ #include "pvfs2-internal.h" #include #include -#include "osd.h" enum io_type { IO_READ = 0, @@ -459,21 +458,6 @@ static ssize_t wait_for_direct_io(struct rw_options *rw, ret = -EINVAL; goto out; } - - ret = osd_do_io(vec, nr_segs, - *rw->off.io.offset, - total_size, - rw->type == IO_READV ? READ : WRITE, - rw->pvfs2_inode, - rw->copy_dest_type == COPY_DEST_PAGES ? 1 : 0, - rw->copy_to_user_addresses); - - if (ret >= 0) - goto out; /* success */ - if (ret != -EOPNOTSUPP) - goto out; /* failed for some reason */ - /* else do I/O through the pvfs server */ - new_op = op_alloc(PVFS2_VFS_OP_FILE_IO); if (!new_op) { @@ -525,11 +509,11 @@ populate_shared_memory: goto out; } - gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): Calling post_io_request with tag(%d)\n" + gossip_debug(GOSSIP_FILE_DEBUG,"%s/%s(%llu): Calling post_io_request with tag (%llu)\n" ,__func__ ,rw->fnstr ,llu(rw->pvfs2_inode->refn.handle) - ,(int)new_op->tag); + ,llu(new_op->tag)); /* Stage 2: Service the I/O operation */ ret = service_operation(new_op, rw->fnstr, @@ -1666,7 +1650,6 @@ static ssize_t pvfs2_file_write( rw.file = file; rw.inode = file->f_dentry->d_inode; rw.pvfs2_inode = PVFS2_I(rw.inode); - rw.pvfs2_inode->refn.handle = 1000001; rw.dest.address.iov = &vec; rw.dest.address.nr_segs = 1; rw.off.io.offset = offset; @@ -2526,7 +2509,9 @@ pvfs2_aio_cancel(struct kiocb *iocb, struct io_event *event) else { pvfs2_kernel_op_t *op = NULL; +#ifdef AIO_PUT_REQ_RETURNS_INT int ret; +#endif /* * Do some sanity checks */ @@ -2542,7 +2527,9 @@ pvfs2_aio_cancel(struct kiocb *iocb, struct io_event *event) "pvfs2_kernel_op structure!\n"); return -EINVAL; } +#ifdef HAVE_KIOCBSETCANCELLED kiocbSetCancelled(iocb); +#endif get_op(op); /* * This will essentially remove it from @@ -2550,7 +2537,7 @@ pvfs2_aio_cancel(struct kiocb *iocb, struct io_event *event) * as the case may be. */ gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s: operation aio_cancel " - "(tag %lld, op %p)\n", __func__, lld(op->tag), op); + "(tag %llu, op %p)\n", __func__, llu(op->tag), op); pvfs2_clean_up_interrupted_operation(op); /* * However, we need to make sure that @@ -2618,7 +2605,7 @@ pvfs2_aio_cancel(struct kiocb *iocb, struct io_event *event) op->priv = NULL; spin_unlock(&op->lock); gossip_debug(GOSSIP_FILE_DEBUG, "Trying to cancel operation in " - " progress %ld\n", (unsigned long) op->tag); + " progress %llu\n", llu(op->tag)); /* * if operation is in progress we need to send * a cancellation upcall for this tag @@ -2660,8 +2647,16 @@ pvfs2_aio_cancel(struct kiocb *iocb, struct io_event *event) * to manually decrement ki_users field! * before calling aio_put_req(). */ +#ifdef KI_USERS_ATOMIC + atomic_dec(&iocb->ki_users); +#else iocb->ki_users--; +#endif +#ifdef AIO_PUT_REQ_RETURNS_INT ret = aio_put_req(iocb); +#else + aio_put_req(iocb); +#endif /* x is itself deallocated by the destructor */ return 0; } @@ -2724,7 +2719,11 @@ fill_default_kiocb(pvfs2_kiocb *x, x->offset = offset; x->bytes_copied = 0; x->needs_cleanup = 1; +#ifdef HAVE_KIOCB_SET_CANCEL_FN + kiocb_set_cancel_fn(iocb, aio_cancel); +#else iocb->ki_cancel = aio_cancel; +#endif /* Allocate a private pointer to store the * iovector since the caller could pass in a * local variable for the iovector. @@ -3212,13 +3211,6 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma) gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_file_mmap: called on %s\n", (file ? (char *)file->f_dentry->d_name.name : (char *)"Unknown")); - - /* we don't support mmap writes, or SHARED mmaps at all */ - if ((vma->vm_flags & VM_SHARED) || (vma->vm_flags & VM_MAYSHARE)) - { - return -EINVAL; - } - /* for mmap on pvfs2, make sure we use pvfs2 specific address operations by explcitly setting the operations @@ -3230,14 +3222,13 @@ static int pvfs2_file_mmap(struct file *file, struct vm_area_struct *vma) vma->vm_flags |= VM_SEQ_READ; vma->vm_flags &= ~VM_RAND_READ; - /* have the kernel enforce readonly mmap support for us */ #ifdef PVFS2_LINUX_KERNEL_2_4 vma->vm_flags &= ~VM_MAYWRITE; return generic_file_mmap(file, vma); #else /* backing_dev_info isn't present on 2.4.x */ inode->i_mapping->backing_dev_info = &pvfs2_backing_dev_info; - return generic_file_readonly_mmap(file, vma); + return generic_file_mmap(file, vma); #endif } @@ -3280,21 +3271,27 @@ int pvfs2_file_release( /** Push all data for a specific file onto permanent storage. */ -int pvfs2_fsync( - struct file *file, +int pvfs2_fsync(struct file *file, #ifdef HAVE_FSYNC_LOFF_T_PARAMS - loff_t start, - loff_t end, + loff_t start, + loff_t end, #endif #ifdef HAVE_FSYNC_DENTRY_PARAM - struct dentry *dentry, + struct dentry *dentry, #endif - int datasync) + int datasync) { int ret = -EINVAL; pvfs2_inode_t *pvfs2_inode = PVFS2_I(file->f_dentry->d_inode); pvfs2_kernel_op_t *new_op = NULL; + /* required call */ +#ifdef HAVE_FSYNC_LOFF_T_PARAMS + filemap_write_and_wait_range(file->f_mapping, start, end); +#else + filemap_write_and_wait(file->f_mapping); +#endif + new_op = op_alloc(PVFS2_VFS_OP_FSYNC); if (!new_op) { @@ -3302,8 +3299,9 @@ int pvfs2_fsync( } new_op->upcall.req.fsync.refn = pvfs2_inode->refn; - ret = service_operation(new_op, "pvfs2_fsync", - get_interruptible_flag(file->f_dentry->d_inode)); + ret = service_operation(new_op, + "pvfs2_fsync", + get_interruptible_flag(file->f_dentry->d_inode)); gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_fsync got return value of %d\n",ret); @@ -3317,6 +3315,9 @@ int pvfs2_fsync( * * \note If .llseek is overriden, we must acquire lock as described in * Documentation/filesystems/Locking. + * + * Future upgrade could support SEEK_DATA and SEEK_HOLE but would + * require much changes to the FS */ loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin) { @@ -3332,20 +3333,24 @@ loff_t pvfs2_file_llseek(struct file *file, loff_t offset, int origin) if (origin == PVFS2_SEEK_END) { /* revalidate the inode's file size. - * NOTE: We are only interested in file size here, so we set mask accordingly + * NOTE: We are only interested in file size here, + * so we set mask accordingly */ ret = pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_SIZE); if (ret) { - gossip_debug(GOSSIP_FILE_DEBUG, "%s:%s:%d calling make bad inode\n", __FILE__, __func__, __LINE__); + gossip_debug(GOSSIP_FILE_DEBUG, + "%s:%s:%d calling make bad inode\n", + __FILE__, __func__, __LINE__); pvfs2_make_bad_inode(inode); return ret; } } - gossip_debug(GOSSIP_FILE_DEBUG, "pvfs2_file_llseek: offset is %ld | origin is %d | " - "inode size is %lu\n", (long)offset, origin, - (unsigned long)file->f_dentry->d_inode->i_size); + gossip_debug(GOSSIP_FILE_DEBUG, + "pvfs2_file_llseek: offset is %ld | origin is %d | " + "inode size is %lu\n", (long)offset, origin, + (unsigned long)file->f_dentry->d_inode->i_size); return generic_file_llseek(file, offset, origin); } diff --git a/src/kernel/linux-2.6/inode.c b/src/kernel/linux-2.6/inode.c index a094eca..af791e4 100644 --- a/src/kernel/linux-2.6/inode.c +++ b/src/kernel/linux-2.6/inode.c @@ -107,11 +107,22 @@ static int pvfs2_readpages( #ifdef HAVE_INT_RETURN_ADDRESS_SPACE_OPERATIONS_INVALIDATEPAGE static int pvfs2_invalidatepage(struct page *page, unsigned long offset) #else +#ifdef HAVE_THREE_ARGUMENT_INVALIDATEPAGE +static void pvfs2_invalidatepage(struct page *page, + unsigned int offset, + unsigned int length) +#else static void pvfs2_invalidatepage(struct page *page, unsigned long offset) #endif +#endif { +#ifdef HAVE_THREE_ARGUMENT_INVALIDATEPAGE + gossip_debug(GOSSIP_INODE_DEBUG, "pvfs2_invalidatepage called on page %p " + "(offset is %u)\n", page, offset); +#else gossip_debug(GOSSIP_INODE_DEBUG, "pvfs2_invalidatepage called on page %p " "(offset is %lu)\n", page, offset); +#endif ClearPageUptodate(page); ClearPageMappedToDisk(page); @@ -205,7 +216,15 @@ int pvfs2_setattr(struct dentry *dentry, struct iattr *iattr) if ((iattr->ia_valid & ATTR_SIZE) && iattr->ia_size != i_size_read(inode)) { +#ifdef HAVE_VMTRUNCATE ret = vmtruncate(inode, iattr->ia_size); +#else + ret = inode_newsize_ok(inode, iattr->ia_size); + if (!ret) { + truncate_setsize(inode,iattr->ia_size); + pvfs2_truncate(inode); + } +#endif if (ret) return ret; } @@ -301,10 +320,20 @@ int pvfs2_getattr( pvfs2_inode = PVFS2_I(inode); kstat->blksize = pvfs2_inode->blksize; } + else if (ret == -EINTR) + { + /* In this case, an interrupt signal was pending when we wanted to wait for the getattr op. + * So, instead of going to sleep with a pending interrupt, we allow the interrupt to take + * precedence. However, we don't want to mark the inode "bad" in this case; we want the + * getattr to be retried. + */ + gossip_debug(GOSSIP_INODE_DEBUG, "%s:%s:%d Received EINTR(%d)\n",__FILE__,__func__,__LINE__,ret); + ret = -EAGAIN; + } else { /* assume an I/O error and flag inode as bad */ - gossip_debug(GOSSIP_INODE_DEBUG, "%s:%s:%d calling make bad inode\n", __FILE__, __func__, __LINE__); + gossip_debug(GOSSIP_INODE_DEBUG, "%s:%s:%d calling make bad inode with return code(%d)\n", __FILE__, __func__, __LINE__,ret); pvfs2_make_bad_inode(inode); } return ret; @@ -352,7 +381,7 @@ int pvfs2_getattr_lite( else { /* assume an I/O error and flag inode as bad */ - gossip_debug(GOSSIP_INODE_DEBUG, "%s:%s:%d calling make bad inode\n", __FILE__, __func__, __LINE__); + gossip_debug(GOSSIP_INODE_DEBUG, "%s:%s:%d calling make bad inode (ret:%d)\n", __FILE__, __func__, __LINE__,ret); pvfs2_make_bad_inode(inode); } return ret; @@ -374,7 +403,9 @@ struct inode_operations pvfs2_file_inode_operations = listxattr: pvfs2_listxattr, #endif #else +#ifdef HAVE_VMTRUNCATE .truncate = pvfs2_truncate, +#endif .setattr = pvfs2_setattr, .getattr = pvfs2_getattr, #ifdef HAVE_GETATTR_LITE_INODE_OPERATIONS @@ -392,6 +423,9 @@ struct inode_operations pvfs2_file_inode_operations = .listxattr = pvfs2_listxattr, #if defined(HAVE_GENERIC_GETXATTR) && defined(CONFIG_FS_POSIX_ACL) .permission = pvfs2_permission, +# if defined(PVFS_KMOD_HAVE_GET_ACL) + .get_acl = pvfs2_get_acl, +# endif #endif #ifdef HAVE_FILL_HANDLE_INODE_OPERATIONS .fill_handle = pvfs2_fill_handle, diff --git a/src/kernel/linux-2.6/modules.order b/src/kernel/linux-2.6/modules.order deleted file mode 100644 index 8ba289f..0000000 --- a/src/kernel/linux-2.6/modules.order +++ /dev/null @@ -1 +0,0 @@ -kernel//usr/src/orangefs-osd/src/kernel/linux-2.6/pvfs2.ko diff --git a/src/kernel/linux-2.6/namei.c b/src/kernel/linux-2.6/namei.c index 2ec4c65..c7b51d7 100644 --- a/src/kernel/linux-2.6/namei.c +++ b/src/kernel/linux-2.6/namei.c @@ -16,16 +16,24 @@ /** Get a newly allocated inode to go with a negative dentry. */ #ifdef PVFS2_LINUX_KERNEL_2_4 -static int pvfs2_create( - struct inode *dir, - struct dentry *dentry, - int mode) +static int pvfs2_create(struct inode *dir, + struct dentry *dentry, + int mode) +#elif defined(PVFS_KMOD_CREATE_TAKES_NAMEIDATA) +static int pvfs2_create(struct inode *dir, + struct dentry *dentry, +#ifdef PVFS_KMOD_CREATE_USES_UMODE_T + umode_t mode, #else -static int pvfs2_create( - struct inode *dir, - struct dentry *dentry, - int mode, - struct nameidata *nd) + int mode, +#endif + struct nameidata *nd) +#else +static int pvfs2_create(struct inode *dir, + struct dentry *dentry, + umode_t mode, + bool exclusive) + /* PVFS could use to indicate exclusive open */ #endif { int ret = -EINVAL; @@ -33,8 +41,12 @@ static int pvfs2_create( gossip_debug(GOSSIP_NAME_DEBUG, "pvfs2_create: called\n"); - inode = pvfs2_create_entry( - dir, dentry, NULL, mode, PVFS2_VFS_OP_CREATE, &ret); + inode = pvfs2_create_entry(dir, + dentry, + NULL, + mode, + PVFS2_VFS_OP_CREATE, + &ret); if (inode) { @@ -55,14 +67,16 @@ static int pvfs2_create( * fsid into a handle for the object. */ #ifdef PVFS2_LINUX_KERNEL_2_4 -static struct dentry *pvfs2_lookup( - struct inode *dir, - struct dentry *dentry) +static struct dentry *pvfs2_lookup(struct inode *dir, + struct dentry *dentry) +#elif defined(PVFS_KMOD_LOOKUP_TAKES_NAMEIDATA) +static struct dentry *pvfs2_lookup(struct inode *dir, + struct dentry *dentry, + struct nameidata *nd) #else -static struct dentry *pvfs2_lookup( - struct inode *dir, - struct dentry *dentry, - struct nameidata *nd) +static struct dentry *pvfs2_lookup(struct inode *dir, + struct dentry *dentry, + unsigned int flags) #endif { int ret = -EINVAL; @@ -79,7 +93,8 @@ static struct dentry *pvfs2_lookup( -EEXIST on O_EXCL opens, which is broken if we skip this lookup in the create path) */ - gossip_debug(GOSSIP_NAME_DEBUG, "pvfs2_lookup called on %s\n", dentry->d_name.name); + gossip_debug(GOSSIP_NAME_DEBUG, + "pvfs2_lookup called on %s\n", dentry->d_name.name); if (dentry->d_name.len > (PVFS2_NAME_LEN-1)) { @@ -94,23 +109,27 @@ static struct dentry *pvfs2_lookup( #ifdef PVFS2_LINUX_KERNEL_2_4 new_op->upcall.req.lookup.sym_follow = PVFS2_LOOKUP_LINK_NO_FOLLOW; -#else +#elif defined(PVFS_KMOD_LOOKUP_TAKES_NAMEIDATA) /* if we're at a symlink, should we follow it? never attempt to follow negative dentries */ new_op->upcall.req.lookup.sym_follow = - ((nd && (nd->flags & LOOKUP_FOLLOW) && - (dentry->d_inode != NULL)) ? - PVFS2_LOOKUP_LINK_FOLLOW : PVFS2_LOOKUP_LINK_NO_FOLLOW); + ((nd && + (nd->flags & LOOKUP_FOLLOW) && + (dentry->d_inode != NULL)) ? + PVFS2_LOOKUP_LINK_FOLLOW : PVFS2_LOOKUP_LINK_NO_FOLLOW); +#else + new_op->upcall.req.lookup.sym_follow = flags & LOOKUP_FOLLOW; #endif if (dir) { sb = dir->i_sb; parent = PVFS2_I(dir); - if (parent && parent->refn.handle != PVFS_HANDLE_NULL - && parent->refn.fs_id != PVFS_FS_ID_NULL) + if (parent && + parent->refn.handle != PVFS_HANDLE_NULL && + parent->refn.fs_id != PVFS_FS_ID_NULL) { gossip_debug(GOSSIP_NAME_DEBUG, "%s:%s:%d using parent %llu\n", __FILE__, __func__, __LINE__, llu(parent->refn.handle)); @@ -119,14 +138,15 @@ static struct dentry *pvfs2_lookup( else { #if defined(HAVE_IGET4_LOCKED) || defined(HAVE_IGET5_LOCKED) - gossip_lerr("Critical error: i_ino cannot be relied on when using iget5/iget4\n"); + gossip_lerr("Critical error: i_ino cannot be relied on " + "when using iget5/iget4\n"); op_release(new_op); return ERR_PTR(-EINVAL); #endif new_op->upcall.req.lookup.parent_refn.handle = - get_handle_from_ino(dir); + get_handle_from_ino(dir); new_op->upcall.req.lookup.parent_refn.fs_id = - PVFS2_SB(sb)->fs_id; + PVFS2_SB(sb)->fs_id; } } else @@ -138,23 +158,25 @@ static struct dentry *pvfs2_lookup( */ sb = dentry->d_inode->i_sb; new_op->upcall.req.lookup.parent_refn.handle = - PVFS2_SB(sb)->root_handle; + PVFS2_SB(sb)->root_handle; new_op->upcall.req.lookup.parent_refn.fs_id = - PVFS2_SB(sb)->fs_id; + PVFS2_SB(sb)->fs_id; } strncpy(new_op->upcall.req.lookup.d_name, - dentry->d_name.name, PVFS2_NAME_LEN); + dentry->d_name.name, + PVFS2_NAME_LEN); - gossip_debug(GOSSIP_NAME_DEBUG, "pvfs2_lookup: doing lookup on %s\n under %llu,%d " - "(follow=%s)\n", new_op->upcall.req.lookup.d_name, - llu(new_op->upcall.req.lookup.parent_refn.handle), - new_op->upcall.req.lookup.parent_refn.fs_id, - ((new_op->upcall.req.lookup.sym_follow == - PVFS2_LOOKUP_LINK_FOLLOW) ? "yes" : "no")); + gossip_debug(GOSSIP_NAME_DEBUG, + "pvfs2_lookup: doing lookup on %s\n under %llu,%d " + "(follow=%s)\n", new_op->upcall.req.lookup.d_name, + llu(new_op->upcall.req.lookup.parent_refn.handle), + new_op->upcall.req.lookup.parent_refn.fs_id, + ((new_op->upcall.req.lookup.sym_follow == + PVFS2_LOOKUP_LINK_FOLLOW) ? "yes" : "no")); - ret = service_operation( - new_op, "pvfs2_lookup", - get_interruptible_flag(dir)); + ret = service_operation(new_op, + "pvfs2_lookup", + get_interruptible_flag(dir)); gossip_debug(GOSSIP_NAME_DEBUG, "Lookup Got %llu, fsid %d (ret=%d)\n", llu(new_op->downcall.resp.lookup.refn.handle), @@ -185,7 +207,11 @@ static struct dentry *pvfs2_lookup( * potential future lookup of this cached negative dentry can * be properly revalidated. */ +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif d_add(dentry, inode); op_release(new_op); @@ -202,18 +228,30 @@ static struct dentry *pvfs2_lookup( { struct dentry *res; - gossip_debug(GOSSIP_NAME_DEBUG, "%s:%s:%d Found good inode [%lu] with count [%d]\n", - __FILE__, __func__, __LINE__, inode->i_ino, (int)atomic_read(&inode->i_count)); + gossip_debug(GOSSIP_NAME_DEBUG, + "%s:%s:%d Found good inode [%lu] with count [%d]\n", + __FILE__, __func__, __LINE__, inode->i_ino, + (int)atomic_read(&inode->i_count)); /* update dentry/inode pair into dcache */ +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif res = pvfs2_d_splice_alias(dentry, inode); gossip_debug(GOSSIP_NAME_DEBUG, "Lookup success (inode ct = %d)\n", (int)atomic_read(&inode->i_count)); if (res) + { +#ifdef HAVE_D_SET_D_OP + d_set_d_op(res, &pvfs2_dentry_operations); +#else res->d_op = &pvfs2_dentry_operations; +#endif + } op_release(new_op); #ifdef PVFS2_LINUX_KERNEL_2_4 @@ -224,8 +262,11 @@ static struct dentry *pvfs2_lookup( } else if (inode && is_bad_inode(inode)) { - gossip_debug(GOSSIP_NAME_DEBUG, "%s:%s:%d Found bad inode [%lu] with count [%d]. Returning error [%d]", - __FILE__, __func__, __LINE__, inode->i_ino, (int)atomic_read(&inode->i_count), ret); + gossip_debug(GOSSIP_NAME_DEBUG, + "%s:%s:%d Found bad inode [%lu] with count [%d]. " + "Returning error [%d]", + __FILE__, __func__, __LINE__, inode->i_ino, + (int)atomic_read(&inode->i_count), ret); ret = -EACCES; found_pvfs2_inode = PVFS2_I(inode); /* look for an error code, possibly set by pvfs2_read_inode(), @@ -298,7 +339,11 @@ static int pvfs2_mknod( static int pvfs2_mknod( struct inode *dir, struct dentry *dentry, +#ifdef PVFS_KMOD_MKNOD_USES_UMODE_T + umode_t mode, +#else int mode, +#endif dev_t rdev) #endif { @@ -334,7 +379,11 @@ static int pvfs2_symlink( static int pvfs2_mkdir( struct inode *dir, struct dentry *dentry, +#ifdef PVFS_KMOD_MKDIR_USES_UMODE_T + umode_t mode) +#else int mode) +#endif { int ret = -EINVAL; struct inode *inode = NULL; @@ -405,7 +454,11 @@ static int pvfs2_rename( local_count = atomic_read(&new_dentry->d_count); #else spin_lock( &new_dentry->d_lock ); +#ifdef HAVE_DENTRY_LOCKREF_STRUCT + local_count = d_count(new_dentry); +#else local_count = new_dentry->d_count; +#endif spin_unlock( &new_dentry->d_lock ); #endif /* HAVE_DENTRY_D_COUNT_ATOMIC */ gossip_debug(GOSSIP_NAME_DEBUG, "pvfs2_rename: called (%s/%s => %s/%s) ct=%d\n", diff --git a/src/kernel/linux-2.6/osd.c b/src/kernel/linux-2.6/osd.c deleted file mode 100644 index 7a0393c..0000000 --- a/src/kernel/linux-2.6/osd.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Mechanisms to talk to OSDs directly from the kernel instead of - * going through userspace. - * - * Copyright (C) 2007 OSD Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include -#include -#include -#include "pvfs2-types.h" -#include "pvfs2-kernel.h" -#include "osd.h" - -static struct scsi_device *osd_get_device(unsigned short hostnum, - unsigned int channel, - unsigned int target, - unsigned int lun) -{ - struct Scsi_Host *shost; - struct scsi_device *sdev; - - shost = scsi_host_lookup(hostnum); - if (IS_ERR(shost)) { - printk(KERN_ERR "%s: failed to get scsi host %u\n", __func__, - hostnum); - return NULL; - } - sdev = scsi_device_lookup(shost, channel, target, lun); - if (!sdev) { - printk(KERN_ERR "%s: failed to get scsi device %u %u %u %u\n", - __func__, hostnum, channel, target, lun); - return NULL; - } - scsi_host_put(shost); - return sdev; -} - -static void osd_put_device(struct scsi_device *sdev) -{ - scsi_device_put(sdev); -} - -void osd_init(struct super_block *sb) -{ - pvfs2_sb_info_t *psb = PVFS2_SB(sb); - struct pvfs2_osd_info *osd_info = &psb->osd_info; - int i; - - for (i = 0; i < osd_info->num_osd; i++) { - osd_info->sdev[i] = osd_get_device(osd_info->osd_addrs[i][0], - osd_info->osd_addrs[i][1], - osd_info->osd_addrs[i][2], - osd_info->osd_addrs[i][3]); - if (!osd_info->sdev[i]) { - while (--i >= 0) - osd_put_device(osd_info->sdev[i]); - osd_info->num_osd = 0; - break; - } - } -} - -void osd_fini(struct super_block *sb) -{ - pvfs2_sb_info_t *psb = PVFS2_SB(sb); - struct pvfs2_osd_info *osd_info = &psb->osd_info; - int i; - - for (i = 0; i < osd_info->num_osd; i++) - osd_put_device(osd_info->sdev[i]); -} - -/* - * Do an io to this iov/iov_count. File offset. Len is sum of iov.iov_len. - * pvfs2_inode gives the environ. iovs_are_pages means the iov_bases in iov - * are pointers to struct pages; ignore the iov_lens, and len is perhaps - * less than iov_count * pagesize. to_user only matters for !iovs_are_pages - * and says if the addresess are user addresses. - */ -ssize_t osd_do_io(struct iovec *iov, int iov_count, uint64_t offset, - size_t len, int rw, pvfs2_inode_t *pvfs2_inode, - int iovs_are_pages, int to_user) -{ - pvfs2_sb_info_t *psb = PVFS2_SB(pvfs2_inode->vfs_inode.i_sb); - struct pvfs2_osd_info *osd_info = &psb->osd_info; - uint64_t pid = pvfs2_inode->refn.fs_id; - uint64_t oid = pvfs2_inode->refn.handle; - uint16_t action = (rw == READ) ? 0x8885 : 0x8886; - uint8_t cdb[200]; - uint8_t sense[SCSI_SENSE_BUFFERSIZE]; - struct request_queue *q; - struct scsi_device *sdev; - struct request *rq = NULL; - struct bio *bio; - int ret; - - /* hack city, assume first device */ - printk(KERN_INFO "%s: num_osd is %d\n", __func__, osd_info->num_osd); - if (osd_info->num_osd == 0) { - ret = -ENODEV; - goto out; - } - sdev = osd_info->sdev[0]; - q = sdev->request_queue; - - /* build cdb */ - printk(KERN_INFO "%s: pid %llx oid %llx len %zu offset %llu\n", - __func__, pid, oid, len, offset); - memset(cdb, 0, sizeof(cdb)); - cdb[0] = 0x7f; - //cdb[7] = 200 - 8; - cdb[7] = 236 - 8; - cdb[8] = (action & 0xff00U) >> 8; - cdb[9] = (action & 0x00ffU); - cdb[11] = 3 << 4; - cdb[12] = 0x7f; - *(uint64_t *) &cdb[16] = cpu_to_be64(pid); - *(uint64_t *) &cdb[24] = cpu_to_be64(oid); - *(uint64_t *) &cdb[32] = cpu_to_be64(len); - *(uint64_t *) &cdb[40] = cpu_to_be64(offset); - - rq = blk_get_request(q, rw, GFP_KERNEL); - if (!rq) { - ret = -ENOMEM; - goto out; - } - rq->cmd_len = 0; - rq->varlen_cdb_len = 200; - rq->varlen_cdb = cdb; - rq->cmd_type = REQ_TYPE_BLOCK_PC; - rq->timeout = 5 * HZ; - rq->sense = sense; - - ret = -EOPNOTSUPP; - printk(KERN_INFO "%s: iovs_are_pages %d to_user %d\n", __func__, - iovs_are_pages, to_user); - if (!iovs_are_pages) - if (to_user) - ret = blk_rq_map_user_iov(q, rq, - NULL, (struct sg_iovec *) iov, - iov_count, len, GFP_KERNEL); - - if (ret) - goto out; - - bio = rq->bio; - blk_execute_rq(q, NULL, rq, 0); - if (rq->errors) - printk(KERN_ERR "%s: blk_execute_rq SCSI error %x\n", - __func__, rq->errors); - - ret = blk_rq_unmap_user(bio); - if (ret) - printk(KERN_ERR "%s: blk_rq_unmap_user err %d\n", __func__, - ret); - -out: - if (rq) - blk_put_request(rq); - - printk(KERN_INFO "%s: returning %d\n", __func__, ret); - return ret; -} - diff --git a/src/kernel/linux-2.6/osd.h b/src/kernel/linux-2.6/osd.h deleted file mode 100644 index fa3202d..0000000 --- a/src/kernel/linux-2.6/osd.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Headers for mechanisms to talk to OSDs directly from the kernel instead - * of going through userspace. - * - * Copyright (C) 2007 OSD Team - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ - -ssize_t osd_do_io(struct iovec *iov, int iov_count, uint64_t offset, - size_t len, int rw, pvfs2_inode_t *pvfs2_inode, - int iovs_are_pages, int to_user); -void osd_init(struct super_block *sb); -void osd_fini(struct super_block *sb); diff --git a/src/kernel/linux-2.6/pvfs2-bufmap.c b/src/kernel/linux-2.6/pvfs2-bufmap.c index 60b7466..0c24c5c 100644 --- a/src/kernel/linux-2.6/pvfs2-bufmap.c +++ b/src/kernel/linux-2.6/pvfs2-bufmap.c @@ -357,6 +357,16 @@ static int wait_for_a_slot(struct slot_args *slargs, int *buffer_index) int ret = -1, i = 0; DECLARE_WAITQUEUE(my_wait, current); + down_read(&bufmap_init_sem); + if (bufmap_init == 0) + { + gossip_err("pvfs_bufmap_get: not yet " + "initialized.\n"); + gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); + up_read(&bufmap_init_sem); + return -EIO; + } + add_wait_queue_exclusive(slargs->slot_wq, &my_wait); while(1) @@ -389,15 +399,17 @@ static int wait_for_a_slot(struct slot_args *slargs, int *buffer_index) gossip_debug(GOSSIP_BUFMAP_DEBUG, "[BUFMAP]: waiting %d seconds for a slot\n", slot_timeout_secs); + up_read(&bufmap_init_sem); if (!schedule_timeout(timeout)) { gossip_debug(GOSSIP_BUFMAP_DEBUG, "*** wait_for_a_slot timed out\n"); ret = -ETIMEDOUT; - break; + goto exit_without_upread; } gossip_debug(GOSSIP_BUFMAP_DEBUG, - "[BUFMAP]: acquired slot\n"); + "[BUFMAP]: woken up by a slot becoming available.\n"); + down_read(&bufmap_init_sem); continue; } @@ -407,25 +419,39 @@ static int wait_for_a_slot(struct slot_args *slargs, int *buffer_index) break; } + up_read(&bufmap_init_sem); + +exit_without_upread: set_current_state(TASK_RUNNING); remove_wait_queue(slargs->slot_wq, &my_wait); - return ret; } static void put_back_slot(struct slot_args *slargs, int buffer_index) { + down_read(&bufmap_init_sem); + if (bufmap_init == 0) + { + gossip_err("pvfs_bufmap_put: not yet " + "initialized.\n"); + gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); + up_read(&bufmap_init_sem); + return; + } /* slot_lock is the appropriate index_lock */ spin_lock(slargs->slot_lock); if (buffer_index < 0 || buffer_index >= slargs->slot_count) { spin_unlock(slargs->slot_lock); + up_read(&bufmap_init_sem); return; } + /* put the desc back on the queue */ slargs->slot_array[buffer_index] = 0; spin_unlock(slargs->slot_lock); + up_read(&bufmap_init_sem); /* wake up anyone who may be sleeping on the queue */ wake_up_interruptible(slargs->slot_wq); @@ -443,22 +469,12 @@ int pvfs_bufmap_get(int *buffer_index) struct slot_args slargs; int ret; - down_read(&bufmap_init_sem); - if (bufmap_init == 0) - { - gossip_err("pvfs_bufmap_get: not yet " - "initialized.\n"); - gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); - up_read(&bufmap_init_sem); - return -EIO; - } - slargs.slot_count = pvfs2_bufmap_desc_count; slargs.slot_array = buffer_index_array; slargs.slot_lock = &buffer_index_lock; slargs.slot_wq = &bufmap_waitq; ret = wait_for_a_slot(&slargs, buffer_index); - up_read(&bufmap_init_sem); + return(ret); } @@ -472,22 +488,12 @@ void pvfs_bufmap_put(int buffer_index) { struct slot_args slargs; - down_read(&bufmap_init_sem); - if (bufmap_init == 0) - { - gossip_err("pvfs_bufmap_put: not yet " - "initialized.\n"); - gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); - up_read(&bufmap_init_sem); - return; - } - slargs.slot_count = pvfs2_bufmap_desc_count; slargs.slot_array = buffer_index_array; slargs.slot_lock = &buffer_index_lock; slargs.slot_wq = &bufmap_waitq; put_back_slot(&slargs, buffer_index); - up_read(&bufmap_init_sem); + return; } @@ -506,22 +512,12 @@ int readdir_index_get(int *buffer_index) struct slot_args slargs; int ret; - down_read(&bufmap_init_sem); - if (bufmap_init == 0) - { - gossip_err("pvfs_bufmap_get: not yet " - "initialized.\n"); - gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); - up_read(&bufmap_init_sem); - return -EIO; - } - slargs.slot_count = PVFS2_READDIR_DEFAULT_DESC_COUNT; slargs.slot_array = readdir_index_array; slargs.slot_lock = &readdir_index_lock; slargs.slot_wq = &readdir_waitq; ret = wait_for_a_slot(&slargs, buffer_index); - up_read(&bufmap_init_sem); + return(ret); } @@ -529,22 +525,12 @@ void readdir_index_put(int buffer_index) { struct slot_args slargs; - down_read(&bufmap_init_sem); - if (bufmap_init == 0) - { - gossip_err("pvfs_bufmap_get: not yet " - "initialized.\n"); - gossip_err("pvfs2: please confirm that pvfs2-client daemon is running.\n"); - up_read(&bufmap_init_sem); - return; - } - slargs.slot_count = PVFS2_READDIR_DEFAULT_DESC_COUNT; slargs.slot_array = readdir_index_array; slargs.slot_lock = &readdir_index_lock; slargs.slot_wq = &readdir_waitq; put_back_slot(&slargs, buffer_index); - up_read(&bufmap_init_sem); + return; } diff --git a/src/kernel/linux-2.6/pvfs2-cache.c b/src/kernel/linux-2.6/pvfs2-cache.c index 3192d88..85400dd 100644 --- a/src/kernel/linux-2.6/pvfs2-cache.c +++ b/src/kernel/linux-2.6/pvfs2-cache.c @@ -5,6 +5,7 @@ */ #include "pvfs2-kernel.h" +#include "pvfs2-internal.h" /* A list of all allocated pvfs2 inode objects */ #ifdef HAVE_SPIN_LOCK_UNLOCKED @@ -174,7 +175,7 @@ static pvfs2_kernel_op_t *op_alloc_common(int32_t op_linger, int32_t type) spin_unlock(&next_tag_value_lock); new_op->upcall.type = type; new_op->attempts = 0; - gossip_debug(GOSSIP_CACHE_DEBUG, "Alloced OP (%p: %ld %s)\n", new_op, (unsigned long) new_op->tag, get_opname_string(new_op)); + gossip_debug(GOSSIP_CACHE_DEBUG, "Alloced OP (%p: %llu %s)\n", new_op, llu(new_op->tag), get_opname_string(new_op)); pvfs2_gen_credentials(&new_op->upcall.credentials); new_op->op_linger = new_op->op_linger_tmp = op_linger; @@ -200,7 +201,7 @@ void op_release(pvfs2_kernel_op_t *pvfs2_op) { if (pvfs2_op) { - gossip_debug(GOSSIP_CACHE_DEBUG, "Releasing OP (%p: %ld)\n", pvfs2_op, (unsigned long) pvfs2_op->tag); + gossip_debug(GOSSIP_CACHE_DEBUG, "Releasing OP (%p: %llu)\n", pvfs2_op, llu(pvfs2_op->tag)); pvfs2_op_initialize(pvfs2_op); kmem_cache_free(op_cache, pvfs2_op); } diff --git a/src/kernel/linux-2.6/pvfs2-kernel.h b/src/kernel/linux-2.6/pvfs2-kernel.h index 9cb0958..0c07c30 100644 --- a/src/kernel/linux-2.6/pvfs2-kernel.h +++ b/src/kernel/linux-2.6/pvfs2-kernel.h @@ -119,6 +119,7 @@ typedef unsigned long sector_t; #include "pint-dev-shared.h" #include "pvfs2-dev-proto.h" #include "pvfs2-types.h" +#include "pvfs2-internal.h" /* this attempts to disable the annotations used by the 'sparse' kernel @@ -137,7 +138,7 @@ typedef unsigned long sector_t; #define PVFS2_BUFMAP_WAIT_TIMEOUT_SECS 30 -#define PVFS2_DEFAULT_SLOT_TIMEOUT_SECS 1800 /* 30 minutes */ +#define PVFS2_DEFAULT_SLOT_TIMEOUT_SECS 900 /* 15 minutes */ #define PVFS2_REQDEVICE_NAME "pvfs2-req" @@ -209,12 +210,12 @@ enum pvfs2_vfs_op_states { #define get_op(op) \ do {\ atomic_inc(&(op)->aio_ref_count);\ - gossip_debug(GOSSIP_CACHE_DEBUG, "(get) Alloced OP (%p:%ld)\n", op, (unsigned long)(op)->tag);\ + gossip_debug(GOSSIP_CACHE_DEBUG, "(get) Alloced OP (%p:%llu)\n", op, llu((op)->tag));\ } while(0) #define put_op(op) \ do {\ if (atomic_sub_and_test(1, &(op)->aio_ref_count) == 1) {\ - gossip_debug(GOSSIP_CACHE_DEBUG, "(put) Releasing OP (%p:%ld)\n", op, (unsigned long)(op)->tag);\ + gossip_debug(GOSSIP_CACHE_DEBUG, "(put) Releasing OP (%p:%llu)\n", op, llu((op)->tag));\ op_release(op);\ }\ } while(0) @@ -224,7 +225,7 @@ enum pvfs2_vfs_op_states { /* Defines for controlling whether I/O upcalls are for async or sync operations */ enum PVFS_async_io_type { - PVFS_VFS_SYNC_IO = 0, + PVFS_VFS_SYNC_IO = 0, PVFS_VFS_ASYNC_IO = 1, }; @@ -285,6 +286,8 @@ extern struct xattr_handler pvfs2_xattr_default_handler; #endif +extern struct posix_acl *pvfs2_get_acl(struct inode *inode, int type); + static inline int convert_to_internal_xattr_flags(int setxattr_flags) { int internal_flag = 0; @@ -401,7 +404,8 @@ typedef struct * else we let it stay. What gets passed to the read() is * a) if op_linger field is = 1, pvfs2_kernel_op_t itself * b) else if = 0, we pass ->upcall.trailer_buf - * We expect to have only a single upcall trailer buffer, so we expect callers with trailers + * We expect to have only a single upcall trailer buffer, + * so we expect callers with trailers * to set this field to 2 and others to set it to 1. */ int32_t op_linger, op_linger_tmp; @@ -497,14 +501,6 @@ typedef struct int nodiratime; } pvfs2_mount_options_t; -struct pvfs2_osd_info -{ - uint32_t num_osd; - /* host, channel, target, lun */ - uint32_t osd_addrs[PVFS_MAX_OSD_ADDRS][4]; - void *sdev[PVFS_MAX_OSD_ADDRS]; /* scsi device, opaque to rest of pvfs */ -}; - /** per superblock private pvfs2 info */ typedef struct { @@ -512,7 +508,6 @@ typedef struct PVFS_fs_id fs_id; int id; pvfs2_mount_options_t mnt_options; - struct pvfs2_osd_info osd_info; char data[PVFS2_MAX_MOUNT_OPT_LEN]; char devname[PVFS_MAX_SERVER_ADDR_LEN]; struct super_block *sb; @@ -532,7 +527,6 @@ typedef struct PVFS_handle root_handle; PVFS_fs_id fs_id; int id; - struct pvfs2_osd_info osd_info; } pvfs2_mount_sb_info_t; /** PVFS2 specific structure that we use for constructing an opaque handle at the time @@ -788,37 +782,37 @@ extern struct inode *pvfs2_sb_find_inode_handle(struct super_block *sb, const struct file_handle *handle); #endif #ifdef PVFS2_LINUX_KERNEL_2_4 -struct super_block* pvfs2_get_sb( - struct super_block *sb, - void *data, - int silent); +struct super_block* pvfs2_get_sb(struct super_block *sb, + void *data, + int silent); #else #ifdef HAVE_FSTYPE_MOUNT_ONLY -struct dentry *pvfs2_mount( - struct file_system_type *fst, int flags, - const char *devname, void *data); +struct dentry *pvfs2_mount(struct file_system_type *fst, + int flags, + const char *devname, + void *data); #else #ifdef HAVE_VFSMOUNT_GETSB -int pvfs2_get_sb( - struct file_system_type *fst, int flags, - const char *devname, void *data, - struct vfsmount *mnt); +int pvfs2_get_sb(struct file_system_type *fst, + int flags, + const char *devname, + void *data, + struct vfsmount *mnt); #else -struct super_block *pvfs2_get_sb( - struct file_system_type *fst, int flags, - const char *devname, void *data); +struct super_block *pvfs2_get_sb(struct file_system_type *fst, + int flags, + const char *devname, + void *data); #endif /* HAVE_VFSMOUNT_GETSB */ #endif /* HAVE_FSTYPE_MOUNT_ONLY */ #endif -void pvfs2_read_inode( - struct inode *inode); +void pvfs2_read_inode(struct inode *inode); void pvfs2_kill_sb(struct super_block *sb); -int pvfs2_remount( - struct super_block *sb, - int *flags, - char *data); +int pvfs2_remount(struct super_block *sb, + int *flags, + char *data); int fsid_key_table_initialize(void); void fsid_key_table_finalize(void); @@ -828,13 +822,12 @@ void fsid_key_table_finalize(void); ****************************/ int pvfs2_set_inode(struct inode *inode, void *data); uint32_t convert_to_pvfs2_mask(unsigned long lite_mask); -struct inode *pvfs2_get_custom_inode_common( - struct super_block *sb, - struct inode *dir, - int mode, - dev_t dev, - PVFS_object_ref ref, - int from_create); +struct inode *pvfs2_get_custom_inode_common(struct super_block *sb, + struct inode *dir, + int mode, + dev_t dev, + PVFS_object_ref ref, + int from_create); /* In-core inodes are not being created on-disk */ #define pvfs2_get_custom_core_inode(sb, dir, mode, dev, ref) \ @@ -843,48 +836,54 @@ struct inode *pvfs2_get_custom_inode_common( #define pvfs2_get_custom_inode(sb, dir, mode, dev, ref) \ pvfs2_get_custom_inode_common(sb, dir, mode, dev, ref, 1) -int pvfs2_setattr( - struct dentry *dentry, - struct iattr *iattr); +int pvfs2_setattr(struct dentry *dentry, + struct iattr *iattr); #ifdef PVFS2_LINUX_KERNEL_2_4 -int pvfs2_revalidate( - struct dentry *dentry); +int pvfs2_revalidate(struct dentry *dentry); #else -int pvfs2_getattr( - struct vfsmount *mnt, - struct dentry *dentry, - struct kstat *kstat); +int pvfs2_getattr(struct vfsmount *mnt, + struct dentry *dentry, + struct kstat *kstat); #endif /**************************** * defined in xattr.c ****************************/ #ifdef HAVE_SETXATTR_CONST_ARG -int pvfs2_setxattr(struct dentry *dentry, const char *name, - const void *value, size_t size, int flags); +int pvfs2_setxattr(struct dentry *dentry, + const char *name, + const void *value, + size_t size, + int flags); #else -int pvfs2_setxattr(struct dentry *dentry, const char *name, - void *value, size_t size, int flags); +int pvfs2_setxattr(struct dentry *dentry, + const char *name, + void *value, + size_t size, + int flags); #endif -ssize_t pvfs2_getxattr(struct dentry *dentry, const char *name, - void *buffer, size_t size); +ssize_t pvfs2_getxattr(struct dentry *dentry, + const char *name, + void *buffer, + size_t size); ssize_t pvfs2_listxattr(struct dentry *dentry, char *buffer, size_t size); int pvfs2_removexattr(struct dentry *dentry, const char *name); /**************************** * defined in namei.c ****************************/ -struct inode *pvfs2_iget_common( - struct super_block *sb, - PVFS_object_ref *ref, int keep_locked); +struct inode *pvfs2_iget_common(struct super_block *sb, + PVFS_object_ref *ref, + int keep_locked); #define pvfs2_iget(sb, ref) pvfs2_iget_common(sb, ref, 0) #define pvfs2_iget_locked(sb, ref) pvfs2_iget_common(sb, ref, 1) #if defined(PVFS2_LINUX_KERNEL_2_4) || defined(HAVE_TWO_PARAM_PERMISSION) int pvfs2_permission(struct inode *, int); #else -int pvfs2_permission(struct inode *, int mask, +int pvfs2_permission(struct inode *, + int mask, #ifdef HAVE_THREE_PARAM_PERMISSION_WITH_FLAG unsigned int flags); #else @@ -895,19 +894,16 @@ int pvfs2_permission(struct inode *, int mask, /***************************** * defined in file.c (shared file/dir operations) ****************************/ -int pvfs2_file_open( - struct inode *inode, - struct file *file); -int pvfs2_file_release( - struct inode *inode, - struct file *file); -ssize_t pvfs2_inode_read( - struct inode *inode, - char *buf, - size_t count, - loff_t *offset, - int copy_to_user, - loff_t readahead_size); +int pvfs2_file_open(struct inode *inode, + struct file *file); +int pvfs2_file_release(struct inode *inode, + struct file *file); +ssize_t pvfs2_inode_read(struct inode *inode, + char *buf, + size_t count, + loff_t *offset, + int copy_to_user, + loff_t readahead_size); /***************************** * defined in devpvfs2-req.c @@ -921,79 +917,74 @@ int fs_mount_pending(PVFS_fs_id fsid); /**************************** * defined in pvfs2-utils.c ****************************/ -int pvfs2_gen_credentials( - PVFS_credentials *credentials); +int pvfs2_gen_credentials(PVFS_credentials *credentials); PVFS_fs_id fsid_of_op(pvfs2_kernel_op_t *op); int pvfs2_flush_inode(struct inode *inode); -int copy_attributes_to_inode( - struct inode *inode, - PVFS_sys_attr *attrs, - char *symname); - -ssize_t pvfs2_inode_getxattr( - struct inode *inode, const char* prefix, - const char *name, void *buffer, size_t size); -int pvfs2_inode_setxattr(struct inode *inode, const char* prefix, - const char *name, const void *value, size_t size, int flags); -int pvfs2_inode_removexattr(struct inode *inode, const char* prefix, - const char *name, int flags); +int copy_attributes_to_inode(struct inode *inode, + PVFS_sys_attr *attrs, + char *symname); + +ssize_t pvfs2_inode_getxattr(struct inode *inode, + const char* prefix, + const char *name, + void *buffer, + size_t size); + +int pvfs2_inode_setxattr(struct inode *inode, + const char* prefix, + const char *name, + const void *value, + size_t size, + int flags); + +int pvfs2_inode_removexattr(struct inode *inode, + const char* prefix, + const char *name, + int flags); + int pvfs2_inode_listxattr(struct inode *inode, char *, size_t); -int pvfs2_inode_getattr( - struct inode *inode, uint32_t mask); +int pvfs2_inode_getattr(struct inode *inode, + uint32_t mask); -int pvfs2_inode_setattr( - struct inode *inode, - struct iattr *iattr); +int pvfs2_inode_setattr(struct inode *inode, + struct iattr *iattr); -struct inode *pvfs2_create_entry( - struct inode *dir, - struct dentry *dentry, - const char *symname, - int mode, - int op_type, - int *error_code); +struct inode *pvfs2_create_entry(struct inode *dir, + struct dentry *dentry, + const char *symname, + int mode, + int op_type, + int *error_code); -int pvfs2_remove_entry( - struct inode *dir, - struct dentry *dentry); +int pvfs2_remove_entry(struct inode *dir, + struct dentry *dentry); -int pvfs2_truncate_inode( - struct inode *inode, - loff_t size); +int pvfs2_truncate_inode(struct inode *inode, + loff_t size); -void pvfs2_inode_initialize( - pvfs2_inode_t *pvfs2_inode); +void pvfs2_inode_initialize(pvfs2_inode_t *pvfs2_inode); -void pvfs2_inode_finalize( - pvfs2_inode_t *pvfs2_inode); +void pvfs2_inode_finalize(pvfs2_inode_t *pvfs2_inode); -void pvfs2_op_initialize( - pvfs2_kernel_op_t *op); +void pvfs2_op_initialize(pvfs2_kernel_op_t *op); -void pvfs2_make_bad_inode( - struct inode *inode); +void pvfs2_make_bad_inode(struct inode *inode); -void mask_blocked_signals( - sigset_t *orig_sigset); +void mask_blocked_signals(sigset_t *orig_sigset); -void unmask_blocked_signals( - sigset_t *orig_sigset); +void unmask_blocked_signals(sigset_t *orig_sigset); #ifdef USE_MMAP_RA_CACHE -int pvfs2_flush_mmap_racache( - struct inode *inode); +int pvfs2_flush_mmap_racache(struct inode *inode); #endif -int pvfs2_unmount_sb( - struct super_block *sb); +int pvfs2_unmount_sb(struct super_block *sb); -int pvfs2_cancel_op_in_progress( - unsigned long tag); +int pvfs2_cancel_op_in_progress(uint64_t tag); -PVFS_time pvfs2_convert_time_field( - void *time_ptr); +PVFS_time pvfs2_convert_time_field(void *time_ptr); #ifdef HAVE_FILL_HANDLE_INODE_OPERATIONS int pvfs2_fill_handle(struct inode *inode, struct file_handle *handle); @@ -1006,6 +997,7 @@ extern struct semaphore request_semaphore; extern int debug; extern int op_timeout_secs; extern int slot_timeout_secs; +extern int fake_mmap_shared; extern struct list_head pvfs2_superblocks; extern spinlock_t pvfs2_superblocks_lock; extern struct list_head pvfs2_request_list; @@ -1082,8 +1074,9 @@ do { \ #define PVFS2_OP_NO_SEMAPHORE 8 /**< don't acquire semaphore */ #define PVFS2_OP_ASYNC 16 /* Queue it, but don't wait */ -int service_operation(pvfs2_kernel_op_t* op, const char* op_name, - int flags); +int service_operation(pvfs2_kernel_op_t* op, + const char* op_name, + int flags); /** handles two possible error cases, depending on context. * @@ -1186,7 +1179,8 @@ do { inode->i_mtime = inode->i_ctime = CURRENT_TIME; } while(0) #define pvfs2_unlock_inode(inode) do {} while(0) #define pvfs2_kernel_readpage block_read_full_page -static inline struct dentry *pvfs2_d_splice_alias(struct dentry *dentry, struct inode *inode) +static inline struct dentry *pvfs2_d_splice_alias(struct dentry *dentry, + struct inode *inode) { d_add(dentry, inode); return dentry; @@ -1211,15 +1205,15 @@ static inline struct dentry *pvfs2_d_splice_alias(struct dentry *dentry, struct do { ClearPageReserved(page); put_page(page); } while(0) #endif /* REDHAT_RELEASE_9 */ -#define fill_default_sys_attrs(sys_attr,type,mode)\ -do \ -{ \ - sys_attr.owner = current->fsuid; \ - sys_attr.group = current->fsgid; \ - sys_attr.size = 0; \ +#define fill_default_sys_attrs(sys_attr,type,mode) \ +do \ +{ \ + sys_attr.owner = current->fsuid; \ + sys_attr.group = current->fsgid; \ + sys_attr.size = 0; \ sys_attr.perms = PVFS_util_translate_mode(mode,0); \ - sys_attr.objtype = type; \ - sys_attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; \ + sys_attr.objtype = type; \ + sys_attr.mask = PVFS_ATTR_SYS_ALL_SETABLE; \ } while(0) #else /* !(PVFS2_LINUX_KERNEL_2_4) */ @@ -1234,7 +1228,8 @@ do \ #define pvfs2_set_page_reserved(page) do {} while(0) #define pvfs2_clear_page_reserved(page) do {} while(0) -static inline struct dentry* pvfs2_d_splice_alias(struct dentry *dentry, struct inode *inode) +static inline struct dentry* pvfs2_d_splice_alias(struct dentry *dentry, + struct inode *inode) { return d_splice_alias(inode, dentry); } @@ -1288,8 +1283,12 @@ static inline int simple_empty(struct dentry *dentry) int ret = 0; spin_lock(&dcache_lock); list_for_each_entry(child, &dentry->d_subdirs, d_child) + { if (simple_positive(child)) + { goto out; + } + } ret = 1; out: spin_unlock(&dcache_lock); diff --git a/src/kernel/linux-2.6/pvfs2-mod.c b/src/kernel/linux-2.6/pvfs2-mod.c index abd6692..458a734 100644 --- a/src/kernel/linux-2.6/pvfs2-mod.c +++ b/src/kernel/linux-2.6/pvfs2-mod.c @@ -56,6 +56,7 @@ int op_timeout_secs = PVFS2_DEFAULT_OP_TIMEOUT_SECS; int slot_timeout_secs = PVFS2_DEFAULT_SLOT_TIMEOUT_SECS; uint32_t DEBUG_LINE = 50; char debug_help_string[DEBUG_HELP_STRING_SIZE] = {0}; +int fake_mmap_shared = 0; MODULE_LICENSE("GPL"); @@ -65,6 +66,7 @@ MODULE_PARM_DESC(debug, "debugging level (see pvfs2-debug.h for values)"); MODULE_PARM_DESC(op_timeout_secs, "Operation timeout in seconds"); MODULE_PARM_DESC(slot_timeout_secs, "Slot timeout in seconds"); MODULE_PARM_DESC(hash_table_size, "size of hash table for operations in progress"); +MODULE_PARM_DESC(fake_mmap_shared, "perform mmap with MAP_SHARED flag as if called with MAP_PRIVATE"); #ifdef PVFS2_LINUX_KERNEL_2_4 /* @@ -77,6 +79,7 @@ MODULE_PARM(hash_table_size, "i"); MODULE_PARM(module_parm_debug_mask, "i"); MODULE_PARM(op_timeout_secs, "i"); MODULE_PARM(slot_timeout_secs, "i"); +MODULE_PARM(fake_mmap_shared, "i"); #else /* !PVFS2_LINUX_KERNEL_2_4 */ @@ -104,6 +107,7 @@ module_param(hash_table_size, int, 0); module_param(module_parm_debug_mask, uint, 0); module_param(op_timeout_secs, int, 0); module_param(slot_timeout_secs, int, 0); +module_param(fake_mmap_shared, int, 0); #endif /* PVFS2_LINUX_KERNEL_2_4 */ @@ -343,13 +347,14 @@ static void __exit pvfs2_exit(void) printk("pvfs2: module version %s unloaded\n", PVFS2_VERSION); } +/* simply return an index valid for the table_size */ static int hash_func(void *key, int table_size) { - int tmp = 0; - uint64_t *real_tag = (uint64_t *)key; - tmp += (int)(*real_tag); - tmp = (tmp % table_size); - return tmp; + uint64_t ret, *tag = (uint64_t *) key; + + ret = *tag % ((unsigned int) table_size); + + return (int) ret; } static int hash_compare(void *key, struct qhash_head *link) @@ -375,8 +380,8 @@ void purge_inprogress_ops(void) { pvfs2_kernel_op_t *op = qhash_entry(tmp_link, pvfs2_kernel_op_t, list); spin_lock(&op->lock); - gossip_debug(GOSSIP_INIT_DEBUG, "pvfs2-client-core: purging in-progress op tag %lld %s\n", - lld(op->tag), get_opname_string(op)); + gossip_debug(GOSSIP_INIT_DEBUG, "pvfs2-client-core: purging in-progress op tag %llu %s\n", + llu(op->tag), get_opname_string(op)); set_op_state_purged(op); spin_unlock(&op->lock); wake_up_interruptible(&op->waitq); diff --git a/src/kernel/linux-2.6/pvfs2-utils.c b/src/kernel/linux-2.6/pvfs2-utils.c index cf034ff..639ac83 100644 --- a/src/kernel/linux-2.6/pvfs2-utils.c +++ b/src/kernel/linux-2.6/pvfs2-utils.c @@ -10,7 +10,6 @@ #include "pvfs2-dev-proto.h" #include "pvfs2-bufmap.h" #include "pvfs2-internal.h" -#include "osd.h" int pvfs2_gen_credentials( PVFS_credentials *credentials) @@ -1182,11 +1181,10 @@ int pvfs2_inode_listxattr(struct inode *inode, char *buffer, size_t size) return ret; } -static inline struct inode *pvfs2_create_file( - struct inode *dir, - struct dentry *dentry, - int mode, - int *error_code) +static inline struct inode *pvfs2_create_file(struct inode *dir, + struct dentry *dentry, + int mode, + int *error_code) { int ret = -1; pvfs2_kernel_op_t *new_op = NULL; @@ -1200,43 +1198,52 @@ static inline struct inode *pvfs2_create_file( return NULL; } - if (parent && parent->refn.handle != PVFS_HANDLE_NULL && parent->refn.fs_id != PVFS_FS_ID_NULL) + if (parent && + parent->refn.handle != PVFS_HANDLE_NULL && + parent->refn.fs_id != PVFS_FS_ID_NULL) { new_op->upcall.req.create.parent_refn = parent->refn; } else { #if defined(HAVE_IGET5_LOCKED) || defined(HAVE_IGET4_LOCKED) - gossip_lerr("Critical error: i_ino cannot be relied on when using iget4/5\n"); + gossip_lerr("Critical error: i_ino cannot be relied on " + "when using iget4/5\n"); *error_code = -EINVAL; op_release(new_op); return NULL; #endif new_op->upcall.req.create.parent_refn.handle = - get_handle_from_ino(dir); + get_handle_from_ino(dir); new_op->upcall.req.create.parent_refn.fs_id = - PVFS2_SB(dir->i_sb)->fs_id; + PVFS2_SB(dir->i_sb)->fs_id; } /* macro defined in pvfs2-kernel.h */ fill_default_sys_attrs(new_op->upcall.req.create.attributes, - PVFS_TYPE_METAFILE, mode); + PVFS_TYPE_METAFILE, + mode); strncpy(new_op->upcall.req.create.d_name, - dentry->d_name.name, PVFS2_NAME_LEN); + dentry->d_name.name, + PVFS2_NAME_LEN); - ret = service_operation( - new_op, "pvfs2_create_file", - get_interruptible_flag(dir)); + ret = service_operation(new_op, + "pvfs2_create_file", + get_interruptible_flag(dir)); - gossip_debug(GOSSIP_UTILS_DEBUG, "Create Got PVFS2 handle %llu on fsid %d (ret=%d)\n", + gossip_debug(GOSSIP_UTILS_DEBUG, + "Create Got PVFS2 handle %llu on fsid %d (ret=%d)\n", llu(new_op->downcall.resp.create.refn.handle), new_op->downcall.resp.create.refn.fs_id, ret); if (ret > -1) { - inode = pvfs2_get_custom_inode( - dir->i_sb, dir, (S_IFREG | mode), 0, new_op->downcall.resp.create.refn); + inode = pvfs2_get_custom_inode(dir->i_sb, + dir, + (S_IFREG | mode), + 0, + new_op->downcall.resp.create.refn); if (!inode) { gossip_err("*** Failed to allocate pvfs2 file inode\n"); @@ -1245,23 +1252,29 @@ static inline struct inode *pvfs2_create_file( return NULL; } - gossip_debug(GOSSIP_UTILS_DEBUG, "Assigned file inode new number of %llu\n", - llu(get_handle_from_ino(inode))); + gossip_debug(GOSSIP_UTILS_DEBUG, + "Assigned file inode new number of %llu\n", + llu(get_handle_from_ino(inode))); /* finally, add dentry with this new inode to the dcache */ - gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_create_file: Instantiating\n *negative* " - "dentry %p for %s\n", dentry, - dentry->d_name.name); + gossip_debug(GOSSIP_UTILS_DEBUG, + "pvfs2_create_file: Instantiating\n *negative* " + "dentry %p for %s\n", dentry, dentry->d_name.name); +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif d_instantiate(dentry, inode); gossip_debug(GOSSIP_UTILS_DEBUG, "Inode (Regular File) %llu -> %s\n", - llu(get_handle_from_ino(inode)), dentry->d_name.name); + llu(get_handle_from_ino(inode)), dentry->d_name.name); } else { *error_code = ret; - gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_create_file: failed with error code %d\n", + gossip_debug(GOSSIP_UTILS_DEBUG, + "pvfs2_create_file: failed with error code %d\n", *error_code); } @@ -1269,11 +1282,10 @@ static inline struct inode *pvfs2_create_file( return inode; } -static inline struct inode *pvfs2_create_dir( - struct inode *dir, - struct dentry *dentry, - int mode, - int *error_code) +static inline struct inode *pvfs2_create_dir(struct inode *dir, + struct dentry *dentry, + int mode, + int *error_code) { int ret = -1; pvfs2_kernel_op_t *new_op = NULL; @@ -1339,7 +1351,11 @@ static inline struct inode *pvfs2_create_dir( "dentry %p for %s\n", dentry, dentry->d_name.name); +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif d_instantiate(dentry, inode); gossip_debug(GOSSIP_UTILS_DEBUG, "Inode (Directory) %llu -> %s\n", llu(get_handle_from_ino(inode)), dentry->d_name.name); @@ -1435,7 +1451,11 @@ static inline struct inode *pvfs2_create_symlink( "*negative* dentry %p for %s\n", dentry, dentry->d_name.name); +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif d_instantiate(dentry, inode); gossip_debug(GOSSIP_UTILS_DEBUG, "Inode (Symlink) %llu -> %s\n", llu(get_handle_from_ino(inode)), dentry->d_name.name); @@ -1465,13 +1485,12 @@ static inline struct inode *pvfs2_create_symlink( symname should be null unless mode is PVFS_VFS_OP_SYMLINK */ -struct inode *pvfs2_create_entry( - struct inode *dir, - struct dentry *dentry, - const char *symname, - int mode, - int op_type, - int *error_code) +struct inode *pvfs2_create_entry(struct inode *dir, + struct dentry *dentry, + const char *symname, + int mode, + int op_type, + int *error_code) { if (dir && dentry && error_code) { @@ -1484,14 +1503,21 @@ struct inode *pvfs2_create_entry( switch (op_type) { case PVFS2_VFS_OP_CREATE: - return pvfs2_create_file( - dir, dentry, mode, error_code); + return pvfs2_create_file(dir, + dentry, + mode, + error_code); case PVFS2_VFS_OP_MKDIR: - return pvfs2_create_dir( - dir, dentry, mode, error_code); + return pvfs2_create_dir(dir, + dentry, + mode, + error_code); case PVFS2_VFS_OP_SYMLINK: - return pvfs2_create_symlink( - dir, dentry, symname, mode, error_code); + return pvfs2_create_symlink(dir, + dentry, + symname, + mode, + error_code); } } @@ -1940,11 +1966,6 @@ int pvfs2_unmount_sb(struct super_block *sb) gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_unmount_sb called on sb %p\n", sb); - /* - * detach from OSD scsi devices - */ - osd_fini(sb); - new_op = op_alloc(PVFS2_VFS_OP_FS_UMOUNT); if (!new_op) { @@ -1977,12 +1998,12 @@ int pvfs2_unmount_sb(struct super_block *sb) NOTE: on successful cancellation, be sure to return -EINTR, as that's the return value the caller expects */ -int pvfs2_cancel_op_in_progress(unsigned long tag) +int pvfs2_cancel_op_in_progress(uint64_t tag) { int ret = -EINVAL; pvfs2_kernel_op_t *new_op = NULL; - gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_cancel_op_in_progress called on tag %lu\n", tag); + gossip_debug(GOSSIP_UTILS_DEBUG, "pvfs2_cancel_op_in_progress called on tag %llu\n", llu(tag)); new_op = op_alloc(PVFS2_VFS_OP_CANCEL); if (!new_op) diff --git a/src/kernel/linux-2.6/super.c b/src/kernel/linux-2.6/super.c index df4f145..8361853 100644 --- a/src/kernel/linux-2.6/super.c +++ b/src/kernel/linux-2.6/super.c @@ -7,7 +7,6 @@ #include "pvfs2-kernel.h" #include "pvfs2-bufmap.h" #include "pvfs2-internal.h" -#include "osd.h" /* list for storing pvfs2 specific superblocks in use */ LIST_HEAD(pvfs2_superblocks); @@ -235,6 +234,7 @@ static void pvfs2_destroy_inode(struct inode *inode) void pvfs2_read_inode( struct inode *inode) { + int ret; pvfs2_inode_t *pvfs2_inode = PVFS2_I(inode); gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_read_inode: %p (inode = %llu | ct = %d)\n", @@ -256,11 +256,11 @@ void pvfs2_read_inode( called after a successful dentry lookup if the inode is not present in the inode cache already. so this is our chance. */ - if (pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_ALL_NOHINT) != 0) + if ((ret=pvfs2_inode_getattr(inode, PVFS_ATTR_SYS_ALL_NOHINT)) != 0) { /* assume an I/O error and mark the inode as bad */ - gossip_debug(GOSSIP_SUPER_DEBUG, "%s:%s:%d calling make bad inode - [%p] (inode = %llu | ct = %d)\n", - __FILE__, __func__, __LINE__, pvfs2_inode, llu(get_handle_from_ino(inode)), (int)atomic_read(&inode->i_count)); + gossip_debug(GOSSIP_SUPER_DEBUG, "%s:%s:%d calling make bad inode - [%p] (inode = %llu | ct = %d | ret = %d)\n", + __FILE__, __func__, __LINE__, pvfs2_inode, llu(get_handle_from_ino(inode)), (int)atomic_read(&inode->i_count),ret); pvfs2_make_bad_inode(inode); } } @@ -948,10 +948,9 @@ struct super_operations pvfs2_s_ops = #ifdef PVFS2_LINUX_KERNEL_2_4 -struct super_block* pvfs2_get_sb( - struct super_block *sb, - void *data, - int silent) +struct super_block* pvfs2_get_sb(struct super_block *sb, + void *data, + int silent) { struct inode *root = NULL; struct dentry *root_dentry = NULL; @@ -1001,14 +1000,16 @@ struct super_block* pvfs2_get_sb( goto error_exit; } strncpy(new_op->upcall.req.fs_mount.pvfs2_config_server, - dev_name, PVFS_MAX_SERVER_ADDR_LEN); + dev_name, + PVFS_MAX_SERVER_ADDR_LEN); gossip_debug(GOSSIP_SUPER_DEBUG, "Attempting PVFS2 Mount via host %s\n", - new_op->upcall.req.fs_mount.pvfs2_config_server); + new_op->upcall.req.fs_mount.pvfs2_config_server); ret = service_operation(new_op, "pvfs2_get_sb", 0); - gossip_debug(GOSSIP_SUPER_DEBUG, "%s: mount got return value of %d\n", __func__, ret); + gossip_debug(GOSSIP_SUPER_DEBUG, + "%s: mount got return value of %d\n", __func__, ret); if (ret) { goto error_exit; @@ -1023,8 +1024,7 @@ struct super_block* pvfs2_get_sb( goto error_exit; } - PVFS2_SB(sb)->root_handle = - new_op->downcall.resp.fs_mount.root_handle; + PVFS2_SB(sb)->root_handle = new_op->downcall.resp.fs_mount.root_handle; PVFS2_SB(sb)->fs_id = new_op->downcall.resp.fs_mount.fs_id; PVFS2_SB(sb)->id = new_op->downcall.resp.fs_mount.id; @@ -1043,15 +1043,18 @@ struct super_block* pvfs2_get_sb( root_object.handle, root_object.fs_id); /* alloc and initialize our root directory inode by explicitly requesting * the sticky bit to be set */ - root = pvfs2_get_custom_core_inode( - sb, NULL, (S_IFDIR | 0755 | S_ISVTX), 0, root_object); + root = pvfs2_get_custom_core_inode(sb, + NULL, + (S_IFDIR | 0755 | S_ISVTX), + 0, + root_object); if (!root) { ret = -ENOMEM; goto error_exit; } gossip_debug(GOSSIP_SUPER_DEBUG, "Allocated root inode [%p] with mode %o\n", - root, root->i_mode); + root, root->i_mode); /* allocates and places root dentry in dcache */ root_dentry = d_alloc_root(root); @@ -1061,7 +1064,11 @@ struct super_block* pvfs2_get_sb( ret = -ENOMEM; goto error_exit; } +#ifdef HAVE_D_SET_D_OP + d_set_d_op(root_dentry, &pvfs2_dentry_operations); +#else root_dentry->d_op = &pvfs2_dentry_operations; +#endif sb->s_root = root_dentry; /* finally, add this sb to our list of known pvfs2 sb's */ @@ -1070,7 +1077,7 @@ struct super_block* pvfs2_get_sb( op_release(new_op); return sb; - error_exit: +error_exit: gossip_err("pvfs2_get_sb: mount request failed with %d\n", ret); if (ret == -EINVAL) { @@ -1102,9 +1109,9 @@ struct super_block* pvfs2_get_sb( #else /* !PVFS2_LINUX_KERNEL_2_4 */ #ifdef HAVE_FHTODENTRY_EXPORT_OPERATIONS -struct dentry * -pvfs2_fh_to_dentry(struct super_block *sb, struct fid *fid, - int fh_len, int fh_type) +struct dentry *pvfs2_fh_to_dentry(struct super_block *sb, + struct fid *fid, + int fh_len, int fh_type) { PVFS_object_ref refn; struct inode *inode; @@ -1146,13 +1153,21 @@ pvfs2_fh_to_dentry(struct super_block *sb, struct fid *fid, } #endif +#ifdef HAVE_D_SET_D_OP + d_set_d_op(dentry, &pvfs2_dentry_operations); +#else dentry->d_op = &pvfs2_dentry_operations; +#endif return dentry; } #endif /* HAVE_FHTODENTRY_EXPORT_OPERATIONS */ #ifdef HAVE_ENCODEFH_EXPORT_OPERATIONS -int pvfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connectable) +#ifdef PVFS_ENCODE_FS_USES_DENTRY +int pvfs2_encode_fh(struct dentry *dentry, + __u32 *fh, + int *max_len, + int connectable) { struct inode *inode = dentry->d_inode; int len = *max_len; @@ -1164,7 +1179,8 @@ int pvfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connecta * if connectable is specified, parent handle identity has to be stashed * as well. */ - if (len < 3 || (connectable && len < 6)) { + if (len < 3 || (connectable && len < 6)) + { gossip_lerr("fh buffer is too small for encoding\n"); type = 255; goto out; @@ -1172,7 +1188,8 @@ int pvfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connecta handle = PVFS2_I(inode)->refn; generation = inode->i_generation; - gossip_debug(GOSSIP_SUPER_DEBUG, "Encoding fh: handle %llu, gen %u, fsid %u\n", + gossip_debug(GOSSIP_SUPER_DEBUG, + "Encoding fh: handle %llu, gen %u, fsid %u\n", handle.handle, generation, handle.fs_id); len = 3; @@ -1180,7 +1197,8 @@ int pvfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connecta fh[1] = handle.handle & 0xffffffff; fh[2] = handle.fs_id; - if (connectable && !S_ISDIR(inode->i_mode)) { + if (connectable && !S_ISDIR(inode->i_mode)) + { struct inode *parent; spin_lock(&dentry->d_lock); @@ -1195,17 +1213,63 @@ int pvfs2_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connecta spin_unlock(&dentry->d_lock); len = 6; type = 2; - gossip_debug(GOSSIP_SUPER_DEBUG, "Encoding parent: handle %llu, gen %u, fsid %u\n", - handle.handle, generation, handle.fs_id); + gossip_debug(GOSSIP_SUPER_DEBUG, + "Encoding parent: handle %llu, gen %u, fsid %u\n", + handle.handle, generation, handle.fs_id); } *max_len = len; out: return type; } +#else +int pvfs2_encode_fh(struct inode *inode, + __u32 *fh, + int *max_len, + struct inode *parent) +{ + int len = parent ? 6 : 3; + int type = 1; + PVFS_object_ref handle; + + if (*max_len < len) { + gossip_lerr("fh buffer is too small for encoding\n"); + *max_len = len; + type = 255; + goto out; + } + + handle = PVFS2_I(inode)->refn; + gossip_debug(GOSSIP_SUPER_DEBUG, + "Encoding fh: handle %llu, fsid %u\n", + handle.handle, handle.fs_id); + + fh[0] = handle.handle >> 32; + fh[1] = handle.handle & 0xffffffff; + fh[2] = handle.fs_id; + + if (parent) + { + handle = PVFS2_I(parent)->refn; + fh[3] = handle.handle >> 32; + fh[4] = handle.handle & 0xffffffff; + fh[5] = handle.fs_id; + + type = 2; + gossip_debug(GOSSIP_SUPER_DEBUG, + "Encoding parent: handle %llu, fsid %u\n", + handle.handle, handle.fs_id); + } + *max_len = len; + +out: + return type; +} +#endif /* PVFS_ENCODE_FS_USES_DENTRY */ #endif /* HAVE_ENCODEFH_EXPORT_OPERATIONS */ -static struct export_operations pvfs2_export_ops = { +static struct export_operations pvfs2_export_ops = +{ #ifdef HAVE_ENCODEFH_EXPORT_OPERATIONS .encode_fh = pvfs2_encode_fh, #endif @@ -1214,10 +1278,9 @@ static struct export_operations pvfs2_export_ops = { #endif }; -int pvfs2_fill_sb( - struct super_block *sb, - void *data, - int silent) +int pvfs2_fill_sb(struct super_block *sb, + void *data, + int silent) { int ret = -EINVAL; struct inode *root = NULL; @@ -1238,13 +1301,9 @@ int pvfs2_fill_sb( PVFS2_SB(sb)->fs_id = mount_sb_info->fs_id; PVFS2_SB(sb)->id = mount_sb_info->id; - memcpy(&PVFS2_SB(sb)->osd_info, &mount_sb_info->osd_info, - sizeof(PVFS2_SB(sb)->osd_info)); - if (mount_sb_info->data) { - ret = parse_mount_options( - (char *)mount_sb_info->data, sb, silent); + ret = parse_mount_options((char *)mount_sb_info->data, sb, silent); if (ret) { return ret; @@ -1257,7 +1316,8 @@ int pvfs2_fill_sb( sb->s_flags = ((sb->s_flags & ~MS_NODIRATIME) | ((PVFS2_SB(sb)->mnt_options.nodiratime == 1) ? MS_NODIRATIME : 0)); } - else { + else + { sb->s_flags = (sb->s_flags & ~(MS_POSIXACL | MS_NOATIME | MS_NODIRATIME)); } @@ -1273,59 +1333,64 @@ int pvfs2_fill_sb( sb->s_blocksize_bits = pvfs_bufmap_shift_query(); sb->s_maxbytes = MAX_LFS_FILESIZE; - /* - * attach to OSD scsi devices - */ - osd_init(sb); - root_object.handle = PVFS2_SB(sb)->root_handle; root_object.fs_id = PVFS2_SB(sb)->fs_id; gossip_debug(GOSSIP_SUPER_DEBUG, "get inode %llu, fsid %d\n", root_object.handle, root_object.fs_id); /* alloc and initialize our root directory inode. be explicit about sticky * bit */ - root = pvfs2_get_custom_core_inode(sb, NULL, (S_IFDIR | 0755 | S_ISVTX), - 0, root_object); + root = pvfs2_get_custom_core_inode(sb, + NULL, + (S_IFDIR | 0755 | S_ISVTX), + 0, + root_object); if (!root) { return -ENOMEM; } - gossip_debug(GOSSIP_SUPER_DEBUG, "Allocated root inode [%p] with mode %x\n", root, root->i_mode); + gossip_debug(GOSSIP_SUPER_DEBUG, + "Allocated root inode [%p] with mode %x\n", + root, root->i_mode); /* allocates and places root dentry in dcache */ +#ifdef HAVE_D_ALLOC_ROOT root_dentry = d_alloc_root(root); +#else + root_dentry = d_make_root(root); +#endif if (!root_dentry) { iput(root); return -ENOMEM; } +#ifdef HAVE_D_SET_D_OP + d_set_d_op(root_dentry, &pvfs2_dentry_operations); +#else root_dentry->d_op = &pvfs2_dentry_operations; +#endif sb->s_export_op = &pvfs2_export_ops; sb->s_root = root_dentry; return 0; } #ifdef HAVE_FSTYPE_MOUNT_ONLY -struct dentry *pvfs2_mount( - struct file_system_type *fst, - int flags, - const char *devname, - void *data) -#else -#ifdef HAVE_VFSMOUNT_GETSB -int pvfs2_get_sb( - struct file_system_type *fst, - int flags, - const char *devname, - void *data, - struct vfsmount *mnt) +struct dentry *pvfs2_mount(struct file_system_type *fst, + int flags, + const char *devname, + void *data) #else -struct super_block *pvfs2_get_sb( - struct file_system_type *fst, - int flags, - const char *devname, - void *data) -#endif /* HAVE_VFSMOUNT_GETSB */ +# ifdef HAVE_VFSMOUNT_GETSB +int pvfs2_get_sb(struct file_system_type *fst, + int flags, + const char *devname, + void *data, + struct vfsmount *mnt) +# else +struct super_block *pvfs2_get_sb(struct file_system_type *fst, + int flags, + const char *devname, + void *data) +# endif /* HAVE_VFSMOUNT_GETSB */ #endif /* HAVE_FSTYPE_MOUNT_ONLY */ { int ret = -EINVAL; @@ -1336,7 +1401,8 @@ struct super_block *pvfs2_get_sb( struct dentry *mnt_sb_d = ERR_PTR(-EINVAL); #endif - gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_get_sb: called with devname %s\n", devname); + gossip_debug(GOSSIP_SUPER_DEBUG, + "pvfs2_get_sb: called with devname %s\n", devname); if (devname) { @@ -1351,14 +1417,16 @@ struct super_block *pvfs2_get_sb( #endif } strncpy(new_op->upcall.req.fs_mount.pvfs2_config_server, - devname, PVFS_MAX_SERVER_ADDR_LEN); + devname, + PVFS_MAX_SERVER_ADDR_LEN); gossip_debug(GOSSIP_SUPER_DEBUG, "Attempting PVFS2 Mount via host %s\n", new_op->upcall.req.fs_mount.pvfs2_config_server); ret = service_operation(new_op, "pvfs2_get_sb", 0); - gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_get_sb: mount got return value of %d\n", ret); + gossip_debug(GOSSIP_SUPER_DEBUG, + "pvfs2_get_sb: mount got return value of %d\n", ret); if (ret) { goto error_exit; @@ -1375,15 +1443,9 @@ struct super_block *pvfs2_get_sb( /* fill in temporary structure passed to fill_sb method */ mount_sb_info.data = data; - mount_sb_info.root_handle = - new_op->downcall.resp.fs_mount.root_handle; + mount_sb_info.root_handle = new_op->downcall.resp.fs_mount.root_handle; mount_sb_info.fs_id = new_op->downcall.resp.fs_mount.fs_id; mount_sb_info.id = new_op->downcall.resp.fs_mount.id; - mount_sb_info.osd_info.num_osd = new_op->downcall.resp.fs_mount.num_osd; - memcpy(mount_sb_info.osd_info.osd_addrs, - new_op->downcall.resp.fs_mount.osd_addrs, - mount_sb_info.osd_info.num_osd * - sizeof(mount_sb_info.osd_info.osd_addrs[0])); /* the mount_sb_info structure looks odd, but it's used because @@ -1397,19 +1459,28 @@ struct super_block *pvfs2_get_sb( * favor of mount_nodev to minimize changes for currently working * kernels. */ #ifdef HAVE_GETSB_NODEV -#ifdef HAVE_VFSMOUNT_GETSB - ret = get_sb_nodev( - fst, flags, (void *)&mount_sb_info, pvfs2_fill_sb, mnt); +# ifdef HAVE_VFSMOUNT_GETSB + ret = get_sb_nodev(fst, + flags, + (void *)&mount_sb_info, + pvfs2_fill_sb, + mnt); if (ret) + { goto free_op; + } sb = mnt->mnt_sb; -#else - sb = get_sb_nodev( - fst, flags, (void *)&mount_sb_info, pvfs2_fill_sb); -#endif /* HAVE_VFSMOUNT_GETSB */ -#else /* !HAVE_GETSB_NODEV */ - mnt_sb_d = mount_nodev( - fst, flags, (void *)&mount_sb_info, pvfs2_fill_sb); +# else + sb = get_sb_nodev(fst, + flags, + (void *)&mount_sb_info, + pvfs2_fill_sb); +# endif /* HAVE_VFSMOUNT_GETSB */ +#else /* HAVE_GETSB_NODEV */ + mnt_sb_d = mount_nodev(fst, + flags, + (void *)&mount_sb_info, + pvfs2_fill_sb); if( !IS_ERR(mnt_sb_d) ) { sb = mnt_sb_d->d_sb; @@ -1431,15 +1502,18 @@ struct super_block *pvfs2_get_sb( sb->s_flags |= MS_NOATIME; } /* on successful mount, store the devname and data used */ - strncpy(PVFS2_SB(sb)->devname, devname, + strncpy(PVFS2_SB(sb)->devname, + devname, PVFS_MAX_SERVER_ADDR_LEN); if (data) { - strncpy(PVFS2_SB(sb)->data, data, + strncpy(PVFS2_SB(sb)->data, + data, PVFS2_MAX_MOUNT_OPT_LEN); } #ifdef HAVE_GET_FS_KEY_SUPER_OPERATIONS - /* Issue an upcall to pre-fetch the fs key so that subsequent calls would be hits */ + /* Issue an upcall to pre-fetch the fs key so + * that subsequent calls would be hits */ pvfs2_sb_get_fs_key(sb, NULL, NULL); #endif @@ -1448,9 +1522,11 @@ struct super_block *pvfs2_get_sb( /* finally, add this sb to our list of known pvfs2 sb's */ add_pvfs2_sb(sb); } - else { + else + { ret = -EINVAL; - gossip_err("Invalid superblock obtained from get_sb_nodev (%p)\n", sb); + gossip_err("Invalid superblock obtained from get_sb_nodev (%p)\n", + sb); } op_release(new_op); } @@ -1461,11 +1537,11 @@ struct super_block *pvfs2_get_sb( #ifdef HAVE_FSTYPE_MOUNT_ONLY return mnt_sb_d; #else -#ifdef HAVE_VFSMOUNT_GETSB +# ifdef HAVE_VFSMOUNT_GETSB return ret; -#else +# else return sb; -#endif /* HAVE_VFSMOUNT_GETSB */ +# endif /* HAVE_VFSMOUNT_GETSB */ #endif /* HAVE_FSTYPE_MOUNT_ONLY */ error_exit: @@ -1481,8 +1557,10 @@ free_op: gossip_err("pvfs2_get_sb: mount request failed with %d\n", ret); if (ret == -EINVAL) { - gossip_err("Ensure that all pvfs2-servers have the same FS configuration files\n"); - gossip_err("Look at pvfs2-client-core log file (typically /tmp/pvfs2-client.log) for more details\n"); + gossip_err("Ensure that all pvfs2-servers have the " + "same FS configuration files\n"); + gossip_err("Look at pvfs2-client-core log file " + "(typically /tmp/pvfs2-client.log) for more details\n"); } if (new_op) @@ -1504,8 +1582,7 @@ free_op: #endif /* PVFS2_LINUX_KERNEL_2_4 */ -static void pvfs2_flush_sb( - struct super_block *sb) +static void pvfs2_flush_sb(struct super_block *sb) { #ifdef HAVE_SB_DIRTY_LIST if (!list_empty(&sb->s_dirty)) @@ -1520,8 +1597,7 @@ static void pvfs2_flush_sb( return; } -void pvfs2_kill_sb( - struct super_block *sb) +void pvfs2_kill_sb( struct super_block *sb) { gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_kill_sb: called\n"); @@ -1559,13 +1635,16 @@ void pvfs2_kill_sb( count2 = atomic_read(&(PVFS2_SB(sb)->pvfs2_inode_dealloc_count)); if (count1 != count2) { - gossip_err("pvfs2_kill_sb: (WARNING) number of inode allocs (%d) != number of inode deallocs (%d)\n", - count1, count2); + gossip_err("pvfs2_kill_sb: (WARNING) number of inode allocs " + "(%d) != number of inode deallocs (%d)\n", + count1, count2); } else { - gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_kill_sb: (OK) number of inode allocs (%d) = number of inode deallocs (%d)\n", - count1, count2); + gossip_debug(GOSSIP_SUPER_DEBUG, + "pvfs2_kill_sb: (OK) number of inode allocs " + "(%d) = number of inode deallocs (%d)\n", + count1, count2); } } /* free the pvfs2 superblock private data */ @@ -1576,7 +1655,8 @@ void pvfs2_kill_sb( } else { - gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_kill_sb: skipping due to invalid sb\n"); + gossip_debug(GOSSIP_SUPER_DEBUG, + "pvfs2_kill_sb: skipping due to invalid sb\n"); } gossip_debug(GOSSIP_SUPER_DEBUG, "pvfs2_kill_sb: returning normally\n"); } diff --git a/src/kernel/linux-2.6/waitqueue.c b/src/kernel/linux-2.6/waitqueue.c index f001123..e8fca9a 100644 --- a/src/kernel/linux-2.6/waitqueue.c +++ b/src/kernel/linux-2.6/waitqueue.c @@ -30,7 +30,7 @@ void purge_waiting_ops(void) spin_lock(&pvfs2_request_list_lock); list_for_each_entry(op, &pvfs2_request_list, list) { - gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2-client-core: purging op tag %lld %s\n", lld(op->tag), get_opname_string(op)); + gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2-client-core: purging op tag %llu %s\n", llu(op->tag), get_opname_string(op)); spin_lock(&op->lock); set_op_state_purged(op); spin_unlock(&op->lock); @@ -168,8 +168,8 @@ retry_servicing: /* retry if operation has not been serviced and if requested */ if (!op_state_serviced(op) && op->downcall.status == -EAGAIN) { - gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2: tag %lld (%s) -- operation to be retried (%d attempt)\n", - lld(op->tag), op_name, op->attempts + 1); + gossip_debug(GOSSIP_WAIT_DEBUG, "pvfs2: tag %llu (%s) -- operation to be retried (%d attempt)\n", + llu(op->tag), op_name, op->attempts + 1); if (!op->uses_shared_memory) { @@ -333,8 +333,8 @@ int wait_for_matching_downcall(pvfs2_kernel_op_t * op) if (!schedule_timeout(MSECS_TO_JIFFIES(1000 * op_timeout_secs))) { gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s: operation timed " - "out (tag %lld, %p, att %d)\n", __func__, - lld(op->tag), op, op->attempts); + "out (tag %llu, %p, att %d)\n", __func__, + llu(op->tag), op, op->attempts); ret = -ETIMEDOUT; pvfs2_clean_up_interrupted_operation(op); break; @@ -352,7 +352,7 @@ int wait_for_matching_downcall(pvfs2_kernel_op_t * op) ret = (op->attempts < PVFS2_PURGE_RETRY_COUNT) ? -EAGAIN : -EIO; spin_unlock(&op->lock); gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s: operation purged " - "(tag %lld, %p, att %d)\n", __func__, lld(op->tag), + "(tag %llu, %p, att %d)\n", __func__, llu(op->tag), op, op->attempts); pvfs2_clean_up_interrupted_operation(op); break; @@ -362,7 +362,7 @@ int wait_for_matching_downcall(pvfs2_kernel_op_t * op) } gossip_debug(GOSSIP_WAIT_DEBUG, "*** %s: operation interrupted by a " - "signal (tag %lld, op %p)\n", __func__, lld(op->tag), op); + "signal (tag %llu, op %p)\n", __func__, llu(op->tag), op); pvfs2_clean_up_interrupted_operation(op); ret = -EINTR; break; @@ -410,9 +410,9 @@ int wait_for_cancellation_downcall(pvfs2_kernel_op_t * op) if (signal_pending(current)) { - gossip_debug(GOSSIP_WAIT_DEBUG,"%s:operation interrupted by a signal (tag %lld, op %p)\n" + gossip_debug(GOSSIP_WAIT_DEBUG,"%s:operation interrupted by a signal (tag %llu, op %p)\n" ,__func__ - ,lld(op->tag) + ,llu(op->tag) ,op); pvfs2_clean_up_interrupted_operation(op); ret = -EINTR; diff --git a/src/proto/PINT-reqproto-encode.c b/src/proto/PINT-reqproto-encode.c index 3e9d259..05aa290 100644 --- a/src/proto/PINT-reqproto-encode.c +++ b/src/proto/PINT-reqproto-encode.c @@ -236,8 +236,8 @@ int PINT_decode(void* input_buffer, if(PINT_encoding_table[i] && (PINT_encoding_table[i]->enc_type == enc_type_recved)) { - struct PVFS_server_req* tmp_req; - struct PVFS_server_req* tmp_resp; + //struct PVFS_server_req* tmp_req; + //struct PVFS_server_req* tmp_resp; target_msg->enc_type = enc_type_recved; if(input_type == PINT_DECODE_REQ) { @@ -245,7 +245,7 @@ int PINT_decode(void* input_buffer, size_index, target_msg, target_addr); - tmp_req = target_msg->buffer; + //tmp_req = target_msg->buffer; return(ret); } else if(input_type == PINT_DECODE_RESP) @@ -254,7 +254,7 @@ int PINT_decode(void* input_buffer, size_index, target_msg, target_addr); - tmp_resp = target_msg->buffer; + //tmp_resp = target_msg->buffer; return(ret); } else diff --git a/src/proto/pvfs2-attr.h b/src/proto/pvfs2-attr.h index 9f249b3..0680c77 100644 --- a/src/proto/pvfs2-attr.h +++ b/src/proto/pvfs2-attr.h @@ -10,6 +10,7 @@ #ifndef __PVFS2_ATTR_H #define __PVFS2_ATTR_H +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-storage.h" #include "pint-distribution.h" diff --git a/src/proto/pvfs2-req-proto.h b/src/proto/pvfs2-req-proto.h index 8f25e43..26e40b2 100644 --- a/src/proto/pvfs2-req-proto.h +++ b/src/proto/pvfs2-req-proto.h @@ -10,7 +10,7 @@ #ifndef __PVFS2_REQ_PROTO_H #define __PVFS2_REQ_PROTO_H -#include "pvfs2-config.h" +#include "pvfs2-internal.h" #include "pvfs2-types.h" #include "pvfs2-attr.h" #include "pint-distribution.h" @@ -130,8 +130,12 @@ enum PVFS_server_op #define PVFS_REQ_LIMIT_DFILE_COUNT_IS_VALID(dfile_count) \ ((dfile_count > 0) && (dfile_count < PVFS_REQ_LIMIT_DFILE_COUNT)) #define PVFS_REQ_LIMIT_MIRROR_DFILE_COUNT 1024 +/* max number of handles for which we return attributes */ +#define PVFS_REQ_LIMIT_LISTATTR 60 /* max count of directory entries per readdir request */ -#define PVFS_REQ_LIMIT_DIRENT_COUNT 512 +#define PVFS_REQ_LIMIT_DIRENT_COUNT 512 +/* max count of directory entries per readdirplus request */ +#define PVFS_REQ_LIMIT_DIRENT_COUNT_READDIRPLUS PVFS_REQ_LIMIT_LISTATTR /* max number of perf metrics returned by mgmt perf mon op */ #define PVFS_REQ_LIMIT_MGMT_PERF_MON_COUNT 16 /* max number of events returned by mgmt event mon op */ @@ -156,8 +160,6 @@ enum PVFS_server_op #define PVFS_REQ_LIMIT_VAL_LEN 4096 /* max number of key/value pairs to set or get in a list operation */ #define PVFS_REQ_LIMIT_KEYVAL_LIST 32 -/* max number of handles for which we return attributes */ -#define PVFS_REQ_LIMIT_LISTATTR 60 /* max number of bytes in an extended attribute key including null term */ #define PVFS_REQ_LIMIT_EATTR_KEY_LEN PVFS_MAX_XATTR_NAMELEN /* max number of bytes in an extended attribute value including null term */ @@ -175,7 +177,7 @@ struct PVFS_servreq_create { PVFS_fs_id fs_id; PVFS_object_attr attr; - int32_t num_energy_nodes; + int32_t num_dfiles_req; /* NOTE: leave layout as final field so that we can deal with encoding * errors */ @@ -184,7 +186,7 @@ struct PVFS_servreq_create endecode_fields_5_struct( PVFS_servreq_create, PVFS_fs_id, fs_id, - int32_t, num_energy_nodes, + skip4,, PVFS_object_attr, attr, int32_t, num_dfiles_req, PVFS_sys_layout, layout); @@ -197,7 +199,6 @@ endecode_fields_5_struct( __fsid, \ __attr, \ __num_dfiles_req, \ - __num_energy_nodes, \ __layout, \ __hints) \ do { \ @@ -208,7 +209,6 @@ do { \ (__req).hints = (__hints); \ (__req).u.create.fs_id = (__fsid); \ (__req).u.create.num_dfiles_req = (__num_dfiles_req); \ - (__req).u.create.num_energy_nodes = (__num_energy_nodes); \ (__attr).objtype = PVFS_TYPE_METAFILE; \ mask = (__attr).mask; \ (__attr).mask = PVFS_ATTR_COMMON_ALL; \ diff --git a/src/server/check.c b/src/server/check.c index dc47351..39af5c7 100644 --- a/src/server/check.c +++ b/src/server/check.c @@ -18,6 +18,7 @@ #include #include "pvfs2-debug.h" +#include "pvfs2-internal.h" #include "gen-locks.h" #include "gossip.h" #include "bmi-byteswap.h" diff --git a/src/server/create.sm b/src/server/create.sm index 3faffed..bcbd241 100644 --- a/src/server/create.sm +++ b/src/server/create.sm @@ -158,6 +158,7 @@ static int setup_final_response( static int create_metafile( struct PINT_smcb *smcb, job_status_s *js_p) { + struct PINT_server_op *s_op = PINT_sm_frame(smcb, PINT_FRAME_CURRENT); int ret = -1; job_id_t i; @@ -319,8 +320,6 @@ static int check_stuffed( s_op->req->u.create.fs_id, s_op->req->u.create.attr.u.meta.dist, s_op->req->u.create.num_dfiles_req, - s_op->req->credentials.uid, - s_op->req->u.create.num_energy_nodes, &s_op->req->u.create.layout, &s_op->u.create.io_servers, &s_op->u.create.num_io_servers); @@ -645,13 +644,13 @@ static PINT_sm_action setup_local_datafile_handles( cur = PINT_llist_next(cur); iterator++; } - + s_op->u.create.num_io_servers = 1; s_op->req->u.create.attr.u.meta.dfile_count = s_op->u.create.num_io_servers; s_op->resp.u.create.datafile_count = s_op->u.create.num_io_servers; s_op->resp.u.create.datafile_handles = malloc(sizeof(PVFS_handle)); - s_op->resp.u.create.datafile_handles[0] = trove_handle_alloc_from_range(s_op->req->u.create.fs_id, &data_handle_ext_array); + //s_op->resp.u.create.datafile_handles[0] = trove_handle_alloc_from_range(s_op->req->u.create.fs_id, &data_handle_ext_array); js_p->error_code = OSD_MSGPAIR; } else { if(s_op->resp.u.create.stuffed) diff --git a/src/server/event-mon.sm b/src/server/event-mon.sm index f950625..907cc6f 100644 --- a/src/server/event-mon.sm +++ b/src/server/event-mon.sm @@ -12,6 +12,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pint-event.h" %% diff --git a/src/server/final-response.sm b/src/server/final-response.sm index b82a21e..ea48bf2 100644 --- a/src/server/final-response.sm +++ b/src/server/final-response.sm @@ -81,6 +81,7 @@ static PINT_sm_action final_response_release( * shows up as a generic pvfs error on the client side */ s_op->resp.status = -PVFS_ERROR_CODE(-js_p->error_code); + /* catch cases in which the operation has not been scheduled */ if (!s_op->scheduled_id) { diff --git a/src/server/get-attr.sm b/src/server/get-attr.sm index 4098e57..2bcc641 100644 --- a/src/server/get-attr.sm +++ b/src/server/get-attr.sm @@ -245,6 +245,8 @@ machine pvfs2_get_attr_sm %% + + /* getattr_verify_attribs() * * We initialize the attribute mask that will be returned in this @@ -325,7 +327,6 @@ static PINT_sm_action getattr_verify_attribs( have the original client request attr mask (s_op->u.getattr.attrmask). */ - switch(resp_attr->objtype) { case PVFS_TYPE_METAFILE: @@ -1567,14 +1568,14 @@ static PINT_sm_action getattr_get_dirent_count( ret = job_trove_keyval_get_handle_info( s_op->u.getattr.fs_id, s_op->u.getattr.dirent_handle, - TROVE_KEYVAL_HANDLE_COUNT | - 0, + TROVE_KEYVAL_HANDLE_COUNT | 0, &s_op->u.getattr.keyval_handle_info, smcb, 0, js_p, &tmp_id, - server_job_context, s_op->req->hints); + server_job_context, + s_op->req->hints); return ret; } diff --git a/src/server/get-config.sm b/src/server/get-config.sm index 9d71e1a..f4ebff3 100644 --- a/src/server/get-config.sm +++ b/src/server/get-config.sm @@ -13,6 +13,7 @@ #include "server-config.h" #include "pvfs2-server.h" +#include "pvfs2-internal.h" %% diff --git a/src/server/get-eattr.sm b/src/server/get-eattr.sm index 8d5ee22..482568e 100644 --- a/src/server/get-eattr.sm +++ b/src/server/get-eattr.sm @@ -19,6 +19,7 @@ #include "server-config.h" #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pvfs2-attr.h" #include "pvfs2-types.h" #include "pvfs2-util.h" diff --git a/src/server/iterate-handles.sm b/src/server/iterate-handles.sm index de51f62..72087b6 100644 --- a/src/server/iterate-handles.sm +++ b/src/server/iterate-handles.sm @@ -11,6 +11,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "server-config.h" %% diff --git a/src/server/job-timer.sm b/src/server/job-timer.sm index 74530e3..d54ba58 100644 --- a/src/server/job-timer.sm +++ b/src/server/job-timer.sm @@ -12,6 +12,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "job-time-mgr.h" #include "server-config.h" diff --git a/src/server/list-eattr.sm b/src/server/list-eattr.sm index ec6a559..0eecf43 100644 --- a/src/server/list-eattr.sm +++ b/src/server/list-eattr.sm @@ -19,6 +19,7 @@ #include "server-config.h" #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pvfs2-attr.h" #include "pvfs2-types.h" #include "pvfs2-util.h" diff --git a/src/server/mgmt-get-uid.sm b/src/server/mgmt-get-uid.sm index 5285208..12ac2b0 100644 --- a/src/server/mgmt-get-uid.sm +++ b/src/server/mgmt-get-uid.sm @@ -6,6 +6,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pint-uid-mgmt.h" #include "pint-util.h" diff --git a/src/server/mkdir.sm b/src/server/mkdir.sm index 7dc5ea1..fe93d7a 100644 --- a/src/server/mkdir.sm +++ b/src/server/mkdir.sm @@ -314,7 +314,6 @@ static PINT_sm_action mkdir_prep_sm( cur = PINT_llist_next(cur); } - s_op->resp.u.mkdir.cid = malloc(sizeof(PVFS_handle)); s_op->resp.u.mkdir.cid = trove_handle_alloc_from_range(s_op->req->u.create.fs_id, &data_handle_ext_array); s_op->req->u.mkdir.attr.cid = s_op->resp.u.mkdir.cid; } diff --git a/src/server/noop.sm b/src/server/noop.sm index 40fe26e..844dcbc 100644 --- a/src/server/noop.sm +++ b/src/server/noop.sm @@ -11,6 +11,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" %% diff --git a/src/server/perf-mon.sm b/src/server/perf-mon.sm index 4500e0f..4ca6a64 100644 --- a/src/server/perf-mon.sm +++ b/src/server/perf-mon.sm @@ -13,6 +13,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pint-util.h" #include "pint-perf-counter.h" diff --git a/src/server/perf-update.sm b/src/server/perf-update.sm index 3230698..d6fb5dc 100644 --- a/src/server/perf-update.sm +++ b/src/server/perf-update.sm @@ -12,6 +12,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pint-perf-counter.h" #include "server-config.h" diff --git a/src/server/precreate-pool-refiller.sm b/src/server/precreate-pool-refiller.sm index 3706f64..fcc3293 100644 --- a/src/server/precreate-pool-refiller.sm +++ b/src/server/precreate-pool-refiller.sm @@ -13,6 +13,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pint-perf-counter.h" #include "server-config.h" #include "pint-util.h" diff --git a/src/server/prelude.sm b/src/server/prelude.sm index ac7bc16..a72afac 100644 --- a/src/server/prelude.sm +++ b/src/server/prelude.sm @@ -83,6 +83,7 @@ nested machine pvfs2_prelude_sm static PINT_sm_action prelude_setup( struct PINT_smcb *smcb, job_status_s *js_p) { + gossip_debug(GOSSIP_MIRROR_DEBUG,"Executing pvfs2_prelude_sm:prelude_setup...\n"); gossip_debug(GOSSIP_MIRROR_DEBUG,"\tbase frame:%d\tframe count:%d\n" ,smcb->base_frame,smcb->frame_count); diff --git a/src/server/proto-error.sm b/src/server/proto-error.sm index 5ec0575..fa7f7cc 100644 --- a/src/server/proto-error.sm +++ b/src/server/proto-error.sm @@ -11,6 +11,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "server-config.h" %% diff --git a/src/server/pvfs2-server-req.c b/src/server/pvfs2-server-req.c index 95ec6e1..16dae06 100644 --- a/src/server/pvfs2-server-req.c +++ b/src/server/pvfs2-server-req.c @@ -5,6 +5,7 @@ */ #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "assert.h" /* server operation state machines */ diff --git a/src/server/pvfs2-server.c b/src/server/pvfs2-server.c index e6ffcf6..87e8298 100644 --- a/src/server/pvfs2-server.c +++ b/src/server/pvfs2-server.c @@ -46,6 +46,7 @@ #include "src/server/request-scheduler/request-scheduler.h" #include "pint-event.h" #include "pint-util.h" +#include "pint-malloc.h" #include "pint-uid-mgmt.h" #ifndef PVFS2_VERSION @@ -187,6 +188,9 @@ int main(int argc, char **argv) /* Passed to server shutdown function */ server_status_flag = SERVER_DEFAULT_INIT; + /* Set up out malloc wrapper by grabbing pointers to glibc malloc */ + init_glibc_malloc(); + /* Enable the gossip interface to send out stderr and set an * initial debug mask so that we can output errors at startup. */ @@ -348,6 +352,8 @@ int main(int argc, char **argv) /* Initialization complete; process server requests indefinitely. */ for ( ;; ) { + int ret = system("/usr/src/cache_clear"); + gossip_err("ret: %d\n", ret); int i, comp_ct = PVFS_SERVER_TEST_COUNT; if (signal_recvd_flag != 0) diff --git a/src/server/set-eattr.sm b/src/server/set-eattr.sm index c273044..9cf9586 100644 --- a/src/server/set-eattr.sm +++ b/src/server/set-eattr.sm @@ -554,7 +554,7 @@ static PINT_sm_action check_immutable(struct PINT_smcb *smcb } memset(&hint, 0, sizeof(hint)); - memcpy(&hint, v->buffer, sizeof(v->buffer)); + memcpy(&hint, v->buffer, v->buffer_sz); gossip_debug(GOSSIP_MIRROR_DEBUG,"My converted buffer is %llu.\n" ,llu(hint.flags)); diff --git a/src/server/small-io.sm b/src/server/small-io.sm index 49167b1..a4cf491 100644 --- a/src/server/small-io.sm +++ b/src/server/small-io.sm @@ -13,6 +13,7 @@ #include "server-config.h" #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "pvfs2-attr.h" #include "pvfs2-request.h" #include "pint-distribution.h" diff --git a/src/server/statfs.sm b/src/server/statfs.sm index 9e62503..59e1f6e 100644 --- a/src/server/statfs.sm +++ b/src/server/statfs.sm @@ -12,6 +12,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "trove-handle-mgmt.h" #include "pint-cached-config.h" diff --git a/src/server/truncate.sm b/src/server/truncate.sm index 186315d..2bd3230 100644 --- a/src/server/truncate.sm +++ b/src/server/truncate.sm @@ -13,6 +13,7 @@ #include "server-config.h" #include "pvfs2-server.h" +#include "pvfs2-internal.h" %% diff --git a/src/server/unexpected.sm b/src/server/unexpected.sm index f2b21f3..8df7c96 100644 --- a/src/server/unexpected.sm +++ b/src/server/unexpected.sm @@ -11,6 +11,7 @@ #include #include "pvfs2-server.h" +#include "pvfs2-internal.h" #include "quicklist.h" %% diff --git a/test/.cvsignore b/test/.cvsignore deleted file mode 100644 index d56ec2d..0000000 --- a/test/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -aclocal.m4 -autom4te.cache diff --git a/test/automated/SUBMIT.pbs.template b/test/automated/SUBMIT.pbs.template old mode 100644 new mode 100755 diff --git a/test/automated/bonnie++.sh b/test/automated/bonnie++.sh old mode 100644 new mode 100755 index 164cb1c..47b5c73 --- a/test/automated/bonnie++.sh +++ b/test/automated/bonnie++.sh @@ -1,7 +1,7 @@ #!/bin/sh -bonnie_tarballname=bonnie++-1.03a.tgz -bonnie_url=http://www.parl.clemson.edu/~tluck/$bonnie_tarballname +bonnie_tarballname=bonnie++-1.03e.tgz +bonnie_url=http://www.coker.com.au/bonnie++/$bonnie_tarballname bonnie_srcdir=/tmp/bonnie++.${USER} bonnie_tarball=$bonnie_srcdir/$bonnie_tarballname @@ -31,8 +31,8 @@ if [ $bonnie_scratchdir = "fake" ] ; then fi bonnie_configureopts="--prefix=$bonnie_installdir" -bonnie_csv=/tmp/bonnie++-1.03a.csv.$USER -bonnie_log=/tmp/bonnie++-1.03a.log.$USER +bonnie_csv=/tmp/bonnie++-1.03e.csv.$USER +bonnie_log=/tmp/bonnie++-1.03e.log.$USER scratch_size=20 ram_size=10 diff --git a/test/automated/hadoop-tests.d/conf/core-site.xml b/test/automated/hadoop-tests.d/conf/core-site.xml new file mode 100644 index 0000000..1891594 --- /dev/null +++ b/test/automated/hadoop-tests.d/conf/core-site.xml @@ -0,0 +1,28 @@ + + + + + + + + + + fs.default.name + ofs://localhost + + + fs.ofs.impl + org.orangefs.hadoop.fs.ofs.OrangeFileSystem + An extension of filesystem for OrangeFS URIs. + + + fs.ofs.mntLocation + __MNT_LOCATION__ + Location of OrangeFS mount point. + + + io.file.buffer.size + 3145728 + + + diff --git a/test/automated/hadoop-tests.d/conf/mapred-site.xml b/test/automated/hadoop-tests.d/conf/mapred-site.xml new file mode 100644 index 0000000..44caefd --- /dev/null +++ b/test/automated/hadoop-tests.d/conf/mapred-site.xml @@ -0,0 +1,22 @@ + + + + + + + + mapred.job.tracker + __NODE001__:8021 + + + mapred.map.tasks.speculative.execution + false +true + + + mapred.reduce.tasks.speculative.execution + false +true + + + diff --git a/test/automated/kmod_ctrl.sh b/test/automated/kmod_ctrl.sh old mode 100644 new mode 100755 diff --git a/test/automated/mpiio-tests.d/functions b/test/automated/mpiio-tests.d/functions old mode 100644 new mode 100755 diff --git a/test/automated/mpiio-tests.d/heidelberg-IO b/test/automated/mpiio-tests.d/heidelberg-IO old mode 100644 new mode 100755 index 4f6f74a..8f33f8c --- a/test/automated/mpiio-tests.d/heidelberg-IO +++ b/test/automated/mpiio-tests.d/heidelberg-IO @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/ior-mpiio b/test/automated/mpiio-tests.d/ior-mpiio old mode 100644 new mode 100755 index ff38da4..15f754f --- a/test/automated/mpiio-tests.d/ior-mpiio +++ b/test/automated/mpiio-tests.d/ior-mpiio @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/ior-mpiio-2 b/test/automated/mpiio-tests.d/ior-mpiio-2 old mode 100644 new mode 100755 index 6bd6054..25d489c --- a/test/automated/mpiio-tests.d/ior-mpiio-2 +++ b/test/automated/mpiio-tests.d/ior-mpiio-2 @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/ior-mpiio-3 b/test/automated/mpiio-tests.d/ior-mpiio-3 old mode 100644 new mode 100755 index a2386fd..ba046a9 --- a/test/automated/mpiio-tests.d/ior-mpiio-3 +++ b/test/automated/mpiio-tests.d/ior-mpiio-3 @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/mpi-io-test b/test/automated/mpiio-tests.d/mpi-io-test old mode 100644 new mode 100755 index 87fc278..00dfe76 --- a/test/automated/mpiio-tests.d/mpi-io-test +++ b/test/automated/mpiio-tests.d/mpi-io-test @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/noncontig b/test/automated/mpiio-tests.d/noncontig old mode 100644 new mode 100755 index 7d6ce48..054995d --- a/test/automated/mpiio-tests.d/noncontig +++ b/test/automated/mpiio-tests.d/noncontig @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-async b/test/automated/mpiio-tests.d/romio-async old mode 100644 new mode 100755 index b67b728..568d0bc --- a/test/automated/mpiio-tests.d/romio-async +++ b/test/automated/mpiio-tests.d/romio-async @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-coll_test b/test/automated/mpiio-tests.d/romio-coll_test old mode 100644 new mode 100755 index 128f58c..e5c3869 --- a/test/automated/mpiio-tests.d/romio-coll_test +++ b/test/automated/mpiio-tests.d/romio-coll_test @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-error b/test/automated/mpiio-tests.d/romio-error old mode 100644 new mode 100755 index 9692cc2..5c282e7 --- a/test/automated/mpiio-tests.d/romio-error +++ b/test/automated/mpiio-tests.d/romio-error @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-excl b/test/automated/mpiio-tests.d/romio-excl old mode 100644 new mode 100755 index 050e120..b15a6f6 --- a/test/automated/mpiio-tests.d/romio-excl +++ b/test/automated/mpiio-tests.d/romio-excl @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-file_info b/test/automated/mpiio-tests.d/romio-file_info old mode 100644 new mode 100755 index 1b8694c..906abb0 --- a/test/automated/mpiio-tests.d/romio-file_info +++ b/test/automated/mpiio-tests.d/romio-file_info @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-noncontig_coll2 b/test/automated/mpiio-tests.d/romio-noncontig_coll2 old mode 100644 new mode 100755 index 9624910..65ff625 --- a/test/automated/mpiio-tests.d/romio-noncontig_coll2 +++ b/test/automated/mpiio-tests.d/romio-noncontig_coll2 @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-psimple b/test/automated/mpiio-tests.d/romio-psimple old mode 100644 new mode 100755 index fa3fde0..74895f8 --- a/test/automated/mpiio-tests.d/romio-psimple +++ b/test/automated/mpiio-tests.d/romio-psimple @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-simple b/test/automated/mpiio-tests.d/romio-simple old mode 100644 new mode 100755 index 477bb8c..5ec723e --- a/test/automated/mpiio-tests.d/romio-simple +++ b/test/automated/mpiio-tests.d/romio-simple @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-split_coll b/test/automated/mpiio-tests.d/romio-split_coll old mode 100644 new mode 100755 index 80e9eb9..56bd8f8 --- a/test/automated/mpiio-tests.d/romio-split_coll +++ b/test/automated/mpiio-tests.d/romio-split_coll @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/romio-status b/test/automated/mpiio-tests.d/romio-status old mode 100644 new mode 100755 index 664c245..7a76ba0 --- a/test/automated/mpiio-tests.d/romio-status +++ b/test/automated/mpiio-tests.d/romio-status @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/mpiio-tests.d/stadler-file-view-test b/test/automated/mpiio-tests.d/stadler-file-view-test old mode 100644 new mode 100755 index 17e2ab6..4277bd0 --- a/test/automated/mpiio-tests.d/stadler-file-view-test +++ b/test/automated/mpiio-tests.d/stadler-file-view-test @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -. functions +source ./functions ## ## entry point for script diff --git a/test/automated/pvfs2tests.py b/test/automated/pvfs2tests.py old mode 100644 new mode 100755 diff --git a/test/automated/run-cron-adenine.sh b/test/automated/run-cron-adenine.sh old mode 100644 new mode 100755 diff --git a/test/automated/run-cron-heroin.sh b/test/automated/run-cron-heroin.sh old mode 100644 new mode 100755 diff --git a/test/automated/run-test-adenine.sh b/test/automated/run-test-adenine.sh old mode 100644 new mode 100755 diff --git a/test/automated/simple.sh b/test/automated/simple.sh old mode 100644 new mode 100755 diff --git a/test/automated/single-node-kernel-test.sh b/test/automated/single-node-kernel-test.sh old mode 100644 new mode 100755 diff --git a/test/automated/start_pvfs2.sh b/test/automated/start_pvfs2.sh new file mode 100755 index 0000000..7b6bf95 --- /dev/null +++ b/test/automated/start_pvfs2.sh @@ -0,0 +1,21 @@ +#/bin/bash + +#parameters are MY_PVFS2_DEST and MY_CVS_TAG + +. `pwd`/testfunctions.sh + +echo "Attempting to start pvfs2 on $HOSTNAME" + + + +PVFS2_DEST=$1 +CVS_TAG=$2 +if [ ! $LD_LIBRARY_PATH ] +then + export LD_LIBRARY_PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib:/opt/db4/lib +else + export LD_LIBRARY_PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib:/opt/db4/lib:${LD_LIBRARY_PATH} +fi + +cd $PVFS2_DEST +teardown_pvfs2 && start_pvfs2 \ No newline at end of file diff --git a/test/automated/sysint-tests.d/cp b/test/automated/sysint-tests.d/cp old mode 100644 new mode 100755 diff --git a/test/automated/sysint-tests.d/misc b/test/automated/sysint-tests.d/misc old mode 100644 new mode 100755 diff --git a/test/automated/sysint-tests.d/mkdir-sysint b/test/automated/sysint-tests.d/mkdir-sysint old mode 100644 new mode 100755 diff --git a/test/automated/sysint-tests.d/ping b/test/automated/sysint-tests.d/ping old mode 100644 new mode 100755 diff --git a/test/automated/sysint-tests.d/symlink-sysint b/test/automated/sysint-tests.d/symlink-sysint old mode 100644 new mode 100755 diff --git a/test/automated/sysint-tests.d/zerofill b/test/automated/sysint-tests.d/zerofill old mode 100644 new mode 100755 diff --git a/test/automated/tacl_xattr.sh b/test/automated/tacl_xattr.sh old mode 100644 new mode 100755 diff --git a/test/automated/testfunctions.sh b/test/automated/testfunctions.sh new file mode 100755 index 0000000..f3afcbf --- /dev/null +++ b/test/automated/testfunctions.sh @@ -0,0 +1,418 @@ +# #!/bin/bash +# testfunction - list of common functions for test programs +# i'm not married to bash. just wanted to get things prototyped + +# prereqs: +# - $user needs to be in the sudoers file +# - $user needs to be able to sudo w/o prompting +# - please don't cheat and run this as root: will not catch permissions bugs + +# set ENABLE_SECURITY to build with security +# set SECURITY_FAIL to test that security will fail - SSS + +# you can override these settings in nightly-tests.cfg +export PVFS2_DEST=/tmp/pvfs2-nightly +export PVFS2_MOUNTPOINT=/pvfs2-nightly +export EXTRA_TESTS=/tmp/${USER}/src/benchmarks +#export EXTRA_TESTS=/tmp/src/benchmarks +export URL=http://devorange.clemson.edu/pvfs +export BENCHMARKS=benchmarks-20121017.tar.gz + +# look for a 'nightly-test.cfg' in the same directory as this script +if [ -f /tmp/$USER/nightly-tests.cfg ] ; then + . /tmp/$USER/nightly-tests.cfg +fi + + +# need to make this a command line arugment: +export CVS_TAG="${CVS_TAG:-HEAD}" + +if [ $ENABLE_SECURITY ] ; then + sec_dir=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/etc +fi + +export CVS_TAG_FULL="${CVS_TAG:-HEAD}" +export CVS_TAG=`echo $CVS_TAG_FULL | awk -F"/" '{print $NF}'` +# no need to modify these. they make their own gravy +STARTTIME=`date +%s` +TINDERSCRIPT=$(cd `dirname $0`; pwd)/tinder-pvfs2-status +#SYSINT_SCRIPTS=~+/sysint-tests.d +export SYSINT_SCRIPTS=`pwd`/sysint-tests.d +export VFS_SCRIPTS=`pwd`/vfs-tests.d +export USERLIB_SCRIPTS=`pwd`/userint-tests.d +#VFS_SCRIPTS=~+/vfs-tests.d +VFS_SCRIPT="dbench" +MPIIO_DRIVER=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/testscrpt-mpi.sh +REPORT_LOG=${PVFS2_DEST}/alltests-${CVS_TAG}.log +REPORT_ERR=${PVFS2_DEST}/alltests-${CVS_TAG}.err +BENCHMARKS=benchmarks-20121017.tar.gz + +# for debugging and testing, you might need to set the above to your working +# direcory.. .unless you like checking in broken scripts +#SYSINT_SCRIPTS=$(cd `dirname $0`; pwd)/sysint-tests.d +#VFS_SCRIPTS=$(cd `dirname $0`; pwd)/vfs-tests.d +MPIIO_DRIVER=$(cd `dirname $0`; pwd)/testscrpt-mpi.sh + +HOSTNAME=`hostname -s 2> /dev/null || hostname` +TESTNAME="${HOSTNAME}-nightly" + +# before starting any client apps, we need to deal with the possiblity that we +# might have built with shared libraries +#export LD_LIBRARY_PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib:${LD_LIBRARY_PATH} + +# we only have a few hosts that meet all the earlier stated prereqs +if [ ! "$VFS_HOSTS" ] +then +VFS_HOSTS=$HOSTNAME +fi +#VFS_HOSTS="badname" +# +# Detect basic heap corruption +# +export MALLOC_CHECK_=2 +# takes one argument: a tag or branch in CVS +pull_and_build_pvfs2 () { + # debugging aide... when we run this script repeatedly, we don't + # really need to build everything again + [ -n "$SKIP_BUILDING_PVFS2" ] && return 0 + + mkdir -p $PVFS2_DEST + with_kernel="" + if [ $do_vfs -eq 1 ] ; then + with_kernel="-k /lib/modules/`uname -r`/build" + fi + with_security="" + if [ $ENABLE_SECURITY ] ; then + with_security="-s" + fi + # a bit of gross shell hackery, but cuts down on the number of + # v-ariables we have to set. Assumes we ran this script out of a + # checked out pvfs2 tree + $(cd `dirname $0`;pwd)/../../maint/build/pvfs2-build.sh -t -v $1 \ + $with_kernel $with_security -r $PVFS2_DEST + +} + +pull_and_build_mpich2 () { + # just to make debugging less painful + [ -n "${SKIP_BUILDING_MPICH2}" ] && return 0 + [ -d ${PVFS2_DEST} ] || mkdir ${PVFS2_DEST} + cd ${PVFS2_DEST} + rm -rf mpich2-*.tar.gz + #wget http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.5/mpich2-1.5.tar.gz + wget --quiet http://devorange.clemson.edu/pvfs/mpich2-1.5.tar.gz + #wget --passive-ftp --quiet 'ftp://ftp.mcs.anl.gov/pub/mpi/misc/mpich2snap/mpich2-snap-*' -O mpich2-latest.tar.gz + rm -rf mpich2-snap-* + #tar xzf mpich2-latest.tar.gz + tar xzf mpich2-1.5.tar.gz + mv mpich2-1.5 mpich2-snapshot + cd mpich2-snapshot + mkdir build + cd build + ../configure -q --prefix=${PVFS2_DEST}/soft/mpich2 \ + --enable-romio --with-file-system=ufs+nfs+testfs+pvfs2 \ + --with-pvfs2=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG} \ + --enable-g=dbg --without-mpe \ + --disable-f77 --disable-fc >mpich2config-${CVS_TAG}.log &&\ + make > mpich2make-$CVSTAG.log 2> /dev/null && make install > mpich2install-${CVSTAG} 2> /dev/null +} + + +teardown_vfs() { + mount | grep -q $PVFS2_MOUNTPOINT && sudo umount $PVFS2_MOUNTPOINT + ps -e | grep -q pvfs2-client && sudo killall pvfs2-client + sleep 1 + /sbin/lsmod | grep -q pvfs2 && sudo /sbin/rmmod pvfs2 + # let teardown always succeed. pvfs2-client might already be killed + # and pvfs2 kernel module might not be loaded yet + return 0 +} + +setup_vfs() { + #sudo dmesg -c >/dev/null + sudo /sbin/insmod ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/modules/`uname -r`/kernel/fs/pvfs2/pvfs2.ko &> pvfs2-kernel-module.log + sudo /sbin/lsmod >> pvfs2-kernel-module.log +# sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client \ +# -p ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core \ +# -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log + # sudo screen -d -m cgdb -x ${PVFS2_DEST}/.gdbinit --args ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log + #sudo valgrind --log-file=${PVFS2_DEST}/pvfs2-client.vg ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log & + keypath="" + if [ $ENABLE_SECURITY ] ; then + keypath="--keypath ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/etc/clientkey.pem" + fi + sudo ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client \ + -p ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core \ + -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log \ + $keypath + sudo chmod 644 ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log + echo "Mounting pvfs2 service at tcp://${HOSTNAME}:3396/pvfs2-fs at mountpoint $PVFS2_MOUNTPOINT" + sudo mount -t pvfs2 tcp://${HOSTNAME}:3396/pvfs2-fs ${PVFS2_MOUNTPOINT} + + if [ $? -ne 0 ] + then + echo "Something has gone wrong. Mount failed." + fi + mount > allmount.log +} + +check_openssl() { + if [ $? -ne 0 ] ; then + echo "OpenSSL error:" 1>&2 + cat ${sec_dir}/error.tmp 1>&2 + fi +} + +setup_security() { + echo "....initializing security" + which openssl > /dev/null 2>&1 + if [ $? -ne 0 ] ; then + echo "openssl must be installed for security mode" + return 1 + fi + mkdir -p $sec_dir + # remove existing files + rm -f ${sec_dir}/* + # generate client private key + openssl genrsa -out ${sec_dir}/clientkey.pem 1024 > /dev/null \ + 2> ${sec_dir}/error.tmp + check_openssl + for alias in `grep 'Alias ' fs.conf | cut -d ' ' -f 2`; do + # output client public key to keystore, unless security + # is intended to fail + if [ ! $SECURITY_FAIL ] ; then + echo "C:${HOSTNAME}" >> ${sec_dir}/keystore-${alias} + openssl rsa -in ${sec_dir}/clientkey.pem -pubout >> \ + ${sec_dir}/keystore-${alias} 2> ${sec_dir}/error.tmp + check_openssl + fi + # generate server private key + openssl genrsa -out ${sec_dir}/serverkey-${alias}.pem 2048 \ + > /dev/null 2> ${sec_dir}/error.tmp + check_openssl + # output server public key to keystore files + for keystore_alias in `grep 'Alias ' fs.conf | cut -d ' ' -f 2`; do + echo "S:${alias}" >> ${sec_dir}/keystore-${keystore_alias} + openssl rsa -in ${sec_dir}/serverkey-${alias}.pem \ + -pubout >> ${sec_dir}/keystore-${keystore_alias} \ + 2> ${sec_dir}/error.tmp + check_openssl + done + done + # set client key location + export PVFS2KEY_FILE=${sec_dir}/clientkey.pem + rm -f ${sec_dir}/error.tmp +} + + +configure_pvfs2() { + + echo "PVFS2_DEST is $PVFS2_DEST" + cd $PVFS2_DEST + mkdir mount + rm -f fs.conf + sec_args="" + if [ $ENABLE_SECURITY ] ; then + sec_args="--keystore=${sec_dir}/keystore-_ALIAS_ " + sec_args+="--serverkey=${sec_dir}/serverkey-_ALIAS_.pem" + fi + MY_VFS_HOSTS=`echo $VFS_HOSTS | sed s/' '/':3396,'/g` + INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-genconfig fs.conf \ + --protocol tcp \ + --iospec="${MY_VFS_HOSTS}:3396" \ + --metaspec="${MY_VFS_HOSTS}:3396" \ + --storage ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG} \ + $sec_args \ + --logfile=${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log --quiet + # generate security keys + if [ $ENABLE_SECURITY ] ; then + setup_security + if [ $? -ne 0 ] ; then + return 1 + fi + fi + +} + +start_pvfs2() { + + # clean up any artifacts from earlier runs + #export ${PRELOAD} + cd ${PVFS2_DEST} + rm -rf ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG}* + rm -f ${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* + failure_logs="${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* $failure_logs" + for alias in `grep 'Alias ' fs.conf | grep ${HOSTNAME} | cut -d ' ' -f 2`; do + ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \ + -p `pwd`/pvfs2-server-${alias}.pid \ + -f fs.conf -a $alias + ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \ + -p `pwd`/pvfs2-server-${alias}.pid \ + fs.conf $server_conf -a $alias + done + + # give the servers time to finish all their initialization tasks + sleep 10 + + echo "tcp://${HOSTNAME}:3396/pvfs2-fs ${PVFS2_MOUNTPOINT} pvfs2 defaults 0 0" > ${PVFS2_DEST}/pvfs2tab + # do we need to use our own pvfs2tab file? If we will mount pvfs2, we + # can fall back to /etc/fstab + grep -q 'pvfs2-nightly' /etc/fstab + #if [ $? -ne 0 -a $do_vfs -eq 0 ] ; then + # export PVFS2TAB_FILE=${PVFS2_DEST}/pvfs2tab + #fi + #turn on debugging on each server + export PVFS2TAB_FILE=${PVFS2_DEST}/pvfs2tab + echo "....setting server-side debug mask" + INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-debugmask -m ${PVFS2_MOUNTPOINT} "all" +} + +setup_pvfs2() { + configure_pvfs2 && start_pvfs2 + +} + +teardown_pvfs2() { + for pidfile in ${PVFS2_DEST}/pvfs2-server*.pid ; do + [ ! -f $pidfile ] && continue + + kill `cat $pidfile` + # occasionally the server ends up in a hard-to-kill state. + # server has atexit(3) remove .pid file + sleep 3 + if [ -f $pidfile ] ; then + kill -9 `cat $pidfile` + fi + done + + # let teardown always succeed. pvfs2-server.pid could be stale + return 0 +} + +buildfail() { + echo "Failure in build process" + cat ${PVFS2_DEST}/configure-${CVS_TAG}.log \ + ${PVFS2_DEST}/make-extracted-${CVS_TAG}.log \ + ${PVFS2_DEST}/make-install-${CVS_TAG}.log \ + ${PVFS2_DEST}/make-${CVS_TAG}.log \ + ${PVFS2_DEST}/make-test-${CVS_TAG}.log | \ + ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} build_failed $STARTTIME + exit 1 +} + +setupfail() { + echo "Failure in setup" + dmesg > ${PVFS2_DEST}/dmesg + cat ${PVFS2_DEST}/dmesg ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log \ + ${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* | \ + ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} test_failed $STARTTIME + exit 1 +} + +tinder_report() { + eval cat $REPORT_LOG $failure_logs |\ + ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} $1 $STARTTIME \ + "$nr_failed of $(( $nr_failed + $nr_passed)) failed" +} + +testfail() { + echo "Failure in testing" + tinder_report test_failed + exit 1 +} + +# idea stolen from debian: for a given directory, run every executable file +run_parts() { + echo "Running $1 Starting from `pwd`" + cd $1 + echo "Currently at `pwd`" + TESTS=$(basename `pwd`) + + for f in *; do + # skip CVS + [ -d $f ] && continue + if [ -x $f ] ; then + echo -n "====== `date` == running $f ..." + ./$f > ${PVFS2_DEST}/${TESTS}-${f}-${CVS_TAG}.log + if [ $? -eq 0 ] ; then + nr_passed=$((nr_passed + 1)) + echo "OK" + else + nr_failed=$((nr_failed + 1)) + failure_logs="$failure_logs ${PVFS2_DEST}/${TESTS}-${f}-${CVS_TAG}.log" + echo "FAILED" + fi + fi + done +} + +#run only one script +run_one() { + cd $1 + echo -n "===== `date` == running ${1}/${2} ..." + ${1}/${2} > ${PVFS2_DEST}/${2}-${CVS_TAG}.log + if [ $? -eq 0 ] ; then + nr_passed=$((nr_passed + 1)) + echo "OK" + else + nr_failed=$((nr_failed + 1)) + failure_logs="$failure_logs ${PVFS2_DEST}/${2}-${CVS_TAG}.log" + echo "FAILED" + fi +} + +copy_pvfs2() { +#$1 is the vfs server +my_host=$1 + +if [ ! $KEYFILE ] +then + #A bit naive, but there should only be one keyfile in the home directory. + KEYFILE=`ls ~/*.pem` +fi +VMUSER=`basename ~` + + + # verify /home/${VMUSER}/${KEYFILESHORT} exists + + if [ $my_host != ${HOSTNAME} ] + then + echo "Copying PVFS2... to $my_host" + echo "ssh -i ${KEYFILE} ${VMUSER}@${my_host} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \"mkdir -p ${PVFS2_DEST}\"" + ssh -i ${KEYFILE} ${VMUSER}@${my_host} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "mkdir -p ${PVFS2_DEST}" + + echo "rsync -a -e \"ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\" ${PVFS2_DEST}/ ${VMUSER}@${my_host}:${PVFS2_DEST}" + rsync -a -e "ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ${PVFS2_DEST}/ ${VMUSER}@${my_host}:${PVFS2_DEST} + + fi + + +} + +start_all_pvfs2() { + + #$1 is the vfs server + + my_host=$1 + + if [ ! $KEYFILE ] + then + #A bit naive, but there should only be one keyfile in the home directory. + KEYFILE=`ls ~/*.pem` + fi + VMUSER=`basename ~` + + + if [ $my_host != ${HOSTNAME} ] + then + + echo "Starting PVFS2 on $my_host" + echo "ssh -i ${KEYFILE} ${VMUSER}@${my_host} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \"cd ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/ && ./start_pvfs2.sh\"" + ssh -i ${KEYFILE} ${VMUSER}@${my_host} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "cd ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/ && ./start_pvfs2.sh $PVFS2_DEST $CVS_TAG " + + else + echo "Starting PVFS2 on $my_host" + start_pvfs2 + fi + +} diff --git a/test/automated/testscrpt-mpi.sh b/test/automated/testscrpt-mpi.sh old mode 100644 new mode 100755 diff --git a/test/automated/testscrpt.sh b/test/automated/testscrpt.sh old mode 100644 new mode 100755 index 0e71ff6..a7dbd46 --- a/test/automated/testscrpt.sh +++ b/test/automated/testscrpt.sh @@ -1,243 +1,8 @@ -#!/bin/sh - -# i'm not married to bash. just wanted to get things prototyped - -# prereqs: -# - $user needs to be in the sudoers file -# - $user needs to be able to sudo w/o prompting -# - please don't cheat and run this as root: will not catch permissions bugs - -# you can override these settings in nightly-tests.cfg -export PVFS2_DEST=/tmp/pvfs2-nightly -export PVFS2_MOUNTPOINT=/pvfs2-nightly -export EXTRA_TESTS=/tmp/${USER}/src/benchmarks -#export EXTRA_TESTS=/tmp/src/benchmarks -export URL=http://devorange.clemson.edu/pvfs -export BENCHMARKS=benchmarks-20060512.tar.gz - -# look for a 'nightly-test.cfg' in the same directory as this script -if [ -f /tmp/$USER/nightly-tests.cfg ] ; then - . /tmp/$USER/nightly-tests.cfg -fi - - -# need to make this a command line arugment: -export CVS_TAG="${CVS_TAG:-HEAD}" - -# no need to modify these. they make their own gravy -STARTTIME=`date +%s` -TINDERSCRIPT=$(cd `dirname $0`; pwd)/tinder-pvfs2-status -SYSINT_SCRIPTS=~+/sysint-tests.d -VFS_SCRIPTS=~+/vfs-tests.d -VFS_SCRIPT="dbench" -MPIIO_DRIVER=${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/automated/testscrpt-mpi.sh -REPORT_LOG=${PVFS2_DEST}/alltests-${CVS_TAG}.log -BENCHMARKS=benchmarks-20060512.tar.gz - -# for debugging and testing, you might need to set the above to your working -# direcory.. .unless you like checking in broken scripts -#SYSINT_SCRIPTS=$(cd `dirname $0`; pwd)/sysint-tests.d -#VFS_SCRIPTS=$(cd `dirname $0`; pwd)/vfs-tests.d -MPIIO_DRIVER=$(cd `dirname $0`; pwd)/testscrpt-mpi.sh - -TESTNAME="`hostname -s`-nightly" - -# before starting any client apps, we need to deal with the possiblity that we -# might have built with shared libraries -export LD_LIBRARY_PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib:${LD_LIBRARY_PATH} - -# we only have a few hosts that meet all the earlier stated prereqs -VFS_HOSTS="devorange2 devorange35 andy jeffrey" - -# -# Detect basic heap corruption -# -export MALLOC_CHECK_=2 - -# takes one argument: a tag or branch in CVS -pull_and_build_pvfs2 () { - # debugging aide... when we run this script repeatedly, we don't - # really need to build everything again - [ -n "$SKIP_BUILDING_PVFS2" ] && return 0 - - mkdir -p $PVFS2_DEST - with_kernel="" - if [ $do_vfs -eq 1 ] ; then - with_kernel="-k /lib/modules/`uname -r`/build" - fi - # a bit of gross shell hackery, but cuts down on the number of - # variables we have to set. Assumes we ran this script out of a - # checked out pvfs2 tree - $(cd `dirname $0`;pwd)/../../maint/build/pvfs2-build.sh -t -v $1 \ - $with_kernel -r $PVFS2_DEST - -} - -pull_and_build_mpich2 () { - # just to make debugging less painful - [ -n "${SKIP_BUILDING_MPICH2}" ] && return 0 - [ -d ${PVFS2_DEST} ] || mkdir ${PVFS2_DEST} - cd ${PVFS2_DEST} - rm -rf mpich2-latest.tar.gz - wget --passive-ftp --quiet 'ftp://ftp.mcs.anl.gov/pub/mpi/misc/mpich2snap/mpich2-snap-*' -O mpich2-latest.tar.gz - rm -rf mpich2-snap-* - tar xzf mpich2-latest.tar.gz - cd mpich2-snap-* - mkdir build - cd build - ../configure -q --prefix=${PVFS2_DEST}/soft/mpich2 \ - --enable-romio --with-file-system=ufs+nfs+testfs+pvfs2 \ - --with-pvfs2=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG} \ - --enable-g=dbg --without-mpe \ - --disable-f77 >mpich2config-${CVS_TAG}.log &&\ - make >/dev/null && make install >/dev/null -} - - -teardown_vfs() { - sudo umount $PVFS2_MOUNTPOINT - sudo killall pvfs2-client - sleep 1 - sudo /sbin/rmmod pvfs2 - # let teardown alway ssucceed. pvfs2-client might already be killed - # and pvfs2 kernel module might not be loaded yet - return 0 -} - -setup_vfs() { - sudo dmesg -c >/dev/null - sudo /sbin/insmod ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/modules/`uname -r`/kernel/fs/pvfs2/pvfs2.ko -# sudo LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client \ -# -p ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core \ -# -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log - # sudo screen -d -m cgdb -x ${PVFS2_DEST}/.gdbinit --args ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log - #sudo valgrind --log-file=${PVFS2_DEST}/pvfs2-client.vg ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log & - sudo ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client -p ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-client-core -L ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log - sudo chmod 644 ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log - sudo mount -t pvfs2 tcp://`hostname -s`:3399/pvfs2-fs ${PVFS2_MOUNTPOINT} -} - -setup_pvfs2() { - cd $PVFS2_DEST - rm -f fs.conf - INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-genconfig fs.conf \ - --protocol tcp \ - --iospec="`hostname -s`:{3396-3399}" \ - --metaspec="`hostname -s`:{3396-3399}" \ - --storage ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG} \ - --logfile=${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log --quiet - # clean up any artifacts from earlier runs - rm -rf ${PVFS2_DEST}/STORAGE-pvfs2-${CVS_TAG}* - rm -f ${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* - failure_logs="${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* $failure_logs" - for alias in `grep 'Alias ' fs.conf | cut -d ' ' -f 2`; do - INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \ - -p `pwd`/pvfs2-server-${alias}.pid \ - -f fs.conf -a $alias - INSTALL-pvfs2-${CVS_TAG}/sbin/pvfs2-server \ - -p `pwd`/pvfs2-server-${alias}.pid \ - fs.conf $server_conf -a $alias - done - - echo "tcp://`hostname -s`:3399/pvfs2-fs ${PVFS2_MOUNTPOINT} pvfs2 defaults 0 0" > ${PVFS2_DEST}/pvfs2tab - # do we need to use our own pvfs2tab file? If we will mount pvfs2, we - # can fall back to /etc/fstab - grep -q 'pvfs2-nightly' /etc/fstab - if [ $? -ne 0 -a $do_vfs -eq 0 ] ; then - export PVFS2TAB_FILE=${PVFS2_DEST}/pvfs2tab - fi - #turn on degging on each server - export PVFS2TAB_FILE=${PVFS2_DEST}/pvfs2tab - echo "....setting server-side debug mask" - INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-set-debugmask -m ${PVFS2_MOUNTPOINT} "all" -} - -teardown_pvfs2() { - for pidfile in ${PVFS2_DEST}/pvfs2-server*.pid ; do - [ ! -f $pidfile ] && continue - - kill `cat $pidfile` - # occasionally the server ends up in a hard-to-kill state. - # server has atexit(3) remove .pid file - sleep 3 - if [ -f $pidfile ] ; then - kill -9 `cat $pidfile` - fi - done +#/bin/bash - # let teardown always succeed. pvfs2-server.pid could be stale - return 0 -} - -buildfail() { - echo "Failure in build process" - cat ${PVFS2_DEST}/configure-${CVS_TAG}.log \ - ${PVFS2_DEST}/make-extracted-${CVS_TAG}.log \ - ${PVFS2_DEST}/make-install-${CVS_TAG}.log \ - ${PVFS2_DEST}/make-${CVS_TAG}.log \ - ${PVFS2_DEST}/make-test-${CVS_TAG}.log | \ - ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} build_failed $STARTTIME - exit 1 -} - -setupfail() { - echo "Failure in setup" - dmesg > ${PVFS2_DEST}/dmesg - cat ${PVFS2_DEST}/dmesg ${PVFS2_DEST}/pvfs2-client-${CVS_TAG}.log \ - ${PVFS2_DEST}/pvfs2-server-${CVS_TAG}.log* | \ - ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} test_failed $STARTTIME - exit 1 -} - -tinder_report() { - eval cat $REPORT_LOG $failure_logs |\ - ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} $1 $STARTTIME \ - "$nr_failed of $(( $nr_failed + $nr_passed)) failed" -} - -testfail() { - echo "Failure in testing" - tinder_report test_failed - exit 1 -} - -# idea stolen from debian: for a given directory, run every executable file -run_parts() { - cd $1 - for f in *; do - # skip CVS - [ -d $f ] && continue - if [ -x $f ] ; then - echo -n "====== `date` == running $f ..." - ./$f > ${PVFS2_DEST}/${f}-${CVS_TAG}.log - if [ $? -eq 0 ] ; then - nr_passed=$((nr_passed + 1)) - echo "OK" - else - nr_failed=$((nr_failed + 1)) - failure_logs="$failure_logs ${PVFS2_DEST}/${f}-${CVS_TAG}.log" - echo "FAILED" - fi - fi - done -} - -#run only one script -run_one() { - cd $1 - echo -n "===== `date` == running ${1}/${2} ..." - ${1}/${2} > ${PVFS2_DEST}/${2}-${CVS_TAG}.log - if [ $? -eq 0 ] ; then - nr_passed=$((nr_passed + 1)) - echo "OK" - else - nr_failed=$((nr_failed + 1)) - failure_logs="$failure_logs ${PVFS2_DEST}/${2}-${CVS_TAG}.log" - echo "FAILED" - fi -} +. `pwd`/testfunctions.sh ### -### entry point for script +### entry point for testscript ### # show that we're doing something @@ -245,13 +10,20 @@ ${TINDERSCRIPT} ${TESTNAME}-${CVS_TAG} building $STARTTIME ${REPORT_LOG} -exec 2>&1 -echo "running sysint scripts" -run_parts ${SYSINT_SCRIPTS} +# Now start running tests + +# Make all of the test sections controlled by vars the same way +do_sysint=1 +echo "running SYSINT scripts------------------------------------" + +if [ $do_sysint -eq 1 ] ; then + # save file descriptors for later + exec 6<&1 + exec 7<&2 + + exec 1>> ${REPORT_LOG} + exec 2>> ${REPORT_ERR} + echo "running SYSINT scripts------------------------------------" + + echo "Environment variables for sysint" + env | tee sysint-env.log + + + run_parts ${SYSINT_SCRIPTS} + + # restore file descriptors and close temporary fds + exec 1<&6 6<&- + exec 2<&7 7<&- +fi + echo "running VFS scripts---------------------------------------" + +if [ $do_vfs -eq 1 ] +then + # save file descriptors for later + exec 6<&1 + exec 7<&2 + + exec 1>> ${REPORT_LOG} + exec 2>> ${REPORT_ERR} + echo "running VFS scripts---------------------------------------" + + echo "Environment variables for vfs" + env | tee vfs-env.log -if [ $do_vfs -eq 1 ] ; then - echo "running vfs scripts" export VFS_SCRIPTS run_parts ${VFS_SCRIPTS} # run_one ${VFS_SCRIPTS} ${VFS_SCRIPT} + +# restore file descriptors and close temporary fds + exec 1<&6 6<&- + exec 2<&7 7<&- fi # down the road (as we get our hands on more clusters) we'll need a more # generic way of submitting jobs. for now assume all the world has pbs -which qsub >/dev/null 2>&1 -if [ $? -eq 0 ] ; then - # go through the hassle of downloading/building mpich2 only if we are - # actually going to use it - pull_and_build_mpich2 || buildfail - . $MPIIO_DRIVER + + echo "running MPI scripts----------------------------------------" +if [ $RUN_MPI_TEST ] +then + # save file descriptors for later + exec 6<&1 + exec 7<&2 + + exec 1>> ${REPORT_LOG} + exec 2>> ${REPORT_ERR} + echo "running MPI scripts----------------------------------------" + + echo "Environment variables for mpi" + env | tee mpi-env.log + + which qsub >/dev/null 2>&1 + if [ $? -eq 0 ] ; then + + # echo "" + #echo "Found qsub at `which qsub`" + # echo "running mpi scripts" + # go through the hassle of downloading/building + # mpich2 only if we are + # actually going to use it + pull_and_build_mpich2 || buildfail + source $MPIIO_DRIVER + . $MPIIO_DRIVER + cd .. + + fi +# restore file descriptors and close temporary fds + exec 1<&6 6<&- + exec 2<&7 7<&- fi -# restore file descriptors and close temporary fds -exec 1<&6 6<&- -exec 2<&7 7<&- +echo "Current directory is `pwd`" +echo "Run userlib test = $RUN_USERLIB_TEST" + + echo "running USRLIB scripts-------------------------------------" +# run userlib tests first before starting client +if [ $RUN_USERLIB_TEST ] +then + + teardown_vfs + + #OLD_LD_PRELOAD=$LD_PRELOAD + #if [ $LD_PRELOAD ] + #then + # export LD_PRELOAD=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libofs.so:${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libpvfs2.so:$LD_PRELOAD + #else + # export LD_PRELOAD=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libofs.so:${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libpvfs2.so + #fi + + export PRELOAD="LD_PRELOAD=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libofs.so:${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/lib/libpvfs2.so" + + for my_host in $VFS_HOSTS + do + start_all_pvfs2 $my_host & + done + + wait + + if [ $? != 0 ] ; then + echo "setup failed" + setupfail + fi + + # save file descriptors for later + exec 6<&1 + exec 7<&2 + + exec 1>> ${REPORT_LOG} + exec 2>> ${REPORT_ERR} + echo "running USRLIB scripts-------------------------------------" + # print out the current environment to a logfile + echo "Environment for userlib testing" + env | tee userlib-env.log + + run_parts ${USERLIB_SCRIPTS} + + #LD_PRELOAD=$OLD_LD_PRELOAD + + # restore file descriptors and close temporary fds + exec 1<&6 6<&- + exec 2<&7 7<&- +fi if [ -f $PVFS2_DEST/pvfs2-built-with-warnings -o \ -f ${PVFS2_DEST}/pvfs2-test-built-with-warnings ] ; then @@ -362,5 +282,5 @@ else tinder_report success fi -#[ $do_vfs -eq 1 ] && teardown_vfs -#teardown_pvfs2 +[ $do_vfs -eq 1 ] && teardown_vfs +teardown_pvfs2 diff --git a/test/automated/tinder-pvfs2-status b/test/automated/tinder-pvfs2-status old mode 100644 new mode 100755 diff --git a/test/automated/tinder-pvfs2-status.orig b/test/automated/tinder-pvfs2-status.orig new file mode 100755 index 0000000..a88857c --- /dev/null +++ b/test/automated/tinder-pvfs2-status.orig @@ -0,0 +1,68 @@ +#!/usr/bin/perl -w + +use strict; + +require HTTP::Request; +require LWP::UserAgent; + +if($#ARGV < 2) +{ + print "\nusage: tinder-pvfs2-status " . + " [status info]\n\n"; + exit 1; +} + +my $buildname=shift @ARGV; +my $status=shift @ARGV; +my $starttime=shift @ARGV; + +my $binfo = ""; +if($#ARGV > -1) +{ + $binfo = "TinderboxPrint: " . join(" ", @ARGV); +} + +my $admin="slang\@mcs.anl.gov"; +my $datestr=time(); + +my $logoutput = ""; +my $line; +while (defined($line = )) +{ + $logoutput .= $line; +} + +my $msg = <<"BODYEOF"; + +tinderbox: administrator: $admin +tinderbox: starttime: $starttime +tinderbox: buildname: $buildname +tinderbox: status: $status +tinderbox: timenow: $datestr +tinderbox: tree: PVFS2 +tinderbox: errorparser: unix +tinderbox: END + +$binfo + +$logoutput + +BODYEOF +; + +my $req = HTTP::Request->new( + "POST" => "http://www.pvfs.org/cgi-bin/pvfs2/tinderbox2/process_build" ); +$req->content( $msg ); + +my $ua = LWP::UserAgent->new; + +my $resp = $ua->request( $req ); +if( $resp->is_success ) +{ + print $resp->content; +} +else +{ + die $resp->status_line; +} + diff --git a/test/automated/usrint-tests.d/append b/test/automated/usrint-tests.d/append new file mode 100755 index 0000000..c3020da --- /dev/null +++ b/test/automated/usrint-tests.d/append @@ -0,0 +1,3 @@ +#!/bin/bash + +export "${PRELOAD}" && bash ./shell-scripts/append.sh diff --git a/test/automated/usrint-tests.d/append2 b/test/automated/usrint-tests.d/append2 new file mode 100755 index 0000000..1a8553b --- /dev/null +++ b/test/automated/usrint-tests.d/append2 @@ -0,0 +1,3 @@ +#!/bin/bash + +export ${PRELOAD} && bash shell-scripts/append2.sh diff --git a/test/automated/usrint-tests.d/bonnie b/test/automated/usrint-tests.d/bonnie new file mode 100755 index 0000000..9a39a91 --- /dev/null +++ b/test/automated/usrint-tests.d/bonnie @@ -0,0 +1,6 @@ +#!/bin/sh + +cd ${EXTRA_TESTS}/bonnie++-1.03e +./configure -q && make 2>&1 && cd ${PVFS2_MOUNTPOINT} || exit 1 +cd ${PVFS2_MOUNTPOINT} && \ + export ${PRELOAD} && ${EXTRA_TESTS}/bonnie++-1.03e/bonnie++ -n 1:0:0:1 -r 8 -s 16 2>&1 diff --git a/test/automated/usrint-tests.d/dbench b/test/automated/usrint-tests.d/dbench new file mode 100755 index 0000000..ff28fc6 --- /dev/null +++ b/test/automated/usrint-tests.d/dbench @@ -0,0 +1,67 @@ +#!/bin/sh + +#this script assumes that the benchmark tar file is already copied into $EXTRA_TESTS +if [ ! $BENCHMARKS ] +then + #this is the existing name of the tar file + BENCHMARKS=benchmarks-20121017.tar.gz +fi + +#make directory, if it doesn't exist +mkdir -p ${EXTRA_TESTS}/dbench-3.03 + +#capture current working directory +cwd=`pwd` + +#do we need to build dbench? +if [ ! -f ${EXTRA_TESTS}/dbench-3.03/dbench ] +then + #goto benchmark directory and cleanup + cd ${EXTRA_TESTS}/dbench-3.03 + make clean + sudo /bin/rm -rf dbench-3.03 + + #go back + cd .. + + + #untar the dbench directory + tar -xzf --wildcards ${BENCHMARKS} benchmarks/dbench-3.03/* + + #goto the dbench directory + cd benchmarks/dbench-3.03 + + #configure the dbench software + ./configure -q + + #apply patches + patch -p3 < ${USERLIB_SCRIPTS}/dbench.patch + +# if [ "${?}" != 0 ] +# then + # echo "Error: failed to apply patches to DBENCH." + # cd $cwd + # exit 1; +# fi + + #compile the system + make 2>&1 +fi + +#setup dbench test and execute. +cp client.txt ${PVFS2_MOUNTPOINT} +if [ $? != 0 ] +then + echo "failed to copy client.txt to ${PVFS2_MOUNTPOINT}" + cd $cwd + exit 1 +fi +cd ${PVFS2_MOUNTPOINT} && export ${PRELOAD} && ${EXTRA_TESTS}/dbench-3.03/dbench -c client.txt 10 -t 300 2>&1 +if [ $? != 0 ] +then + echo "dbench failed" + cd $cwd + exit 1 +fi + +cd $cwd diff --git a/test/automated/usrint-tests.d/dbench.patch b/test/automated/usrint-tests.d/dbench.patch new file mode 100644 index 0000000..e321792 --- /dev/null +++ b/test/automated/usrint-tests.d/dbench.patch @@ -0,0 +1,43 @@ +--- test/benchmarks/dbench-3.03/snprintf.c 2004-12-12 21:26:32.000000000 -0500 ++++ src/benchmarks/dbench-3.03/snprintf.c 2010-07-13 16:07:48.000000000 -0400 +@@ -81,6 +81,7 @@ + #include + #endif + ++/* + #ifndef VA_COPY + #ifdef HAVE_VA_COPY + #define VA_COPY(dest, src) __va_copy(dest, src) +@@ -88,7 +89,20 @@ + #define VA_COPY(dest, src) (dest) = (src) + #endif + #endif +- ++#define VA_COPY(dest, src) __va_copy(dest, src) ++*/ ++#ifdef va_copy ++/*using va_copy macro*/ ++#define VA_COPY(d,s) va_copy(d,s) ++#else ++#ifdef __va_copy ++/*using __va_copy macro*/ ++#define VA_COPY(d,s) __va_copy(d,s) ++#else ++/*using va_copy library function*/ ++#define VA_COPY(d,s) va_copy(d,s) ++#endif ++#endif + + #if defined(HAVE_SNPRINTF) && defined(HAVE_VSNPRINTF) && defined(HAVE_C99_VSNPRINTF) + /* only include stdio.h if we are not re-defining snprintf or vsnprintf */ +--- test/benchmarks/dbench-3.03/tbench_srv.c 2004-12-12 21:47:59.000000000 -0500 ++++ src/benchmarks/dbench-3.03/tbench_srv.c 2010-07-13 16:12:42.000000000 -0400 +@@ -64,7 +64,7 @@ + + while (1) { + struct sockaddr addr; +- int in_addrlen = sizeof(addr); ++ socklen_t in_addrlen = sizeof(addr); + int fd; + + while (waitpid((pid_t)-1,(int *)NULL, WNOHANG) > 0) ; diff --git a/test/automated/usrint-tests.d/fdtree b/test/automated/usrint-tests.d/fdtree new file mode 100755 index 0000000..49d1cca --- /dev/null +++ b/test/automated/usrint-tests.d/fdtree @@ -0,0 +1,3 @@ +#!/bin/sh + +cd ${PVFS2_MOUNTPOINT} && export ${PRELOAD} && ${EXTRA_TESTS}/fdtree-1.0.1/fdtree.bash -l 4 -d 5 diff --git a/test/automated/usrint-tests.d/fstest b/test/automated/usrint-tests.d/fstest new file mode 100755 index 0000000..e511c0e --- /dev/null +++ b/test/automated/usrint-tests.d/fstest @@ -0,0 +1,6 @@ +#!/bin/sh + +mkdir ${PVFS2_MOUNTPOINT}/fstest + +gcc ${USERLIB_SCRIPTS}/fstest.c -o ${PVFS2_DEST}/fstest && \ + export ${PRELOAD} && ${PVFS2_DEST}/fstest -p ${PVFS2_MOUNTPOINT}/fstest diff --git a/test/automated/usrint-tests.d/fstest.c b/test/automated/usrint-tests.d/fstest.c new file mode 100644 index 0000000..58bc2a7 --- /dev/null +++ b/test/automated/usrint-tests.d/fstest.c @@ -0,0 +1,337 @@ +/* filesystem verification tool, designed to detect data corruption on a filesystem + + tridge@samba.org, March 2002 + */ +#define _GNU_SOURCE + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* variables settable on the command line */ +static int loop_count = 100; +static int num_files = 1; +static int file_size = 1024*1024; +static int block_size = 1024; +static char *base_dir = "."; +static int use_mmap; +static int use_sync; + +typedef unsigned char uchar; + +#ifndef MIN +#define MIN(a,b) ((a)<(b)?(a):(b)) +#endif + +static void *x_malloc(int size) +{ + void *ret = malloc(size); + if (!ret) { + fprintf(stderr,"Out of memory for size %d!\n", size); + exit(1); + } + return ret; +} + + +/* generate a buffer for a particular child, fnum etc. Just use a simple buffer + to make debugging easy +*/ +static void gen_buffer(uchar *buf, int loop, int child, int fnum, int ofs) +{ + uchar v = (loop+child+fnum+(ofs/block_size)) % 256; + memset(buf, v, block_size); +} + +/* + check if a buffer from disk is correct +*/ +static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs) +{ + uchar *buf2; + + buf2 = x_malloc(block_size); + + gen_buffer(buf2, loop, child, fnum, ofs); + + if (memcmp(buf, buf2, block_size) != 0) { + int i, j; + for (i=0;buf[i] == buf2[i] && id_name,".") == 0) continue; + if (strcmp(de->d_name,"..") == 0) continue; + + sprintf(fname, "%s/%s", dir, de->d_name); + if (lstat(fname, &st)) { + perror(fname); + continue; + } + + if (S_ISDIR(st.st_mode)) { + traverse(fname, fn); + } + + fn(fname); + } + + closedir(d); +} + +/* the main child function - this creates/checks the file for one child */ +static void run_child(int child) +{ + int i, loop; + char dir[1024]; + + sprintf(dir, "%s/child%d", base_dir, child); + + /* cleanup any old files */ + if (remove(dir) != 0 && errno != ENOENT) { + printf("Child %d cleaning %s\n", child, dir); + traverse(dir, remove); + remove(dir); + } + + if (mkdir(dir, 0755) != 0) { + perror(dir); + exit(1); + } + + for (loop = 0; loop < loop_count; loop++) { + printf("Child %d loop %d\n", child, loop); + for (i=0;i +#include +#ifdef _UWIN +# include +# include +# include +# include +# define MAP_FILE 0 +#else +#ifndef linux +# include +#endif +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define NUMPRINTCOLUMNS 32 /* # columns of data to print on each line */ + +/* + * A log entry is an operation and a bunch of arguments. + */ + +struct log_entry { + int operation; + int args[3]; +}; + +#define LOGSIZE 1000 + +struct log_entry oplog[LOGSIZE]; /* the log */ +int logptr = 0; /* current position in log */ +int logcount = 0; /* total ops */ + +/* + * Define operations + */ + +#define OP_READ 1 +#define OP_WRITE 2 +#define OP_TRUNCATE 3 +#define OP_CLOSEOPEN 4 +#define OP_MAPREAD 5 +#define OP_MAPWRITE 6 +#define OP_SKIPPED 7 + +#ifndef PAGE_SIZE +#define PAGE_SIZE 4096 +#endif +#define PAGE_MASK (PAGE_SIZE - 1) + +char *original_buf; /* a pointer to the original data */ +char *good_buf; /* a pointer to the correct data */ +char *temp_buf; /* a pointer to the current data */ +char *fname; /* name of our test file */ +int fd; /* fd for our test file */ + +off_t file_size = 0; +off_t biggest = 0; +char state[256]; +unsigned long testcalls = 0; /* calls to function "test" */ + +unsigned long simulatedopcount = 0; /* -b flag */ +int closeprob = 0; /* -c flag */ +int debug = 0; /* -d flag */ +unsigned long debugstart = 0; /* -D flag */ +unsigned long maxfilelen = 256 * 1024; /* -l flag */ +int sizechecks = 1; /* -n flag disables them */ +int maxoplen = 64 * 1024; /* -o flag */ +int quiet = 0; /* -q flag */ +unsigned long progressinterval = 0; /* -p flag */ +int readbdy = 1; /* -r flag */ +int style = 0; /* -s flag */ +int truncbdy = 1; /* -t flag */ +int writebdy = 1; /* -w flag */ +long monitorstart = -1; /* -m flag */ +long monitorend = -1; /* -m flag */ +int lite = 0; /* -L flag */ +long numops = -1; /* -N flag */ +int randomoplen = 1; /* -O flag disables it */ +int seed = 1; /* -S flag */ +int mapped_writes = 1; /* -W flag disables */ +int mapped_reads = 1; /* -R flag disables it */ +int fsxgoodfd = 0; +FILE * fsxlogf = NULL; +int badoff = -1; +int closeopen = 0; + + +void +prt(char *fmt, ...) +{ + va_list args; + + va_start(args, fmt); + vfprintf(stdout, fmt, args); + va_end(args); + if (fsxlogf) + { + va_start(args,fmt); + vfprintf(fsxlogf, fmt, args); + va_end(args); + } +} + +void +prterr(char *prefix) +{ + prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno)); +} + + +void +log4(int operation, int arg0, int arg1, int arg2) +{ + struct log_entry *le; + + le = &oplog[logptr]; + le->operation = operation; + if (closeopen) + le->operation = ~ le->operation; + le->args[0] = arg0; + le->args[1] = arg1; + le->args[2] = arg2; + logptr++; + logcount++; + if (logptr >= LOGSIZE) + logptr = 0; +} + + +void +logdump(void) +{ + int i, count, down; + struct log_entry *lp; + + prt("LOG DUMP (%d total operations):\n", logcount); + if (logcount < LOGSIZE) { + i = 0; + count = logcount; + } else { + i = logptr; + count = LOGSIZE; + } + for ( ; count > 0; count--) { + int opnum; + + opnum = i+1 + (logcount/LOGSIZE)*LOGSIZE; + prt("%d(%d mod 256): ", opnum, opnum%256); + lp = &oplog[i]; + if ((closeopen = lp->operation < 0)) + lp->operation = ~ lp->operation; + + switch (lp->operation) { + case OP_MAPREAD: + prt("MAPREAD\t0x%x thru 0x%x\t(0x%x bytes)", + lp->args[0], lp->args[0] + lp->args[1] - 1, + lp->args[1]); + if (badoff >= lp->args[0] && badoff < + lp->args[0] + lp->args[1]) + prt("\t***RRRR***"); + break; + case OP_MAPWRITE: + prt("MAPWRITE 0x%x thru 0x%x\t(0x%x bytes)", + lp->args[0], lp->args[0] + lp->args[1] - 1, + lp->args[1]); + if (badoff >= lp->args[0] && badoff < + lp->args[0] + lp->args[1]) + prt("\t******WWWW"); + break; + case OP_READ: + prt("READ\t0x%x thru 0x%x\t(0x%x bytes)", + lp->args[0], lp->args[0] + lp->args[1] - 1, + lp->args[1]); + if (badoff >= lp->args[0] && + badoff < lp->args[0] + lp->args[1]) + prt("\t***RRRR***"); + break; + case OP_WRITE: + prt("WRITE\t0x%x thru 0x%x\t(0x%x bytes)", + lp->args[0], lp->args[0] + lp->args[1] - 1, + lp->args[1]); + if (lp->args[0] > lp->args[2]) + prt(" HOLE"); + else if (lp->args[0] + lp->args[1] > lp->args[2]) + prt(" EXTEND"); + if ((badoff >= lp->args[0] || badoff >=lp->args[2]) && + badoff < lp->args[0] + lp->args[1]) + prt("\t***WWWW"); + break; + case OP_TRUNCATE: + down = lp->args[0] < lp->args[1]; + prt("TRUNCATE %s\tfrom 0x%x to 0x%x", + down ? "DOWN" : "UP", lp->args[1], lp->args[0]); + if (badoff >= lp->args[!down] && + badoff < lp->args[!!down]) + prt("\t******WWWW"); + break; + case OP_SKIPPED: + prt("SKIPPED (no operation)"); + break; + default: + prt("BOGUS LOG ENTRY (operation code = %d)!", + lp->operation); + } + if (closeopen) + prt("\n\t\tCLOSE/OPEN"); + prt("\n"); + i++; + if (i == LOGSIZE) + i = 0; + } +} + + +void +save_buffer(char *buffer, off_t bufferlength, int fd) +{ + off_t ret; + ssize_t byteswritten; + + if (fd <= 0 || bufferlength == 0) + return; + + if (bufferlength > SSIZE_MAX) { + prt("fsx flaw: overflow in save_buffer\n"); + exit(67); + } + if (lite) { + off_t size_by_seek = lseek(fd, (off_t)0, L_XTND); + if (size_by_seek == (off_t)-1) + prterr("save_buffer: lseek eof"); + else if (bufferlength > size_by_seek) { + warn("save_buffer: .fsxgood file too short... will save 0x%qx bytes instead of 0x%qx\n", (unsigned long long)size_by_seek, + (unsigned long long)bufferlength); + bufferlength = size_by_seek; + } + } + + ret = lseek(fd, (off_t)0, SEEK_SET); + if (ret == (off_t)-1) + prterr("save_buffer: lseek 0"); + + byteswritten = write(fd, buffer, (size_t)bufferlength); + if (byteswritten != bufferlength) { + if (byteswritten == -1) + prterr("save_buffer write"); + else + warn("save_buffer: short write, 0x%x bytes instead of 0x%qx\n", + (unsigned)byteswritten, + (unsigned long long)bufferlength); + } +} + + +void +report_failure(int status) +{ + logdump(); + + if (fsxgoodfd) { + if (good_buf) { + save_buffer(good_buf, file_size, fsxgoodfd); + prt("Correct content saved for comparison\n"); + prt("(maybe hexdump \"%s\" vs \"%s.fsxgood\")\n", + fname, fname); + } + close(fsxgoodfd); + } + exit(status); +} + + +#define short_at(cp) ((unsigned short)((*((unsigned char *)(cp)) << 8) | \ + *(((unsigned char *)(cp)) + 1))) + +void +check_buffers(unsigned offset, unsigned size) +{ + unsigned char c, t; + unsigned i = 0; + unsigned n = 0; + unsigned op = 0; + unsigned bad = 0; + + if (bcmp(good_buf + offset, temp_buf, size) != 0) { + prt("READ BAD DATA: offset = 0x%x, size = 0x%x\n", + offset, size); + prt("OFFSET\tGOOD\tBAD\tRANGE\n"); + while (size > 0) { + c = good_buf[offset]; + t = temp_buf[i]; + if (c != t) { + if (n == 0) { + bad = short_at(&temp_buf[i]); + prt("0x%5x\t0x%04x\t0x%04x", offset, + short_at(&good_buf[offset]), bad); + op = temp_buf[offset & 1 ? i+1 : i]; + } + n++; + badoff = offset; + } + offset++; + i++; + size--; + } + if (n) { + prt("\t0x%5x\n", n); + if (bad) + prt("operation# (mod 256) for the bad data may be %u\n", ((unsigned)op & 0xff)); + else + prt("operation# (mod 256) for the bad data unknown, check HOLE and EXTEND ops\n"); + } else + prt("????????????????\n"); + report_failure(110); + } +} + + +void +check_size(void) +{ + struct stat statbuf; + off_t size_by_seek; + + if (fstat(fd, &statbuf)) { + prterr("check_size: fstat"); + statbuf.st_size = -1; + } + size_by_seek = lseek(fd, (off_t)0, L_XTND); + if (file_size != statbuf.st_size || file_size != size_by_seek) { + prt("Size error: expected 0x%qx stat 0x%qx seek 0x%qx\n", + (unsigned long long)file_size, + (unsigned long long)statbuf.st_size, + (unsigned long long)size_by_seek); + report_failure(120); + } +} + + +void +check_trunc_hack(void) +{ + struct stat statbuf; + + ftruncate(fd, (off_t)0); + ftruncate(fd, (off_t)100000); + fstat(fd, &statbuf); + if (statbuf.st_size != (off_t)100000) { + prt("no extend on truncate! not posix!\n"); + exit(130); + } + ftruncate(fd, 0); +} + + +void +doread(unsigned offset, unsigned size) +{ + off_t ret; + unsigned iret; + + offset -= offset % readbdy; + if (size == 0) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping zero size read\n"); + log4(OP_SKIPPED, OP_READ, offset, size); + return; + } + if (size + offset > file_size) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping seek/read past end of file\n"); + log4(OP_SKIPPED, OP_READ, offset, size); + return; + } + + log4(OP_READ, offset, size, 0); + + if (testcalls <= simulatedopcount) + return; + + if (!quiet && (progressinterval && testcalls % progressinterval == 0 || + debug && + (monitorstart == -1 || + offset + size > monitorstart && + (monitorend == -1 || offset <= monitorend)))) + prt("%lu read\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + offset, offset + size - 1, size); + ret = lseek(fd, (off_t)offset, SEEK_SET); + if (ret == (off_t)-1) { + prterr("doread: lseek"); + report_failure(140); + } + iret = read(fd, temp_buf, size); + if (iret != size) { + if (iret == -1) + prterr("doread: read"); + else + prt("short read: 0x%x bytes instead of 0x%x\n", + iret, size); + report_failure(141); + } + check_buffers(offset, size); +} + + +void +domapread(unsigned offset, unsigned size) +{ + unsigned pg_offset; + unsigned map_size; + char *p; + + offset -= offset % readbdy; + if (size == 0) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping zero size read\n"); + log4(OP_SKIPPED, OP_MAPREAD, offset, size); + return; + } + if (size + offset > file_size) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping seek/read past end of file\n"); + log4(OP_SKIPPED, OP_MAPREAD, offset, size); + return; + } + + log4(OP_MAPREAD, offset, size, 0); + + if (testcalls <= simulatedopcount) + return; + + if (!quiet && (progressinterval && testcalls % progressinterval == 0 || + debug && + (monitorstart == -1 || + offset + size > monitorstart && + (monitorend == -1 || offset <= monitorend)))) + prt("%lu mapread\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + offset, offset + size - 1, size); + + pg_offset = offset & PAGE_MASK; + map_size = pg_offset + size; + +#ifdef linux + if ((p = (char *)mmap(0, map_size, PROT_READ, MAP_SHARED, fd, +#else + if ((p = (char *)mmap(0, map_size, PROT_READ, MAP_FILE, fd, +#endif + (off_t)(offset - pg_offset))) == (char *)-1) { + prterr("domapread: mmap"); + report_failure(190); + } + memcpy(temp_buf, p + pg_offset, size); + if (munmap(p, map_size) != 0) { + prterr("domapread: munmap"); + report_failure(191); + } + + check_buffers(offset, size); +} + + +void +gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size) +{ + while (size--) { + good_buf[offset] = testcalls % 256; + if (offset % 2) + good_buf[offset] += original_buf[offset]; + offset++; + } +} + + +void +dowrite(unsigned offset, unsigned size) +{ + off_t ret; + unsigned iret; + + offset -= offset % writebdy; + if (size == 0) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping zero size write\n"); + log4(OP_SKIPPED, OP_WRITE, offset, size); + return; + } + + log4(OP_WRITE, offset, size, file_size); + + gendata(original_buf, good_buf, offset, size); + if (file_size < offset + size) { + if (file_size < offset) + bzero(good_buf + file_size, offset - file_size); + file_size = offset + size; + if (lite) { + warn("Lite file size bug in fsx!"); + report_failure(149); + } + } + + if (testcalls <= simulatedopcount) + return; + + if (!quiet && (progressinterval && testcalls % progressinterval == 0 || + debug && + (monitorstart == -1 || + offset + size > monitorstart && + (monitorend == -1 || offset <= monitorend)))) + prt("%lu write\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + offset, offset + size - 1, size); + ret = lseek(fd, (off_t)offset, SEEK_SET); + if (ret == (off_t)-1) { + prterr("dowrite: lseek"); + report_failure(150); + } + iret = write(fd, good_buf + offset, size); + if (iret != size) { + if (iret == -1) + prterr("dowrite: write"); + else + prt("short write: 0x%x bytes instead of 0x%x\n", + iret, size); + report_failure(151); + } +} + + +void +domapwrite(unsigned offset, unsigned size) +{ + unsigned pg_offset; + unsigned map_size; + off_t cur_filesize; + char *p; + + offset -= offset % writebdy; + if (size == 0) { + if (!quiet && testcalls > simulatedopcount) + prt("skipping zero size write\n"); + log4(OP_SKIPPED, OP_MAPWRITE, offset, size); + return; + } + cur_filesize = file_size; + + log4(OP_MAPWRITE, offset, size, 0); + + gendata(original_buf, good_buf, offset, size); + if (file_size < offset + size) { + if (file_size < offset) + bzero(good_buf + file_size, offset - file_size); + file_size = offset + size; + if (lite) { + warn("Lite file size bug in fsx!"); + report_failure(200); + } + } + + if (testcalls <= simulatedopcount) + return; + + if (!quiet && (progressinterval && testcalls % progressinterval == 0 || + debug && + (monitorstart == -1 || + offset + size > monitorstart && + (monitorend == -1 || offset <= monitorend)))) + prt("%lu mapwrite\t0x%x thru\t0x%x\t(0x%x bytes)\n", testcalls, + offset, offset + size - 1, size); + + if (file_size > cur_filesize) { + if (ftruncate(fd, file_size) == -1) { + prterr("domapwrite: ftruncate"); + exit(201); + } + } + pg_offset = offset & PAGE_MASK; + map_size = pg_offset + size; + + if ((p = (char *)mmap(0, map_size, PROT_READ | PROT_WRITE, + MAP_FILE | MAP_SHARED, fd, + (off_t)(offset - pg_offset))) == (char *)-1) { + prterr("domapwrite: mmap"); + report_failure(202); + } + memcpy(p + pg_offset, good_buf + offset, size); + if (msync(p, map_size, 0) != 0) { + prterr("domapwrite: msync"); + report_failure(203); + } + if (munmap(p, map_size) != 0) { + prterr("domapwrite: munmap"); + report_failure(204); + } +} + + +void +dotruncate(unsigned size) +{ + int oldsize = file_size; + + size -= size % truncbdy; + if (size > biggest) { + biggest = size; + if (!quiet && testcalls > simulatedopcount) + prt("truncating to largest ever: 0x%x\n", size); + } + + log4(OP_TRUNCATE, size, (unsigned)file_size, 0); + + if (size > file_size) + bzero(good_buf + file_size, size - file_size); + file_size = size; + + if (testcalls <= simulatedopcount) + return; + + if (progressinterval && testcalls % progressinterval == 0 || + debug && (monitorstart == -1 || monitorend == -1 || + size <= monitorend)) + prt("%lu trunc\tfrom 0x%x to 0x%x\n", testcalls, oldsize, size); + if (ftruncate(fd, (off_t)size) == -1) { + prt("ftruncate1: %x\n", size); + prterr("dotruncate: ftruncate"); + report_failure(160); + } +} + + +void +writefileimage() +{ + ssize_t iret; + + if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) { + prterr("writefileimage: lseek"); + report_failure(171); + } + iret = write(fd, good_buf, file_size); + if ((off_t)iret != file_size) { + if (iret == -1) + prterr("writefileimage: write"); + else + prt("short write: 0x%x bytes instead of 0x%qx\n", + iret, (unsigned long long)file_size); + report_failure(172); + } + if (lite ? 0 : ftruncate(fd, file_size) == -1) { + prt("ftruncate2: %qx\n", (unsigned long long)file_size); + prterr("writefileimage: ftruncate"); + report_failure(173); + } +} + + +void +docloseopen(void) +{ + if (testcalls <= simulatedopcount) + return; + + if (debug) + prt("%lu close/open\n", testcalls); + if (close(fd)) { + prterr("docloseopen: close"); + report_failure(180); + } + fd = open(fname, O_RDWR, 0); + if (fd < 0) { + prterr("docloseopen: open"); + report_failure(181); + } +} + + +void +test(void) +{ + unsigned long offset; + unsigned long size = maxoplen; + unsigned long rv = random(); + unsigned long op = rv % (3 + !lite + mapped_writes); + + /* turn off the map read if necessary */ + + if (op == 2 && !mapped_reads) + op = 0; + + if (simulatedopcount > 0 && testcalls == simulatedopcount) + writefileimage(); + + testcalls++; + + if (closeprob) + closeopen = (rv >> 3) < (1 << 28) / closeprob; + + if (debugstart > 0 && testcalls >= debugstart) + debug = 1; + + if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0) + prt("%lu...\n", testcalls); + + /* + * READ: op = 0 + * WRITE: op = 1 + * MAPREAD: op = 2 + * TRUNCATE: op = 3 + * MAPWRITE: op = 3 or 4 + */ + if (lite ? 0 : op == 3 && (style & 1) == 0) /* vanilla truncate? */ + dotruncate(random() % maxfilelen); + else { + if (randomoplen) + size = random() % (maxoplen+1); + if (lite ? 0 : op == 3) + dotruncate(size); + else { + offset = random(); + if (op == 1 || op == (lite ? 3 : 4)) { + offset %= maxfilelen; + if (offset + size > maxfilelen) + size = maxfilelen - offset; + if (op != 1) + domapwrite(offset, size); + else + dowrite(offset, size); + } else { + if (file_size) + offset %= file_size; + else + offset = 0; + if (offset + size > file_size) + size = file_size - offset; + if (op != 0) + domapread(offset, size); + else + doread(offset, size); + } + } + } + if (sizechecks && testcalls > simulatedopcount) + check_size(); + if (closeopen) + docloseopen(); +} + + +void +cleanup(sig) + int sig; +{ + if (sig) + prt("signal %d\n", sig); + prt("testcalls = %lu\n", testcalls); + exit(sig); +} + + +void +usage(void) +{ + fprintf(stdout, "usage: %s", + "fsx [-dnqLOW] [-b opnum] [-c Prob] [-l flen] [-m start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] fname\n\ + -b opnum: beginning operation number (default 1)\n\ + -c P: 1 in P chance of file close+open at each op (default infinity)\n\ + -d: debug output for all operations\n\ + -l flen: the upper bound on file size (default 262144)\n\ + -m startop:endop: monitor (print debug output) specified byte range (default 0:infinity)\n\ + -n: no verifications of file size\n\ + -o oplen: the upper bound on operation size (default 65536)\n\ + -p progressinterval: debug output at specified operation interval\n\ + -q: quieter operation\n\ + -r readbdy: 4096 would make reads page aligned (default 1)\n\ + -s style: 1 gives smaller truncates (default 0)\n\ + -t truncbdy: 4096 would make truncates page aligned (default 1)\n\ + -w writebdy: 4096 would make writes page aligned (default 1)\n\ + -D startingop: debug output starting at specified operation\n\ + -L: fsxLite - no file creations & no file size changes\n\ + -N numops: total # operations to do (default infinity)\n\ + -O: use oplen (see -o flag) for every op (default random)\n\ + -P: save .fsxlog and .fsxgood files in dirpath (default ./)\n\ + -S seed: for random # generator (default 1) 0 gets timestamp\n\ + -W: mapped write operations DISabled\n\ + -R: read() system calls only (mapped reads disabled)\n\ + fname: this filename is REQUIRED (no default)\n"); + exit(90); +} + + +int +getnum(char *s, char **e) +{ + int ret = -1; + + *e = (char *) 0; + ret = strtol(s, e, 0); + if (*e) + switch (**e) { + case 'b': + case 'B': + ret *= 512; + *e = *e + 1; + break; + case 'k': + case 'K': + ret *= 1024; + *e = *e + 1; + break; + case 'm': + case 'M': + ret *= 1024*1024; + *e = *e + 1; + break; + case 'w': + case 'W': + ret *= 4; + *e = *e + 1; + break; + } + return (ret); +} + + +int +main(int argc, char **argv) +{ + int i, style, ch; + char *endp; + char goodfile[1024]; + char logfile[1024]; + + goodfile[0] = 0; + logfile[0] = 0; + + setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */ + + while ((ch = getopt(argc, argv, "b:c:dl:m:no:p:qr:s:t:w:D:LN:OP:RS:W")) + != EOF) + switch (ch) { + case 'b': + simulatedopcount = getnum(optarg, &endp); + if (!quiet) + fprintf(stdout, "Will begin at operation %ld\n", + simulatedopcount); + if (simulatedopcount == 0) + usage(); + simulatedopcount -= 1; + break; + case 'c': + closeprob = getnum(optarg, &endp); + if (!quiet) + fprintf(stdout, + "Chance of close/open is 1 in %d\n", + closeprob); + if (closeprob <= 0) + usage(); + break; + case 'd': + debug = 1; + break; + case 'l': + maxfilelen = getnum(optarg, &endp); + if (maxfilelen <= 0) + usage(); + break; + case 'm': + monitorstart = getnum(optarg, &endp); + if (monitorstart < 0) + usage(); + if (!endp || *endp++ != ':') + usage(); + monitorend = getnum(endp, &endp); + if (monitorend < 0) + usage(); + if (monitorend == 0) + monitorend = -1; /* aka infinity */ + debug = 1; + case 'n': + sizechecks = 0; + break; + case 'o': + maxoplen = getnum(optarg, &endp); + if (maxoplen <= 0) + usage(); + break; + case 'p': + progressinterval = getnum(optarg, &endp); + if (progressinterval < 0) + usage(); + break; + case 'q': + quiet = 1; + break; + case 'r': + readbdy = getnum(optarg, &endp); + if (readbdy <= 0) + usage(); + break; + case 's': + style = getnum(optarg, &endp); + if (style < 0 || style > 1) + usage(); + break; + case 't': + truncbdy = getnum(optarg, &endp); + if (truncbdy <= 0) + usage(); + break; + case 'w': + writebdy = getnum(optarg, &endp); + if (writebdy <= 0) + usage(); + break; + case 'D': + debugstart = getnum(optarg, &endp); + if (debugstart < 1) + usage(); + break; + case 'L': + lite = 1; + break; + case 'N': + numops = getnum(optarg, &endp); + if (numops < 0) + usage(); + break; + case 'O': + randomoplen = 0; + break; + case 'P': + strncpy(goodfile, optarg, sizeof(goodfile)); + strcat(goodfile, "/"); + strncpy(logfile, optarg, sizeof(logfile)); + strcat(logfile, "/"); + break; + case 'R': + mapped_reads = 0; + if (!quiet) + fprintf(stdout, "mapped reads DISABLED\n"); + break; + case 'S': + seed = getnum(optarg, &endp); + if (seed == 0) + seed = time(0) % 10000; + if (!quiet) + fprintf(stdout, "Seed set to %d\n", seed); + if (seed < 0) + usage(); + break; + case 'W': + mapped_writes = 0; + if (!quiet) + fprintf(stdout, "mapped writes DISABLED\n"); + break; + + default: + usage(); + /* NOTREACHED */ + } + argc -= optind; + argv += optind; + if (argc != 1) + usage(); + fname = argv[0]; + + signal(SIGHUP, cleanup); + signal(SIGINT, cleanup); + signal(SIGPIPE, cleanup); + signal(SIGALRM, cleanup); + signal(SIGTERM, cleanup); + signal(SIGXCPU, cleanup); + signal(SIGXFSZ, cleanup); + signal(SIGVTALRM, cleanup); + signal(SIGUSR1, cleanup); + signal(SIGUSR2, cleanup); + + initstate(seed, state, 256); + setstate(state); + fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666); + if (fd < 0) { + prterr(fname); + exit(91); + } + strncat(goodfile, fname, 256); + strcat (goodfile, ".fsxgood"); + fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666); + if (fsxgoodfd < 0) { + prterr(goodfile); + exit(92); + } + strncat(logfile, fname, 256); + strcat (logfile, ".fsxlog"); + fsxlogf = fopen(logfile, "w"); + if (fsxlogf == NULL) { + prterr(logfile); + exit(93); + } + if (lite) { + off_t ret; + file_size = maxfilelen = lseek(fd, (off_t)0, L_XTND); + if (file_size == (off_t)-1) { + prterr(fname); + warn("main: lseek eof"); + exit(94); + } + ret = lseek(fd, (off_t)0, SEEK_SET); + if (ret == (off_t)-1) { + prterr(fname); + warn("main: lseek 0"); + exit(95); + } + } + original_buf = (char *) malloc(maxfilelen); + for (i = 0; i < maxfilelen; i++) + original_buf[i] = random() % 256; + good_buf = (char *) malloc(maxfilelen); + bzero(good_buf, maxfilelen); + temp_buf = (char *) malloc(maxoplen); + bzero(temp_buf, maxoplen); + if (lite) { /* zero entire existing file */ + ssize_t written; + + written = write(fd, good_buf, (size_t)maxfilelen); + if (written != maxfilelen) { + if (written == -1) { + prterr(fname); + warn("main: error on write"); + } else + warn("main: short write, 0x%x bytes instead of 0x%x\n", + (unsigned)written, maxfilelen); + exit(98); + } + } else + check_trunc_hack(); + + while (numops == -1 || numops--) + test(); + + if (close(fd)) { + prterr("close"); + report_failure(99); + } + prt("All operations completed A-OK!\n"); + + exit(0); + return 0; +} diff --git a/test/automated/usrint-tests.d/iozone b/test/automated/usrint-tests.d/iozone new file mode 100755 index 0000000..a23c0d1 --- /dev/null +++ b/test/automated/usrint-tests.d/iozone @@ -0,0 +1,21 @@ +#!/bin/sh + +cd ${EXTRA_TESTS}/iozone3_239/src/current || exit 1 + +#do we need to rebuild iozone +if [ ! -f ./iozone ] +then +patch -p5 < ${USERLIB_SCRIPTS}/iozone.patch + #if [ $? != 0 ] + #then + # echo "Attemp to patch iozone software failed." + # exit 1 + #fi + make linux || exit 1 +fi +# -y min record size +# -q max record size +# -n min file size +# -g max file size +export ${PRELOAD} && ./iozone -a -y 4096 -q $((1024*16)) -n 4096 -g $((1024*16*2)) \ + -f ${PVFS2_MOUNTPOINT}/test_iozone_file diff --git a/test/automated/usrint-tests.d/iozone.patch b/test/automated/usrint-tests.d/iozone.patch new file mode 100644 index 0000000..615d01d --- /dev/null +++ b/test/automated/usrint-tests.d/iozone.patch @@ -0,0 +1,1058 @@ +diff -Naur patch/benchmarks/iozone3_239/src/current/fileop.c src/benchmarks/iozone3_239/src/current/fileop.c +--- patch/benchmarks/iozone3_239/src/current/fileop.c 2005-04-22 17:09:54.000000000 -0400 ++++ src/benchmarks/iozone3_239/src/current/fileop.c 2010-07-26 17:25:19.000000000 -0400 +@@ -184,8 +184,6 @@ + file_stat(int x) + { + int i,j,k,y; +- int fd; +- int ret; + char buf[100]; + struct stat mystat; + for(i=0;i>%c<< Expecting >>%c<<\n", *where2,*pattern_ptr); + return(1); +@@ -6142,6 +6168,7 @@ + long long *data2; + #endif + { ++ long long int tmp; + double starttime1; + double writetime[2]; + double walltime[2], cputime[2]; +@@ -6458,9 +6485,15 @@ + else + fprintf(rwqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((qtime_stop-qtime_start-time_res))*1000000,reclen); + #else +- fprintf(wqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((qtime_stop-qtime_start-time_res))*1000000,reclen); ++ { ++ tmp = (long long int)traj_offset; ++ fprintf(wqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((qtime_stop-qtime_start-time_res))*1000000,reclen); ++ } + else +- fprintf(rwqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((qtime_stop-qtime_start-time_res))*1000000,reclen); ++ { ++ tmp = (long long int)traj_offset; ++ fprintf(rwqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((qtime_stop-qtime_start-time_res))*1000000,reclen); ++ } + #endif + } + w_traj_ops_completed++; +@@ -6883,7 +6916,7 @@ + printf("\nError freading block %ld %x\n", i, + (unsigned long long)buffer); + #else +- printf("\nError freading block %ld %x\n", i, ++ printf("\nError freading block %ld %llx\n", i, + (unsigned long long)buffer); + #endif + #else +@@ -6997,6 +7030,7 @@ + long long *data1,*data2; + #endif + { ++ long long int tmp = 0; + double starttime2; + double compute_val = (double)0; + double readtime[2]; +@@ -7137,7 +7171,7 @@ + if(read(fd, (void *)nbuff, (size_t) page_size) != page_size) + { + #ifdef _64BIT_ARCH_ +- printf("\nError reading block %d %x\n", 0, ++ printf("\nError reading block %d %llx\n", 0, + (unsigned long long)nbuff); + #else + printf("\nError reading block %d %lx\n", 0, +@@ -7226,7 +7260,8 @@ + printf("\nError reading block %ld %lx\n", i, + (unsigned long long)nbuff); + #else +- printf("\nError reading block %lld %llx\n", i, ++ tmp = (long long int)i; ++ printf("\nError reading block %lld %llx\n", tmp, + (unsigned long long)nbuff); + #endif + #else +@@ -7269,9 +7304,15 @@ + else + fprintf(rrqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,(qtime_stop-qtime_start-time_res)*1000000,reclen); + #else +- fprintf(rqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,(qtime_stop-qtime_start-time_res)*1000000,reclen); ++ { ++ tmp = (long long int)traj_offset; ++ fprintf(rqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,(qtime_stop-qtime_start-time_res)*1000000,reclen); ++ } + else +- fprintf(rrqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,(qtime_stop-qtime_start-time_res)*1000000,reclen); ++ { ++ tmp = (long long int)traj_offset; ++ fprintf(rrqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,(qtime_stop-qtime_start-time_res)*1000000,reclen); ++ } + #endif + } + r_traj_ops_completed++; +@@ -7418,6 +7459,7 @@ + long long *data1, *data2; + #endif + { ++ long long int tmp = 0; + double randreadtime[2]; + double starttime2; + double walltime[2], cputime[2]; +@@ -7593,8 +7635,9 @@ + printf("\nError reading block at %ld\n", + offset64); + #else ++ tmp = (long long int)offset64; + printf("\nError reading block at %lld\n", +- offset64); ++ tmp); + #endif + perror("read"); + exit(70); +@@ -7711,8 +7754,9 @@ + printf("\nError writing block at %ld\n", + offset64); + #else ++ tmp = (long long int)offset64; + printf("\nError writing block at %lld\n", +- offset64); ++ tmp); + #endif + if(wval==-1) + perror("write"); +@@ -7828,6 +7872,7 @@ + long long *data1,*data2; + #endif + { ++ long long int tmp = 0; + double revreadtime[2]; + double starttime2; + double walltime[2], cputime[2]; +@@ -7969,7 +8014,8 @@ + #ifdef NO_PRINT_LLD + printf("\nError reading block %ld\n", i); + #else +- printf("\nError reading block %lld\n", i); ++ tmp = (long long int)i; ++ printf("\nError reading block %lld\n", tmp); + #endif + perror("read"); + exit(79); +@@ -8365,6 +8411,7 @@ + long long *data1, *data2; + #endif + { ++ long long int tmp = 0; + double strideintime; + double starttime1; + double compute_val = (double)0; +@@ -8501,8 +8548,10 @@ + printf("\nError reading block %ld, fd= %d Filename %s Read returned %ld\n", i, fd,filename,uu); + printf("\nSeeked to %ld Reclen = %ld\n", savepos64,reclen); + #else +- printf("\nError reading block %lld, fd= %d Filename %s Read returned %lld\n", i, fd,filename,uu); +- printf("\nSeeked to %lld Reclen = %lld\n", savepos64,reclen); ++ tmp = (long long int)i; ++ printf("\nError reading block %lld, fd= %d Filename %s Read returned %lld\n", tmp, fd,filename,uu); ++ tmp = (long long int)savepos64; ++ printf("\nSeeked to %lld Reclen = %lld\n",tmp,reclen); + #endif + perror("read"); + exit(88); +@@ -9919,6 +9968,7 @@ + long long who; + #endif + { ++ long long int tmp = 0; + long long i; + off64_t current_file_size; + off64_t rec_size; +@@ -9943,7 +9993,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf(" %c%ld%c",042,rec_size/1024,042); + #else +- if(!silent) printf(" %c%lld%c",042,rec_size/1024,042); ++ if(!silent) ++ { ++ tmp = (long long int)rec_size; ++ printf(" %c%lld%c",042,tmp/1024,042); ++ } + #endif + } + if(!silent) printf("\n"); +@@ -9961,7 +10015,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf("%c%ld%c ",042,current_file_size,042); + #else +- if(!silent) printf("%c%lld%c ",042,current_file_size,042); ++ if(!silent) ++ { ++ tmp = (long long int)current_file_size; ++ printf("%c%lld%c ",042,tmp,042); ++ } + #endif + for(i=0;i<=max_y;i++){ + if(report_array[0][i] != current_file_size){ +@@ -9976,7 +10034,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf("%c%ld%c ",042,current_file_size,042); + #else +- if(!silent) printf("%c%lld%c ",042,current_file_size,042); ++ if(!silent) ++ { ++ tmp = (long long int)current_file_size; ++ printf("%c%lld%c ",042,tmp,042); ++ } + #endif + } + if(bif_flag) +@@ -9984,7 +10046,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf(" %ld ",report_array[who][i]); + #else +- if(!silent) printf(" %lld ",report_array[who][i]); ++ if(!silent) ++ { ++ tmp = (long long int)report_array[who][i]; ++ printf(" %lld ",tmp); ++ } + #endif + } + if(bif_flag) +@@ -10156,6 +10222,7 @@ + long long who; + #endif + { ++ long long int tmp = 0; + long long i; + off64_t current_file_size; + off64_t rec_size; +@@ -10173,7 +10240,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf(" %c%ld%c",042,rec_size/1024,042); + #else +- if(!silent) printf(" %c%lld%c",042,rec_size/1024,042); ++ if(!silent) ++ { ++ tmp = (long long int)rec_size; ++ printf(" %c%lld%c",042,tmp/1024,042); ++ } + #endif + } + if(!silent) printf("\n"); +@@ -10191,7 +10262,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf("%c%ld%c ",042,current_file_size,042); + #else +- if(!silent) printf("%c%lld%c ",042,current_file_size,042); ++ if(!silent) ++ { ++ tmp = (long long int)current_file_size; ++ printf("%c%lld%c ",042,tmp,042); ++ } + #endif + for (i = 0; i <= max_y; i++) { + if (report_array[0][i] != current_file_size) { +@@ -10206,7 +10281,11 @@ + #ifdef NO_PRINT_LLD + if(!silent) printf("%c%ld%c ",042,current_file_size,042); + #else +- if(!silent) printf("%c%lld%c ",042,current_file_size,042); ++ if(!silent) ++ { ++ tmp = (long long int)current_file_size; ++ printf("%c%lld%c ",042,tmp,042); ++ } + #endif + } + if (bif_flag) +@@ -10416,7 +10495,7 @@ + #ifdef NO_PRINT_LLD + printf("shmid = %d, size = %ld, size1 = %d, Error %d\n",shmid,size,(size_t)size1,errno); + #else +- printf("shmid = %d, size = %lld, size1 = %d, Error %d\n",shmid,size,(size_t)size1,errno); ++ printf("shmid = %d, size = %lld, size1 = %lx, Error %d\n",shmid,size,(size_t)size1,errno); + #endif + exit(119); + } +@@ -10628,6 +10707,7 @@ + #endif + { + ++ long long int tmp = 0; + struct child_stats *child_stat; + double starttime1 = 0; + double temp_time; +@@ -11029,7 +11109,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_wqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_wqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_wqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + w_traj_ops_completed++; +@@ -11186,6 +11267,7 @@ + #endif + { + ++ long long int tmp = 0; + struct child_stats *child_stat; + double starttime1 = 0; + double temp_time; +@@ -11588,7 +11670,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_wqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_wqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_wqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + w_traj_ops_completed++; +@@ -11739,6 +11822,7 @@ + thread_rwrite_test(x) + #endif + { ++ long long int tmp = 0; + /************************/ + /* Children only here */ + /************************/ +@@ -12071,7 +12155,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_rwqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_rwqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_rwqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + if(rlocking) +@@ -12205,6 +12290,7 @@ + thread_read_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + struct child_stats *child_stat; + double walltime, cputime; +@@ -12478,7 +12564,8 @@ + printf("\nError reading block %ld, fd= %d\n", i, + fd); + #else +- printf("\nError reading block %lld, fd= %d\n", i, ++ tmp = (long long int)i; ++ printf("\nError reading block %lld, fd= %d\n", tmp, + fd); + #endif + perror("read"); +@@ -12525,7 +12612,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_rqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_rqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_rqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + +@@ -12658,6 +12746,7 @@ + thread_pread_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + struct child_stats *child_stat; + double walltime, cputime; +@@ -12931,7 +13020,8 @@ + printf("\nError preading block %ld, fd= %d\n", i, + fd); + #else +- printf("\nError preading block %lld, fd= %d\n", i, ++ tmp = (long long int)i; ++ printf("\nError preading block %lld, fd= %d\n", tmp, + fd); + #endif + perror("pread"); +@@ -12978,7 +13068,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_rqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_rqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_rqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + +@@ -13112,6 +13203,7 @@ + thread_rread_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + char *nbuff; + struct child_stats *child_stat; +@@ -13384,7 +13476,8 @@ + printf("\nError writing block %ld, fd= %d\n", i, + fd); + #else +- printf("\nError writing block %lld, fd= %d\n", i, ++ tmp = (long long int)i; ++ printf("\nError writing block %lld, fd= %d\n", tmp, + fd); + #endif + perror("read"); +@@ -13431,7 +13524,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_rrqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_rrqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_rrqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + +@@ -13562,6 +13656,7 @@ + thread_reverse_read_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + char *nbuff; + struct child_stats *child_stat; +@@ -13818,7 +13913,8 @@ + #ifdef NO_PRINT_LLD + printf("\nError reading block %ld\n", i); + #else +- printf("\nError reading block %lld\n", i); ++ tmp = (long long int)i; ++ printf("\nError reading block %lld\n", tmp); + #endif + perror("read"); + if (!no_unlink) +@@ -13873,7 +13969,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_revqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_revqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_revqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + } +@@ -13990,6 +14087,7 @@ + thread_stride_read_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + char *nbuff=0; + struct child_stats *child_stat; +@@ -14239,7 +14337,8 @@ + #ifdef NO_PRINT_LLD + printf("\nError reading block %ld, fd= %d\n", i, fd); + #else +- printf("\nError reading block %lld, fd= %d\n", i, fd); ++ tmp = (long long int)i; ++ printf("\nError reading block %lld, fd= %d\n", tmp, fd); + #endif + perror("read"); + if (!no_unlink) +@@ -14323,7 +14422,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_strqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_strqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_strqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + } +@@ -14509,6 +14609,7 @@ + thread_ranread_test(x) + #endif + { ++ long long int tmp = 0; + long long xx,xx2; + struct child_stats *child_stat; + double walltime, cputime; +@@ -14795,8 +14896,9 @@ + printf("\nError reading block at %ld\n", + offset); + #else ++ tmp = (long long int)offset; + printf("\nError reading block at %lld\n", +- offset); ++ tmp); + #endif + perror("ranread"); + if (!no_unlink) +@@ -14846,7 +14948,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_randrfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_randrfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_randrfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + } +@@ -14968,6 +15071,7 @@ + #endif + { + ++ long long int tmp = 0; + struct child_stats *child_stat; + double starttime1 = 0; + double temp_time; +@@ -15375,7 +15479,8 @@ + #ifdef NO_PRINT_LLD + fprintf(thread_randwqfd,"%10.1ld %10.0f %10.1ld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #else +- fprintf(thread_randwqfd,"%10.1lld %10.0f %10.1lld\n",(traj_offset)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); ++ tmp = (long long int)traj_offset; ++ fprintf(thread_randwqfd,"%10.1lld %10.0f %10.1lld\n",(tmp)/1024,((thread_qtime_stop-thread_qtime_start-time_res))*1000000,reclen); + #endif + } + w_traj_ops_completed++; +@@ -15629,7 +15734,7 @@ + if(debug1 ) + { + printf("\nthread created has an id of %lx\n",ts); +- printf("meme %ld\n",meme); ++ printf("meme %lld\n",meme); + } + return((long long)meme); + } +@@ -17473,8 +17578,8 @@ + bzero(&outbuf,sizeof(struct client_neutral_command)); + if(mdebug) + { +- printf("Master_neutral_command size = %d\n",sizeof(struct master_neutral_command)); +- printf("Client_neutral_command size = %d\n",sizeof(struct client_neutral_command)); ++ printf("Master_neutral_command size = %lx\n",sizeof(struct master_neutral_command)); ++ printf("Client_neutral_command size = %lx\n",sizeof(struct client_neutral_command)); + } + /* + * Convert internal commands to string format for neutral format/portability +@@ -17807,6 +17912,7 @@ + #endif + { + int me,ns; ++ socklen_t me2; + struct sockaddr_in *addr; + if(flag) + { +@@ -17827,6 +17933,7 @@ + } + } + me=sizeof(struct sockaddr_in); ++ me2 = (socklen_t)me; + if(cdebug) + { + printf("Child %d enters listen\n",(int)chid); +@@ -17838,7 +17945,7 @@ + printf("Child %d enters accept\n",(int)chid); + fflush(stdout); + } +- ns=accept(s,(void *)addr,&me); ++ ns=accept(s,(void *)addr,&me2); + if(cdebug) + { + printf("Child %d attached for receive. Sock %d %d\n",(int)chid, ns,errno); +@@ -19807,6 +19914,7 @@ + { + int tsize; + int s,ns,me; ++ socklen_t me2; + int rc; + int xx; + int tmp_port; +@@ -19815,6 +19923,7 @@ + int recv_buf_size=65536; + xx = 0; + me=sizeof(struct sockaddr_in); ++ me2 = (socklen_t)me; + tsize=size_of_message; /* Number of messages to receive */ + s = socket(AF_INET, SOCK_STREAM, 0); + if (s < 0) +@@ -19863,7 +19972,7 @@ + printf("Child enters accept\n"); + fflush(stdout); + } +- ns=accept(s,(void *)addr,&me); ++ ns=accept(s,(void *)addr,&me2); + if(cdebug) + { + printf("Child attached for receive. Sock %d %d\n", ns,errno); +@@ -20028,6 +20137,7 @@ + { + int tsize; + int s,ns,me; ++ socklen_t me2; + int rc; + int xx; + int tmp_port; +@@ -20036,6 +20146,7 @@ + int recv_buf_size=65536; + xx = 0; + me=sizeof(struct sockaddr_in); ++ me2 = (socklen_t)me; + tsize=sp_size_of_message; /* Number of messages to receive */ + s = socket(AF_INET, SOCK_STREAM, 0); + if (s < 0) +@@ -20084,7 +20195,7 @@ + printf("Master enters accept\n"); + fflush(stdout); + } +- ns=accept(s,(void *)addr,&me); ++ ns=accept(s,(void *)addr,&me2); + if(mdebug) + { + printf("Master attached for receive. Sock %d %d\n", ns,errno); +diff -Naur patch/benchmarks/iozone3_239/src/current/libasync.c src/benchmarks/iozone3_239/src/current/libasync.c +--- patch/benchmarks/iozone3_239/src/current/libasync.c 2005-04-22 17:09:54.000000000 -0400 ++++ src/benchmarks/iozone3_239/src/current/libasync.c 2010-07-26 16:28:31.000000000 -0400 +@@ -301,6 +301,7 @@ + off64_t max; + long long depth; + { ++ long long int tmp = 0; + off64_t a_offset,r_offset; + long long a_size; + struct cache_ent *ce,*first_ce=0; +@@ -331,7 +332,7 @@ + } + if(ret) + { +- printf("aio_error 1: ret %d %d\n",ret,errno); ++ printf("aio_error 1: ret %zd %d\n",ret,errno); + } + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +@@ -369,10 +370,10 @@ + if(retval < ce->myaiocb.aio_nbytes) + #endif + { +- printf("aio_return error1: ret %d %d\n",retval,errno); ++ printf("aio_return error1: ret %zd %d\n",retval,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("aio_return error1: fd %d offset %ld buffer %lx size %d Opcode %d\n", ++ printf("aio_return error1: fd %d offset %ld buffer %lx size %zd Opcode %d\n", + ce->myaiocb.aio_fildes, + ce->myaiocb.aio_offset, + (long)(ce->myaiocb.aio_buf), +@@ -421,7 +422,7 @@ + if(errno==EAGAIN) + goto again; + else +- printf("error returned from aio_read(). Ret %d errno %d\n",ret,errno); ++ printf("error returned from aio_read(). Ret %zd errno %d\n",ret,errno); + } + } + if(stride==0) /* User does not want read-ahead */ +@@ -477,7 +478,7 @@ + ; + } + if(ret) +- printf("aio_error 2: ret %d %d\n",ret,errno); ++ printf("aio_error 2: ret %zd %d\n",ret,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ + retval=aio_return(&first_ce->myaiocb); +@@ -497,12 +498,13 @@ + if(retval < first_ce->myaiocb.aio_nbytes) + #endif + { +- printf("aio_return error2: ret %d %d\n",retval,errno); ++ printf("aio_return error2: ret %zd %d\n",retval,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("aio_return error2: fd %d offset %lld buffer %lx size %d Opcode %d\n", ++ tmp = (long long int)first_ce->myaiocb.aio_offset; ++ printf("aio_return error2: fd %d offset %lld buffer %lx size %zd Opcode %d\n", + first_ce->myaiocb.aio_fildes, +- first_ce->myaiocb.aio_offset, ++ tmp, + (long)(first_ce->myaiocb.aio_buf), + first_ce->myaiocb.aio_nbytes, + first_ce->myaiocb.aio_lio_opcode +@@ -806,6 +808,7 @@ + off64_t max; + long long depth; + { ++ long long int tmp = 0; + off64_t a_offset,r_offset; + long long a_size; + struct cache_ent *ce,*first_ce=0; +@@ -835,7 +838,7 @@ + ; + } + if(ret) +- printf("aio_error 3: ret %d %d\n",ret,errno); ++ printf("aio_error 3: ret %zd %d\n",ret,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ + if(ce->oldbuf != ce->myaiocb.aio_buf || +@@ -885,12 +888,13 @@ + if(retval < ce->myaiocb.aio_nbytes) + #endif + { +- printf("aio_return error4: ret %d %d\n",retval,errno); ++ printf("aio_return error4: ret %zd %d\n",retval,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("aio_return error4: fd %d offset %lld buffer %lx size %d Opcode %d\n", ++ tmp = (long long int)ce->myaiocb.aio_offset; ++ printf("aio_return error4: fd %d offset %lld buffer %lx size %zd Opcode %d\n", + ce->myaiocb.aio_fildes, +- ce->myaiocb.aio_offset, ++ tmp, + (long)(ce->myaiocb.aio_buf), + ce->myaiocb.aio_nbytes, + ce->myaiocb.aio_lio_opcode +@@ -903,9 +907,10 @@ + ce->myaiocb64.aio_lio_opcode + #endif + #else +- printf("aio_return error4: fd %d offset %d buffer %lx size %d Opcode %d\n", ++ tmp = (long long int)ce->myaiocb.aio_offset; ++ printf("aio_return error4: fd %d offset %d buffer %lx size %zd Opcode %d\n", + ce->myaiocb.aio_fildes, +- ce->myaiocb.aio_offset, ++ tmp, + (long)(ce->myaiocb.aio_buf), + ce->myaiocb.aio_nbytes, + ce->myaiocb.aio_lio_opcode +@@ -948,7 +953,7 @@ + if(errno==EAGAIN) + goto again; + else +- printf("error returned from aio_read(). Ret %d errno %d\n",ret,errno); ++ printf("error returned from aio_read(). Ret %zd errno %d\n",ret,errno); + } + } + if(stride==0) /* User does not want read-ahead */ +@@ -1013,7 +1018,7 @@ + ; + } + if(ret) +- printf("aio_error 4: ret %d %d\n",ret,errno); ++ printf("aio_error 4: ret %zd %d\n",ret,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ + if(first_ce->oldbuf != first_ce->myaiocb.aio_buf || +@@ -1045,12 +1050,13 @@ + if(retval < first_ce->myaiocb.aio_nbytes) + #endif + { +- printf("aio_return error5: ret %d %d\n",retval,errno); ++ printf("aio_return error5: ret %zd %d\n",retval,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("aio_return error5: fd %d offset %lld buffer %lx size %d Opcode %d\n", ++ tmp = (long long int)first_ce->myaiocb.aio_offset; ++ printf("aio_return error5: fd %d offset %lld buffer %lx size %zd Opcode %d\n", + first_ce->myaiocb.aio_fildes, +- first_ce->myaiocb.aio_offset, ++ tmp, + (long)(first_ce->myaiocb.aio_buf), + first_ce->myaiocb.aio_nbytes, + first_ce->myaiocb.aio_lio_opcode +@@ -1063,9 +1069,10 @@ + first_ce->myaiocb64.aio_lio_opcode + #endif + #else +- printf("aio_return error5: fd %d offset %ld buffer %lx size %d Opcode %d\n", ++ tmp = (long long int)first_ce->myaiocb.aio_offset; ++ printf("aio_return error5: fd %d offset %ld buffer %lx size %zd Opcode %d\n", + first_ce->myaiocb.aio_fildes, +- first_ce->myaiocb.aio_offset, ++ tmp, + (long)(first_ce->myaiocb.aio_buf), + first_ce->myaiocb.aio_nbytes, + first_ce->myaiocb.aio_lio_opcode +@@ -1204,7 +1211,7 @@ + } + else + { +- printf("Error in aio_write: ret %d errno %d count %lld\n",ret,errno,gc->w_count); ++ printf("Error in aio_write: ret %zd errno %d count %lld\n",ret,errno,gc->w_count); + /* + printf("aio_write_no_copy: fd %d buffer %x offset %lld size %d\n", + ce->myaiocb64.aio_fildes, +@@ -1367,6 +1374,7 @@ + async_wait_for_write(gc) + struct cache *gc; + { ++ long long int tmp = 0; + struct cache_ent *ce; + size_t ret,retval; + if(gc->w_head==0) +@@ -1397,12 +1405,13 @@ + } + if(ret) + { +- printf("aio_error 5: ret %d %d\n",ret,errno); ++ printf("aio_error 5: ret %zd %d\n",ret,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("fd %d offset %lld size %d\n", ++ tmp = (long long int)ce->myaiocb64.aio_offset; ++ printf("fd %d offset %lld size %zd\n", + ce->myaiocb.aio_fildes, +- ce->myaiocb.aio_offset, ++ tmp, + ce->myaiocb.aio_nbytes); + #else + printf("fd %d offset %lld size %d\n", +@@ -1466,6 +1475,7 @@ + long long depth; + char *free_addr; + { ++ long long int tmp = 0; + struct cache_ent *ce; + size_t ret; + long long direct = 1; +@@ -1503,13 +1513,14 @@ + } + else + { +- printf("Error in aio_write: ret %d errno %d\n",ret,errno); ++ printf("Error in aio_write: ret %zd errno %d\n",ret,errno); + #ifdef _LARGEFILE64_SOURCE + #ifdef __LP64__ +- printf("aio_write_no_copy: fd %d buffer %lx offset %lld size %d\n", ++ tmp = (long long int)ce->myaiocb.aio_offset; ++ printf("aio_write_no_copy: fd %d buffer %lx offset %lld size %zd\n", + ce->myaiocb.aio_fildes, + (long)(ce->myaiocb.aio_buf), +- ce->myaiocb.aio_offset, ++ tmp, + ce->myaiocb.aio_nbytes); + #else + printf("aio_write_no_copy: fd %d buffer %lx offset %lld size %d\n", diff --git a/test/automated/usrint-tests.d/ltp b/test/automated/usrint-tests.d/ltp new file mode 100755 index 0000000..d66575f --- /dev/null +++ b/test/automated/usrint-tests.d/ltp @@ -0,0 +1,114 @@ +#!/bin/bash + +#default URL, in case this script is run separately +if [ ! $URL ] +then + URL=http://devorange.clemson.edu/pvfs +fi + +LTPVER="20120903" +THISDATE=`date +%F-%R` +LTP_ARCHIVE=ltp-full-${LTPVER}.bz2 +DOWNLOAD=${URL}/${LTP_ARCHIVE} + +cd ${EXTRA_TESTS} + +# get rid of any old copies +sudo rm -rf ltp-full-${LTPVER} +sudo rm -f ltp-full-${LTPVER}.tgz +sudo rm -f ltp-full-${LTPVER}.bz2 + +# download +echo Downloading LTP... +wget -q ${DOWNLOAD} > /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to download ${DOWNLOAD}." + exit 1; +fi + +tar -xvjf ${LTP_ARCHIVE} > /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to untar ${DOWNLOAD}." + exit 1; +fi + +# fix some pvfs specific problems +cd ltp-full-${LTPVER} +#for patch in \ +patch -p1 < ${USERLIB_SCRIPTS}/ltp-20120903-zoo-path.patch +# ${USERLIB_SCRIPTS}/ltp-20080630-accept4-wrapper.patch \ +# ${USERLIB_SCRIPTS}/ltp-full-20081130-no-signalfd.patch \ +# ${USERLIB_SCRIPTS}/ltp-full-20081130-unzip.patch; do +# patch -p1 < $patch +#done +if [ "${?}" != 0 ] +then + echo "Error: failed to apply patches to LTP." + exit 1; +fi +echo Configuring LTP... +./configure --prefix=/opt/ltp ADD_CFLAGS="-D_GNU_SOURCE" >& /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to configure LTP." + exit 1; +fi +echo Compiling LTP... +export CFLAGS="-g" +make all>& /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to build LTP." + exit 1; +fi + +# NOTE: this does not install anything outside of the ltp directory. It +# just configures the test programs so that they can be executed. We +# deliberately avoid running make install at the top level because that +# _would_ install files in /opt/ltp unecessarily. +#cd testcases +sudo make install > /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to make install LTP testcases." + exit 1; +fi +#cd ../ + +# copy pvfs friendly test cases; we should pass all of these +cp ${USERLIB_SCRIPTS}/ltp-pvfs-testcases runtest/ +sudo cp ${USERLIB_SCRIPTS}/ltp-pvfs-testcases /opt/ltp/runtest/ +export ${PRELOAD} && mkdir -p ${PVFS2_MOUNTPOINT}/ltp-tmp +export ${PRELOAD} && chmod 777 ${PVFS2_MOUNTPOINT}/ltp-tmp +umask 0 + +# run ltp +echo Running LTP... +CURRENTDIR=`pwd` +cd /opt/ltp +export $PRELOAD +sudo ./runltp -p -l ${CURRENTDIR}/../ltp-pvfs-testcases-${THISDATE}.log -d ${PVFS2_MOUNTPOINT}/ltp-tmp -f ltp-pvfs-testcases -z ${EXTRA_TESTS}/zoo.tmp >& ${CURRENTDIR}/../ltp-pvfs-testcases-$THISDATE.output +LTPRET=${?} +if [ "${LTPRET}" != 0 ] +then + echo "Error: either failed to invoke LTP, or at least one test failed" +fi +cd - +cd .. + +FAILCOUNT=`grep FAIL ltp-pvfs-testcases-$THISDATE.log | wc -l` + +if [ "${FAILCOUNT}" != 0 -o "${LTPRET}" != 0 ] +then + echo "Error: failed the following LTP test cases:" + grep FAIL ltp-pvfs-testcases-$THISDATE.log + echo "log file: ${EXTRA_TESTS}/ltp-pvfs-testcases-$THISDATE.log" + echo "record of stdout and stderr: ${EXTRA_TESTS}/ltp-pvfs-testcases-$THISDATE.output" + exit 1 +fi + +echo "Completed LTP tests." + +exit 0 diff --git a/test/automated/usrint-tests.d/ltp-20080630-accept4-wrapper.patch b/test/automated/usrint-tests.d/ltp-20080630-accept4-wrapper.patch new file mode 100644 index 0000000..cbfbc80 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-20080630-accept4-wrapper.patch @@ -0,0 +1,21 @@ +diff -Naupr ltp-full-20081130/testcases/kernel/syscalls/accept4/accept4_01.c ltp-full-20081130-mod/testcases/kernel/syscalls/accept4/accept4_01.c +--- ltp-full-20081130/testcases/kernel/syscalls/accept4/accept4_01.c 2008-11-19 04:34:38.000000000 -0600 ++++ ltp-full-20081130-mod/testcases/kernel/syscalls/accept4/accept4_01.c 2010-02-02 15:40:12.000000000 -0600 +@@ -147,7 +147,7 @@ setup() + + + static int +-accept4(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags) ++accept4_internal(int fd, struct sockaddr *sockaddr, socklen_t *addrlen, int flags) + { + #ifdef DEBUG + tst_resm(TINFO, "Calling accept4(): flags = %x", flags); +@@ -202,7 +202,7 @@ do_test(int lfd, struct sockaddr_in *con + die("Connect Error"); + + addrlen = sizeof(struct sockaddr_in); +- acceptfd = accept4(lfd, (struct sockaddr *) &claddr, &addrlen, ++ acceptfd = accept4_internal(lfd, (struct sockaddr *) &claddr, &addrlen, + closeonexec_flag | nonblock_flag); + if (acceptfd == -1) + die("accept4() Error"); diff --git a/test/automated/usrint-tests.d/ltp-20080630-hackbench-limits.patch b/test/automated/usrint-tests.d/ltp-20080630-hackbench-limits.patch new file mode 100644 index 0000000..73a7204 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-20080630-hackbench-limits.patch @@ -0,0 +1,11 @@ +diff -burpN -x cscope.out -x MakefileHost -x MakefileTarget ltp-full-20080630/testcases/kernel/sched/cfs-scheduler/hackbench.c ltp-full-20080630.modified/testcases/kernel/sched/cfs-scheduler/hackbench.c +--- ltp-full-20080630/testcases/kernel/sched/cfs-scheduler/hackbench.c 2008-06-28 15:19:08.000000000 -0500 ++++ ltp-full-20080630.modified/testcases/kernel/sched/cfs-scheduler/hackbench.c 2008-07-25 10:47:08.000000000 -0500 +@@ -48,6 +48,7 @@ + /* */ + /******************************************************************************/ + #include ++#include + #include + #include + #include diff --git a/test/automated/usrint-tests.d/ltp-20080630-zoo-path.patch b/test/automated/usrint-tests.d/ltp-20080630-zoo-path.patch new file mode 100644 index 0000000..f3ce559 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-20080630-zoo-path.patch @@ -0,0 +1,53 @@ +--- ltp-full-20080630/runltp 2008-06-28 16:19:02.000000000 -0400 ++++ ltp-full-20080630-new/runltp 2008-07-21 15:47:54.000000000 -0400 +@@ -79,6 +79,7 @@ setup() + export TMP="${TMPBASE}/ltp-$$" + export TMPDIR="${TMP}" + export PATH="${PATH}:${LTPROOT}/testcases/bin" ++ export ZOOFILE="$$" + + [ -d $LTPROOT/testcases/bin ] || + { +@@ -152,6 +153,7 @@ usage() + -v Print more verbose output to screen. + -w CMDFILEADDR Uses wget to get the user's list of testcases. + -x INSTANCES Run multiple instances of this testsuite. ++ -z ZOOFILE Specify an alternate path to zoo file. + + example: ./${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD} + +@@ -191,7 +193,7 @@ main() + local DEFAULT_FILE_NAME_GENERATION_TIME=`date +"%Y_%b_%d-%Hh_%Mm_%Ss"` + version_date=`head -n 1 $LTPROOT/ChangeLog` + +- while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x: arg ++ while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x:z: arg + do case $arg in + a) EMAIL_TO=$OPTARG + ALT_EMAIL_OUT=1;; +@@ -377,6 +379,7 @@ main() + sleep 10 + INSTANCES="-x $OPTARG -O ${TMP}";; + ++ z) ZOOFILE=$OPTARG;; + \?) usage;; + esac + done +@@ -624,7 +627,7 @@ main() + fi + + [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; } +- PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \ ++ PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE \ + -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE" + if [ ! -z "$VERBOSE_MODE" ] ; then + echo "COMMAND: $PAN_COMMAND" +@@ -652,7 +655,7 @@ main() + + echo "Running tests......." + test_start_time=$(date) +- ${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE ++ ${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE + + if [ $? -eq 0 ]; then + echo "INFO: pan reported all tests PASS" diff --git a/test/automated/usrint-tests.d/ltp-20120903-zoo-path.patch b/test/automated/usrint-tests.d/ltp-20120903-zoo-path.patch new file mode 100644 index 0000000..af9b412 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-20120903-zoo-path.patch @@ -0,0 +1,57 @@ +--- ltp-full-20120903/runltp 2012-09-03 00:39:26.000000000 -0400 ++++ ltp-full-20120903-patched/runltp 2012-10-23 15:33:25.709909793 -0400 +@@ -79,6 +79,7 @@ + export LTPROOT=${PWD} + export TMPBASE="/tmp" + export PATH="${PATH}:${LTPROOT}/testcases/bin" ++ export ZOOFILE="$$" + + [ -d "$LTPROOT/testcases/bin" ] || + { +@@ -163,9 +164,9 @@ + -b DEVICE Some tests require an unmounted block device + to run correctly. + -B DEVICE_FS_TYPE The file system of test block devices. ++ -z ZOOFILE Specify an alternate path to zoo file. + +- +- example: ${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD} ++ example: ./${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD} + + + EOF +@@ -211,7 +212,7 @@ + + version_date=$(cat "$LTPROOT/Version") + +- while getopts a:c:C:d:D:f:F:ehi:K:g:l:m:M:Nno:pqr:s:S:t:T:w:x:b:B: arg ++ while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x:z: arg + do case $arg in + a) EMAIL_TO=$OPTARG + ALT_EMAIL_OUT=1;; +@@ -424,6 +425,8 @@ + INSTANCES="-x $OPTARG";; + b) DEVICE=$OPTARG;; + B) DEVICE_FS_TYPE=$OPTARG;; ++ ++ z) ZOOFILE=$OPTARG;; + \?) usage;; + esac + done +@@ -740,7 +743,7 @@ + fi + + [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; } +- PAN_COMMAND="${LTPROOT}/bin/ltp-pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \ ++ PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE \ + -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE" + echo "COMMAND: $PAN_COMMAND" + if [ ! -z "$TAG_RESTRICT_STRING" ] ; then +@@ -834,6 +837,7 @@ + # Some tests need to run inside the "bin" directory. + cd "${LTPROOT}/testcases/bin" + "${LTPROOT}/bin/ltp-pan" $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE ++ "${LTPROOT}/bin/ltp-pan" $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE + + if [ $? -eq 0 ]; then + echo "INFO: ltp-pan reported all tests PASS" diff --git a/test/automated/usrint-tests.d/ltp-full-20081130-no-signalfd.patch b/test/automated/usrint-tests.d/ltp-full-20081130-no-signalfd.patch new file mode 100644 index 0000000..e925942 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-full-20081130-no-signalfd.patch @@ -0,0 +1,14 @@ +--- ltp-full-20081130/include/config.h.default 2008-11-12 14:30:36.000000000 -0500 ++++ ltp-full-20081130-new/include/config.h.default 2010-06-29 11:47:50.000000000 -0400 +@@ -8,6 +8,11 @@ + #define HAVE_LINUX_TYPES_H 1 + + /* signalfd() is in glibc-2.7+ */ ++/* OrangeFS is currently running glibc-2.5, so we will comment out these ++ * definitions for now. ++*/ ++/* + #define HAVE_SYS_SIGNALFD_H 1 + #define HAVE_SIGNALFD 1 + #define HAVE_SIGNALFD_SIGINFO_SSI_SIGNO 1 ++*/ diff --git a/test/automated/usrint-tests.d/ltp-full-20081130-unzip.patch b/test/automated/usrint-tests.d/ltp-full-20081130-unzip.patch new file mode 100644 index 0000000..82f87e8 --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-full-20081130-unzip.patch @@ -0,0 +1,61 @@ +diff -Naupr ltp-full-20081130/testcases/commands/unzip/Makefile ltp-full-20081130-new/testcases/commands/unzip/Makefile +--- ltp-full-20081130/testcases/commands/unzip/Makefile 2003-03-04 00:37:41.000000000 -0500 ++++ ltp-full-20081130-new/testcases/commands/unzip/Makefile 2010-06-29 14:25:12.000000000 -0400 +@@ -4,7 +4,7 @@ all: + install: + ln -f unzip_tests.sh ../../bin/unzip_tests.sh + ln -f tst_unzip_file.zip ../../bin/tst_unzip_file.zip +- ln -f tst_unzip_file.zip /tmp/tst_unzip_file.zip ++ ln -f tst_unzip_file.zip ../../tmp/tst_unzip_file.zip + + clean: + rm -f tst_unzip_file.zip +diff -Naupr ltp-full-20081130/testcases/commands/unzip/unzip_genfile.sh ltp-full-20081130-new/testcases/commands/unzip/unzip_genfile.sh +--- ltp-full-20081130/testcases/commands/unzip/unzip_genfile.sh 2003-03-04 00:37:41.000000000 -0500 ++++ ltp-full-20081130-new/testcases/commands/unzip/unzip_genfile.sh 2010-06-29 14:26:19.000000000 -0400 +@@ -31,17 +31,17 @@ + + # Create directories and fill them with files. + +-numdirs=3 # number of directories to create +-numfiles=3 # number of file to create in each directory +-dirname=/tmp/tst_unzip.dir # name of the base directory +-dircnt=0 # index into number of dirs created in loop +-fcnt=0 # index into number of files created in loop +-RC=0 # return value from commands ++numdirs=3 # number of directories to create ++numfiles=3 # number of file to create in each directory ++dirname=../../tmp/tst_unzip.dir # name of the base directory ++dircnt=0 # index into number of dirs created in loop ++fcnt=0 # index into number of files created in loop ++RC=0 # return value from commands + + while [ $dircnt -lt $numdirs ] + do +- dirname=$dirname/d.$dircnt +- mkdir -p $dirname &>/dev/null || RC=$? ++ dirname2=$dirname/d.$dircnt ++ mkdir -p $dirname2 &>/dev/null || RC=$? + if [ $RC -ne 0 ] + then + echo "unzip_genfile.sh: ERROR: while creating $numdirs dirs." +@@ -50,7 +50,7 @@ do + fcnt=0 + while [ $fcnt -lt $numfiles ] + do +- touch $dirname/f.$fcnt ++ touch $dirname2/f.$fcnt + if [ $RC -ne 0 ] + then + echo "unzip_genfile.sh: ERROR: creating $numdirs dirs." +@@ -63,8 +63,8 @@ done + + # Create ZIP file. + +-zip -r tst_unzip_file.zip /tmp/tst_unzip.dir &>/dev/null ++zip -r tst_unzip_file.zip $dirname &>/dev/null + +-rm -fr /tmp/tst_unzip.* &>/dev/null ++rm -fr $dirname &>/dev/null + + exit $RC diff --git a/test/automated/usrint-tests.d/ltp-pvfs-testcases b/test/automated/usrint-tests.d/ltp-pvfs-testcases new file mode 100644 index 0000000..07a649b --- /dev/null +++ b/test/automated/usrint-tests.d/ltp-pvfs-testcases @@ -0,0 +1,325 @@ +# LTP test cases for PVFS +# known to work with LTP version 20060717, not sure about later versions + +access03 access03 +asyncio02 asyncio02 +chdir02 chdir02 +chown01 chown01 +close08 close08 +creat09 creat09 +dup01 dup01 +dup02 dup02 +dup03 dup03 +dup04 dup04 +fchmod01 fchmod01 +fchown01 fchown01 +fcntl02 fcntl02 +fcntl03 fcntl03 +fcntl04 fcntl04 +fcntl07 fcntl07 +fcntl08 fcntl08 +fpathconf01 fpathconf01 +fstat01 fstat01 +fstatfs01 fstatfs01 +fsync01 fsync01 +lseek01 lseek01 +lseek02 lseek02 +lseek03 lseek03 +lseek05 lseek05 +lstat02 lstat02 +mkdir01 mkdir01 +mkdir08 mkdir08 +open03 open03 +pathconf01 pathconf01 +read01 read01 +readdir01 readdir01 +readlink02 readlink02 +rename02 rename02 +rmdir04 rmdir04 +rmdir05 rmdir05 +select01 select01 +select02 select02 +stat05 stat05 +stat06 stat06 +statfs01 statfs01 +sync01 sync01 +umask01 umask01 +unlink05 unlink05 +unlink07 unlink07 +unlink08 unlink08 +write01 write01 +symlink01 symlink01 +symlink02 symlink02 +readlink01 symlink01 -T readlink01 +lstat01 symlink01 -T lstat01 +mkdir05 symlink01 -T mkdir05 +rmdir03 symlink01 -T rmdir03 +chdir01 symlink01 -T chdir01 +unlink01 symlink01 -T unlink01 +chmod01 symlink01 -T chmod01 +utime01 symlink01 -T utime01 +rename01 symlink01 -T rename01 +open01 symlink01 -T open01 +abort01 ulimit -c 1024;abort01 +access02 access02 +access04 access04 +access05 access05 +chdir01 chdir01 +chdir01A symlink01 -T chdir01 +chdir03 chdir03 +chdir04 chdir04 +chmod01A symlink01 -T chmod01 +chown05 chown05 +chroot01 chroot01 +chroot02 chroot02 +chroot03 chroot03 +chroot04 chroot04 +close01 close01 +close02 close02 +creat01 creat01 +creat03 creat03 +creat04 creat04 +creat05 creat05 +creat06 creat06 +# creat07 has changed in ltp 20120903. No longer recognizes -F option +#creat07 creat07 -F $LTPROOT/testcases/bin/test1 +creat07 creat07 +creat08 creat08 +dup06 dup06 +dup07 dup07 +dup201 dup201 +dup202 dup202 +dup203 dup203 +dup204 dup204 +dup205 dup205 +fchdir01 fchdir01 +fchdir02 fchdir02 +fchdir03 fchdir03 +fchown04 export change_owner=$LTPROOT/testcases/bin/change_owner;fchown04 +fchown05 fchown05 +fcntl01 fcntl01 +fcntl06 fcntl06 +fcntl12 fcntl12 +fcntl13 fcntl13 +fcntl18 fcntl18 +fdatasync01 fdatasync01 +fdatasync02 fdatasync02 +fstat02 fstat02 +fstat03 fstat03 +fstat04 fstat04 +fstat05 fstat05 +fstatfs02 fstatfs02 +fsync03 fsync03 +ftruncate01 ftruncate01 +ftruncate02 ftruncate02 +ftruncate03 ftruncate03 +ftruncate04 ftruncate04 +getcwd01 getcwd01 +getcwd02 getcwd02 +getcwd03 getcwd03 +getdents01 getdents01 +getdents02 getdents02 +getdents03 getdents03 +getdents04 getdents04 +ioperm01 ioperm01 +iopl01 iopl01 +iopl02 iopl02 +lchown01 lchown01 +link06 link06 +link07 link07 +llseek01 llseek01 +llseek02 llseek02 +lseek06 lseek06 +lseek07 lseek07 +lseek08 lseek08 +lseek09 lseek09 +lstat01 lstat01 +lstat03 lstat03 +mallopt01 mallopt01 +mkdir02 mkdir02 +mkdir03 mkdir03 +mkdir04 mkdir04 +mkdir05 mkdir05 +mkdir05A symlink01 -T mkdir05 +mkdir09 mkdir09 +mmap06 mmap06 +mmap07 mmap07 +mmap08 mmap08 +modify_ldt01 modify_ldt01 +modify_ldt02 modify_ldt02 +mprotect01 mprotect01 +mremap02 mremap02 +mremap03 mremap03 +mremap04 mremap04 +msync03 msync03 +msync04 msync04 +msync05 msync05 +nftw01 nftw01 +nftw6401 nftw6401 +open01A symlink01 -T open01 +open02 open02 +open04 open04 +open05 open05 +open07 open07 +open08 open08 +open09 open09 +open10 open10 +pipe01 pipe01 +pipe02 pipe02 +pipe03 pipe03 +pipe04 pipe04 +pipe05 pipe05 +pipe06 pipe06 +pipe07 pipe07 +pipe08 pipe08 +pipe09 pipe09 +pipe10 pipe10 +pipe11 pipe11 +prctl01 prctl01 +prctl02 prctl02 +pread01 pread01 +pread02 pread02 +pread03 pread03 +profil01 profil01 +ptrace01 ptrace01 +ptrace02 ptrace02 +ptrace03 ptrace03 +pwrite01 pwrite01 +pwrite02 pwrite02 +pwrite03 pwrite03 +pwrite04 pwrite04 +read02 read02 +read04 read04 +readdir02 readdir02 +readlink01A symlink01 -T readlink01 +readlink01 readlink01 +readlink03 readlink03 +readlink04 cp -f $LTPROOT/testcases/bin/creat_slink $TMP; readlink04 +readv01 readv01 +readv02 readv02 +readv03 readv03 +rename01 rename01 +rename01A symlink01 -T rename01 +rename03 rename03 +rename04 rename04 +rename05 rename05 +rename06 rename06 +rename07 rename07 +rename08 rename08 +rename09 rename09 +rename10 rename10 +rename14 rename14 +rmdir01 rmdir01 +rmdir02 rmdir02 +rmdir03A symlink01 -T rmdir03 +stat01 stat01 +stat02 stat02 +stat03 stat03 +statfs02 statfs02 +statfs03 statfs03 +symlink03 symlink03 +symlink04 symlink04 +symlink05 symlink05 +sync02 sync02 +syscall01 syscall01 +sysconf01 sysconf01 +sysfs02 sysfs02 +sysfs03 sysfs03 +sysfs04 sysfs04 +sysfs05 sysfs05 +sysfs06 sysfs06 +sysinfo01 sysinfo01 +sysinfo02 sysinfo02 +truncate01 truncate01 +truncate02 truncate02 +truncate03 truncate03 +truncate04 truncate04 +umask02 umask02 +umask03 umask03 +uname01 uname01 +uname02 uname02 +uname03 uname03 +ustat01 ustat01 +ustat02 ustat02 +utime01 utime01 +utime01A symlink01 -T utime01 +utime02 utime02 +utime03 utime03 +utime04 utime04 +utime05 utime05 +utime06 utime06 +write02 write02 +write03 write03 +write05 write05 +writev02 writev02 +writev05 writev05 +pipeio_3 pipeio -T pipeio_3 -c 5 -s 4090 -i 100 -u -b -f x80 +pipeio_4 pipeio -T pipeio_4 -c 5 -s 4090 -i 100 -u -f x80 +pipeio_6 pipeio -T pipeio_6 -c 5 -s 5000 -i 10 -b -u -f x80 +pipeio_8 pipeio -T pipeio_8 -c 5 -s 5000 -i 10 -u -f x80 +openfile01 openfile -f10 -t10 +statvfs01 statvfs01 +stat04 symlink01 -T stat04 +lstat01A symlink01 -T lstat01 + + +# TESTS THAT ARE KNOWN TO FAIL +############################################### + +# this is a known issue, not likely to be fixed. The posix semantics are not +# well defined for writev in some cases and pvfs2 differs in its +# interpretation from ext3 +# http://www.beowulf-underground.org/pipermail/pvfs2-developers/2005-August/001449.html + +# writev01 writev01 +# writev03 writev03 +# writev04 writev04 + +# PVFS does not support mkfifo, needed by a few pipeio,lseek,unlink tests + +# These tests use tests/pipeio to put pipes (named or unnamed) through a workout +# +# pipeio_1 pipeio -T pipeio_1 -c 5 -s 4090 -i 100 -b -f x80 + +# spawns 5 children to write 100 chunks of 4090 bytes to an unnamed pipe +# using non-blocking I/O +# pipeio_5 pipeio -T pipeio_5 -c 5 -s 5000 -i 10 -b -f x80 +# unlink06 unlink06 + +# PVFS does not support mknod, needed by this lseek,open,read test +# lseek10 lseek10 +# open06 open06 +# read03 read03 +# write04 write04 + +# PVFS does not support the S_ISVTX (sticky) permission bit +# rename12 rename12 +# rmdir03 rmdir03 + +# PVFS does not support hard links +# rename13 rename13 + +# PVFS does not support close-on-exec (see F_SETFD in fcntl man page) +# open01 1 FAIL : Save test bit cleared, but should not have been +# open01 open01 + +# PVFS does not support suid? +# chown04 cp -p $LTPROOT/testcases/bin/change_owner $TMP;chown04 +# fchmod06 cp -p $LTPROOT/testcases/bin/change_owner $TMP;fchmod06 +# lchown02 cp -p $LTPROOT/testcases/bin/create_link $TMP; lchown02 + +# PVFS does not support flocks +# fcntl05 fcntl05 +# fcntl22 fcntl22 +# fcntl09 fcntl09 +# fcntl10 fcntl10 +# fcntl11 fcntl11 +# fcntl14 fcntl14 +# fcntl15 fcntl15 +# fcntl17 fcntl17 +# fcntl19 fcntl19 +# fcntl20 fcntl20 +# fcntl21 fcntl21 + +# this test is specific to ext2 +# sysfs01 sysfs01 diff --git a/test/automated/usrint-tests.d/mkdir-vfs b/test/automated/usrint-tests.d/mkdir-vfs new file mode 100755 index 0000000..5c85b38 --- /dev/null +++ b/test/automated/usrint-tests.d/mkdir-vfs @@ -0,0 +1,6 @@ +#!/bin/sh + +PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH} +echo $PATH +export PATH +export ${PRELOAD} && ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-mkdir --directory ${PVFS2_MOUNTPOINT} diff --git a/test/automated/usrint-tests.d/mpi-env.log b/test/automated/usrint-tests.d/mpi-env.log new file mode 100644 index 0000000..c897171 --- /dev/null +++ b/test/automated/usrint-tests.d/mpi-env.log @@ -0,0 +1,40 @@ +HOSTNAME=devorange23 +MALLOC_CHECK_=2 +VFSHOSTS=devorange23 +PVFS2_MOUNTPOINT=/tmp/jburto2/pvfs2-nightly/20130218/branches/trunktestjdb/mount +TERM=xterm-color +SHELL=/bin/bash +HISTSIZE=1000 +SSH_CLIENT=10.127.0.1 39614 22 +RUN_VFS_TEST=1 +PVFS2_DEST=/tmp/jburto2/pvfs2-nightly/20130218/branches/trunktestjdb +CVSROOT=cvs.parl.clemson.edu:/projects/cvsroot +OLDPWD=/home/jburto2/test2/pvfs2/test/automated/sysint-tests.d +SSH_TTY=/dev/pts/0 +USER=jburto2 +LD_LIBRARY_PATH=/tmp/jburto2/pvfs2-nightly/20130218/branches/trunktestjdb/INSTALL-pvfs2-trunktestjdb/lib:/opt/db4/lib:/opt/db4/lib +LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36: +SVNBRANCH=branches/trunktestjdb +MAIL=/var/spool/mail/jburto2 +PATH=/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jburto2/bin +PWD=/home/jburto2/test2/pvfs2/test/automated/vfs-tests.d +LANG=en_US.UTF-8 +RUN_MPI_TEST=1 +USERLIB_SCRIPTS=/home/jburto2/test2/pvfs2/test/automated/vfs-tests.d +CVS_TAG=trunktestjdb +RUN_USERLIB_TEST=1 +URL=http://devorange.clemson.edu/pvfs +HISTCONTROL=ignoredups +PVFS2TAB_FILE=/tmp/jburto2/pvfs2-nightly/20130218/branches/trunktestjdb/pvfs2tab +CVS_TAG_FULL=branches/trunktestjdb +SHLVL=5 +HOME=/home/jburto2 +WITH_DB=/opt/db4 +LOGNAME=jburto2 +CVS_RSH=/usr/bin/ssh +SSH_CONNECTION=10.127.0.1 39614 10.127.0.63 22 +LESSOPEN=|/usr/bin/lesspipe.sh %s +BENCHMARKS=benchmarks-20121017.tar.gz +EXTRA_TESTS=/tmp/jburto2/src/benchmarks +G_BROKEN_FILENAMES=1 +_=/bin/env diff --git a/test/automated/usrint-tests.d/shell-scripts/append.sh b/test/automated/usrint-tests.d/shell-scripts/append.sh new file mode 100755 index 0000000..7d87f22 --- /dev/null +++ b/test/automated/usrint-tests.d/shell-scripts/append.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +pvfs2_testfile=${PVFS2_MOUNTPOINT}/append_test +local_reference=${PVFS2_DEST}/append_ref +datagen() { + for I in `seq 1 25`; do + echo "line$I" + done +} + +datagen > $local_reference +datagen > $pvfs2_testfile +datagen >> $local_reference +datagen >> $pvfs2_testfile + +diff -u $local_reference $pvfs2_testfile diff --git a/test/automated/usrint-tests.d/shell-scripts/append2.sh b/test/automated/usrint-tests.d/shell-scripts/append2.sh new file mode 100755 index 0000000..ee72cea --- /dev/null +++ b/test/automated/usrint-tests.d/shell-scripts/append2.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +pvfs2_testdir=${PVFS2_MOUNTPOINT}/append_dir +pvfs2_testfile=${pvfs2_testdir}/append_test2 +local_reference=${PVFS2_DEST}/append_ref2 + +datagen() { + for I in `seq 1 25`; do + echo "line$I" + done +} + +mkdir -p $pvfs2_testdir + +datagen > $local_reference +datagen > $pvfs2_testfile +datagen >> $local_reference +datagen >> $pvfs2_testfile + +diff -u $local_reference $pvfs2_testfile diff --git a/test/automated/usrint-tests.d/shell-scripts/tail.sh b/test/automated/usrint-tests.d/shell-scripts/tail.sh new file mode 100755 index 0000000..6e110bc --- /dev/null +++ b/test/automated/usrint-tests.d/shell-scripts/tail.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +pvfs2_tailtest=${PVFS2_MOUNTPOINT}/tail_test +local_reference=${PVFS2_DEST}/tail_ref +datagen() { + for I in `seq 1 25`; do + echo "line$I" + done +} + +datagen > $pvfs2_tailtest + +tail $pvfs2_tailtest diff --git a/test/automated/usrint-tests.d/shelltest b/test/automated/usrint-tests.d/shelltest new file mode 100755 index 0000000..286b2ca --- /dev/null +++ b/test/automated/usrint-tests.d/shelltest @@ -0,0 +1,3 @@ +#!/bin/bash + +export ${PRELOAD} && bash ${PVFS2_DEST}/pvfs2-${CVS_TAG}/test/kernel/linux-2.6/pvfs2-shell-test.sh ${PVFS2_MOUNTPOINT} 2>&1 diff --git a/test/automated/usrint-tests.d/symlink-vfs b/test/automated/usrint-tests.d/symlink-vfs new file mode 100755 index 0000000..38b6d38 --- /dev/null +++ b/test/automated/usrint-tests.d/symlink-vfs @@ -0,0 +1,6 @@ +#!/bin/sh + +PATH=${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin:${PATH} +echo $PATH +export PATH +export ${PRELOAD} && ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/test/test-symlink-perms --directory ${PVFS2_MOUNTPOINT} diff --git a/test/automated/usrint-tests.d/tail b/test/automated/usrint-tests.d/tail new file mode 100755 index 0000000..fc50374 --- /dev/null +++ b/test/automated/usrint-tests.d/tail @@ -0,0 +1,3 @@ +#!/bin/bash + +export ${PRELOAD} && bash shell-scripts/tail.sh diff --git a/test/automated/usrint-tests.d/vfs-cp b/test/automated/usrint-tests.d/vfs-cp new file mode 100755 index 0000000..da333be --- /dev/null +++ b/test/automated/usrint-tests.d/vfs-cp @@ -0,0 +1,6 @@ +#!/bin/sh + +export ${PRELOAD} && cp ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp ${PVFS2_MOUNTPOINT} +export ${PRELOAD} && cp ${PVFS2_MOUNTPOINT}/pvfs2-cp ${PVFS2_DEST} + +export ${PRELOAD} && cmp ${PVFS2_DEST}/pvfs2-cp ${PVFS2_DEST}/INSTALL-pvfs2-${CVS_TAG}/bin/pvfs2-cp diff --git a/test/automated/vfs-tests.d/append b/test/automated/vfs-tests.d/append old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/append2 b/test/automated/vfs-tests.d/append2 old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/bonnie b/test/automated/vfs-tests.d/bonnie old mode 100644 new mode 100755 index a0d7434..75c0f79 --- a/test/automated/vfs-tests.d/bonnie +++ b/test/automated/vfs-tests.d/bonnie @@ -1,6 +1,6 @@ #!/bin/sh -cd ${EXTRA_TESTS}/bonnie++-1.03a +cd ${EXTRA_TESTS}/bonnie++-1.03e ./configure -q && make 2>&1 && cd ${PVFS2_MOUNTPOINT} || exit 1 cd ${PVFS2_MOUNTPOINT} && \ - ${EXTRA_TESTS}/bonnie++-1.03a/bonnie++ -n 1:0:0:1 -r 8 -s 16 2>&1 + ${EXTRA_TESTS}/bonnie++-1.03e/bonnie++ -n 1:0:0:1 -r 8 -s 16 2>&1 diff --git a/test/automated/vfs-tests.d/dbench b/test/automated/vfs-tests.d/dbench old mode 100644 new mode 100755 index 033c348..0498872 --- a/test/automated/vfs-tests.d/dbench +++ b/test/automated/vfs-tests.d/dbench @@ -4,7 +4,7 @@ if [ ! $BENCHMARKS ] then #this is the existing name of the tar file - BENCHMARKS=benchmarks-20060512.tar.gz + BENCHMARKS=benchmarks-20121017.tar.gz fi #make directory, if it doesn't exist @@ -14,17 +14,18 @@ mkdir -p ${EXTRA_TESTS}/dbench-3.03 cwd=`pwd` #goto benchmark directory and cleanup -cd ${EXTRA_TESTS} -sudo /bin/rm -rf dbench-3.03 +cd ${EXTRA_TESTS}/dbench-3.03 +make clean +#sudo /bin/rm -rf dbench-3.03 #go back -cd .. +#cd .. #untar the dbench directory -tar -xzf ${BENCHMARKS} benchmarks/dbench-3.03/* +#tar -xzf --wildcards ${BENCHMARKS} benchmarks/dbench-3.03/* #goto the dbench directory -cd benchmarks/dbench-3.03 +#cd benchmarks/dbench-3.03 #configure the dbench software ./configure -q diff --git a/test/automated/vfs-tests.d/fdtree b/test/automated/vfs-tests.d/fdtree old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/fstest b/test/automated/vfs-tests.d/fstest old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/fsx b/test/automated/vfs-tests.d/fsx old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/iozone b/test/automated/vfs-tests.d/iozone old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/ltp b/test/automated/vfs-tests.d/ltp old mode 100644 new mode 100755 index b557532..5e1124e --- a/test/automated/vfs-tests.d/ltp +++ b/test/automated/vfs-tests.d/ltp @@ -6,9 +6,9 @@ then URL=http://devorange.clemson.edu/pvfs fi -LTPVER="20081130" +LTPVER="20120903" THISDATE=`date +%F-%R` -LTP_ARCHIVE=ltp-full-${LTPVER}.tgz +LTP_ARCHIVE=ltp-full-${LTPVER}.bz2 DOWNLOAD=${URL}/${LTP_ARCHIVE} cd ${EXTRA_TESTS} @@ -16,6 +16,7 @@ cd ${EXTRA_TESTS} # get rid of any old copies sudo rm -rf ltp-full-${LTPVER} sudo rm -f ltp-full-${LTPVER}.tgz +sudo rm -f ltp-full-${LTPVER}.bz2 # download echo Downloading LTP... @@ -26,7 +27,7 @@ then exit 1; fi -tar -xvzf ${LTP_ARCHIVE} > /dev/null +tar -xvjf ${LTP_ARCHIVE} > /dev/null if [ "${?}" != 0 ] then echo "Error: failed to untar ${DOWNLOAD}." @@ -35,22 +36,28 @@ fi # fix some pvfs specific problems cd ltp-full-${LTPVER} -for patch in \ - ${VFS_SCRIPTS}/ltp-20080630-zoo-path.patch \ - ${VFS_SCRIPTS}/ltp-20080630-accept4-wrapper.patch \ - ${VFS_SCRIPTS}/ltp-full-20081130-no-signalfd.patch \ - ${VFS_SCRIPTS}/ltp-full-20081130-unzip.patch; do - patch -p1 < $patch -done +#for patch in \ +patch -p1 < ${VFS_SCRIPTS}/ltp-20120903-zoo-path.patch +# ${VFS_SCRIPTS}/ltp-20080630-accept4-wrapper.patch \ +# ${VFS_SCRIPTS}/ltp-full-20081130-no-signalfd.patch \ +# ${VFS_SCRIPTS}/ltp-full-20081130-unzip.patch; do +# patch -p1 < $patch +#done if [ "${?}" != 0 ] then echo "Error: failed to apply patches to LTP." exit 1; fi - +echo Configuring LTP... +./configure --prefix=/opt/ltp ADD_CFLAGS="-D_GNU_SOURCE" >& /dev/null +if [ "${?}" != 0 ] +then + echo "Error: failed to configure LTP." + exit 1; +fi echo Compiling LTP... export CFLAGS="-g" -make >& /dev/null +make all>& /dev/null if [ "${?}" != 0 ] then echo "Error: failed to build LTP." @@ -61,30 +68,33 @@ fi # just configures the test programs so that they can be executed. We # deliberately avoid running make install at the top level because that # _would_ install files in /opt/ltp unecessarily. -cd testcases +#cd testcases sudo make install > /dev/null if [ "${?}" != 0 ] then echo "Error: failed to make install LTP testcases." exit 1; fi -cd ../ +#cd ../ # copy pvfs friendly test cases; we should pass all of these cp ${VFS_SCRIPTS}/ltp-pvfs-testcases runtest/ +sudo cp ${VFS_SCRIPTS}/ltp-pvfs-testcases /opt/ltp/runtest/ mkdir -p ${PVFS2_MOUNTPOINT}/ltp-tmp chmod 777 ${PVFS2_MOUNTPOINT}/ltp-tmp umask 0 # run ltp echo Running LTP... -sudo ./runltp -p -l `pwd`/../ltp-pvfs-testcases-${THISDATE}.log -d ${PVFS2_MOUNTPOINT}/ltp-tmp -f ltp-pvfs-testcases -z ${EXTRA_TESTS}/zoo.tmp >& `pwd`/../ltp-pvfs-testcases-$THISDATE.output +CURRENTDIR=`pwd` +cd /opt/ltp +sudo ./runltp -p -l ${CURRENTDIR}/../ltp-pvfs-testcases-${THISDATE}.log -d ${PVFS2_MOUNTPOINT}/ltp-tmp -f ltp-pvfs-testcases -z ${EXTRA_TESTS}/zoo.tmp >& ${CURRENTDIR}/../ltp-pvfs-testcases-$THISDATE.output LTPRET=${?} if [ "${LTPRET}" != 0 ] then echo "Error: either failed to invoke LTP, or at least one test failed" fi - +cd - cd .. FAILCOUNT=`grep FAIL ltp-pvfs-testcases-$THISDATE.log | wc -l` diff --git a/test/automated/vfs-tests.d/ltp-20120903-zoo-path.patch b/test/automated/vfs-tests.d/ltp-20120903-zoo-path.patch new file mode 100644 index 0000000..af9b412 --- /dev/null +++ b/test/automated/vfs-tests.d/ltp-20120903-zoo-path.patch @@ -0,0 +1,57 @@ +--- ltp-full-20120903/runltp 2012-09-03 00:39:26.000000000 -0400 ++++ ltp-full-20120903-patched/runltp 2012-10-23 15:33:25.709909793 -0400 +@@ -79,6 +79,7 @@ + export LTPROOT=${PWD} + export TMPBASE="/tmp" + export PATH="${PATH}:${LTPROOT}/testcases/bin" ++ export ZOOFILE="$$" + + [ -d "$LTPROOT/testcases/bin" ] || + { +@@ -163,9 +164,9 @@ + -b DEVICE Some tests require an unmounted block device + to run correctly. + -B DEVICE_FS_TYPE The file system of test block devices. ++ -z ZOOFILE Specify an alternate path to zoo file. + +- +- example: ${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD} ++ example: ./${0##*/} -c 2 -i 2 -m 2,4,10240,1 -D 2,10,10240,1 -p -q -l /tmp/result-log.$$ -o /tmp/result-output.$$ -C /tmp/result-failed.$$ -d ${PWD} + + + EOF +@@ -211,7 +212,7 @@ + + version_date=$(cat "$LTPROOT/Version") + +- while getopts a:c:C:d:D:f:F:ehi:K:g:l:m:M:Nno:pqr:s:S:t:T:w:x:b:B: arg ++ while getopts a:c:C:d:D:f:ehi:g:l:m:Nno:pqr:s:t:T:vw:x:z: arg + do case $arg in + a) EMAIL_TO=$OPTARG + ALT_EMAIL_OUT=1;; +@@ -424,6 +425,8 @@ + INSTANCES="-x $OPTARG";; + b) DEVICE=$OPTARG;; + B) DEVICE_FS_TYPE=$OPTARG;; ++ ++ z) ZOOFILE=$OPTARG;; + \?) usage;; + esac + done +@@ -740,7 +743,7 @@ + fi + + [ ! -z "$QUIET_MODE" ] && { echo "INFO: Test start time: $(date)" ; } +- PAN_COMMAND="${LTPROOT}/bin/ltp-pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ \ ++ PAN_COMMAND="${LTPROOT}/pan/pan $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE \ + -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE" + echo "COMMAND: $PAN_COMMAND" + if [ ! -z "$TAG_RESTRICT_STRING" ] ; then +@@ -834,6 +837,7 @@ + # Some tests need to run inside the "bin" directory. + cd "${LTPROOT}/testcases/bin" + "${LTPROOT}/bin/ltp-pan" $QUIET_MODE -e -S $INSTANCES $DURATION -a $$ -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE ++ "${LTPROOT}/bin/ltp-pan" $QUIET_MODE -e -S $INSTANCES $DURATION -a $ZOOFILE -n $$ $PRETTY_PRT -f ${TMP}/alltests $LOGFILE $OUTPUTFILE $FAILCMDFILE + + if [ $? -eq 0 ]; then + echo "INFO: ltp-pan reported all tests PASS" diff --git a/test/automated/vfs-tests.d/ltp-pvfs-testcases b/test/automated/vfs-tests.d/ltp-pvfs-testcases index 528ff14..07a649b 100644 --- a/test/automated/vfs-tests.d/ltp-pvfs-testcases +++ b/test/automated/vfs-tests.d/ltp-pvfs-testcases @@ -81,7 +81,9 @@ creat03 creat03 creat04 creat04 creat05 creat05 creat06 creat06 -creat07 creat07 -F $LTPROOT/testcases/bin/test1 +# creat07 has changed in ltp 20120903. No longer recognizes -F option +#creat07 creat07 -F $LTPROOT/testcases/bin/test1 +creat07 creat07 creat08 creat08 dup06 dup06 dup07 dup07 diff --git a/test/automated/vfs-tests.d/mkdir-vfs b/test/automated/vfs-tests.d/mkdir-vfs old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/shelltest b/test/automated/vfs-tests.d/shelltest old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/symlink-vfs b/test/automated/vfs-tests.d/symlink-vfs old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/tail b/test/automated/vfs-tests.d/tail old mode 100644 new mode 100755 diff --git a/test/automated/vfs-tests.d/vfs-cp b/test/automated/vfs-tests.d/vfs-cp old mode 100644 new mode 100755 diff --git a/test/ci/jenkins-build.sh b/test/ci/jenkins-build.sh old mode 100644 new mode 100755 diff --git a/test/ci/jenkins-doc.sh b/test/ci/jenkins-doc.sh old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/condvar1.c b/test/common/gen-locks/condvar1.c old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/condvar2_1.c b/test/common/gen-locks/condvar2_1.c old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/condvar3.c b/test/common/gen-locks/condvar3.c old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/condvar3_1.c b/test/common/gen-locks/condvar3_1.c old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/condvar3_2.c b/test/common/gen-locks/condvar3_2.c old mode 100644 new mode 100755 diff --git a/test/common/gen-locks/test-null-lock.c b/test/common/gen-locks/test-null-lock.c deleted file mode 100644 index 8614332..0000000 --- a/test/common/gen-locks/test-null-lock.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * copyright (c) 2001 Clemson University, all rights reserved. - * - * Written by Phil Carns. - * - * This program is free software; you can redistribute it and/or - * modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2 of the License, - * or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Contact: Phil Carns pcarns@parl.clemson.edu - */ - -#include -#include - -/* gen_locks can be declared and initialized at the same time */ -static gen_mutex_t test_mutex = GEN_MUTEX_INITIALIZER; -static int foo_function(void); - - -int main(int argc, char **argv) { - - gen_mutex_lock(&test_mutex); - /* Access critical region here */ - printf("Critical region 1.\n"); - gen_mutex_unlock(&test_mutex); - - foo_function(); - - return(0); -} - - -/* this function shows how mutex's can be dynamically allocated and - * destroyed */ -static int foo_function(void){ - - gen_mutex_t foo_mutex; - - gen_mutex_init(&foo_mutex); - - gen_mutex_lock(&foo_mutex); - /* Access critical region */ - printf("Critical region 2.\n"); - gen_mutex_unlock(&foo_mutex); - - gen_mutex_destroy(&foo_mutex); - - return(0); -} diff --git a/test/common/gen-locks/test-pthread-lock.c b/test/common/gen-locks/test-pthread-lock.c deleted file mode 100644 index 8614332..0000000 --- a/test/common/gen-locks/test-pthread-lock.c +++ /dev/null @@ -1,61 +0,0 @@ -/* - * copyright (c) 2001 Clemson University, all rights reserved. - * - * Written by Phil Carns. - * - * This program is free software; you can redistribute it and/or - * modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation; either version 2 of the License, - * or any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * Contact: Phil Carns pcarns@parl.clemson.edu - */ - -#include -#include - -/* gen_locks can be declared and initialized at the same time */ -static gen_mutex_t test_mutex = GEN_MUTEX_INITIALIZER; -static int foo_function(void); - - -int main(int argc, char **argv) { - - gen_mutex_lock(&test_mutex); - /* Access critical region here */ - printf("Critical region 1.\n"); - gen_mutex_unlock(&test_mutex); - - foo_function(); - - return(0); -} - - -/* this function shows how mutex's can be dynamically allocated and - * destroyed */ -static int foo_function(void){ - - gen_mutex_t foo_mutex; - - gen_mutex_init(&foo_mutex); - - gen_mutex_lock(&foo_mutex); - /* Access critical region */ - printf("Critical region 2.\n"); - gen_mutex_unlock(&foo_mutex); - - gen_mutex_destroy(&foo_mutex); - - return(0); -} diff --git a/test/common/pav/pav_check b/test/common/pav/pav_check old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_clean b/test/common/pav/pav_clean old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_create b/test/common/pav/pav_create old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_dist b/test/common/pav/pav_dist old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_info b/test/common/pav/pav_info old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_init b/test/common/pav/pav_init old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_start b/test/common/pav/pav_start old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_stop b/test/common/pav/pav_stop old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_tester b/test/common/pav/pav_tester old mode 100644 new mode 100755 diff --git a/test/common/pav/pav_uninit b/test/common/pav/pav_uninit old mode 100644 new mode 100755 diff --git a/test/configure b/test/configure old mode 100644 new mode 100755 index 6dc7532..ca7835b --- a/test/configure +++ b/test/configure @@ -1,25 +1,82 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.63. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -29,33 +86,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -63,157 +147,391 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -222,7 +540,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -231,39 +570,27 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= @@ -275,46 +602,142 @@ ac_unique_file="correctness/pts/pts.h" # Factoring default headers for most tests. ac_includes_default="\ #include -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include # include #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H # include #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS BUILD_ABSOLUTE_TOP SRC_RELATIVE_TOP SRC_ABSOLUTE_TOP QUIET_COMPILE INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP HAVE_PERL HAVE_FIND HAVE_BISON HAVE_FLEX EGREP INTELC GNUC PVFS2_SRC_RELATIVE_TOP PVFS2_BUILD_RELATIVE_TOP SERVERLIBS PVFS2_TOP_PREFIX MPICC BUILD_MPI MPI_INTELC MPI_GNUC DB_CFLAGS DB_LIB LIBOBJS LTLIBOBJS' +ac_subst_vars='LTLIBOBJS +LIBOBJS +DB_LIB +DB_CFLAGS +MPI_GNUC +MPI_INTELC +BUILD_MPI +MPICC +PVFS2_TOP_PREFIX +SERVERLIBS +PVFS2_BUILD_RELATIVE_TOP +PVFS2_SRC_RELATIVE_TOP +GNUC +INTELC +EGREP +GREP +HAVE_FLEX +HAVE_BISON +HAVE_FIND +HAVE_PERL +CPP +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +QUIET_COMPILE +SRC_ABSOLUTE_TOP +SRC_RELATIVE_TOP +BUILD_ABSOLUTE_TOP +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_verbose_build +with_efence +with_zlib +with_mpi +enable_thread_safety +with_pvfs2_src +with_pvfs2_build +enable_strict +with_db +with_openssl +with_libaio +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -337,34 +760,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -386,33 +823,61 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -439,6 +904,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -463,13 +934,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -534,6 +1008,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -584,26 +1068,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package| sed 's/-/_/g'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -623,7 +1119,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -632,17 +1128,16 @@ Try \`$0 --help' for more information." >&2 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - eval "$ac_envvar='$ac_optarg'" + eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -651,31 +1146,39 @@ done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 + { $as_echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi -# Be sure to have absolute paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -689,7 +1192,7 @@ target=$target_alias if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes @@ -702,75 +1205,77 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$0" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi -if test ! -r $srcdir/$ac_unique_file; then - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + # # Report the --help message. # @@ -798,14 +1303,11 @@ Configuration: -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] -_ACEOF - - cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -815,18 +1317,25 @@ for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -838,6 +1347,7 @@ if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-verbose-build Enables full output during build process @@ -865,126 +1375,97 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory - CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF +ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. - ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF +configure +generated by GNU Autoconf 2.63 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF - exit 0 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1003,7 +1484,7 @@ uname -v = `(uname -v) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1015,8 +1496,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1038,7 +1520,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1049,8 +1530,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1071,9 +1552,7 @@ do -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1084,8 +1563,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. -# WARNING: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1098,20 +1577,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1122,22 +1616,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1149,26 +1649,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >confdefs.h +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1198,18 +1696,24 @@ _ACEOF # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. -if test -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; do +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1219,54 +1723,61 @@ if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1276,19 +1787,15 @@ echo "$as_me: current value: $ac_new_val" >&2;} fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - @@ -1305,34 +1812,45 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu - ac_config_headers="$ac_config_headers pvfs2-test-config.h" +ac_config_headers="$ac_config_headers pvfs2-test-config.h" ac_aux_dir= -for ac_dir in maint $srcdir/maint; do - if test -f $ac_dir/install-sh; then +for ac_dir in maint "$srcdir"/maint; do + if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break - elif test -f $ac_dir/install.sh; then + elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break - elif test -f $ac_dir/shtool; then + elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint $srcdir/maint" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in maint $srcdir/maint" >&2;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&5 +$as_echo "$as_me: error: cannot find install-sh or install.sh in maint \"$srcdir\"/maint" >&2;} { (exit 1); exit 1; }; } fi -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + USR_CFLAGS=$CFLAGS @@ -1348,13 +1866,13 @@ SRC_ABSOLUTE_TOP=`cd $srcdir ; pwd` -# Check whether --enable-verbose-build or --disable-verbose-build was given. +# Check whether --enable-verbose-build was given. if test "${enable_verbose_build+set}" = set; then - enableval="$enable_verbose_build" - QUIET_COMPILE=0 + enableval=$enable_verbose_build; QUIET_COMPILE=0 else QUIET_COMPILE=1 -fi; +fi + @@ -1371,11 +1889,12 @@ fi; # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1394,7 +1913,7 @@ case $as_dir/ in # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1404,30 +1923,43 @@ case $as_dir/ in # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done +IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1445,10 +1977,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1459,34 +1991,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1497,38 +2031,49 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1539,76 +2084,36 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -fi + fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1620,17 +2125,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -1648,24 +2154,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1676,38 +2183,40 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1718,58 +2227,90 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 - (eval $ac_compiler --version &5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 - (eval $ac_compiler -v &5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 - (eval $ac_compiler -V &5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -1788,111 +2329,150 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables +$as_echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } + { (exit 77); exit 77; }; }; } fi ac_exeext=$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. +$as_echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi fi fi -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check the compiler produces executables we can run. If not, either +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will @@ -1901,32 +2481,33 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest$ac_cv_exeext -echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -1944,39 +2525,48 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile +$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -1997,50 +2587,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2056,38 +2650,121 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2103,12 +2780,12 @@ else CFLAGS= fi fi -echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2142,12 +2819,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2162,248 +2844,101 @@ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; return 0; } _ACEOF -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext CC=$ac_save_CC fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:$LINENO: checking whether cc is gcc" >&5 +$as_echo_n "checking whether cc is gcc... " >&6; } +if test "x$GCC" = "x"; then + { { $as_echo "$as_me:$LINENO: error: pvfs2 currently requires gcc as the compiler" >&5 +$as_echo "$as_me: error: pvfs2 currently requires gcc as the compiler" >&2;} + { (exit 1); exit 1; }; } +fi +CFLAGS=$USR_CFLAGS + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -echo "$as_me:$LINENO: checking whether cc is gcc" >&5 -echo $ECHO_N "checking whether cc is gcc... $ECHO_C" >&6 -if test "x$GCC" = "x"; then - { { echo "$as_me:$LINENO: error: pvfs2 currently requires gcc as the compiler" >&5 -echo "$as_me: error: pvfs2 currently requires gcc as the compiler" >&2;} - { (exit 1); exit 1; }; } -fi -CFLAGS=$USR_CFLAGS - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -2417,35 +2952,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2455,34 +2990,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2500,8 +3035,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -2524,35 +3059,35 @@ cat >>conftest.$ac_ext <<_ACEOF #endif Syntax error _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi + rm -f conftest.err conftest.$ac_ext - # OK, works on sane cases. Now check whether non-existent headers + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2562,34 +3097,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi + rm -f conftest.err conftest.$ac_ext done @@ -2598,11 +3133,13 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi ac_ext=c @@ -2613,10 +3150,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_HAVE_PERL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$HAVE_PERL"; then ac_cv_prog_HAVE_PERL="$HAVE_PERL" # Let the user override the test. @@ -2627,32 +3164,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_PERL="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_PERL" && ac_cv_prog_HAVE_PERL="no" fi fi HAVE_PERL=$ac_cv_prog_HAVE_PERL if test -n "$HAVE_PERL"; then - echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 -echo "${ECHO_T}$HAVE_PERL" >&6 + { $as_echo "$as_me:$LINENO: result: $HAVE_PERL" >&5 +$as_echo "$HAVE_PERL" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "find", so it can be a program name with args. set dummy find; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_HAVE_FIND+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$HAVE_FIND"; then ac_cv_prog_HAVE_FIND="$HAVE_FIND" # Let the user override the test. @@ -2663,32 +3202,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_FIND="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_FIND" && ac_cv_prog_HAVE_FIND="no" fi fi HAVE_FIND=$ac_cv_prog_HAVE_FIND if test -n "$HAVE_FIND"; then - echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 -echo "${ECHO_T}$HAVE_FIND" >&6 + { $as_echo "$as_me:$LINENO: result: $HAVE_FIND" >&5 +$as_echo "$HAVE_FIND" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "bison", so it can be a program name with args. set dummy bison; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_HAVE_BISON+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$HAVE_BISON"; then ac_cv_prog_HAVE_BISON="$HAVE_BISON" # Let the user override the test. @@ -2699,32 +3240,34 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_BISON="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_BISON" && ac_cv_prog_HAVE_BISON="no" fi fi HAVE_BISON=$ac_cv_prog_HAVE_BISON if test -n "$HAVE_BISON"; then - echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 -echo "${ECHO_T}$HAVE_BISON" >&6 + { $as_echo "$as_me:$LINENO: result: $HAVE_BISON" >&5 +$as_echo "$HAVE_BISON" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + # Extract the first word of "flex", so it can be a program name with args. set dummy flex; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_HAVE_FLEX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$HAVE_FLEX"; then ac_cv_prog_HAVE_FLEX="$HAVE_FLEX" # Let the user override the test. @@ -2735,48 +3278,169 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_HAVE_FLEX="yes" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS test -z "$ac_cv_prog_HAVE_FLEX" && ac_cv_prog_HAVE_FLEX="no" fi fi HAVE_FLEX=$ac_cv_prog_HAVE_FLEX if test -n "$HAVE_FLEX"; then - echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 -echo "${ECHO_T}$HAVE_FLEX" >&6 + { $as_echo "$as_me:$LINENO: result: $HAVE_FLEX" >&5 +$as_echo "$HAVE_FLEX" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_egrep+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 else - if echo a | (grep -E '(a|b)') >/dev/null 2>&1 - then ac_cv_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2798,35 +3462,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -2882,6 +3543,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include +#include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -2901,36 +3563,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -2952,11 +3628,11 @@ fi for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2969,41 +3645,42 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3014,19 +3691,21 @@ done for ac_header in openssl/evp.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3037,41 +3716,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3080,81 +3756,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3164,19 +3837,21 @@ done for ac_header in openssl/crypto.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3187,41 +3862,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3230,81 +3902,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3314,19 +3983,21 @@ done for ac_header in zlib.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3337,41 +4008,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3380,81 +4048,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3463,8 +4128,8 @@ done INTELC= GNUC= -echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 -echo $ECHO_N "checking whether cc is an Intel compiler... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether cc is an Intel compiler" >&5 +$as_echo_n "checking whether cc is an Intel compiler... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3485,40 +4150,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } INTELC=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$INTELC = x ; then if test x$GCC = xyes ; then GNUC=1 @@ -3528,17 +4190,16 @@ fi -# Check whether --with-efence or --without-efence was given. +# Check whether --with-efence was given. if test "${with_efence+set}" = set; then - withval="$with_efence" - if test x$withval != xyes ; then + withval=$with_efence; if test x$withval != xyes ; then LDFLAGS="${LDFLAGS} -L$withval" fi -echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 -echo $ECHO_N "checking for malloc in -lefence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for malloc in -lefence" >&5 +$as_echo_n "checking for malloc in -lefence... " >&6; } if test "${ac_cv_lib_efence_malloc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lefence $LIBS" @@ -3549,57 +4210,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char malloc (); int main () { -malloc (); +return malloc (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_efence_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_efence_malloc=no + ac_cv_lib_efence_malloc=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 -echo "${ECHO_T}$ac_cv_lib_efence_malloc" >&6 -if test $ac_cv_lib_efence_malloc = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_efence_malloc" >&5 +$as_echo "$ac_cv_lib_efence_malloc" >&6; } +if test "x$ac_cv_lib_efence_malloc" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBEFENCE 1 _ACEOF @@ -3609,21 +4271,22 @@ _ACEOF fi -fi; +fi + -# Check whether --with-zlib or --without-zlib was given. +# Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then - withval="$with_zlib" - if test x$withval != xyes ; then + withval=$with_zlib; if test x$withval != xyes ; then LDFLAGS="${LDFLAGS} -L$withval" fi -fi; -echo "$as_me:$LINENO: checking for adler32 in -lz" >&5 -echo $ECHO_N "checking for adler32 in -lz... $ECHO_C" >&6 +fi + +{ $as_echo "$as_me:$LINENO: checking for adler32 in -lz" >&5 +$as_echo_n "checking for adler32 in -lz... " >&6; } if test "${ac_cv_lib_z_adler32+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $LIBS" @@ -3634,57 +4297,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char adler32 (); int main () { -adler32 (); +return adler32 (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_z_adler32=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_z_adler32=no + ac_cv_lib_z_adler32=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_z_adler32" >&5 -echo "${ECHO_T}$ac_cv_lib_z_adler32" >&6 -if test $ac_cv_lib_z_adler32 = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_adler32" >&5 +$as_echo "$ac_cv_lib_z_adler32" >&6; } +if test "x$ac_cv_lib_z_adler32" = x""yes; then LIBS="${LIBS} -lz" @@ -3697,12 +4361,11 @@ fi -# Check whether --with-mpi or --without-mpi was given. +# Check whether --with-mpi was given. if test "${with_mpi+set}" = set; then - withval="$with_mpi" - if test x$withval = xyes; then - { { echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5 -echo "$as_me: error: --with-mpi must be given a pathname" >&2;} + withval=$with_mpi; if test x$withval = xyes; then + { { $as_echo "$as_me:$LINENO: error: --with-mpi must be given a pathname" >&5 +$as_echo "$as_me: error: --with-mpi must be given a pathname" >&2;} { (exit 1); exit 1; }; } else MPICC="${withval}/bin/mpicc" @@ -3711,61 +4374,61 @@ echo "$as_me: error: --with-mpi must be given a pathname" >&2;} BUILD_MPI="1" fi -fi; +fi + -# Check whether --enable-thread-safety or --disable-thread-safety was given. +# Check whether --enable-thread-safety was given. if test "${enable_thread_safety+set}" = set; then - enableval="$enable_thread_safety" - if test "x$enableval" = "xno" ; then + enableval=$enable_thread_safety; if test "x$enableval" = "xno" ; then CFLAGS="$CFLAGS -D__GEN_NULL_LOCKING__" - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi else CFLAGS="$CFLAGS -D__GEN_POSIX_LOCKING__" - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + +fi -fi; PVFS2_SRC_RELATIVE_TOP="${srcdir}/.." PVFS2_BUILD_RELATIVE_TOP=".." -# Check whether --with-pvfs2-src or --without-pvfs2-src was given. +# Check whether --with-pvfs2-src was given. if test "${with_pvfs2_src+set}" = set; then - withval="$with_pvfs2_src" - if test x$withval = xyes; then - { { echo "$as_me:$LINENO: error: --with-pvfs2-src must be given a pathname" >&5 -echo "$as_me: error: --with-pvfs2-src must be given a pathname" >&2;} + withval=$with_pvfs2_src; if test x$withval = xyes; then + { { $as_echo "$as_me:$LINENO: error: --with-pvfs2-src must be given a pathname" >&5 +$as_echo "$as_me: error: --with-pvfs2-src must be given a pathname" >&2;} { (exit 1); exit 1; }; } else PVFS2_SRC_RELATIVE_TOP="${withval}" PVFS2_BUILD_RELATIVE_TOP="${withval}" fi -fi; +fi + -# Check whether --with-pvfs2-build or --without-pvfs2-build was given. +# Check whether --with-pvfs2-build was given. if test "${with_pvfs2_build+set}" = set; then - withval="$with_pvfs2_build" - if test x$withval = xyes; then - { { echo "$as_me:$LINENO: error: --with-pvfs2-build must be given a pathname" >&5 -echo "$as_me: error: --with-pvfs2-build must be given a pathname" >&2;} + withval=$with_pvfs2_build; if test x$withval = xyes; then + { { $as_echo "$as_me:$LINENO: error: --with-pvfs2-build must be given a pathname" >&5 +$as_echo "$as_me: error: --with-pvfs2-build must be given a pathname" >&2;} { (exit 1); exit 1; }; } else PVFS2_BUILD_RELATIVE_TOP="${withval}" fi -fi; +fi -# Check whether --enable-strict or --disable-strict was given. -if test "${enable_strict+set}" = set; then - enableval="$enable_strict" +# Check whether --enable-strict was given. +if test "${enable_strict+set}" = set; then + enableval=$enable_strict; if test "x$USR_CFLAGS_SET" = "xno"; then CFLAGS="$CFLAGS -g -Wall -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wpointer-arith -Wbad-function-cast" fi @@ -3776,24 +4439,25 @@ if test "x$USR_CFLAGS_SET" = "xno"; then CFLAGS="$CFLAGS -O2" fi -fi; +fi + LDFLAGS="${LDFLAGS} -L${PVFS2_BUILD_RELATIVE_TOP}/lib" CFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}" CPPFLAGS="${CFLAGS} -I${PVFS2_SRC_RELATIVE_TOP} -I${PVFS2_SRC_RELATIVE_TOP}/include -I${PVFS2_BUILD_RELATIVE_TOP}" if test "${ac_cv_header_pvfs2_config_h+set}" = set; then - echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 -echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 +$as_echo_n "checking for pvfs2-config.h... " >&6; } if test "${ac_cv_header_pvfs2_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 +$as_echo "$ac_cv_header_pvfs2_config_h" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking pvfs2-config.h usability" >&5 -echo $ECHO_N "checking pvfs2-config.h usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking pvfs2-config.h usability" >&5 +$as_echo_n "checking pvfs2-config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3804,41 +4468,38 @@ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking pvfs2-config.h presence" >&5 -echo $ECHO_N "checking pvfs2-config.h presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking pvfs2-config.h presence" >&5 +$as_echo_n "checking pvfs2-config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3847,83 +4508,76 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: pvfs2-config.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: pvfs2-config.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: pvfs2-config.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: pvfs2-config.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: pvfs2-config.h: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 -echo $ECHO_N "checking for pvfs2-config.h... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for pvfs2-config.h" >&5 +$as_echo_n "checking for pvfs2-config.h... " >&6; } if test "${ac_cv_header_pvfs2_config_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_cv_header_pvfs2_config_h=$ac_header_preproc fi -echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 -echo "${ECHO_T}$ac_cv_header_pvfs2_config_h" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pvfs2_config_h" >&5 +$as_echo "$ac_cv_header_pvfs2_config_h" >&6; } fi -if test $ac_cv_header_pvfs2_config_h = yes; then +if test "x$ac_cv_header_pvfs2_config_h" = x""yes; then : else - { { echo "$as_me:$LINENO: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&5 -echo "$as_me: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&5 +$as_echo "$as_me: error: \"could not find pvfs2-config.h... must specify path to PVFS2 src with --with-pvfs2-src\"" >&2;} { (exit 1); exit 1; }; } fi @@ -3937,10 +4591,10 @@ PVFS2_TOP_PREFIX=`/bin/sh ${PVFS2_BUILD_RELATIVE_TOP}/src/apps/admin/pvfs2-confi -echo "$as_me:$LINENO: checking for PVFS_sys_create in -lpvfs2" >&5 -echo $ECHO_N "checking for PVFS_sys_create in -lpvfs2... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for PVFS_sys_create in -lpvfs2" >&5 +$as_echo_n "checking for PVFS_sys_create in -lpvfs2... " >&6; } if test "${ac_cv_lib_pvfs2_PVFS_sys_create+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpvfs2 $LIBS" @@ -3951,57 +4605,58 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char PVFS_sys_create (); int main () { -PVFS_sys_create (); +return PVFS_sys_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_lib_pvfs2_PVFS_sys_create=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_lib_pvfs2_PVFS_sys_create=no + ac_cv_lib_pvfs2_PVFS_sys_create=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_lib_pvfs2_PVFS_sys_create" >&5 -echo "${ECHO_T}$ac_cv_lib_pvfs2_PVFS_sys_create" >&6 -if test $ac_cv_lib_pvfs2_PVFS_sys_create = yes; then +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pvfs2_PVFS_sys_create" >&5 +$as_echo "$ac_cv_lib_pvfs2_PVFS_sys_create" >&6; } +if test "x$ac_cv_lib_pvfs2_PVFS_sys_create" = x""yes; then cat >>confdefs.h <<_ACEOF #define HAVE_LIBPVFS2 1 _ACEOF @@ -4009,8 +4664,8 @@ _ACEOF LIBS="-lpvfs2 $LIBS" else - { { echo "$as_me:$LINENO: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&5 -echo "$as_me: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&2;} + { { $as_echo "$as_me:$LINENO: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&5 +$as_echo "$as_me: error: \"could not find libpvfs2... must specify path to PVFS2 installation or build tree with --with-pvfs2-build\"" >&2;} { (exit 1); exit 1; }; } fi @@ -4019,8 +4674,8 @@ fi MPI_INTELC= MPI_GNUC= if test x$BUILD_MPI = x1; then - echo "$as_me:$LINENO: checking whether the mpicc compiler works" >&5 -echo $ECHO_N "checking whether the mpicc compiler works... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether the mpicc compiler works" >&5 +$as_echo_n "checking whether the mpicc compiler works... " >&6; } saveCC="$CC" CC="$MPICC" cat >conftest.$ac_ext <<_ACEOF @@ -4039,43 +4694,40 @@ int ret = MPI_Init(0, (void*)0) } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 - { { echo "$as_me:$LINENO: error: $CC doesn't appear to be a valid MPI compiler" >&5 -echo "$as_me: error: $CC doesn't appear to be a valid MPI compiler" >&2;} + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + { { $as_echo "$as_me:$LINENO: error: $CC doesn't appear to be a valid MPI compiler" >&5 +$as_echo "$as_me: error: $CC doesn't appear to be a valid MPI compiler" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking whether mpicc is an Intel compiler" >&5 -echo $ECHO_N "checking whether mpicc is an Intel compiler... $ECHO_C" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:$LINENO: checking whether mpicc is an Intel compiler" >&5 +$as_echo_n "checking whether mpicc is an Intel compiler... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4096,43 +4748,40 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } MPI_INTELC=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test x$MPI_INTELC = x; then - echo "$as_me:$LINENO: checking whether mpicc is a GNU compiler" >&5 -echo $ECHO_N "checking whether mpicc is a GNU compiler... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking whether mpicc is a GNU compiler" >&5 +$as_echo_n "checking whether mpicc is a GNU compiler... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4153,40 +4802,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } MPI_GNUC=1 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CC="$saveCC" @@ -4196,15 +4842,14 @@ fi -# Check whether --with-db or --without-db was given. +# Check whether --with-db was given. if test "${with_db+set}" = set; then - withval="$with_db" - + withval=$with_db; dbpath=${withval} DB_LDFLAGS= - echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for db library" >&5 +$as_echo_n "checking for db library... " >&6; } oldlibs=$LIBS lib=notfound @@ -4212,78 +4857,85 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldcflags=$CFLAGS for dbheader in db4 db3 notfound; do cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/$dbheader/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/$dbheader/" break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 -echo "$as_me: error: Invalid libdb path specified. No db.h found. +$as_echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -4308,38 +4960,77 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lib=db else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags else + DBDOTH="" + for i in `find /usr/include -name db.h` + do + if test "$i" = "/usr/include/db.h" + then + DBDOTH="" + break + else + DBDOTH="$i" + fi + done + if test "$DBDOTH" != "" + then + DB_CFLAGS="-I `dirname $DBDOTH`" + CFLAGS="$CFLAGS $DB_CFLAGS" + DBPACKAGE=`rpm -qf $DBDOTH` + else + DBPACKAGE="" + fi + + strings /etc/ld.so.cache | grep -q /lib64 + if test "$?" = "0" + then + LIBPATH="/usr/lib64" + else + LIBPATH="/usr/lib" + fi + + for i in `find "$LIBPATH" -name libdb.so` + do + LIBPACKAGE=`rpm -qf $i` + if test "$DBPACKAGE" = "$LIBPACKAGE" + then + LDFLAGS="$LDFLAGS -L"`dirname $i` + fi + done + for lib in db4 db3 db notfound; do LIBS="${oldlibs} -l$lib -lpthread" DB_LIB="-l$lib" @@ -4359,53 +5050,55 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$oldlibs if test "x$lib" = "xnotfound" ; then - { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 -echo "$as_me: error: could not find DB libraries" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +$as_echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6 + { $as_echo "$as_me:$LINENO: result: $lib" >&5 +$as_echo "$lib" >&6; } fi - echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -4437,29 +5130,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 @@ -4467,18 +5156,19 @@ _ACEOF have_dbenv_parameter_to_db_error_callback=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_dbenv_parameter_to_db_error_callback=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +$as_echo_n "checking if third parameter to error callback function is const... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4508,47 +5198,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4575,29 +5262,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -4605,19 +5288,20 @@ _ACEOF have_db_stat_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_db_stat_malloc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4643,29 +5327,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -4673,19 +5353,20 @@ _ACEOF have_txnid_param_to_stat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_txnid_param_to_stat=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +$as_echo_n "checking for txnid parameter to DB open function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4715,45 +5396,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4774,45 +5452,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4834,45 +5509,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4897,45 +5569,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking Berkeley DB version" >&5 -echo $ECHO_N "checking Berkeley DB version... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +$as_echo_n "checking Berkeley DB version... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4961,40 +5630,37 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } HAVE_DB_OLD=0 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } HAVE_DB_OLD=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" else @@ -5002,8 +5668,8 @@ else dbpath="" DB_LDFLAGS= - echo "$as_me:$LINENO: checking for db library" >&5 -echo $ECHO_N "checking for db library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for db library" >&5 +$as_echo_n "checking for db library... " >&6; } oldlibs=$LIBS lib=notfound @@ -5011,78 +5677,85 @@ echo $ECHO_N "checking for db library... $ECHO_C" >&6 oldcflags=$CFLAGS for dbheader in db4 db3 notfound; do cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/$dbheader/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/$dbheader/" break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done if test "x$dbheader" = "xnotfound"; then cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "$dbpath/include/db.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then DB_CFLAGS="-I$dbpath/include/" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. + { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:$LINENO: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&5 -echo "$as_me: error: Invalid libdb path specified. No db.h found. +$as_echo "$as_me: error: Invalid libdb path specified. No db.h found. See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { (exit 1); exit 1; }; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi DB_LDFLAGS="-L${dbpath}/lib" @@ -5107,38 +5780,77 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then lib=db else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$oldcflags else + DBDOTH="" + for i in `find /usr/include -name db.h` + do + if test "$i" = "/usr/include/db.h" + then + DBDOTH="" + break + else + DBDOTH="$i" + fi + done + if test "$DBDOTH" != "" + then + DB_CFLAGS="-I `dirname $DBDOTH`" + CFLAGS="$CFLAGS $DB_CFLAGS" + DBPACKAGE=`rpm -qf $DBDOTH` + else + DBPACKAGE="" + fi + + strings /etc/ld.so.cache | grep -q /lib64 + if test "$?" = "0" + then + LIBPATH="/usr/lib64" + else + LIBPATH="/usr/lib" + fi + + for i in `find "$LIBPATH" -name libdb.so` + do + LIBPACKAGE=`rpm -qf $i` + if test "$DBPACKAGE" = "$LIBPACKAGE" + then + LDFLAGS="$LDFLAGS -L"`dirname $i` + fi + done + for lib in db4 db3 db notfound; do LIBS="${oldlibs} -l$lib -lpthread" DB_LIB="-l$lib" @@ -5158,53 +5870,55 @@ DB *dbp; db_create(&dbp, NULL, 0); } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then break else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext done fi LIBS=$oldlibs if test "x$lib" = "xnotfound" ; then - { { echo "$as_me:$LINENO: error: could not find DB libraries" >&5 -echo "$as_me: error: could not find DB libraries" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find DB libraries" >&5 +$as_echo "$as_me: error: could not find DB libraries" >&2;} { (exit 1); exit 1; }; } else - echo "$as_me:$LINENO: result: $lib" >&5 -echo "${ECHO_T}$lib" >&6 + { $as_echo "$as_me:$LINENO: result: $lib" >&5 +$as_echo "$lib" >&6; } fi - echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 -echo $ECHO_N "checking for dbenv parameter to DB error callback function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for dbenv parameter to DB error callback function" >&5 +$as_echo_n "checking for dbenv parameter to DB error callback function... " >&6; } oldcflags=$CFLAGS CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" cat >conftest.$ac_ext <<_ACEOF @@ -5236,29 +5950,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DBENV_PARAMETER_TO_DB_ERROR_CALLBACK 1 @@ -5266,18 +5976,19 @@ _ACEOF have_dbenv_parameter_to_db_error_callback=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_dbenv_parameter_to_db_error_callback=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_dbenv_parameter_to_db_error_callback" = "xyes" ; then - echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 -echo $ECHO_N "checking if third parameter to error callback function is const... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking if third parameter to error callback function is const" >&5 +$as_echo_n "checking if third parameter to error callback function is const... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5307,47 +6018,44 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_CONST_THIRD_PARAMETER_TO_DB_ERROR_CALLBACK 1 _ACEOF fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$USR_CFLAGS $DB_CFLAGS -Werror" - echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 -echo $ECHO_N "checking for DB stat with malloc function ptr... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for DB stat with malloc function ptr" >&5 +$as_echo_n "checking for DB stat with malloc function ptr... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5374,29 +6082,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_UNKNOWN_PARAMETER_TO_DB_STAT 1 @@ -5404,19 +6108,20 @@ _ACEOF have_db_stat_malloc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_db_stat_malloc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$have_db_stat_malloc" = "xno" ; then - echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 -echo $ECHO_N "checking for txnid parameter to DB stat function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB stat function" >&5 +$as_echo_n "checking for txnid parameter to DB stat function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5442,29 +6147,25 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_STAT 1 @@ -5472,19 +6173,20 @@ _ACEOF have_txnid_param_to_stat=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } have_txnid_param_to_stat=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 -echo $ECHO_N "checking for txnid parameter to DB open function... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for txnid parameter to DB open function" >&5 +$as_echo_n "checking for txnid parameter to DB open function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5514,45 +6216,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_TXNID_PARAMETER_TO_DB_OPEN 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 -echo $ECHO_N "checking for DB_DIRTY_READ flag... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_DIRTY_READ flag" >&5 +$as_echo_n "checking for DB_DIRTY_READ flag... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5573,45 +6272,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_DIRTY_READ 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 -echo $ECHO_N "checking for DB_BUFFER_SMALL error... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for DB_BUFFER_SMALL error" >&5 +$as_echo_n "checking for DB_BUFFER_SMALL error... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5633,45 +6329,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_BUFFER_SMALL 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 -echo $ECHO_N "checking for berkeley db get_pagesize function... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking for berkeley db get_pagesize function" >&5 +$as_echo_n "checking for berkeley db get_pagesize function... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5696,45 +6389,42 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define HAVE_DB_GET_PAGESIZE 1 _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - echo "$as_me:$LINENO: checking Berkeley DB version" >&5 -echo $ECHO_N "checking Berkeley DB version... $ECHO_C" >&6 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + + { $as_echo "$as_me:$LINENO: checking Berkeley DB version" >&5 +$as_echo_n "checking Berkeley DB version... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5760,55 +6450,52 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } HAVE_DB_OLD=0 else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } HAVE_DB_OLD=1 fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$oldcflags" -fi; +fi -# Check whether --with-openssl or --without-openssl was given. -if test "${with_openssl+set}" = set; then - withval="$with_openssl" +# Check whether --with-openssl was given. +if test "${with_openssl+set}" = set; then + withval=$with_openssl; opensslpath=${withval} if test "x${withval}" != "xno"; then - echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for openssl library" >&5 +$as_echo_n "checking for openssl library... " >&6; } if test "x${opensslpath}" != "x"; then CFLAGS="${CFLAGS} -I${opensslpath}/include" @@ -5818,40 +6505,42 @@ echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 LIBS="$LIBS -lcrypto -lssl" cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "openssl/bio.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 -echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Invalid openssl path specified. No openssl/bio.h found." >&5 +$as_echo "$as_me: error: Invalid openssl path specified. No openssl/bio.h found." >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -5869,38 +6558,39 @@ BIO * b; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: could not find openssl libs" >&5 -echo "$as_me: error: could not find openssl libs" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find openssl libs" >&5 +$as_echo "$as_me: error: could not find openssl libs" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext @@ -5912,19 +6602,21 @@ _ACEOF for ac_header in openssl/evp.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5935,41 +6627,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -5978,81 +6667,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6062,19 +6748,21 @@ done for ac_header in openssl/crypto.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6085,41 +6773,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6128,81 +6813,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6212,19 +6894,21 @@ done for ac_header in openssl/sha.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6235,41 +6919,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6278,81 +6959,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6363,45 +7041,47 @@ done else - echo "$as_me:$LINENO: checking for openssl library" >&5 -echo $ECHO_N "checking for openssl library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for openssl library" >&5 +$as_echo_n "checking for openssl library... " >&6; } TMPLIBS=${LIBS} LIBS="$LIBS -lcrypto -lssl" cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ #include "openssl/bio.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +$as_echo "$as_me: WARNING: No openssl headers found." >&2;} fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6419,29 +7099,28 @@ BIO * b; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_OPENSSL 1 @@ -6449,34 +7128,38 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 -echo "$as_me: WARNING: No openssl headers found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: No openssl headers found." >&5 +$as_echo "$as_me: WARNING: No openssl headers found." >&2;} LIBS=${TMPLIBS} fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for ac_header in openssl/evp.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6487,41 +7170,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6530,81 +7210,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6614,19 +7291,21 @@ done for ac_header in openssl/crypto.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6637,41 +7316,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6680,81 +7356,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6764,19 +7437,21 @@ done for ac_header in openssl/sha.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6787,41 +7462,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -6830,81 +7502,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6913,19 +7582,19 @@ done -fi; +fi -# Check whether --with-libaio or --without-libaio was given. -if test "${with_libaio+set}" = set; then - withval="$with_libaio" +# Check whether --with-libaio was given. +if test "${with_libaio+set}" = set; then + withval=$with_libaio; libaiopath=${withval} if test "x${withval}" != "xno"; then - echo "$as_me:$LINENO: checking for libaio library" >&5 -echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for libaio library" >&5 +$as_echo_n "checking for libaio library... " >&6; } if test "x${libaiopath}" != "x"; then CFLAGS="${CFLAGS} -I${libaiopath}/include" @@ -6938,37 +7607,34 @@ echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 #include "libaio.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: Invalid libaio path specified. No libaio.h found." >&5 -echo "$as_me: error: Invalid libaio path specified. No libaio.h found." >&2;} + { { $as_echo "$as_me:$LINENO: error: Invalid libaio path specified. No libaio.h found." >&5 +$as_echo "$as_me: error: Invalid libaio path specified. No libaio.h found." >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -6986,38 +7652,39 @@ io_context_t * b; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: could not find libaio libs" >&5 -echo "$as_me: error: could not find libaio libs" >&2;} + { { $as_echo "$as_me:$LINENO: error: could not find libaio libs" >&5 +$as_echo "$as_me: error: could not find libaio libs" >&2;} { (exit 1); exit 1; }; } fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext @@ -7029,19 +7696,21 @@ _ACEOF for ac_header in libaio.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7052,41 +7721,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7095,81 +7761,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7180,8 +7843,8 @@ done else - echo "$as_me:$LINENO: checking for libaio library" >&5 -echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for libaio library" >&5 +$as_echo_n "checking for libaio library... " >&6; } TMPLIBS=${LIBS} LIBS="$LIBS -laio" @@ -7189,36 +7852,33 @@ echo $ECHO_N "checking for libaio library... $ECHO_C" >&6 #include "libaio.h" _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 -echo "$as_me: WARNING: No libaio headers found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 +$as_echo "$as_me: WARNING: No libaio headers found." >&2;} fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -7236,29 +7896,28 @@ io_context_t * b; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } cat >>confdefs.h <<\_ACEOF #define WITH_AIO 1 @@ -7266,34 +7925,38 @@ _ACEOF else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - { echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 -echo "$as_me: WARNING: No libaio headers found." >&2;} + { $as_echo "$as_me:$LINENO: WARNING: No libaio headers found." >&5 +$as_echo "$as_me: WARNING: No libaio headers found." >&2;} LIBS=${TMPLIBS} fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext for ac_header in libaio.h do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } else # Is the header compilable? -echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7304,41 +7967,38 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } # Is the header present? -echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -7347,81 +8007,78 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi + rm -f conftest.err conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------------------ ## -## Report this to the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ;; esac -echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +as_val=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + if test "x$as_val" = x""yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -7430,13 +8087,15 @@ done -fi; +fi + for d in common io client correctness/pts kernel ; do install -d $d; done - ac_config_files="$ac_config_files Makefile io/trove/module.mk io/buffer/module.mk common/quicklist/module.mk common/id-generator/module.mk common/gossip/module.mk common/gen-locks/module.mk common/misc/module.mk io/bmi/module.mk io/description/module.mk io/flow/module.mk io/job/module.mk io/dev/module.mk client/sysint/module.mk client/mpi-io/module.mk client/vfs/module.mk proto/module.mk server/module.mk server/request-scheduler/module.mk correctness/pts/module.mk correctness/module.mk common/pav/configfile.sample kernel/linux-2.6/module.mk maint/mpi-depend.sh shared/module.mk perfbase/benchmarks/module.mk posix/module.mk" +ac_config_files="$ac_config_files Makefile io/trove/module.mk io/buffer/module.mk common/quicklist/module.mk common/id-generator/module.mk common/gossip/module.mk common/gen-locks/module.mk common/misc/module.mk io/bmi/module.mk io/description/module.mk io/flow/module.mk io/job/module.mk io/dev/module.mk client/sysint/module.mk client/mpi-io/module.mk client/vfs/module.mk proto/module.mk server/module.mk server/request-scheduler/module.mk correctness/pts/module.mk correctness/module.mk common/pav/configfile.sample kernel/linux-2.6/module.mk maint/mpi-depend.sh shared/module.mk perfbase/benchmarks/module.mk posix/module.mk" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -7455,39 +8114,59 @@ _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. -# So, don't put newlines in cache variables' values. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : clear + :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end - /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - : end' >>confcache -if diff $cache_file confcache >/dev/null 2>&1; then :; else - if test -w $cache_file; then - test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + test "x$cache_file" != "x/dev/null" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -7496,32 +8175,18 @@ test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/; -s/:*\${srcdir}:*/:/; -s/:*@srcdir@:*/:/; -s/^\([^=]*=[ ]*\):*/\1/; -s/:*$//; -s/^[^=]*=[ ]*$//; -}' -fi - DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. - ac_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -7530,11 +8195,12 @@ LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -7547,22 +8213,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -7572,33 +8294,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -7606,159 +8355,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)$' \| \ - . : '\(.\)' 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } - /^X\/\(\/\/\)$/{ s//\1/; q; } - /^X\/\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# PATH needs CR, and LINENO needs CR and PATH. -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits +# CDPATH. +$as_unset CDPATH -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' - else - PATH_SEPARATOR=: - fi - rm -f conf$$.sh -fi as_lineno_1=$LINENO as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - case $0 in - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done - - ;; - esac - # We did not find ourselves, most probably we were run as `sh COMMAND' - # in which case we are not to be found in the path. - if test "x$as_myself" = x; then - as_myself=$0 - fi - if test ! -f "$as_myself"; then - { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, and appends trailing '-' during - # substitution so that $LINENO is not a special case at line end. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensible to this). - . ./$as_me.lineno + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" # Exit status is that of the last command. exit } -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln else as_ln_s='cp -p' fi -rm -f conf$$ conf$$.exe conf$$.file +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -7767,7 +8479,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -7776,31 +8509,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - +# values after options handling. +ac_log=" This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7808,45 +8524,44 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages + -V, --version print version number and configuration settings, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -7855,83 +8570,82 @@ Configuration headers: $config_headers Report bugs to ." -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +configured by $0, generated by GNU Autoconf 2.63, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." -srcdir=$srcdir -INSTALL="$INSTALL" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; - -*) + *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; esac case $ac_option in # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2;} - { (exit 1); exit 1; }; };; - --help | --hel | -h ) - echo "$ac_cs_usage"; exit 0 ;; - --debug | --d* | -d ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -7945,57 +8659,73 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "io/trove/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/trove/module.mk" ;; - "io/buffer/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/buffer/module.mk" ;; - "common/quicklist/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/quicklist/module.mk" ;; - "common/id-generator/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/id-generator/module.mk" ;; - "common/gossip/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/gossip/module.mk" ;; - "common/gen-locks/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/gen-locks/module.mk" ;; - "common/misc/module.mk" ) CONFIG_FILES="$CONFIG_FILES common/misc/module.mk" ;; - "io/bmi/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/bmi/module.mk" ;; - "io/description/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/description/module.mk" ;; - "io/flow/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/flow/module.mk" ;; - "io/job/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/job/module.mk" ;; - "io/dev/module.mk" ) CONFIG_FILES="$CONFIG_FILES io/dev/module.mk" ;; - "client/sysint/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/sysint/module.mk" ;; - "client/mpi-io/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/mpi-io/module.mk" ;; - "client/vfs/module.mk" ) CONFIG_FILES="$CONFIG_FILES client/vfs/module.mk" ;; - "proto/module.mk" ) CONFIG_FILES="$CONFIG_FILES proto/module.mk" ;; - "server/module.mk" ) CONFIG_FILES="$CONFIG_FILES server/module.mk" ;; - "server/request-scheduler/module.mk" ) CONFIG_FILES="$CONFIG_FILES server/request-scheduler/module.mk" ;; - "correctness/pts/module.mk" ) CONFIG_FILES="$CONFIG_FILES correctness/pts/module.mk" ;; - "correctness/module.mk" ) CONFIG_FILES="$CONFIG_FILES correctness/module.mk" ;; - "common/pav/configfile.sample" ) CONFIG_FILES="$CONFIG_FILES common/pav/configfile.sample" ;; - "kernel/linux-2.6/module.mk" ) CONFIG_FILES="$CONFIG_FILES kernel/linux-2.6/module.mk" ;; - "maint/mpi-depend.sh" ) CONFIG_FILES="$CONFIG_FILES maint/mpi-depend.sh" ;; - "shared/module.mk" ) CONFIG_FILES="$CONFIG_FILES shared/module.mk" ;; - "perfbase/benchmarks/module.mk" ) CONFIG_FILES="$CONFIG_FILES perfbase/benchmarks/module.mk" ;; - "posix/module.mk" ) CONFIG_FILES="$CONFIG_FILES posix/module.mk" ;; - "pvfs2-test-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-test-config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "pvfs2-test-config.h") CONFIG_HEADERS="$CONFIG_HEADERS pvfs2-test-config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "io/trove/module.mk") CONFIG_FILES="$CONFIG_FILES io/trove/module.mk" ;; + "io/buffer/module.mk") CONFIG_FILES="$CONFIG_FILES io/buffer/module.mk" ;; + "common/quicklist/module.mk") CONFIG_FILES="$CONFIG_FILES common/quicklist/module.mk" ;; + "common/id-generator/module.mk") CONFIG_FILES="$CONFIG_FILES common/id-generator/module.mk" ;; + "common/gossip/module.mk") CONFIG_FILES="$CONFIG_FILES common/gossip/module.mk" ;; + "common/gen-locks/module.mk") CONFIG_FILES="$CONFIG_FILES common/gen-locks/module.mk" ;; + "common/misc/module.mk") CONFIG_FILES="$CONFIG_FILES common/misc/module.mk" ;; + "io/bmi/module.mk") CONFIG_FILES="$CONFIG_FILES io/bmi/module.mk" ;; + "io/description/module.mk") CONFIG_FILES="$CONFIG_FILES io/description/module.mk" ;; + "io/flow/module.mk") CONFIG_FILES="$CONFIG_FILES io/flow/module.mk" ;; + "io/job/module.mk") CONFIG_FILES="$CONFIG_FILES io/job/module.mk" ;; + "io/dev/module.mk") CONFIG_FILES="$CONFIG_FILES io/dev/module.mk" ;; + "client/sysint/module.mk") CONFIG_FILES="$CONFIG_FILES client/sysint/module.mk" ;; + "client/mpi-io/module.mk") CONFIG_FILES="$CONFIG_FILES client/mpi-io/module.mk" ;; + "client/vfs/module.mk") CONFIG_FILES="$CONFIG_FILES client/vfs/module.mk" ;; + "proto/module.mk") CONFIG_FILES="$CONFIG_FILES proto/module.mk" ;; + "server/module.mk") CONFIG_FILES="$CONFIG_FILES server/module.mk" ;; + "server/request-scheduler/module.mk") CONFIG_FILES="$CONFIG_FILES server/request-scheduler/module.mk" ;; + "correctness/pts/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/pts/module.mk" ;; + "correctness/module.mk") CONFIG_FILES="$CONFIG_FILES correctness/module.mk" ;; + "common/pav/configfile.sample") CONFIG_FILES="$CONFIG_FILES common/pav/configfile.sample" ;; + "kernel/linux-2.6/module.mk") CONFIG_FILES="$CONFIG_FILES kernel/linux-2.6/module.mk" ;; + "maint/mpi-depend.sh") CONFIG_FILES="$CONFIG_FILES maint/mpi-depend.sh" ;; + "shared/module.mk") CONFIG_FILES="$CONFIG_FILES shared/module.mk" ;; + "perfbase/benchmarks/module.mk") CONFIG_FILES="$CONFIG_FILES perfbase/benchmarks/module.mk" ;; + "posix/module.mk") CONFIG_FILES="$CONFIG_FILES posix/module.mk" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done + # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely @@ -8006,577 +8736,610 @@ if $ac_need_defaults; then fi # Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, +# simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=' ' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@BUILD_ABSOLUTE_TOP@,$BUILD_ABSOLUTE_TOP,;t t -s,@SRC_RELATIVE_TOP@,$SRC_RELATIVE_TOP,;t t -s,@SRC_ABSOLUTE_TOP@,$SRC_ABSOLUTE_TOP,;t t -s,@QUIET_COMPILE@,$QUIET_COMPILE,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@CPP@,$CPP,;t t -s,@HAVE_PERL@,$HAVE_PERL,;t t -s,@HAVE_FIND@,$HAVE_FIND,;t t -s,@HAVE_BISON@,$HAVE_BISON,;t t -s,@HAVE_FLEX@,$HAVE_FLEX,;t t -s,@EGREP@,$EGREP,;t t -s,@INTELC@,$INTELC,;t t -s,@GNUC@,$GNUC,;t t -s,@PVFS2_SRC_RELATIVE_TOP@,$PVFS2_SRC_RELATIVE_TOP,;t t -s,@PVFS2_BUILD_RELATIVE_TOP@,$PVFS2_BUILD_RELATIVE_TOP,;t t -s,@SERVERLIBS@,$SERVERLIBS,;t t -s,@PVFS2_TOP_PREFIX@,$PVFS2_TOP_PREFIX,;t t -s,@MPICC@,$MPICC,;t t -s,@BUILD_MPI@,$BUILD_MPI,;t t -s,@MPI_INTELC@,$MPI_INTELC,;t t -s,@MPI_GNUC@,$MPI_GNUC,;t t -s,@DB_CFLAGS@,$DB_CFLAGS,;t t -s,@DB_LIB@,$DB_LIB,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5 +$as_echo "$as_me: error: invalid tag $ac_tag" >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - ac_builddir=. -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # We are building in place. ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + ;; + :H) + # + # CONFIG_HEADER + # if test x"$ac_file" != x-; then - if diff $ac_file $tmp/config.h >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi -done -_ACEOF + ;; + + + esac + +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -8598,5 +9361,9 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi diff --git a/test/correctness/pts/run-server b/test/correctness/pts/run-server old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-handler.sh b/test/io/bmi/test-handler.sh old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-lat-tcp.pl b/test/io/bmi/test-lat-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-manymanybig-tcp.pl b/test/io/bmi/test-manymanybig-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-manyonesmall-tcp.pl b/test/io/bmi/test-manyonesmall-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-manyonesmaller-tcp.pl b/test/io/bmi/test-manyonesmaller-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-onemanysmall-tcp.pl b/test/io/bmi/test-onemanysmall-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-onemanysmaller-tcp.pl b/test/io/bmi/test-onemanysmaller-tcp.pl old mode 100644 new mode 100755 diff --git a/test/io/bmi/test-smaller.sh b/test/io/bmi/test-smaller.sh old mode 100644 new mode 100755 diff --git a/test/io/dev/build_mod.sh b/test/io/dev/build_mod.sh old mode 100644 new mode 100755 diff --git a/test/io/job/test-job-client.c b/test/io/job/test-job-client.c old mode 100644 new mode 100755 diff --git a/test/io/job/test-job-server.c b/test/io/job/test-job-server.c old mode 100644 new mode 100755 diff --git a/test/io/job/trove-job-io.c b/test/io/job/trove-job-io.c deleted file mode 100644 index dbf00dd..0000000 --- a/test/io/job/trove-job-io.c +++ /dev/null @@ -1,385 +0,0 @@ -/* - * (C) 2002 Clemson University and The University of Chicago - * - * See COPYING in top-level directory. - */ - -#include -#include -#include -#include - -#include -#include -#include -#include - -#define BUF_SIZE 512 - -char storage_space[SSPACE_SIZE] = "/tmp/trove-test-space"; -char file_system[FS_SIZE] = "fs-foo"; -char path_to_file[PATH_SIZE] = "/iotest"; -TROVE_handle requested_file_handle = 4096; - -extern char *optarg; - -int parse_args(int argc, char **argv); - -int main(int argc, char **argv) -{ - int ret, i; - TROVE_coll_id coll_id; - TROVE_handle file_handle, parent_handle; - TROVE_keyval_s key, val; - char *file_name; - char path_name[PATH_SIZE]; - job_id_t foo_id; - job_status_s job_stat; - char buffer1[BUF_SIZE]; - char buffer2[BUF_SIZE]; - char testkey[] = "foo"; - job_context_id context; - TROVE_extent cur_extent; - TROVE_handle_extent_array extent_array; - - ret = parse_args(argc, argv); - if (ret < 0) { - fprintf(stderr, "argument parsing failed.\n"); - return -1; - } - - ret = trove_initialize( - TROVE_METHOD_DBPF, NULL, storage_space, 0); - if (ret < 0) { - fprintf(stderr, "initialize failed.\n"); - return -1; - } - - /* TODO: this is temporary; just pulling in BMI and flow symbols that are - * needed for job library */ - ret = BMI_initialize("bogus", NULL, 0); - if(ret > -1) - { - fprintf(stderr, "BMI_initialize() succeeded when it shouldn't have.\n"); - return(-1); - } - ret = PINT_flow_initialize("bogus", 0); - if(ret > -1) - { - fprintf(stderr, "flow_initialize() succeeded when it shouldn't have.\n"); - return(-1); - } - - ret = job_initialize(0); - if(ret < 0) - { - fprintf(stderr, "job_initialize() failure.\n"); - return(-1); - } - - ret = job_open_context(&context); - if(ret < 0) - { - fprintf(stderr, "job_open_context() failure.\n"); - return(-1); - } - - - /* try to look up collection used to store file system */ - ret = job_trove_fs_lookup(file_system, NULL, 0, &job_stat, &foo_id, - context); - if(ret < 0) - { - fprintf(stderr, "fs lookup failed.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "fs lookup failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after fs_lookup.\n"); - return(-1); - } - - coll_id = job_stat.coll_id; - - /* find the parent directory name */ - strcpy(path_name, path_to_file); - for (i=strlen(path_name); i >= 0; i--) { - if (path_name[i] != '/') path_name[i] = '\0'; - else break; - } - file_name = path_to_file + strlen(path_name); - printf("path is %s\n", path_name); - printf("file is %s\n", file_name); - - /* find the parent directory handle */ - ret = path_lookup(coll_id, path_name, &parent_handle); - if (ret < 0) { - return -1; - } - - /* TODO: verify that this is in fact a directory! */ - - /* Q: how do I know what handle to use for the new file? */ - cur_extent.first = cur_extent.last = requested_file_handle; - extent_array.extent_count = 1; - extent_array.extent_array = &cur_extent; - ret = job_trove_dspace_create(coll_id, - &extent_array, - TROVE_TEST_FILE, - NULL, - TROVE_SYNC, - NULL, - 0, - &job_stat, - &foo_id, - context); - if(ret < 0) - { - fprintf(stderr, "job_trove_dspace_create() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "dspace_create failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after dspace_create.\n"); - return(-1); - } - - file_handle = job_stat.handle; - - /* TODO: set attributes of file? */ - - /* add new file name/handle pair to parent directory */ - key.buffer = file_name; - key.buffer_sz = strlen(file_name) + 1; - val.buffer = &file_handle; - val.buffer_sz = sizeof(file_handle); - - ret = job_trove_keyval_write(coll_id, parent_handle, &key, - &val, 0, NULL, NULL, 0, &job_stat, &foo_id, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_keyval_write() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "dspace_create failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after keyval_write.\n"); - return(-1); - } - - /* create a small buffer and tag it with know values so that we - * can verify correctness later - */ - for(i=0; i<(BUF_SIZE/sizeof(int)); i++) - { - ((int*)buffer1)[i] = i; - } - memset(buffer2, 0, BUF_SIZE); - - /* try to write this buffer into a key/val pair */ - key.buffer = testkey; - key.buffer_sz = strlen(testkey) + 1; - val.buffer = buffer1; - val.buffer_sz = BUF_SIZE; - - ret = job_trove_keyval_write(coll_id, file_handle, &key, - &val, 0, NULL, NULL, 0, &job_stat, &foo_id, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_keyval_write() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "dspace_create failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after keyval_write.\n"); - return(-1); - } - - /* read the buffer back out of a key/val pair */ - key.buffer = testkey; - key.buffer_sz = strlen(testkey) + 1; - val.buffer = buffer2; - val.buffer_sz = BUF_SIZE; - - ret = job_trove_keyval_read(coll_id, file_handle, &key, - &val, 0, NULL, NULL, 0, &job_stat, &foo_id, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_keyval_read() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "keyval_read failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after keyval_read.\n"); - return(-1); - } - - if(0 != memcmp(buffer1, buffer2, BUF_SIZE)) - { - fprintf(stderr, "failed buffer verification for keyval!\n"); - return(-1); - } - memset(buffer2, 0, BUF_SIZE); - - /* remove the key/val entry */ - ret = job_trove_keyval_remove(coll_id, file_handle, &key, NULL, - 0, NULL, NULL, 0, &job_stat, &foo_id, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_keyval_remove() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "keyval_remove failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after keyval_remove.\n"); - return(-1); - } - - /* write the buffer out into the bytestream space */ - ret = job_trove_bstream_write_at(coll_id, file_handle, 0, - buffer1, BUF_SIZE, 0, NULL, NULL, 0, &job_stat, &foo_id, - context); - if(ret < 0) - { - fprintf(stderr, "job_trove_bstream_write_at() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_bstream_write_at() failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after bstream_write_at.\n"); - return(-1); - } - - /* read the buffer out into the bytestream space */ - ret = job_trove_bstream_read_at(coll_id, file_handle, 0, - buffer2, BUF_SIZE, 0, NULL, NULL, 0, &job_stat, &foo_id, - context); - if(ret < 0) - { - fprintf(stderr, "job_trove_bstream_read_at() failure.\n"); - return(-1); - } - if(ret == 0) - { - ret = block_on_job(foo_id, NULL, &job_stat, context); - if(ret < 0) - { - fprintf(stderr, "job_trove_bstream_read_at() failed (at job_test()).\n"); - return(-1); - } - } - if(job_stat.error_code) - { - fprintf(stderr, "job status error after bstream_read_at.\n"); - return(-1); - } - - if(0 != memcmp(buffer1, buffer2, BUF_SIZE)) - { - fprintf(stderr, "failed buffer verification for keyval!\n"); - return(-1); - } - - job_close_context(context); - job_finalize(); - trove_finalize(TROVE_METHOD_DBPF); - - return 0; -} - -int parse_args(int argc, char **argv) -{ - int c; - - while ((c = getopt(argc, argv, "s:c:p:h:")) != EOF) { - switch (c) { - case 's': - strncpy(storage_space, optarg, SSPACE_SIZE); - break; - case 'c': /* collection */ - strncpy(file_system, optarg, FS_SIZE); - break; - case 'p': - strncpy(path_to_file, optarg, PATH_SIZE); - case 'h': - requested_file_handle = atoll(optarg); - break; - case '?': - default: - return -1; - } - } - return 0; -} - -/* - * Local variables: - * c-indent-level: 4 - * c-basic-offset: 4 - * End: - * - * vim: ts=8 sts=4 sw=4 expandtab - */ diff --git a/test/kernel/linux-2.6/pvfs2-shell-test.sh b/test/kernel/linux-2.6/pvfs2-shell-test.sh index 4928c1c..ddcf3dc 100644 --- a/test/kernel/linux-2.6/pvfs2-shell-test.sh +++ b/test/kernel/linux-2.6/pvfs2-shell-test.sh @@ -1138,7 +1138,7 @@ PVFS2_TESTDIR=$PVFS2_MNT/__testdir cd $PVFS2_MNT -if test "x$ORIG_DIR" = "x`pwd`"; then +if test "x$ORIG_DIR" = "x`pwd`" && test "x$PVFS2_MNT" != "x$ORIG_DIR"; then echo "Cannot change directory to $PVFS_MNT" error_exit; fi diff --git a/test/maint/config.guess b/test/maint/config.guess old mode 100644 new mode 100755 diff --git a/test/maint/config.sub b/test/maint/config.sub old mode 100644 new mode 100755 diff --git a/test/maint/install-sh b/test/maint/install-sh old mode 100644 new mode 100755 diff --git a/test/maint/missing b/test/maint/missing old mode 100644 new mode 100755 diff --git a/test/maint/mpi-depend.sh.in b/test/maint/mpi-depend.sh.in old mode 100644 new mode 100755 diff --git a/test/perfbase/perfbase-web-input b/test/perfbase/perfbase-web-input old mode 100644 new mode 100755 diff --git a/test/perfbase/run-perfbase-tests b/test/perfbase/run-perfbase-tests old mode 100644 new mode 100755 diff --git a/test/posix/getdents.c b/test/posix/getdents.c old mode 100644 new mode 100755 diff --git a/test/posix/openg-test b/test/posix/openg-test old mode 100644 new mode 100755 diff --git a/test/posix/rdwr.sh b/test/posix/rdwr.sh old mode 100644 new mode 100755 diff --git a/test/posix/rdwrx.sh b/test/posix/rdwrx.sh old mode 100644 new mode 100755 diff --git a/test/posix/readdir.sh b/test/posix/readdir.sh old mode 100644 new mode 100755 diff --git a/test/posix/stat.sh b/test/posix/stat.sh old mode 100644 new mode 100755 diff --git a/test/prepare b/test/prepare old mode 100644 new mode 100755 diff --git a/test/run-nightly b/test/run-nightly old mode 100644 new mode 100755 diff --git a/test/run-nightly-setup b/test/run-nightly-setup old mode 100644 new mode 100755 index ef9ef2b..f896ef4 --- a/test/run-nightly-setup +++ b/test/run-nightly-setup @@ -2,32 +2,50 @@ if [ $# -lt 1 ]; then echo "Usage: $0 " - echo " e.g. $0 HEAD Orange-Branch" + echo " e.g. $0 stable trunk" exit 0 fi -CVSTAGS=$* +SVNTAGS=$1 export PATH_SUFFIX=$(cd `dirname $0`;pwd) -echo "Running nightly tests for ${CVSTAGS}" +echo "Running nightly tests for ${SVNTAGS}" -cvsroot=:pserver:anonymous@cvs.parl.clemson.edu:/anoncvs run_nightly_scripts="pvfs2/test/run-nightly pvfs2/maint/build pvfs2/test/automated" #remove existing files cd $PATH_SUFFIX -sudo /bin/rm -rf ~+/pvfs2 +sudo /bin/rm -rf `pwd`/pvfs2 +mkdir -p pvfs2/test +mkdir -p pvfs2/maint/build #checkout needed directories and files to run the nightly process -cvs -Q -d $cvsroot co -rOrange-Branch $run_nightly_scripts +cd ${PATH_SUFFIX}/pvfs2/maint +svn export --force -q http://www.orangefs.org/svn/orangefs/${SVNTAGS}/maint/build if [ $? != 0 ] then - echo "Failed to retrieve scripts from CVS" + echo "Failed to export maint/build directory from SVN" + exit 1 +fi + +cd ${PATH_SUFFIX}/pvfs2/test +svn export --force -q http://www.orangefs.org/svn/orangefs/${SVNTAGS}/test/run-nightly +if [ $? != 0 ] +then + echo "Failed to export the run-nightly file from SVN" + exit 1 +fi + +svn export --force -q http://www.orangefs.org/svn/orangefs/${SVNTAGS}/test/automated +if [ $? != 0 ] +then + echo "Failed to export test/automated directory from SVN" exit 1 fi -cd ~+/pvfs2/test -./run-nightly $CVSTAGS +cd ${PATH_SUFFIX}/pvfs2/test +echo "Current working directory is `pwd`" +#./run-nightly $SVNTAGS exit diff --git a/test/scripts/checklogs.pl b/test/scripts/checklogs.pl new file mode 100755 index 0000000..85663af --- /dev/null +++ b/test/scripts/checklogs.pl @@ -0,0 +1,191 @@ +#!/usr/bin/perl + + +# List of test names - Can be easily expanded + +#running sysint scripts +my @sysint_tests = qw( +cp +misc +mkdir-sysint +ping +symlink-sysint +zerofill +); + +#running vfs scripts +my @vfs_tests = qw( +append +append2 +bonnie +dbench +fdtree +fstest +fsx +iozone +ltp +mkdir-vfs +shelltest +symlink-vfs +tail +vfs-cp +); + +#mpi tests +my @mpi_tests = qw( +functions +heidelberg-IO +ior-mpiio +ior-mpiio-2 +ior-mpiio-3 +mpi-io-test +noncontig +romio-async +romio-coll_test +romio-error +romio-excl +romio-file_info +romio-noncontig_coll2 +romio-psimple +romio-simple +romio-split_coll +romio-status +stadler-file-view-test ); + +#index into table of testnames - start at -1 in case tests not run +my $sysint_idx = -1; +my $vfs_idx = -1; +my $mpi_idx = -1; + +# number of tests passed and failed +my $failed = 0; +my $passed = 0; + +# parameters: logfile + +open (LOGFILE,$ARGV[0]) || die "Could not open logfile $ARGV[0]"; + +# open the logfile + +while () + { +# print $_; + $line = $_; + chomp($line); + + # whitespace - skip + if ( $line eq "" ) + { + next; + } + # did we run sysint tests? + if ($line =~ /running sysint scripts/) + { + #set the index to 0 so that we can check the individual tests + $sysint_idx = 0; + next; + } + #print "checking sysint test number $sysint_idx $sysint_tests[$sysint_idx]\n"; + + # test all the sysint scripts in the table + if ( $sysint_idx >= 0 && $sysint_idx < @sysint_tests) + { + #print "checking sysint test number $sysint_idx $sysint_tests[$sysint_idx]\n"; + if ($line =~ /${sysint_tests[$sysint_idx]}(.*)FAILED/) + { + print "Test ${sysint_tests[$sysint_idx]} FAILED!\n"; + $failed++; + + } + elsif ($line =~ /${sysint_tests[$sysint_idx]}(.*)OK/) + { + $passed++; + } + $sysint_idx++; + next; + } + + # did we run vfs tests? + if ($line =~ /running vfs scripts/) + { + #print "vfs found"; + $vfs_idx = 0; + next; + } + #print "checking sysint test number $sysint_idx $sysint_tests[$sysint_idx]\n"; + + # test all the vfs scripts in the table + if ( $vfs_idx >= 0 && $vfs_idx < @vfs_tests) + { + #print "checking vfs test number $vfs_idx $vfs_tests[$vfs_idx]\n"; + if ($line =~ /${vfs_tests[$vfs_idx]}(.*)FAILED/) + { + print "Test ${vfs_tests[$vfs_idx]} FAILED!\n"; + $failed++; + + } + elsif ($line =~ /${vfs_tests[$vfs_idx]}(.*)OK/) + { + $passed++; + } + $vfs_idx++; + next; + } + + # did we run mpi tests? + if ($line =~ /running mpi scripts/) + { + #print "mpi found"; + $mpi_idx = 0; + next; + } + + # test all the mpi scripts in the table + if ( $mpi_idx >= 0 && $mpi_idx < @mpi_tests) + { + #print "checking sysint test number $mpi_idx $mpi_tests[$mpi_idx]\n"; + if ($line =~ /${mpi_tests[$mpi_idx]}(.*)FAILED/) + { + print "Test ${mpi_tests[$mpi_idx]} FAILED!\n"; + $failed++; + } + elsif ($line =~ /${mpi_tests[$mpi_idx]}(.*)OK/) + { + $passed++; + } + $mpi_idx++; + next; + } + # did we run userlib tests? Same as VFS tests + if ($line =~ /running userlib scripts/) + { + #print "vfs found"; + $vfs_idx = 0; + next; + } + #print "checking sysint test number $sysint_idx $sysint_tests[$sysint_idx]\n"; + + # test all the vfs scripts in the table + if ( $vfs_idx >= 0 && $vfs_idx < @vfs_tests) + { + #print "checking vfs test number $vfs_idx $vfs_tests[$vfs_idx]\n"; + if ($line =~ /${vfs_tests[$vfs_idx]}(.*)FAILED/) + { + print "Test ${vfs_tests[$vfs_idx]} (userlib) FAILED!\n"; + $failed++; + + } + elsif ($line =~ /${vfs_tests[$vfs_idx]}(.*)OK/) + { + $passed++; + } + $vfs_idx++; + next; + } + } + +print "\n"; +print "Number of tests passed = $passed\n"; +print "Number of tests failed = $failed\n"; + +exit $failed diff --git a/test/scripts/cpi.sh b/test/scripts/cpi.sh new file mode 100755 index 0000000..fef1c74 --- /dev/null +++ b/test/scripts/cpi.sh @@ -0,0 +1,168 @@ +#!/bin/bash + +#arguments will come from calling program +#runalltests [-v][-m][-d][-a IPADDRESS][-s SVNBRANCH][-i IMAGE][-c EC2CONFFILE][-k KEYNAME][-f KEYFILE] + +# subroutine for generating instances. + +# euca create instance +# verify instance is running +# return ip address of instance. + + + + +DATE=`date -u +'%Y%m%d'` +DATETIME=`date -u +'%Y%m%d-%H.%M.%S'` +#export VMUSER=ec2-user +VMUSER=ubuntu +#export VMSYSTEM=sl6-mpi +VMSYSTEM= + +NEWINSTANCE=1 + + +while getopts i:a:hc:n:k:f:t: arguments +do + case $arguments in + h) + echo "This script creates prepared instances (with all updates and prereqs) for Orange FS" + echo "cpi.sh [-n NUMBER_INSTANCES][-i IMAGE][-t FLAVOR][-c EC2CONFFILE][-k KEYNAME][-f KEYFILE]" + echo "" + echo "Examples: " + echo "" + echo "cpi.sh -n 2 -i cloud-ubuntu-12.04 -t c1.small -c ~/ec2rc.sh -k JamesB -f ~/jamesb.pem" + echo "" + + ;; + i) + VMSYSTEM=$OPTARG + ;; + c) + EC2CONFFILE=$OPTARG + ;; + k) + KEYNAME=$OPTARG + ;; + f) + KEYFILE=$OPTARG + ;; + n) + NUMBER_INSTANCES=$OPTARG + ;; + t) + VMTYPE=$OPTARG + ;; + esac +done + +#the parameters will change, but the basic functionality will not +echo "DATE is ${DATE}" +echo "SVNBRANCH is ${SVNBRANCH}" +echo "NEWINSTANCE is ${NEWINSTANCE}" +echo "EC2CONFFILE is $EC2CONFFILE" +echo "KEYNAME is $KEYNAME" +echo "VMSYSTEM is $VMSYSTEM" +echo "VMTTYPE is $VMTYPE" +echo "NUMBER_INSTANCES is $NUMBER_INSTANCES" + +echo "RUN_MPI_TEST is $RUN_MPI_TEST" +echo "RUN_VFS_TEST is $RUN_VFS_TEST" +echo "VMIPADDR is $VMIPADDR" +echo "DELETE_INSTANCE is $DELETE_INSTANCE" + + +export SVNBRANCH +export NEWINSTANCE +export VMSYSTEM + +export RUN_VFS_TEST +export RUN_MPI_TEST +export KEYFILE +export KEYNAME +export EC2CONFFILE +export DELETE_INSTANCE + +#Determine VM User from system +case $VMSYSTEM in + + cloud-*buntu*|cloud-*mint*) + VMUSER=ubuntu + ;; + cloud-rhel*|cloud-centos*|cloud-sl6*|cloud-fedora*|cloud-*suse) + VMUSER=ec2-user + ;; + *) + echo "System $VMSYSTEM not supported." + exit 1 +esac + +echo "VMUSER is $VMUSER" +export VMUSER + + +SVNBRANCH_SHORT=`echo $SVNBRANCH | awk -F"/" '{print $NF}'` + +#Look for configuration file +if [ ! -f ${EC2CONFFILE} ] ; then + echo "EC2 Configuration file $EC2CONFFILE not found." + exit 1 +fi + +#Look for Keyfile +if [ ! -f ${KEYFILE} ] ; then + echo "KEYFILE $KEYFILE not found." + exit 1 +fi + +#test keypairs +euca-describe-keypairs --config=${EC2CONFFILE} --filter key-name=$KEYNAME + +if [ $? != 0 ] +then + echo "Keyname $KEYNAME not found." + exit 1 +fi + +#here are the parameters. Hard coded for now, but will change + +# +. ./instancefunctions.sh + +#create the VM +#exit 0 +if [ ${NEWINSTANCE} != 0 ] +then + generate_instances $NUMBER_INSTANCES $VMTYPE + +fi +#Now grab the IP Address of the new instance +VMIPADDRARR=( $(for i in ${VMINSTANCEARR[@]}; do euca-describe-instances instance-id=$i --config ${EC2CONFFILE}; done | grep INSTANCE | awk '{ print $13 }') ) +VMINSTANCENAMEARR=( $(for i in ${VMINSTANCEARR[@]}; do euca-describe-instances instance-id=$i --config ${EC2CONFFILE}; done | grep INSTANCE | awk '{ print $4 }') ) + +VMIPADDR=${VMIPADDRARR[0]} + +echo "VM IP ADDRESS is ${VMIPADDR}" + +VFS_HOSTS=`echo ${VMINSTANCENAMEARR[@]}` + +echo "VFS_HOSTS are $VFS_HOSTS" + +for i in ${VMIPADDRARR[@]} +do + echo "Removing obsolete ssh host records at ~/.ssh/known_hosts for $i." + ssh-keygen -f ~/.ssh/known_hosts -R $i + + # prepare each instance on a separate process. + prepare_instance $i & + +done +wait + +for i in ${VMIPADDRARR[@]} +do + + #Verify all instances are running before continuing. + check_instance $i + +done diff --git a/test/scripts/instancefunctions.sh b/test/scripts/instancefunctions.sh new file mode 100755 index 0000000..aabf121 --- /dev/null +++ b/test/scripts/instancefunctions.sh @@ -0,0 +1,94 @@ +#!/bin/bash + +check_instance() { + + #$1 = ipaddress + + ssh -i $KEYFILE ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no true 2> /dev/null + + #is SSH responding? + until [ $? -eq 0 ] + do + sleep 10 + ssh -i $KEYFILE ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no true 2> /dev/null + done +} + +generate_instances() { + + # Parameter $1 number of instances + # Parameter $2 type of system + echo "Generating $1 new instances of $VMSYSTEM" + echo "euca-run-instances -n $1 --config ${EC2CONFFILE} --debug -k $KEYNAME -t $2 $VMSYSTEM > newinstance.out 2> newinstance.err" + + euca-run-instances -n $1 --config ${EC2CONFFILE} --debug -k $KEYNAME -t $2 $VMSYSTEM > newinstance.out 2> newinstance.err + + if [ $? -ne 0 ] + then + echo "Could not create instance of $VMSYSTEM. Exiting" + exit 1 + fi + + VMINSTANCEARR=( $(cat newinstance.out | grep INSTANCE | awk '{print $2}') ) + + + # primary instance is first instance + VMINSTANCEID=${VMINSTANCEARR[0]} + + #wait 20 seconds to start instance + sleep 20 + + # now verify the instance is running + for i in ${VMINSTANCEARR[@]} + do + echo "VM Instance of $VMSYSTEM requested. Instance id is ${i}" + + RUNNING=`euca-describe-instances instance-id=${i} --config ${EC2CONFFILE} | grep INSTANCE | awk '{ print $6 }'` + + until [ "$RUNNING" == "running" ] + do + RUNNING=`euca-describe-instances instance-id=${i} --config ${EC2CONFFILE} | grep INSTANCE | awk '{ print $6 }'` + sleep 10 + echo "Instance ${i} is ${RUNNING}" + if [ $RUNNING == "error" ] + then + echo "Error in creating ${i}. Bailing out." + exit 1 + fi + done + done + + +} + + + +prepare_instance() { + + # $1 = ipaddress + # install all system updates and reboot + check_instance $i + + #upload keyfile to instance - will need later + rsync -a -e "ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ${KEYFILE} ${VMUSER}@${i}:/home/${VMUSER}/ + + #update the instance + # run scripted via bash -s to work around remote issues + (echo "script update-cloud.txt" && cat ./update-cloud.sh) > update-cloud.scr + ssh -i ${KEYFILE} ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "VMSYSTEM=${VMSYSTEM} bash -s" < update-cloud.scr + + # add sleep to fix timing issue on rhel6 based distros. + sleep 15 + check_instance $i + + ssh -i ${KEYFILE} ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no 'echo System rebooted. Test system is `uname -a`' + + echo "Preparing the image for testing..." + + # run scripted via bash -s to work around remote issues + (echo "script prepare-cloud.txt" && cat ./prepare-cloud.sh) > prepare-cloud.scr + echo "ssh -i ${KEYFILE} ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \"VMSYSTEM=${VMSYSTEM} bash -s\" < prepare-cloud.scr " + + + ssh -i ${KEYFILE} ${VMUSER}@$1 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "VMSYSTEM=${VMSYSTEM} bash -s" < ./prepare-cloud.scr +} diff --git a/test/scripts/prepare-cloud.sh b/test/scripts/prepare-cloud.sh new file mode 100644 index 0000000..7fc2917 --- /dev/null +++ b/test/scripts/prepare-cloud.sh @@ -0,0 +1,117 @@ +#!/bin/bash + +# use: prepare-cloud + +# must script to work around sudo issue + +if [ $1 ] +then + VMSYSTEM=$1 +fi + +CHOICE=$VMSYSTEM + +# get the architecture +if [[ $CHOICE =~ 'i386' ]] +then + ARCH=i386 +else + ARCH=x86_64 +fi + +SYSTEM=`echo $CHOICE | sed s/^cloud-// | sed s/-i386//` + +# switch on Choice + +# ubuntu/debian based distributions + +case $CHOICE in + cloud-*buntu*|cloud-*mint*|cloud-debian*) + + echo "Preparing Ubuntu based distribution $CHOICE" + + sudo apt-get update > /dev/null + #documentation needs to be updated. linux-headers needs to be added for ubuntu! + sudo apt-get install -y -q gcc g++ flex bison libssl-dev linux-source perl make linux-headers-`uname -r` zip subversion automake autoconf < /dev/null + + + #prepare source + SOURCENAME=`find /usr/src -name "linux-source*" -type d -prune -printf %f` + cd /usr/src/${SOURCENAME} + sudo tar -xjf ${SOURCENAME}.tar.bz2 &> /dev/null + cd ${SOURCENAME}/ + sudo cp /boot/config-`uname -r` .config + sudo make oldconfig &> /dev/null + sudo make prepare &>/dev/null + + #install torque + echo "Installing TORQUE from apt-get" + sudo apt-get install -y -q torque-server torque-scheduler torque-client < /dev/null + + #break + ;; + cloud-*suse*) + + echo "Preparing SUSE based distribution $CHOICE" + + echo "Installing prereqs via zypper..." + #sudo yum -y install gcc gcc-c++ flex bison openssl-devel db4-devel kernel-devel-`uname -r` kernel-headers-`uname -r` perl make subversion automake autoconf zip &> yum.out + zypper --non-interactive install gcc gcc-c++ flex bison libopenssl-devel kernel-source kernel-syms kernel-devel perl make subversion automake autoconf zip + #install db4 + + cd /usr/src/linux-`uname -r | sed s/-[\d].*//` + sudo cp /boot/config-`uname -r` .config + sudo make oldconfig &> /dev/null + sudo make modules_prepare &>/dev/null + sudo ln -s /lib/modules/`uname -r`/build/Module.symvers /lib/modules/`uname -r`/source + + + echo "Installing TORQUE from devorange: " + echo "wget -r -np -nd http://devorange.clemson.edu/pvfs/${SYSTEM}/RPMS/${ARCH}/" + wget -r -np -nd http://devorange.clemson.edu/pvfs/${SYSTEM}/RPMS/${ARCH}/ + #cd devorange.clemson.edu/pvfs/openSUSE-12.2/RPMS/x86_64 + ls *.rpm + sudo rpm -e libtorque2 + sudo rpm -ivh *.rpm + cd - + + # break + ;; + + cloud-rhel*|cloud-centos*|cloud-sl6*|cloud-fedora*) + + echo "Preparing RedHat based distribution $CHOICE" + + echo "Installing prereqs via yum..." + sudo yum -y install gcc gcc-c++ flex bison openssl-devel db4-devel kernel-devel-`uname -r` kernel-headers-`uname -r` perl make subversion automake autoconf zip &> yum.out + + + echo "Installing TORQUE from devorange: " + echo "wget -r -np -nd http://devorange.clemson.edu/pvfs/${SYSTEM}/RPMS/${ARCH}/" + wget -r -np -nd http://devorange.clemson.edu/pvfs/${SYSTEM}/RPMS/${ARCH}/ + ls *.rpm + sudo rpm -ivh torque*.rpm + + ;; + *) + echo "System $CHOICE not supported." + exit 1 + exit 1 + ;; +esac + +#install db4 - all systems +echo "Downloading Berkeley DB 4.8.30 from devorange.clemson.edu..." +cd ~ +wget -q http://devorange.clemson.edu/pvfs/db-4.8.30.tar.gz +tar zxf db-4.8.30.tar.gz &> /dev/null +cd db-4.8.30/build_unix +echo "Configuring Berkeley DB 4.8.30..." +../dist/configure --prefix=/opt/db4 &> db4conf.out +echo "Building Berkeley DB 4.8.30..." +make &> db4make.out +echo "Installing Berkeley DB 4.8.30 to /opt/db4..." +sudo make install &> db4install.out +exit +exit + diff --git a/test/scripts/run-test.sh b/test/scripts/run-test.sh new file mode 100755 index 0000000..53c125c --- /dev/null +++ b/test/scripts/run-test.sh @@ -0,0 +1,19 @@ +#!/bin/bash +export VFS_HOSTS +export RUN_MPI_TEST +export RUN_VFS_TEST +export SVNBRANCH +export WITH_DB=/opt/db4 +export LD_LIBRARY_PATH=$WITH_DB/lib +mkdir ~/test2 +cd ~/test2 +echo svn export --force -q http://www.orangefs.org/svn/orangefs/${SVNBRANCH}/test/run-nightly-setup +svn export --force -q http://www.orangefs.org/svn/orangefs/${SVNBRANCH}/test/run-nightly-setup +./run-nightly-setup ${SVNBRANCH} +cd ~/test2/pvfs2/test +ls +./run-nightly ${SVNBRANCH} +echo "Run nightly completed. Exiting." +exit +exit +exit diff --git a/test/scripts/runalltests b/test/scripts/runalltests new file mode 100755 index 0000000..cc047dd --- /dev/null +++ b/test/scripts/runalltests @@ -0,0 +1,243 @@ +#!/bin/bash + +#arguments will come from calling program +#runalltests [-v][-m][-d][-a IPADDRESS][-s SVNBRANCH][-i IMAGE][-c EC2CONFFILE][-k KEYNAME][-f KEYFILE] + +# subroutine for generating instances. + +# euca create instance +# verify instance is running +# return ip address of instance. + + + + +DATE=`date -u +'%Y%m%d'` +DATETIME=`date -u +'%Y%m%d-%H.%M.%S'` +#export VMUSER=ec2-user +VMUSER=ubuntu +#export VMSYSTEM=sl6-mpi +VMSYSTEM= + +NEWINSTANCE=1 + + +while getopts s:i:a:dvhumc:k:f:n:t: arguments +do + case $arguments in + h) + echo "runalltests [-v][-m][-u][-d][-a IPADDRESS][-s SVNBRANCH][-i IMAGE][-t FLAVOR][[-n NUMBER_INSTANCES]-c EC2CONFFILE][-k KEYNAME][-f KEYFILE]" + echo "" + echo "Examples: " + echo "" + echo "runalltests -vmd -s branches/stable -i cloud-ubuntu-12.04 -t c1.small -n 2 -c ~/ec2rc.sh -k JamesB -f ~/jamesb.pem" + echo "" + echo "This runs all tests against branches/stable, including vfs and mpi, on an new instance of Ubuntu 12.04LTS and deletes the instance upon completion." + echo "" + echo "runalltests -vmd -s trunk -i cloud-rhel6 -t c1.small -n 2 -c ~/ec2rc.sh -k JamesB -f ~/jamesb.pem" + echo "" + echo "This runs just the sysint and build tests against trunk on a running Redhat Enterprise Linux 6 instance at 10.20.102.30" + echo "" + ;; + s) + SVNBRANCH=$OPTARG + ;; + a) + VMIPADDR=$OPTARG + NEWINSTANCE=0 + ;; + i) + VMSYSTEM=$OPTARG + ;; + v) + #echo "Running VFS tests" + RUN_VFS_TEST=1 + ;; + m) + #echo "Running MPI tests" + RUN_MPI_TEST=1 + ;; + u) + #echo "Running userlib tests" + RUN_USERLIB_TEST=1 + ;; + c) + EC2CONFFILE=$OPTARG + ;; + k) + KEYNAME=$OPTARG + ;; + f) + KEYFILE=$OPTARG + ;; + d) + DELETE_INSTANCE=1 + ;; + n) + NUMBER_INSTANCES=$OPTARG + ;; + t) + VMTYPE=$OPTARG + ;; + esac +done + +#the parameters will change, but the basic functionality will not +echo "DATE is ${DATE}" +echo "SVNBRANCH is ${SVNBRANCH}" +echo "NEWINSTANCE is ${NEWINSTANCE}" +echo "EC2CONFFILE is $EC2CONFFILE" +echo "KEYNAME is $KEYNAME" +echo "VMSYSTEM is $VMSYSTEM" +echo "VMTYPE is $VMTYPE" +echo "NUMBER_INSTANCES is $NUMBER_INSTANCES" + +echo "RUN_MPI_TEST is $RUN_MPI_TEST" +echo "RUN_VFS_TEST is $RUN_VFS_TEST" +echo "RUN_USERLIB_TEST is $RUN_USERLIB_TEST" +echo "VMIPADDR is $VMIPADDR" +echo "DELETE_INSTANCE is $DELETE_INSTANCE" + + +export SVNBRANCH +export NEWINSTANCE +export VMSYSTEM + +export RUN_VFS_TEST +export RUN_MPI_TEST +export RUN_USERLIB_TEST +export KEYFILE +export KEYNAME +export EC2CONFFILE +export DELETE_INSTANCE + +#Determine VM User from system +case $VMSYSTEM in + + cloud-*buntu*|cloud-*mint*) + VMUSER=ubuntu + ;; + cloud-rhel*|cloud-centos*|cloud-sl6*|cloud-fedora*|cloud-*suse) + VMUSER=ec2-user + ;; + *) + echo "System $VMSYSTEM not supported." + exit 1 +esac + +echo "VMUSER is $VMUSER" +export VMUSER + + +SVNBRANCH_SHORT=`echo $SVNBRANCH | awk -F"/" '{print $NF}'` + +#Look for configuration file +if [ ! -f ${EC2CONFFILE} ] ; then + echo "EC2 Configuration file $EC2CONFFILE not found." + exit 1 +fi + +#Look for Keyfile +if [ ! -f ${KEYFILE} ] ; then + echo "KEYFILE $KEYFILE not found." + exit 1 +fi + +#test keypairs +euca-describe-keypairs --config=${EC2CONFFILE} --filter key-name=$KEYNAME + +if [ $? != 0 ] +then + echo "Keyname $KEYNAME not found." + exit 1 +fi + +#here are the parameters. Hard coded for now, but will change + +# +. ./instancefunctions.sh + +#create the VM +#exit 0 +if [ ${NEWINSTANCE} != 0 ] +then + + generate_instances $NUMBER_INSTANCES $VMTYPE + +fi + +#Now grab the IP Address of the new instance +VMIPADDRARR=( $(for i in ${VMINSTANCEARR[@]}; do euca-describe-instances instance-id=$i --config ${EC2CONFFILE}; done | grep INSTANCE | awk '{ print $13 }') ) +VMINSTANCENAMEARR=( $(for i in ${VMINSTANCEARR[@]}; do euca-describe-instances instance-id=$i --config ${EC2CONFFILE}; done | grep INSTANCE | awk '{ print $4 }') ) + +VMIPADDR=${VMIPADDRARR[0]} + +echo "VM IP ADDRESS is ${VMIPADDR}" + +VFS_HOSTS=`echo ${VMINSTANCENAMEARR[@]}` + +echo "VFS_HOSTS are $VFS_HOSTS" + +for i in ${VMIPADDRARR[@]} +do + echo "Removing obsolete ssh host records at ~/.ssh/known_hosts for $i." + ssh-keygen -f ~/.ssh/known_hosts -R $i + + # prepare each instance on a separate process. + prepare_instance $i & + +done +wait + +for i in ${VMIPADDRARR[@]} +do + + #Verify all instances are running before continuing. + check_instance $i + +done + + +echo "" +echo "Running tests..." + +# run scripted via bash -s to work around remote issues +(echo "script run-test.txt" && cat ./run-test.sh) > run-test.scr + +echo ssh -i ${KEYFILE} ${VMUSER}@${VMIPADDR} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "VFS_HOSTS='${VFS_HOSTS}' RUN_USERLIB_TEST=${RUN_USERLIB_TEST} RUN_VFS_TEST=${RUN_VFS_TEST} RUN_MPI_TEST=${RUN_MPI_TEST} SVNBRANCH=${SVNBRANCH} bash -s " < ./run-test.scr + +ssh -i ${KEYFILE} ${VMUSER}@${VMIPADDR} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "VFS_HOSTS='${VFS_HOSTS}' RUN_VFS_TEST=${RUN_VFS_TEST} RUN_USERLIB_TEST=${RUN_USERLIB_TEST} RUN_MPI_TEST=${RUN_MPI_TEST} SVNBRANCH=${SVNBRANCH} bash -s " < ./run-test.scr + +echo "Grabbing logs and scripts from server" +rsync -a -e "ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ${VMUSER}@${VMIPADDR}:/tmp/${VMUSER}/pvfs2-nightly/${DATE}/${SVNBRANCH}/*.log logs-$DATETIME/ +rsync -a -e "ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ${VMUSER}@${VMIPADDR}:/home/${VMUSER}/*.txt logs-$DATETIME/ +rsync -a -e "ssh -i ${KEYFILE} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" ${VMUSER}@${VMIPADDR}:/home/${VMUSER}/*.out logs-$DATETIME/ + +# create link to latest logs so that buildbot can find them. +rm `pwd`/logs-current +ln -s `pwd`/logs-$DATETIME `pwd`/logs-current + +echo "Processing the logs" +./checklogs.pl `pwd`/logs-$DATETIME/alltests-${SVNBRANCH_SHORT}.log + + + +if [ $? -ne 0 ] +then + #if the log check failed, bailout before deleteing instance + echo "Some tests failed. Please check `pwd`/logs-$DATETIME/alltests-$SVNBRANCH_SHORT for more details." + #echo "Instance $VMINSTANCEID at $VMIPADDR NOT deleted." + #exit 1 +fi + +#if successful, delete the VM +if [ ${DELETE_INSTANCE} ] +then + for my_instance in ${VMINSTANCEARR[@]} + do + echo "Deleting instance $my_instance." + euca-terminate-instances --config=$EC2CONFFILE $my_instance + done + +fi + diff --git a/test/scripts/update-cloud.sh b/test/scripts/update-cloud.sh new file mode 100644 index 0000000..d6e9694 --- /dev/null +++ b/test/scripts/update-cloud.sh @@ -0,0 +1,66 @@ +#!/bin/bash + +# must script to work around sudo issue + + +CHOICE=$VMSYSTEM + +# get the architecture +if [[ $CHOICE =~ 'i386' ]] +then + ARCH=i386 +else + ARCH=x86_64 +fi + +SYSTEM=`echo $CHOICE | sed s/^cloud-// | sed s/-i386//` + +# switch on Choice + +# ubuntu/debian based distributions + +case $CHOICE in + cloud-*buntu*|cloud-*mint*|cloud-debian*) + + echo "Downloading system updates for ubuntu based system $CHOICE..." + sudo apt-get -y -q update + sudo apt-get -y -q dist-upgrade < /dev/null + echo "Update successful. Rebooting image..." + sudo reboot + # break + ;; + + cloud-*suse*) + + echo "Downloading system updates for suse based system $CHOICE..." + #sudo yum update --disableexcludes=main -y + sudo zypper --non-interactive update + echo "Update successful. Rebooting image..." + sudo /sbin/reboot + # break + ;; + + cloud-rhel*|cloud-centos*|cloud-sl6*|cloud-fedora*) + + echo "Downloading system updates for RedHat based system $CHOICE..." + sudo yum update --disableexcludes=main -y + # Uninstall the old kernel + echo "Removing old kernel `uname -r`..." + sudo rpm -e kernel-`uname -r` + #Update grub from current kernel to installed kernel + echo "Updating /boot/grub/grub.conf to kernel `rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel`" + sudo perl -e "s/`uname -r`/`rpm -q --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}\n' kernel`/g" -p -i /boot/grub/grub.conf + echo "Update successful. Rebooting image..." + sudo reboot + # break + ;; + *) + echo "System $CHOICE not supported." + exit 1 + exit 1 + ;; +esac + +exit +exit + diff --git a/test/shared/test-common.c b/test/shared/test-common.c index 85bbf21..4747d9b 100644 --- a/test/shared/test-common.c +++ b/test/shared/test-common.c @@ -100,7 +100,7 @@ int create_pvfs2tab_file( /* Construct unique name for pvfstab file (use the pid to make it unique) */ - retval = snprintf(buffer, sizeof(buffer), "/usr/tmp/pvfs2tab_%d", getpid()); + retval = snprintf(buffer, sizeof(buffer), "/tmp/pvfs2tab_%d", getpid()); if ((retval+1) > sizeof(buffer)) /* retval does not include NULL terminator */ { print_error("Internal variable \"buffer\" too short.\n" @@ -463,8 +463,12 @@ int create_file( PVFS_credentials credentials; struct file_ref stFileRef; + /* Remove the file before trying to create it */ + printf("\tRemoving file if it exists. Any errors may be safely ignored."); + remove_file(fileName, use_pvfs2_lib, verbose); if(verbose) { printf("\tCreating [%s] using mode [%o]\n", fileName, mode); } - + + if(use_pvfs2_lib) { ret = PVFS_util_resolve(fileName, @@ -532,6 +536,28 @@ int create_directory( if(use_pvfs2_lib) { + /* Remove the directory before creating it. */ + printf("\tRemoving directory if it exists. Any errors may be safely ignored."); + if(verbose) + { + snprintf(cmd, sizeof(cmd), "%spvfs2-rm %s", pvfsEXELocation, directory); + } + else + { + /* Make sure nothing prints to STDOUT/STDERR if verbose mode is off */ + snprintf(cmd, sizeof(cmd), "%spvfs2-rm %s >/dev/null 2>&1", pvfsEXELocation, directory); + } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } + ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } + + if(verbose) { snprintf(cmd, sizeof(cmd), "%spvfs2-mkdir -m %o %s", pvfsEXELocation, mode, directory); @@ -541,7 +567,15 @@ int create_directory( /* Make sure nothing prints to STDOUT/STDERR if verbose mode is off */ snprintf(cmd, sizeof(cmd), "%spvfs2-mkdir -m %o %s >/dev/null 2>&1", pvfsEXELocation, mode, directory); } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { ret = -ENODATA; /* Set to a generic return code, since errno not @@ -554,7 +588,11 @@ int create_directory( } else { - ret = mkdir(directory, mode); + /* A bit naive, but these test directories should be empty*/ + printf("\tRemoving directory if it exists. Any errors may be safely ignored."); + ret = rmdir(directory); + + ret = mkdir(directory, mode); if(ret != 0) { ret = errno; /* Save errno for return */ @@ -600,7 +638,15 @@ int remove_directory( snprintf(cmd, sizeof(cmd), "%spvfs2-rm %s >/dev/null 2>&1", pvfsEXELocation, directory); } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { ret = -ENODATA; /* Save the error number */ @@ -670,7 +716,15 @@ int remove_file( { snprintf(cmd, sizeof(cmd), "%spvfs2-rm %s >/dev/null 2>&1", pvfsEXELocation, fileName); } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { ret = -ENODATA; @@ -679,7 +733,8 @@ int remove_file( } else { - ret = unlink(fileName); + + ret = unlink(fileName); if(ret != 0) { ret = errno; @@ -726,7 +781,15 @@ int change_mode( snprintf(cmd, sizeof(cmd), "%spvfs2-chmod %o %s >/dev/null 2>&1", pvfsEXELocation, mode, fileName); } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { ret = -ENODATA; @@ -849,7 +912,15 @@ int change_owner( } } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { if(use_pvfs2_lib) @@ -1332,8 +1403,12 @@ int create_symlink( int ret=0; char cmd[PATH_MAX] = ""; + /* Remove symlink first */ + remove_symlink(linkName,use_pvfs2_lib,verbose); + if(verbose) { printf("\tCreating symlink [%s] to [%s]:\n", linkName, linkTarget); } + if(use_pvfs2_lib) { if(verbose) @@ -1346,7 +1421,15 @@ int create_symlink( snprintf(cmd, sizeof(cmd), "%spvfs2-ln -s %s %s >/dev/null 2>&1", pvfsEXELocation, linkTarget, linkName); } + if(verbose) + { + printf("\nRUNNING->%s ", cmd); + } ret = system(cmd); + if(verbose) + { + printf("RETURNS->%d\n",ret); + } if(ret != 0) { ret = -ENODATA;